0
$\begingroup$

Gazebo Answers logo

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 [parser.cc:566] XML Element[static], child of element[model] not defined in SDF. Ignoring.[model] Error [parser.cc:557] Error reading element Error [parser.cc:340] Unable to parse sdf element[gazebo] Error [parser.cc:299] parse as old deprecated model file failed. Error [World.cc:1099] 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?


Originally posted by Davinci on Gazebo Answers with karma: 65 on 2012-12-19

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

Hi,

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'/>
      </inertial>
      <collision name='static_sphere_collision' laser_retro='0.000000'>
        <origin pose='0.000000 0.000000 0.000000 0.000000 0.000000 0.000000'/>
        <geometry>
          <sphere radius ='0.005'/>
        </geometry>
        <surface>
          <friction>
            <ode mu='10.000000' mu2='10.000000' fdir1='0.000000 0.000000 0.000000' slip1='0.000000' slip2='0.000000'/>
          </friction>
          <bounce restitution_coefficient='0.000000' threshold='100000.000000'/>
          <contact>
            <ode soft_cfm='0.000000' soft_erp='0.200000' kp='1000000000000.000000' kd='1.000000' max_vel='100.000000' min_depth='0.001000'/>
          </contact>
        </surface>
      </collision>
      <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'/>
        <geometry>
          <sphere radius ='0.005'/>
        </geometry>
        <material script='Gazebo/Blue'/>
      </visual>
    </link>
  </model>
</gazebo>

Originally posted by AndreiHaidu with karma: 2108 on 2012-12-20

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Davinci on 2012-12-20:
Thanks, but the object is not visible if I spawn it using: rosrun gazebo spawn_model -file static_sphere.model -gazebo -z 1 -x 1 -y 1 -model sphere1 https://dl.dropbox.com/u/5812499/gazebo.png

Comment by nkoenig on 2013-07-23:
The above example is just a really small sphere. Try increasing the radius.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.