How can I use arg to add a node to a urdf.xacro?
I use the $(arg foo) syntax to change some values in a urdf.xacro file to adapt the urdf to different robots. This works fine if I just want to replace a string like a position (e.g.
<origin xyz="-0.05 -0.20 -0.038" rpy="($arg rpy_joint_1)/>
but I also want to be able to a a full xml node. I'd like to have a urdf.xacro that looks like
<link name="link_foo" />
$(arg bla)
<link name="link_bar" />
If an additional link is present, 'bar' would contain the whole link definition (maybe also with a joint definition), otherwise it would just be empty. Unfortunately, xacro ignores args that are not already within an xml-node (other than <robot>)
Has anyone managed to get this done?