Integrate simulator with Bullet

Post Reply
johndoe11
Posts: 2
Joined: Wed Mar 21, 2018 2:45 pm

Integrate simulator with Bullet

Post by johndoe11 »

I have a robotic simulator using OpenSceneGraph as its scenegraph and graphic engine. I want to integrate bullet physics engine in it for collision detection. So what are basic procedures for integrating it. Do I have to write whole code again using bullet physics or can I make change in my existing robotic simulator.
hyyou
Posts: 96
Joined: Wed Mar 16, 2016 10:11 am

Re: Integrate simulator with Bullet

Post by hyyou »

I use 1 body = 1 node.
Yes, there are still a lot of (fun) work.
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Integrate simulator with Bullet

Post by drleviathan »

Do I have to write whole code again using bullet physics or can I make change in my existing robotic simulator.
I bet you could find existing code for loading your robot into a simulation, as long as your robot was in URDF format. However, I don't have a link to such. There might even be example code in the Bullet github repository.

Alternatively, you could fork one of the C++ Bullet examples and modify it to suit your needs.

If you already have a mature C++ codebase it might be easier to look at example code, study the Bullet API, and add the Bullet libs as dependencies to your project and roll your own integration.

It is possible to load and manipulate scenes with pyBullet. You might try reading the pyBullet quickstart guide to get an idea of what is possible.
johndoe11
Posts: 2
Joined: Wed Mar 21, 2018 2:45 pm

Re: Integrate simulator with Bullet

Post by johndoe11 »

Thanks for reply. Actually my simulator take input as xml files. these xml files contain sample robotic world. So can u give some idea exactly where I have to focus to change code .
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Integrate simulator with Bullet

Post by drleviathan »

Your questions are general and vague so I provide general and vague answers. To get more useful answers you might need to provide more info about your project or ask more specific questions.

If you are using OpenSceneGraph and you can parse, load, and render content from XML, then it sounds like you have a "mature C++ codebase" and I would recommend just adding Bullet as a dependency. It would take too long to type out all the instructions here. The best way forward would be for you look at example code, study the Bullet API, and try it. Come back here when you have specific questions and provide relevant source code.
hyyou
Posts: 96
Joined: Wed Mar 16, 2016 10:11 am

Re: Integrate simulator with Bullet

Post by hyyou »

Thank drleviathan, for the great answer!

On topic:-

OgreBullet (http://wiki.ogre3d.org/OgreBullet) is a popular example.
It aims to integrate a node-based graphic engine (Ogre) with Bullet.
OP may get some neat idea from it. I have never used it though.
Post Reply