Gazebo | Ignition | Community
Ask Your Question
0

Spawning Erratic robot in Gazebo 1.9 with ROS groovy

asked 2013-07-30 13:23:05 -0500

ZeeQ gravatar image

updated 2013-07-31 01:16:45 -0500

Hi, I am trying to spawn erratic robot in Gazebo 1.9 using following launch file.

<launch>
<!-- Convert an xacro and put on parameter server -->
<param name="robot_description" command="$(find xacro)/xacro.py $(find erratic_description)/urdf/erratic.urdf.xacro" />

<!-- Spawn a robot into Gazebo -->
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model erratic" />
</launch>

It works perfect for PR2 robot but in the case of erratic it does not spawn the robot. Any suggestions? Thanks. Here is the output of the launch file. Running PR2 in same way also generates alot of errors in terminal but manage to spawn it.In this tutorial they explicitly says that

Note: at this writing there are still a lot of errors and warnings from the console output that need to be fixed from the PR2's URDF due to Gazebo API changes.

Warning [parser.cc:353] No <sdf> element in file[data-string]
Error [parser.cc:694] XML Element[controller:diffdrive_plugin], child of element[model] not defined in SDF. Ignoring.[model]
Error [parser.cc:685] Error reading element <model>
Error [parser.cc:345] Unable to read element <sdf>
Error [parser.cc:296] parse as old deprecated model file failed.
Error [World.cc:1469] Unable to read sdf string
<!--This document was autogenerated by xacro from /opt/ros/groovy/stacks/erratic_robot/erratic_description/urdf/erratic.urdf.xacro | -->
<!--EDITING THIS FILE BY HAND IS NOT RECOMMENDED========== -->
<robot xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
    xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
     xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" name="erratic">

<!-- Included URDF Files -->
<material name="Black"><color rgba="0.0 0.0 0.0 1.0" /></material>
<material name="Blue"><color rgba="0.0 0.0 0.8 1.0" /></material>
<material name="Green"><color rgba="0.0 0.8 0.0 1.0" /></material>
<material name="Grey"><color rgba="0.7 0.7 0.7 1.0" /></material>
<material name="Grey2"><color rgba="0.9 0.9 0.9 1.0" /></material>
<material name="Red"><color rgba="0.8 0.0 0.0 1.0" /></material>
<material name="White"><color rgba="1.0 1.0 1.0 1.0" /></material>
<link name="base_footprint">
<inertial><mass value="0.0001" /><origin xyz="0 0 0" />
<inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001" /></inertial>
<visual><origin rpy="0 0 0" xyz="0 0 0" /><geometry><box size="0.001 0.001 0.001" /></geometry>
<material name="Green" /></visual><collision><origin rpy="0 0 0" xyz="0 0 0.128" /><geometry>
<box size="0.001 0.001 0.001" /></geometry></collision></link>
<joint name="base_footprint_joint" type="fixed"><origin rpy="0 0 0" xyz="0.063 0 0.128" />
<parent link="base_footprint" /><child link="base_link" /></joint>
<link name="base_link"><inertial><mass value="20" /><origin xyz="0 0 0" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0" /></inertial>
<visual ...
(more)
edit retag flag offensive close merge delete

Comments

Can you update your post with the terminal output from running that launch file?

nkoenig gravatar imagenkoenig ( 2013-07-30 18:54:47 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2013-07-31 18:34:39 -0500

nkoenig gravatar image

These are errors that must be resolved:

Error [parser.cc:694] XML Element[controller:diffdrive_plugin], child of element[model] not defined in SDF. Ignoring.[model]
Error [parser.cc:685] Error reading element <model>
Error [parser.cc:345] Unable to read element <sdf>
Error [parser.cc:296] parse as old deprecated model file failed.
Error [World.cc:1469] Unable to read sdf string

You are using a deprecated and unsupported XML format for your model. You'll have to change your model to SDF:

http://gazebosim.org/sdf.html

edit flag offensive delete link more
0

answered 2013-08-01 02:23:25 -0500

Arn-O gravatar image

I had the same issue, and that comes from an outdated version of the robot description. I'm currently adapting the old files to the new conventions.

First of all, you have to review the format :

<controller:gazebo_ros_controller_manager name="gazebo_ros_controller_manager" plugin="libgazebo_ros_controller_manager.so">

should be adapated to:

<plugin name="ros_control" filename="libgazebo_ros_control.so">

Then, you need to check the plugins, as some may be no longer supported (the one from above is OK).

edit flag offensive delete link more

Comments

Are you able to spawn the robot after these changes? If yes can you share the converted files?

ZeeQ gravatar imageZeeQ ( 2013-08-06 09:26:04 -0500 )edit

I am. My converted files are on GitHub: https://github.com/Arn-O/youbot\_ros\_tools

Arn-O gravatar imageArn-O ( 2013-08-07 01:19:29 -0500 )edit

@_ArnO_ Thanks. After spawning the robot how am i suppose to teleoperate it?

ZeeQ gravatar imageZeeQ ( 2013-08-15 11:16:54 -0500 )edit

rosrun erraticteleop erratickeyboard_teleop

EFernandes gravatar imageEFernandes ( 2014-01-20 09:47:39 -0500 )edit

For my repo, you should run ```rosrun youbot_teleop youbot_teleop.py```

Arn-O gravatar imageArn-O ( 2014-01-20 14:09:40 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2013-07-30 13:23:05 -0500

Seen: 1,553 times

Last updated: Aug 01 '13