understand constraint : why error is projected onto each axe

acx01b
Posts: 10
Joined: Thu Jan 15, 2009 12:42 pm

understand constraint : why error is projected onto each axe

Post by acx01b »

hello,

I have to understand the calculus used for solving constraints in Bullet, for a student project

my first question is :

in btPoint2PointConstraint::solveConstraintObsolete (btPoint2PointConstraint is the easier to start with)

you find that code :

Code: Select all

for (int i=0;i<3;i++)
{
  /* blah blah blah */
  
  btScalar rel_vel = normal.dot(vel); // vel = bodyA.velocityInLocalPoint - bodyB.velocityInLocalPoint
  / ... /
  btScalar depth = -(pivotAInW - pivotBInW).dot(normal);
}


then some impulse is applied to bodyA and bodyB depending of rel_vel and depth, resp. the velocity and the positionnal error projected onto each axe [ for (i = 0; i < 3; i++) ]

I can see in the code that the reason for doing that way is to deal with the JacobianEntry thing, but I don't kown the "Jacobian trick"

could you please give me some explanation that could help me,
thank you very much !
Renaud