why use xacro to generate a single file? #331
-
My question may be silly, but I do not understand why use a macro to generate a single file ???? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Not a silly question at all. If you are referring to the use of All robot support packages contain -- per robot variant -- a top-level If we only ship And the reason we only ship So even if, in the end, the top-level By using a slightly more complex setup, we cover both use-cases and it keeps everything following the same conventions, structure and layout. |
Beta Was this translation helpful? Give feedback.
-
Closing due to inactivity. |
Beta Was this translation helpful? Give feedback.
Not a silly question at all.
If you are referring to the use of
xacro
in theload_...launch
files: ROS-Industrial robot support packages are all structured in a similar way.All robot support packages contain -- per robot variant -- a top-level
.xacro
file which does nothing more than instantiate the model using itsxacro:macro
, and a file defining thatxacro:macro
(in the..._macro.xacro
file).If we only ship
.xacro
s, we have to usexacro
to convert it to plain URDF so it can be loaded into therobot_description
parameter.And the reason we only ship
.xacro
s is because we want these robot support packages to be as useful as possible. If we'd only provide.urdf
s, the models could not be …