Home | Tutorials | Wiki | Issues
Ask Your Question

How to disable gravity only for a specific model in Gazebo?

asked 2016-05-26 22:16:18 -0600

webvenky gravatar image

updated 2016-05-26 22:39:32 -0600

A similar question has been answered. http://answers.ros.org/question/65991...

However, this only works for the .sdf model files. It does not work for urdf. Kindly help.

<link name="base_link" gravity="0 0 0">

  <joint name="base_joint" type="fixed">
    <origin xyz="0 0 0" rpy="0 0 0" />
    <parent link="base_link" />
    <child link="body_link" />

  <link name="body_link">
      <mass value="0.1" />
      <origin xyz="0 0 0" />
      <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1" />

    <visual name="base_visual">
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry name="pioneer_geom">
        <mesh filename="package://rotors_description/meshes/simple_airplane1.dae" />

      <origin xyz="0 0 0" rpy="0 0 0" />
        <mesh filename="package://rotors_description/meshes/simple_airplane1.dae" />

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-05-26 22:44:42 -0600

chapulina gravatar image

It looks like your file is in the URDF format (you use origin instead of pose for example).

<gravity> within a link is specified in SDF, but not in URDF. Luckily, the conversion from URDF to SDF is possible. In order to use SDF tags within your URDF link, use the <gazebo> tag, as explained in this tutorial. It should look something like this:

  <gazebo reference="base_link">
edit flag offensive delete link more


Thanks a lot! It works. :-)

webvenky gravatar imagewebvenky ( 2016-05-26 22:58:13 -0600 )edit

Does it remain static in the world even if something collide with it? I was looking for something more like the <static> tag.

hbaqueiro gravatar imagehbaqueiro ( 2018-11-05 09:41:14 -0600 )edit

No, it will not remain static, it will just not be affected by gravity. There's no way to set only one link to be static, that tag works only on the model level. You can however make a model static and connect it to a non-static model with a joint.

chapulina gravatar imagechapulina ( 2018-11-05 12:12:57 -0600 )edit
Login/Signup to Answer

Question Tools



Asked: 2016-05-26 22:16:18 -0600

Seen: 7,548 times

Last updated: May 26 '16