ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I think this should be able to do what you want. Xacro offers parameterized macros:

http://wiki.ros.org/urdf/Tutorials/Using%20Xacro%20to%20Clean%20Up%20a%20URDF%20File#Parameterized_Macro

I think this should be able to do what you want. Xacro offers parameterized macros:macros (specifically the "params" attribute in the macro definition):

http://wiki.ros.org/urdf/Tutorials/Using%20Xacro%20to%20Clean%20Up%20a%20URDF%20File#Parameterized_Macro

<xacro:macro name="blue_shape" params="name *shape">
           <link name="${name}">
               ....

I think the parameter functionality with simple concatenation (in the constants section http://wiki.ros.org/urdf/Tutorials/Using%20Xacro%20to%20Clean%20Up%20a%20URDF%20File#Constants):

<link name=”${robotname}s_leg” />

I think this should be able to do what you want. Xacro offers parameterized macros (specifically the "params" attribute in the macro definition):

http://wiki.ros.org/urdf/Tutorials/Using%20Xacro%20to%20Clean%20Up%20a%20URDF%20File#Parameterized_Macro

<xacro:macro name="blue_shape" params="name *shape">
           <link name="${name}">
name="${name}_blue">
               ....

I think the parameter functionality with simple concatenation (in the constants section http://wiki.ros.org/urdf/Tutorials/Using%20Xacro%20to%20Clean%20Up%20a%20URDF%20File#Constants):

<link name=”${robotname}s_leg” />

I think this should be able to do what you want. Xacro offers parameterized macros (specifically the "params" attribute in the macro definition):

http://wiki.ros.org/urdf/Tutorials/Using%20Xacro%20to%20Clean%20Up%20a%20URDF%20File#Parameterized_Macro

<xacro:macro name="blue_shape" params="name *shape">
params="name">
           <link name="${name}_blue">
name="${name}">
               ....

I think the parameter functionality with simple concatenation (in the constants section http://wiki.ros.org/urdf/Tutorials/Using%20Xacro%20to%20Clean%20Up%20a%20URDF%20File#Constants):

<link name=”${robotname}s_leg” />