SyntaxWarning: invalid escape sequence '\$'
bjsowa opened this issue · comments
Whenever I run xacro on ROS Rolling and Ubuntu Noble, I get this stderr output:
/opt/ros/rolling/lib/python3.12/site-packages/xacro/__init__.py:558: SyntaxWarning: invalid escape sequence '\$'
default_value = '''\$\{.*?\}|\$\(.*?\)|(?:'.*?'|\".*?\"|[^\s'\"]+)+|'''
/opt/ros/rolling/lib/python3.12/site-packages/xacro/__init__.py:559: SyntaxWarning: invalid escape sequence '\s'
re_macro_arg = re.compile(r'^\s*([^\s:=]+?)\s*:?=\s*(\^\|?)?(' + default_value + ')(?:\s+|$)(.*)')
If I build this package locally (version 2.0.10) I only get these warnings upon building.
I'm invoking xacro in command substitution in launch file like this:
<param name="robot_description" value="$(command 'xacro $(var model)')" />
The ros2 launch command complains about the stderr output and stops execution. This breaks the whole startup procedure of my robot.
I believe the fix to this was implemented in #336 but it was only commited to noetic-devel
branch. Could you please backport the fix to ros2
branch and release a new version of the package to rosdistro?
Release done: ros/rosdistro#40424