WHY XACRO
Large descriptions need reuse and parameterization.
Properties
Reuse constants instead of repeating values throughout the model.
Macros
Generate repeated links, joints, sensors and subsystems from templates.
Includes
Compose a robot from files owned by different packages or subsystems.
Arguments
Generate variants from explicit inputs such as prefixes, grippers or simulation mode.
Conditions
Include or omit portions of the generated model based on configuration.
Expressions
Calculate values during generation instead of hand-authoring every derivative.
PIPELINE
A Xacro file is source code for a description build.
For provenance, keep both the inputs and the expanded artifact. Includes, arguments and conditions can change the final robot description, so counts or claims extracted from raw Xacro are not automatically claims about the generated URDF.
OPENRGD
Expand first, then import the artifact that was actually consumed.
The canonical OpenRGD importer consumes URDF evidence, not the Xacro macro language itself. A reproducible pipeline records Xacro source and parameters, expands it deterministically, then imports the resulting URDF while keeping the generation provenance.