ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

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

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

sugumarp gravatar image

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

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:

ROS_VERSION=1
ROS_PYTHON_VERSION=3
ROS_PACKAGE_PATH=/home/sug/catkin_ws/src:/opt/ros/noetic/share
ROSLISP_PACKAGE_DIRECTORIES=/home/sug/catkin_ws/devel/share/common-lisp
ROS_ETC_DIR=/opt/ros/noetic/etc/ros
ROS_MASTER_URI=http://localhost:11311
ROS_ROOT=/opt/ros/noetic/share/ros
ROS_DISTRO=noetic
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 671 times

Last updated: Mar 28 '22