Usage / use cases of pybullet ?

Post Reply
scorpion81
Posts: 11
Joined: Sun Apr 08, 2012 10:01 am

Usage / use cases of pybullet ?

Post by scorpion81 »

Hello,

just read about 2.85 and the new pybullet bindings.... but when reading thru the pybullet.c file, i cant find obvious ways to create a world, create rigidbodies and shapes,
populate the world with those rigidbodies or add / remove constraints. there is a step function and several get functions for various properties. And URDF and SDF loaders...
Hmmm does this mean if you want to "operate" bullet via python and add rigidbodies and such, you cant and you need to make such files and load them ?
Or is this work in progress and other important functionality will be exposed in the next days / weeks ?

I am trying to use a python interface to bullet to populate it with external mesh data for the shapes and further configuration data from an external application.
So i need to fill the world with "shards" of a fractured mesh where each rigidbody represents one of those shards. Furthermore it should be possible to add in constraints as well
Ah, and some contact callback would be nice, too. I use this to trigger mesh refractures dependent on impact location and force.

Any hints or pointers into the right direction would be helpful.

Greetings, scorpion81
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Usage / use cases of pybullet ?

Post by Erwin Coumans »

Yes, you will need to create your objects using URDF descriptions, and load them. URDF are just text files, please give it a try.

One option is to create a programmatic way to create URDF files, and load those.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Usage / use cases of pybullet ?

Post by Erwin Coumans »

We'll be making it easier to interface pybullet and the underlying shared memory API to external applications etc.

I need to re-consider how to give access to programmatically created content, without using URDF/SDF files.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Usage / use cases of pybullet ?

Post by Erwin Coumans »

The shared memory physics client-server API (in Bullet/examples/SharedMemory/PhysicsClientC_API.h) and pybullet should replace all of Bullet 2.x API, and allow us to migrate from Bullet 2.x to Bullet 3.x (GPU/OpenCL physics engine) and Bullet 4.x (future machine learning/deep learning/reinforcement learning physics engine...) without users having to change the API.

So use-cases will be games, movies and robotics, using C, C++, python (and other) languages.

It should be possible to use pybullet also in Blender scripts, both BGE and regular Blender Python. So, we will develop and figure out a way to create shapes, rigid bodies from inside Blender scripts...
Post Reply