openai_ros turtlebot2 example launch fails due to xml/xacro error

asked 2019-12-10 07:41:35 -0500

benson33 gravatar image

updated 2019-12-11 11:09:59 -0500

ROS Melodic 18.04

Hi,

I am trying to run the openai_ros turtlebot2 example. Unfortunately I cannot launch the simulation as I get the following error message:

Tutorials link: [http://wiki.ros.org/openai_ros/Turtle...]


XML parsing error: unbound prefix: line 25, column 1

roslaunch.core.RLException: while processing /home/benedict/catkin_ws/src/turtlebot/turtlebot_gazebo/launch/includes/kobuki.launch.xml:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/melodic/share/xacro/xacro.py '/home/benedict/catkin_ws/src/turtlebot/turtlebot_description/robots/kobuki_hexagons_kinect.urdf.xacro'] returned with code [2]. 

Param xml is <param command="$(arg urdf_file)" name="robot_description"/>

I checked the 'kobuki_hexagons_kinect.urdf.xacro' xacro file:

    <?xml version="1.0"?>
<!--
    - Base      : kobuki
    - Stacks    : hexagons
    - 3d Sensor : kinect
-->    
<robot name="turtlebot" xmlns:xacro="http://ros.org/wiki/xacro">

  <xacro:include filename="$(find turtlebot_description)/urdf/turtlebot_library.urdf.xacro" />

  <kobuki/>
  <stack_hexagons   parent="base_link"/>
  <sensor_kinect    parent="base_link"/>
</robot>

And also the turtlebot_library.urdf.xacro:

<?xml version="1.0"?>
<!--
  The complete turtlebot library of xacros for easy reference
 -->
<robot xmlns:xacro="http://ros.org/wiki/xacro">
  <!-- General -->
  <xacro:include filename="$(find turtlebot_description)/urdf/common_properties.urdf.xacro"/>
  <xacro:include filename="$(find turtlebot_description)/urdf/turtlebot_properties.urdf.xacro"/>
  <!-- Bases -->
  <xacro:include filename="$(find create_description)/urdf/create.urdf.xacro"/>
  <xacro:include filename="$(find kobuki_description)/urdf/kobuki.urdf.xacro" />
  <!-- Stacks -->
  <xacro:include filename="$(find turtlebot_description)/urdf/stacks/circles.urdf.xacro"/>
  <xacro:include filename="$(find kobuki_description)/urdf/stacks/hexagons.urdf.xacro"/>
  <!-- 3D Sensors -->
  <xacro:include filename="$(find kobuki_description)/urdf/sensors/kinect.urdf.xacro"/>
  <xacro:include filename="$(find kobuki_description)/urdf/sensors/asus_xtion_pro.urdf.xacro"/>
  <xacro:include filename="$(find kobuki_description)/urdf/sensors/asus_xtion_pro_offset.urdf.xacro"/>
</robot>

Both seem to be ok to me.

Xacroversion is version 1.13.4

Any ideas about that?

Thank you in advance, Ben

edit retag flag offensive close merge delete

Comments

maybe examine turtlebot_library.urdf.xacro?

jordan gravatar image jordan  ( 2019-12-10 10:38:08 -0500 )edit

Thank you! I did so and it also looks allright.. Attached the file to the original post!

benson33 gravatar image benson33  ( 2019-12-11 11:10:56 -0500 )edit