Gazebo | Ignition | Community
Ask Your Question
0

How can I use my own physics engine?

asked 2016-03-24 11:18:16 -0500

gianluca.bardaro gravatar image

updated 2016-03-25 09:41:49 -0500

Let's suppose I have my own physics engine, how can I make it interact with gazebo?

I can't find any description on how the simulation loop works or when all the physic routines are called.

Looking at the API I can see there is a section "Physics" and how the other engines reimplement these classes and methods, what I want to know is how can I modify the physical behavior of the various simulation element at various level and moment?

thanks in advance for any answer

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-03-25 10:21:40 -0500

nkoenig gravatar image

The title of your question is about using your own physics engine, but you also mention altering the behavior of simulation elements . To me this implies you'd like to use an existing physics engine but change its behavior. I'll try to answer both versions.

Use a new physics engine

Option 1 : Implement the physics API

If you have an existing physics engine, you can implement Gazebo's physics interface just as ODE, Bullet, Simbody, and DART have done. This is a non-trivial amount of work. Take a look at the PhysicsFactory, and at the ODE implementation for reference.

Option 2: Use gazebo as a library

You can use gazebo as a library, which would allow your physics engine to control simulation. Take a look here for a simple example of using gazebo in a custom main loop.

Option 3: Write a plugin

You could write a world or system plugin that loads your physics engine, and also control gazebo. Here are a few tutorials.

Alter simulation elements

Option 1: Write a plugin

You could write a plugin to move, spawn, delete and adjust the properties of models. Tutorials.

Option 2: Fork gazebo and make changes in the code

You can always fork gazebo, and directly modify the code to do anything you want. This approach could produce fast results, but would be difficult to maintain.

There are probably other methods, but these are good starting points.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-03-24 11:18:16 -0500

Seen: 1,695 times

Last updated: Mar 25 '16