Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I would like to complement the answer given by @bt.

Here you have the video that explains all the process: VideoAnswer

In this case I have created a python script ( that generates a class that controlles gravity in Gazebo. It has a testing function that changes the gravity two various configurations sequentially to see the effect.

I use the different gazebo services to pause, unpause , reset and set the Gazebo Physiscs.

I have used a simple URDF difined object called simple_box.

Here you have all the main files necessary:

The Script that changes the gravity->

Main that launches everything->main.launch

Launch to spawn the simple box->spawn_simple_box.launch

Launch to spawn a URDF model->spawn_robot_urdf.launch

Model of the simple box ->simple_box.urdf

The simple world with normal gravity

Hope this helps.