How to refer to propeties using macro prefixes?

asked 2018-03-17 14:15:17 -0500

veritas gravatar image

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"/>

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

edit retag flag offensive close merge delete


I was thinking about the same a few days ago, i tried it as well and hoped it would work out, maybe we get an answer for a workaround or

JaFeKl gravatar image JaFeKl  ( 2018-03-17 14:24:50 -0500 )edit