Sunday 10 June 2018

classical mechanics - how to represent the effect of linking rigid-bodies together?


I have 2 rigid-bodies (b1,b2) if i linked one to the other (as if they are conjoined together) , how to represent b1 effect on b2 and b2 effect on b1


enter image description here


Is there any LAW that affect the position/orientation of the other body ?



notes :



  • i am using Quaternions for orientations

  • i don't want to treat them as one body

  • i have only primitive shapes (box,sphere,..) to link.



Answer



The open-source physics engine ODE allows you to connect two bodies using any of a number of different joints. One of those joints is the "Fixed" joint. It's much more stable, in the physics engine, to represent the two bodies as a single body but maintain two separate geometries for collision purposes. However, ODE probably handles collision detection/resolution differently from what you have in mind. It only detects collision after one frame of interpenetration and then constrains the relative velocity of the colliding bodies in such a was as to force them apart on the next time step. That type of constraint is much easier to satisfy for a single rigid body than two, but perhaps you're actually preventing penetration and so need a different technique.


The fixed joint simply constrains the two bodies to have zero relative angular velocity and zero relative linear velocity (and also has an error correction term to eliminate small numerical drift). After that, the LCP solver handles the rest.


No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...