Gazebo | Ignition | Community
Ask Your Question

Using Gazebo as a physics simulation inside a motion planner

asked 2014-01-22 12:32:03 -0500

mkoval gravatar image

I'm interested in using Gazebo physics simulator inside the inner loop of a motion planner. For example, I would like to set the environment in an initial state, run exactly 100 ms of simulation, then record the final state of the environment. Ideally, I would like to run the [relatively simple] simulation much faster than real-time.

This requires low-level control over starting, stopping, and stepping the simulation without waiting for Gazebo's main event loop to run. We've found callbacks that notify us of these event happen, but no way to trigger them ourselves.

Are there any functions in the API that give us this type of low-level control over the simulation loop? Do I need to bypass Gazebo entirely and write my own simulation loop?

edit retag flag offensive close merge delete


I'll try to setup a working example tomorrow, and post my result. In the mean time, you could look at writing a system plugin to control gazebo start/stop/run states.

nkoenig gravatar imagenkoenig ( 2014-01-22 19:24:11 -0500 )edit

Thanks again for the reply. That sounds like what we're looking for. However, I don't actually see any functionality besides Init, Load, and Reset exposed through the SystemPlugin interface. How do I control the start/stop/run state from that interface? (This will likely already be answered by the example.)

mkoval gravatar imagemkoval ( 2014-01-23 14:19:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-01-27 16:40:39 -0500

nkoenig gravatar image

Take a look at this pull-request, and example usage.

This code will go into the next version of gazebo (gazebo-2.3).

edit flag offensive delete link more


Thanks for doing this! I'll build a nightly locally and see if I can get it running.

mkoval gravatar imagemkoval ( 2014-01-29 19:03:14 -0500 )edit

Question Tools



Asked: 2014-01-22 12:32:03 -0500

Seen: 893 times

Last updated: Jan 27 '14