Convert xacro to sdf when catkin_make is used
Hi all,
I have a model defined in xacro file with gazebo extension, similar to files rrbot.xacro and rrbot.gazebo as described in this tutorial. In my project I sometimes want to use urdf and sometimes sdf, which I generate using the following commands:
rosrun xacro xacro --inorder -o rrbot.urdf rrbot.xacro
gz sdf -p rrbot.urdf > rrbot.sdf
The problem is that mesh paths in sdf are absolute. This is inconvenient if I want to share my package. Is there a way to automatically convert rrbot.xacro to rrbot.sdf, for example when I build all packages using catkin_make?
Even though this is more a Gazebo problem (and would be best posted on Gazebo Answers): that's not really/necessarily true.
See How to include uri relatively? fi.
That's what I did, but the relative path is converted to absolute by
rosrun ...
. However, the following path definitionmodel://low_poly_paddle.stl
stays relative even after conversion. I think this is a good enough solution for me!