Bullet Pt2Pt Constraint and Jacobian entry
Posted: Sun Oct 23, 2005 12:45 pm
I looked at the Point2PointConstraint class and have a question how the constraint is satisfied ( Point2PointConstraint::SolveConstraint( dt ) ). For my understanding two steps have to be taken:
1.) First calculate the constraint error
This is very obvious here. Simply calculate the relative drift and relative velocity at the pivot point.
2.) Find correction (impulse) such that constraint error is repaired
Here I can't follow anymore.
Questions:
(1)
The Jacobian for the Pt2Pt constraint is a 3 x 12 matrix and it has the following entries:
J = ( I -R1 -I R2 )
I := Identity matrix (3x3)
R1 := Cross matrix for offset vector from CM body1 to pivot point in world space (3x3)
R2 := Cross matrix for offset vector from CM body2 to pivot point in world space (3x3)
How does this relate to the JacobianEntry class and what is the "normal" entry in this class?
(2)
We need to find an impulse such that constraint error is resolved. How is this achieved using the JacobianEntry class? Derivation? I have solved this problem by finding an impulse such that relative velocity at the pivot point is resolved, but I don't take the Jacobian into account. So how can use the Jacobian to find the repairing impulse?
(3)
For a hinge joint the resulting impulse would be a 5 x1 vector. How do I build a linear and angular impulse from this data?
A sketch of the basic idea would be very helpful - especially the role of the Jacobian!
Regards,
-Dirk
1.) First calculate the constraint error
This is very obvious here. Simply calculate the relative drift and relative velocity at the pivot point.
2.) Find correction (impulse) such that constraint error is repaired
Here I can't follow anymore.
Questions:
(1)
The Jacobian for the Pt2Pt constraint is a 3 x 12 matrix and it has the following entries:
J = ( I -R1 -I R2 )
I := Identity matrix (3x3)
R1 := Cross matrix for offset vector from CM body1 to pivot point in world space (3x3)
R2 := Cross matrix for offset vector from CM body2 to pivot point in world space (3x3)
How does this relate to the JacobianEntry class and what is the "normal" entry in this class?
(2)
We need to find an impulse such that constraint error is resolved. How is this achieved using the JacobianEntry class? Derivation? I have solved this problem by finding an impulse such that relative velocity at the pivot point is resolved, but I don't take the Jacobian into account. So how can use the Jacobian to find the repairing impulse?
(3)
For a hinge joint the resulting impulse would be a 5 x1 vector. How do I build a linear and angular impulse from this data?
A sketch of the basic idea would be very helpful - especially the role of the Jacobian!
Regards,
-Dirk