ros / xacro

Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Home Page:http://www.ros.org/wiki/xacro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$(find) no longer resolved after other args

adamheins opened this issue · comments

On the noetic-devel branch, resolving substitution arguments was outsourced to roslaunch. This resolves $(find) after other arguments like $(arg) (see here), which means I do things like pass $(find) into an argument. For example:

<xacro:arg name="robotfile" default="default.urdf.xacro"/>
<xacro:include filename="$(arg robotfile)"/>

and then I could pass in something like robotfile:=$(find mypkg)/urdf/robot.urdf.xacro, and expect the included filename to ultimately be resolved properly through the $(arg) and $(find).

On the ros2 branch, this logic has been changed so that the above no longer works for me. I'm wondering if this change was intended, or if I'm just doing something wrong here.

Fixed via #339. Do you need a release? Into which ROS2 distros?

Thanks, that does it! I don't actually need a release; I came across this while working on xacrodoc, which is a small tool that modifies xacro to (1) have more support for programmatically compiling files, and (2) makes the package-lookup mechanism fully functional even without ROS.