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

Revision history [back]

Writing a xacro file is more about making creating a maintainable file than an efficient one. The only ROS package (AFAIK) that reads xacro files is xacro, which converts them to macroless URDF. So you don't gain anything computationally from making a xacro. In fact, you lose some small bit of efficiency by dynamically generating from a xacro.

However, what you gain is maintainability. By creating macros and constants, you make it easier to edit and add to an existing model. If you're done creating your model, and are confident it won't change, then there's probably no need. Otherwise, you'll probably end up saving time in the long run if you create a xacro.