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

Revision history [back]

click to hide/show revision 1
initial version

Xacro evaluates everything that is inside ${} so the variables inside an expression will be evaluated automatically. As a result xacro doesn't support nested ${}.

For example: this fails:
<origin rpy="${${pi} / 2 * -1} 0 0" xyz="0 ${${reflect} * 0.1175} -0.074"/>

but this succeeds with the expected result:
<origin rpy="${pi / 2 * -1} 0 0" xyz="0 ${reflect * 0.1175} -0.074"/>

Hope this helps