input xacro name in xacro file
hi, i want to implement this :
<?xml version="1.0" ?>
<robot name="robot1" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:arg name="robot" default="error"/>
<xacro:include filename="robots/$(arg robot)_macro.xacro"/>
<xacro:${arg robot} prefix="robot1_"/>
</robot>
this of course won't work cause ${arg robot} as xacro:name is not recognized.
Any way to implement this way? with the robot name as an argument?
Thanks
well, i have no idea if this could work, but for argument substitution you need regular braces, not curly ones, like you did in the include:
$(arg robot)
. Have you tried with that?The code you have written is not self explanatory, it is not obvious what you want to achieve here. In any case here is a ros answer with some discussion on passing arguments to xacro https://answers.ros.org/question/38956