Page 1 of 1

Custom physics server in pybullet

Posted: Fri May 05, 2017 8:27 pm
by juancamilog
I'm currently trying to use the pybullet API to interface with some code that was written using the bullet2 c++ API. As the code uses a GUI, I was looking into replicating the way the GUI server is instiatied when calling pybullet.connect(pybullet.GUI). I was looking into subclassing PhysicsClientSharedMemory, overriding its methods to calls to my backend, and replacing the call to btCreateInProcessExampleBrowser with a function that would instantiate instantiate my own browser (a subclass of the ExampleBrowserInterface in the bullet2 API).
I would add a new case in the pybullet_connectPhysicsServer, eCONNECT_CUSTOM_SERVER, to connect to my custom server.

I'm not sure if this is the way to go. What would be the appropriate way to do this?

Thanks!

-- Juan

Re: Custom physics server in pybullet

Posted: Sat May 13, 2017 1:13 am
by Erwin Coumans
What do you want to replace and what do you want to keep exactly? Replace the physics engine or the 3D graphics visualizer or everything?

If you want to write a custom physics engine, we can make the PhysicsServerCommandProcessor a virtual class, and allow subclassing (I was planning this).
Replacing the entire backend/server, you could start with TCP or UDP first, and go from there.

Thanks!
Erwin