Gazebo | Ignition | Community
Ask Your Question

Can't change gravity in world-file

asked 2019-01-29 09:47:08 -0600

mwaandah gravatar image

I'm new to Gazebo and SDF-files in general. The file I'm using works, but when I try to specify gravity to it, I get an error.

I get the following error when trying to change the gravity using a SDF file.

Warning [] XML Element[gravity], child of element[world] not defined in SDF. Ignoring[gravity]. You may have an incorrect SDF file, or an sdformat version that doesn't support this element.

My SDF-file looks like this;

<?xml version="1.0" ?>
<sdf version="1.5">
  <world name="default">
    <gravity>0 0 -0.1</gravity>
    <physics type="ode">

      <!-- Run as fast as possible -->
          <!-- Simulator.cpp -->

          <!-- Making this smaller seems to decrease rather than increase stability. -->

    <!-- A global light source -->

    <plugin name="tol-control" filename="" />

Any ideas why it says that SDF might not have this element defined?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-01-29 10:33:29 -0600

chapulina gravatar image

You may be using an earlier version of SDF, where <gravity> was under <physics>. From SDF 1.6 it is under <world>.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-01-29 09:47:08 -0600

Seen: 679 times

Last updated: Jan 29 '19