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

To answer my own question #1 - Yes, macros can be recursive. My error was that I put the includes for the referenced xacro files under the xacro:macro name="..." line.

The correct way is:

<robot xmlns:xacro="http://ros.org/wiki/xacro">
  <include filename="$(find abb_common)/urdf/irb_5400_macro.xacro" /> 
  <xacro:macro name="generate_robot" params="robot_name" >
    <xacro:irb_5400 prefix="${robot_name}"/>

Make sure all the includes are above the macro declaration!