xacro: parametrable constants?
Hi.
I'm working on a robotic arm and I have this code block 5 times in my urdf file:
<!-- arm_1 link -->
<link name="arm_1_link">
<inertial>
<mass value="${arm_1_link_mass}" />
<inertia ixx="0.010" ixy="0.000" ixz="0.000" iyy="0.010" iyz="0.000" izz="0.010" />
</inertial>
<visual>
<geometry>
<mesh filename="package://youbot_description/meshes/arm_joint_1.dae"/>
</geometry>
</visual>
</link>
<!-- arm_1 joint -->
<joint name="arm_1_joint" type="revolute">
<origin xyz="${arm_1_link_pose_x} ${arm_1_link_pose_y} ${arm_1_link_pose_z}"
rpy="${arm_1_link_orient_r} ${arm_1_link_orient_p} ${arm_1_link_orient_y}" />
<parent link="arm_base_link"/>
<child link="arm_1_link" />
<axis xyz="${arm_1_axis}" />
<limit lower="${arm_1_limit_min}" upper="${arm_1_limit_max}"
effort="${arm_joint_effort}" velocity="${arm_joint_velocity}" />
</joint>
I would like to use a smart macro to only have one block called 5 times. I would ideally only use the joint number as a parameter. The values are stored on another file in xacro:property.
The issue: how to transform this ${arm_1_limit_min} with a parameter? ${arm_${param_name}_limit_min} does not work.
Thanks for your answers!