Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to refer to propeties using macro prefixes?

I have properties of the form:

<xacro:property name="x_origin" value=".."/>
<xacro:property name="y_origin" value=".."/>
<xacro:property name="z_origin" value=".."/>

and I want to achieve something among these lines:

<xacro:macro name="make_joint" params="prefix">
    <joint name="${prefix}_joint" type="revolute">
         <origin rpy="0 0 0" xyz="${${prefix}_origin}}"/>
         <parent link="base_link"/>
         <child link="${prefix}_link"/>
         <axis xyz="1 0 0"/>
         <limit effort="40" lower="0" upper="280" velocity="10.0"/>
    </joint>
</xacro:macro>

Is there some way to acieve this ${} nesting in xacro ?