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

Leading double underscores in xacro:property name are no longer considered valid

danielcranston opened this issue · comments

Using Melodic.

Steps to reproduce:

xacro `rospack find ur_e_description`/urdf/ur5e_robot.urdf.xacro

When using ros-melodic-xacro = 1.13.8-1bionic.20200828.181628, this works fine. However, after upgrading to the newest version (1.13.13-2bionic.20210921.204552), I get this:

$ xacro `rospack find ur_e_description`/urdf/ur5e_robot.urdf.xacro
Use of invalid name(s):  __kinematics 
when evaluating expression '__kinematics['shoulder']['roll']'
when instantiating macro: ur5e_robot (/home/daniel/ws/src/universal_robot/ur_e_description/urdf/ur5e.urdf.xacro)
in file: /home/daniel/ws/src/universal_robot/ur_e_description/urdf/ur5e_robot.urdf.xacro

After renaming the property in the offending urdf.xacro file from __kinematics to kinematics, the problem disappears.


My conclusion is that some version after 1.13.8-1bionic.20200828.181628 breaks backwards compatibility wrt double underscores in xacro:property names. Is this a bug, or an intended change?

Yes, double underscores in property names are no longer allowed for security reasons. See the CHANGELOG.
The main UR repository fixed its URDFs appropriately: UniversalRobots/Universal_Robots_ROS2_Driver#166.
Looks like the ROS Industrial repo is still missing these updates.