Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Bullet Physics Equations
PostPosted: Fri Oct 06, 2017 8:47 am 
Offline

Joined: Fri Oct 06, 2017 8:42 am
Posts: 2
Hello,

Where can I find the physics equations implemented by the Bullet Physics Engine? Specifically, I am looking for the equations that govern the collisions in a pybullet simulation. If two objects are created in collision (sharing some or all the same mesh points), they push each other out.

1) What are the equations that govern the forces that push the objects out of each other?

2) Is there a way to control the forces such that they don't act in the z direction at all? That way they would push each other out, but only in the x and y directions.

Any help is very much appreciated!


Top
 Profile  
 
PostPosted: Mon Oct 09, 2017 3:31 pm 
Offline
User avatar

Joined: Tue Sep 30, 2014 6:03 pm
Posts: 363
Location: San Francisco
What do you really want to do? Are you trying to use Bullet in 2D mode?

You can limit a btRigidBody to move in its XY plane and only rotate about Z like so:
Code:
body->setLinearFactor(btVector3(1,0,1));
body->setAngularFactor(btVector3(0,1,0));


Top
 Profile  
 
PostPosted: Mon Oct 09, 2017 6:07 pm 
Offline

Joined: Fri Oct 06, 2017 8:42 am
Posts: 2
Thank you very much!

I'm trying to do just that but in Python, do you know if that is possible?

Also, I'm trying to find the governing equations. When two objects are created in collision, and they push each other out, how is the resulting force calculated? Is it modeled as an (most probably) elastic or non-elastic collision?

From highschool, I remember (m1*v1) + (m2*v2) = (m1*v1') + (m2*v2'), and that is related to the force. But when two objects are simply created in a simulation, what is their initial velocity assumed as?


Top
 Profile  
 
PostPosted: Mon Oct 09, 2017 8:14 pm 
Offline
User avatar

Joined: Tue Sep 30, 2014 6:03 pm
Posts: 363
Location: San Francisco
For normal collisions I believe the ContactPoint is processed like a "constraint", which means the forces of the event are implicit in the solution. In short: a Jacobian matrix is computed and the problem comes down to the solving the Ax = b matrix equation, where x is a vector of unknown values for which we're trying to solve: positions and velocities <x, y, z, Vx, Vy, Vz, qx, qz, qy, qw, ωx, ωy, ωz>. The A matrix must be inverted and then x can be computed: A'b = x The method doesn't bother to compute the intermediary forces.

When two objects significantly overlap I don't know what happens. Bullet has some "inter-penetration resolution" code that will push penetrating objects apart without pumping too much energy into the system but I don't know how it works.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group