Open Doomerdinger opened 11 months ago
There are some use cases where being able to specify the prefix in the non-macro xacro file is useful.
Could you give an example where this would be useful?
As you already write yourself, this .xacro
file is supposed to be a top-level one and is not meant for composition. I'm having a hard time coming up with a use-case for a prefix.
An example would be when using external tooling to compose URDFs, but still wanting to utilize existing xacro files alongside/within those tools.
By virtue of what those tools are attempting, they essentially must be able to parse URDF properly, but may not support parsing/resolving xacro macros.
In such cases, it can be useful to have a top-level xacro file that essentially wraps the macro more or less 1:1, so that xacro
itself can be called on that top-level file and the resulting valid URDF file fed into the other tool.
There are some use cases where being able to specify the prefix in the non-macro xacro file is useful.
Adding this should have no impact on any existing use cases.
I can add this argument to the other "concrete" xacro files, but I believe in nearly all cases where this is relevant the user will favor using the generic file anyway.
As a side note, this argument is provided in the non-macro file of the ROS2 description repo.