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

ROS Noetic xacro issue - Cannot load command parameter [robot_description] returned with code [2]

asked 2022-03-22 17:02:57 -0500

sugumarp gravatar image

updated 2022-04-30 13:42:51 -0500

lucasw gravatar image

OS: Ubuntu 20.04.4 LTS Kernel: Linux 5.13.0-35-generic Architecture: x86-64 ROS distro: ROS Noetic

I am trying to launch my turtlebot3 for a school assignment in the gazebo simulator using the following command:

roslaunch rob521_lab3 turtlebot3_world.launch

However, I am getting the following error:

xacro: in-order processing became default in ROS Melodic. You can drop the option.
substitution args not supported:  No module named 'defusedxml'
when processing file: /home/sug/catkin_ws/src/rob521_lab3/urdf/turtlebot3_waffle_pi.urdf.xacro
RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/noetic/lib/xacro/xacro', '--inorder', '/home/sug/catkin_ws/src/rob521_lab3/urdf/turtlebot3_waffle_pi.urdf.xacro']] returned with code [2]. 

Param xml is <param name="robot_description" command="$(find xacro)/xacro --inorder $(find rob521_lab3)/urdf/turtlebot3_$(arg model).urdf.xacro"/>
The traceback for the exception was written to the log file

I have been trying to search various other forums and threads and most say to modify the .launch file relating to the parameter for "robot description". However, I was unable to modify the launch file param line in any way that resulted in successful launch.

Here are my ROS Environment Variables:

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-03-28 17:48:06 -0500

sugumarp gravatar image

Sorry, the solution was a very basic one and solved with one line:

pip install defusedxml

Now, it is working. I was going too deep into deprecation of xacro from kinetic/melodic to noetic.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2022-03-22 17:02:57 -0500

Seen: 1,391 times

Last updated: Mar 28 '22