gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.17k stars 476 forks source link

Add support for bullet3 (GPU-accelerated physics) #963

Open osrf-migration opened 10 years ago

osrf-migration commented 10 years ago

Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


The bullet3 repository has support for GPU acceleration of the whole rigid body dynamics and collision checking pipeline. We should support this physics engine in Gazebo.

osrf-migration commented 9 years ago

Original comment by Thomas Wood (Bitbucket: odellus).


I agree. Anything I could do to help?

osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


The current interfaces between gazebo and bullet are in the gazebo/physics/bullet folder:

https://github.com/osrf/gazebo/blob/master/gazebo/physics/bullet/

Also, we currently search for bullet 2.82 in cmake/SearchForStuff.cmake. The bullet3 master branch currently has version number of 2.83 and has had a 2.83 alpha release, but no official 2.83 release yet. So to build bullet3 from source, one should increment the version that gazebo searches for to 2.83.

The bullet3 repository also has the bullet 2 API in parallel with the bullet3 API. So presumably, we should make sure gazebo works with 2.83, and then figure out how to connect to the new API.

Sorry I don't have any more concrete suggestions than that. I'm not actively working on this right now. Feel free to post your progress and questions here, and we'll try to be of assistance.

osrf-migration commented 9 years ago

Original comment by Thomas Wood (Bitbucket: odellus).


Those suggestions were very helpful. Thanks for letting me know where to start.

I'll begin working on this soon and let you know if I have any questions or progress to report.

osrf-migration commented 9 years ago

Original comment by Thomas Wood (Bitbucket: odellus).


Quick Update:

I ran into some problems testing the bullet3 master branch in Ubuntu 14.04 with ATI Catalyst Drivers:

https://github.com/bulletphysics/bullet3/issues/200#issuecomment-56908839

So I have some work to do porting the OpenCL kernels from bullet3 to work on ATI cards in Ubuntu before more progress can be made implementing the plan @scpeters outlined above, at least on my particular setup. I'll report back when I get this working.

osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


See also:

osrf-migration commented 9 years ago

Original comment by Thomas Wood (Bitbucket: odellus).


Bullet3 is now working fine on my old HD 6900 ATI, so I decided it was time to follow @scpeters suggestion and increment the minimum required bullet version to 2.83.

It appears to be working after I made a couple of minor edits. I can make a pull request if anyone else wants to see what I have changed so far. I'm pretty sure I haven't begun to scratch the surface of the changes that need to be made to fully utilize the GPU computing capability of Bullet3, but first things first, Gazebo works with bullet-2.8.3.

osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Perhaps you could commit some of your changes to a fork of gazebo? I don't think we will require bullet 2.83 immediately, since it is not yet in any of the Ubuntu releases (Vivid has 2.82).

osrf-migration commented 7 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


osrf-migration commented 7 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).