'Invalid <param> tag: Cannot load command parameter [robot_description]
I'm using ros kinetic and Ubuntu 16.04
I'm trying to do run this project but not running inside a Docker container.
After, I had done
user@user-HP-Pavilion-15-Notebook-PC:~/gym-gazebo/gym_gazebo/envs/installation/catkin_ws$ catkin_make
user@user-HP-Pavilion-15-Notebook-PC:~/gym-gazebo/gym_gazebo/envs/installation$ bash setup_kinetic.bash
user@user-HP-Pavilion-15-Notebook-PC:~/gym-gazebo/gym_gazebo/envs/installation$ bash turtlebot_setup.bash
user@user-HP-Pavilion-15-Notebook-PC:~/gym-gazebo/examples/turtlebot$ python circuit2_turtlebot_lidar_qlearn.py
Then, it comes out the following error:
... logging to /home/user/.ros/log/3ac6e572-28a3-11e8-9aba-142d27dccbb5/roslaunch-user-HP-Pavilion-15-Notebook-PC-6853.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://user-HP-Pavilion-15-Notebook-PC:37855/
ros_comm version 1.12.12
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.12
NODES
auto-starting new master
process[master]: started with pid [6864]
ROS_MASTER_URI=http://user-HP-Pavilion-15-Notebook-PC:11311/
setting /run_id to 3ac6e572-28a3-11e8-9aba-142d27dccbb5
process[rosout-1]: started with pid [6884]
started core service [/rosout]
Roscore launched!
Gazebo launched!
... logging to /home/user/.ros/log/3ac6e572-28a3-11e8-9aba-142d27dccbb5/roslaunch-user-HP-Pavilion-15-Notebook-PC-6908.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
while processing /home/user/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/turtlebot_simulator/turtlebot_gazebo/launch/includes/kobuki.launch.xml:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/lib/xacro/xacro --inorder '/home/user/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/turtlebot/turtlebot_description/robots/kobuki_hexagons_asus_xtion_pro.urdf.xacro'] returned with code [2].
Param xml is <param command="$(arg urdf_file)" name="robot_description"/>
The traceback for the exception was written to the log file
And the kobuki.launch.xml :
<launch>
<arg name="base" />
<arg name="stacks" />
<arg name="3d_sensor" />
<arg name="urdf_file" default="$(find xacro)/xacro --inorder '$(find turtlebot_description)/robots/$(arg base)_$(arg stacks)_$(arg 3d_sensor).urdf.xacro'" />
<param name="robot_description" command="$(arg urdf_file)" />
<!-- Gazebo model spawner -->
<node name="spawn_turtlebot_model" pkg="gazebo_ros" type="spawn_model" args="$(optenv ROBOT_INITIAL_POSE) -unpause -urdf -param robot_description -model mobile_base" />
<!-- Velocity muxer -->
<node pkg="nodelet" type="nodelet" name="mobile_base_nodelet_manager" args="manager" />
<node pkg="nodelet" type="nodelet" name="cmd_vel_mux" args="load yocs_cmd_vel_mux/CmdVelMuxNodelet mobile_base_nodelet_manager">
<param name="yaml_cfg_file" value="$(find turtlebot_bringup)/param/mux.yaml" />
<remap from="cmd_vel_mux/output" to="mobile_base/commands/velocity" />
</node>
<!-- Bumper/cliff to pointcloud (not working, as it needs sensors/core messages) -->
<include file="$(find turtlebot_bringup)/launch/includes/kobuki/bumper2pc.launch.xml" />
</launch>
This is what I get after run xacro --inorder /home/user/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/turtlebot/turtlebot_description/robots/kobuki_hexagons_asus_xtion_pro.urdf.xacro
option --inorder not recognized
Usage: xacro.py [-o <output>] <input>
xacro.py --deps Prints dependencies
xacro.py --includes Only evalutes includes
I'm still new with ROS. Did I miss something?
Solution 1:[1]
The Error Your Getting From Xacro Is Actually From A --inorder tag Which Is Mostly Used In ROS Indigo(To My best of knowledge) And I Don't Think U Need It In ROS Kinetic (But I'm Not Sure Cause I'm Still On Indigo Myself) I Suggest U Try It Without The --inorder Argument And If U ran Into Problems Try Replacing it With -i As Said In The xacro Changelog In Their Github
Solution 2:[2]
source /opt/ros/kinetic/setup.bash
The above command solved the issue for me.
Solution 3:[3]
The error says cannot load command parameter [robot_description] from
/opt/ros/kinetic/lib/xacro/xacro --inorder '/home/user/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/turtlebot/turtlebot_description/robots/kobuki_hexagons_asus_xtion_pro.urdf.xacro'
The problem you're seeing is because of the single quote characters in the command line of the xacro file. Line 6 is where param name is given as robot description, and it isnt getting loaded as urdf path hasn't been read properly in the previous line because of the single quotes. In order to load the file remove the single quotes in line 5.
Change line 5 which is
<arg name="urdf_file" default="$(find xacro)/xacro --inorder '$(find turtlebot_description)/robots/$(arg base)_$(arg stacks)_$(arg 3d_sensor).urdf.xacro'" />
to the following
<arg name="urdf_file" default="$(find xacro)/xacro --inorder $(find turtlebot_description)/robots/$(arg base)_$(arg stacks)_$(arg 3d_sensor).urdf.xacro" />
The xml file should look like
<launch>
<arg name="base" />
<arg name="stacks" />
<arg name="3d_sensor" />
<arg name="urdf_file" default="$(find xacro)/xacro --inorder $(find turtlebot_description)/robots/$(arg base)_$(arg stacks)_$(arg 3d_sensor).urdf.xacro" />
<param name="robot_description" command="$(arg urdf_file)" />
<!-- Gazebo model spawner -->
<node name="spawn_turtlebot_model" pkg="gazebo_ros" type="spawn_model" args="$(optenv ROBOT_INITIAL_POSE) -unpause -urdf -param robot_description -model mobile_base" />
<!-- Velocity muxer -->
<node pkg="nodelet" type="nodelet" name="mobile_base_nodelet_manager" args="manager" />
<node pkg="nodelet" type="nodelet" name="cmd_vel_mux" args="load yocs_cmd_vel_mux/CmdVelMuxNodelet mobile_base_nodelet_manager">
<param name="yaml_cfg_file" value="$(find turtlebot_bringup)/param/mux.yaml" />
<remap from="cmd_vel_mux/output" to="mobile_base/commands/velocity" />
</node>
<!-- Bumper/cliff to pointcloud (not working, as it needs sensors/core messages) -->
<include file="$(find turtlebot_bringup)/launch/includes/kobuki/bumper2pc.launch.xml" />
</launch>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mohammad Ali |
| Solution 2 | Jeremy Caney |
| Solution 3 | Vidya Ganesh |
