Invalid <param> tag: Cannot load command parameter [robot_description]:

asked 2018-03-15 12:10:27 -0500

foong0920 gravatar image

updated 2018-03-16 02:01:53 -0500

Im using ros kinetic and Ubuntu 16.04

Im trying to do run this project from [ https://github.com/erlerobot/gym-gazebo ] 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/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>

Im still new with ROS. So, do i miss something?

Appreciate to any help, Im stuck for 3 days

edit retag flag offensive close merge delete

Comments

Before you try running the python script, try running bash turtlebot_setup.bash in the same directory you ran bash setup_kinetic.bash.

stevejp gravatar imagestevejp ( 2018-03-15 14:43:46 -0500 )edit

I had run bash turtlebot_setup.bash as well in same directory, but it still can't solve the problem. The problem is same as above. And i also added the kobuki.launch.xml file to the question

foong0920 gravatar imagefoong0920 ( 2018-03-16 01:37:47 -0500 )edit

It seems like xacro has a problem creating the URDF. Try running xacro --inorder /home/user/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/turtlebot/turtlebot_description/robots/kobuki_hexagons_asus_xtion_pro.urdf.xacro directly in the console, this could yield more precise error messages.

Tim Stadtmann gravatar imageTim Stadtmann ( 2018-03-16 04:51:50 -0500 )edit

This is what i get when running xacro command

option --inorder not recognized
Usage: xacro.py [-o <output>] <input>
       xacro.py --deps       Prints dependencies
       xacro.py --includes   Only evalutes includes
foong0920 gravatar imagefoong0920 ( 2018-03-16 13:45:11 -0500 )edit

Uhm, that's strange, that option was introduced in Jade afaik. Two things to try out now. First, update xacro and try again (sudo apt-get install ros-kinetic-xacro) If it's still not working, just leave out the --inorder tag.

Tim Stadtmann gravatar imageTim Stadtmann ( 2018-03-17 04:20:36 -0500 )edit

It is strange. When i run sudo apt-get install ros-kinetic-xacro, it show ros-kinetic-xacro is already the newest version (1.11.2-0xenial-20180222-225948-0800).. After that, i run rosversion xacro it say 1.9.5. But i try to remove --inorder from launch XML, the problem is gone. Thanks

foong0920 gravatar imagefoong0920 ( 2018-03-18 05:14:51 -0500 )edit