Gazebo | Ignition | Community
Ask Your Question

Fixing an object in gazebo

asked 2012-12-19 09:45:34 -0500

Davinci gravatar image

updated 2012-12-19 14:29:36 -0500

I am trying to spawn a box in gazebo (and ROS fuerte). Except the box is flying rounds. Or flies away to 2147483647.000000 (negative gravity or something?) Therefore I am trying to use the <static> tag. But this tag is not accepted:

Error [] XML Element[static], child of element[model] not defined in SDF. Ignoring.[model] Error [] Error reading element Error [] Unable to parse sdf element[gazebo] Error [] parse as old deprecated model file failed. Error [] Unable to read sdf string

This is with the model given in the tutorial I also changed the <gazebo version="1.2"> tag to 1.0 to make it work. How can I a fix a model to the world?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-12-20 03:17:13 -0500

AndreiHaidu gravatar image


I think the tutorial has a wrong model (it is actually for Gazebo 1.2 not for 1.0).

Here is an example of a static model for Gazebo 1.0, hope it is fine:

<gazebo version='1.0'>
  <model name='static_sphere' static='1'>
    <origin pose='0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000'/>
    <link name='static_sphere_link' gravity='1' self_collide='0' kinematic='0'>
      <origin pose='0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000'/>
      <inertial mass='10.0' density='1.000000'>
        <origin pose='0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000'/>
        <inertia ixx='0.001' ixy='0.000000' ixz='0.000000' iyy='0.001' iyz='0.000000' izz='0.001'/>
      <collision name='static_sphere_collision' laser_retro='0.000000'>
        <origin pose='0.000000 0.000000 0.000000 0.000000 0.000000 0.000000'/>
          <sphere radius ='0.005'/>
            <ode mu='10.000000' mu2='10.000000' fdir1='0.000000 0.000000 0.000000' slip1='0.000000' slip2='0.000000'/>
          <bounce restitution_coefficient='0.000000' threshold='100000.000000'/>
            <ode soft_cfm='0.000000' soft_erp='0.200000' kp='1000000000000.000000' kd='1.000000' max_vel='100.000000' min_depth='0.001000'/>
      <visual name='static_sphere_visual' cast_shadows='1' laser_retro='0.000000' transparency='0.000000'>
        <origin pose='0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000'/>
          <sphere radius ='0.005'/>
        <material script='Gazebo/Blue'/>
edit flag offensive delete link more


Thanks, but the object is not visible if I spawn it using: rosrun gazebo spawnmodel -file staticsphere.model -gazebo -z 1 -x 1 -y 1 -model sphere1

Davinci gravatar imageDavinci ( 2012-12-20 05:06:55 -0500 )edit

The above example is just a really small sphere. Try increasing the radius.

nkoenig gravatar imagenkoenig ( 2013-07-23 17:21:35 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2012-12-19 09:45:34 -0500

Seen: 2,311 times

Last updated: Dec 20 '12