Simply put, after install the ROS noetic:
rosrun xacro xacro xxx.urdf.xacro > xxx.urdf
A little bit comments:
Though we are considering design a new universal format to replace URDF, for the historical reason, we still need to support it. What makes URDF frustrating to use is that most robot assets in the community is defined by XACRO!
So to use URDF, you have to convert the XACRO first.
But if you want to convert XACRO, you have to:
- install ROS
- learn how to put the xxx_description into a ros workspace: mkdir -p ~/catkin_ws/src FYI.
- pray for this package does not rely on too many strange external lib.
- hope the xacro is actually working! (you may surprisingly find, the working portion is really low…)
After a long time, I still do not get why robot community adopts such an ugly format like xacro. If URDF is too cumbersome to use, just abandoning XML! I blame this to gazebo.