[ODE] Constraint equations and the famous J matrix
Joakim Eriksson
jme at snowcode.com
Tue Jul 1 02:29:02 2003
> > Now for a small example. Say I want to constrain a body
> > to a world position. What would I have to do to get that to work?
> >...
> > But in this abover case what does the J matrix look like?
> > From joint.pdf (Good doc BTW) I guess that the J matrix would look
> > like this
> >
> > 1-----
> > -1----
> > --1---
> > ----QN
> > ---O-P
> > ---QM-
>
> well, first you need to say what you mean by "constrain a body to a
> world position". if you mean "fix the body in space so that it can't
> move or rotate", then J is the 6x6 identity matrix. if you mean
> "constraint a point on the body to be fixed to a point in
> space" then J
> is a 3x6 matrix that looks like this:
>
> [ 1 0 0 0 C -B ]
> [ 0 1 0 -C 0 A ]
> [ 0 0 1 B -A 0 ]
>
> this is the same as a ball joint that is attached to only one
> body (see joint.cpp).
Yes this is what I was after. A body connected through an anchor
point to a world position (That is a ball-socket joint with a
single body (just to make it simple))
So we remove 3 dofs from the body and thus apply the constraint
on both linear and angular motion on the x,y,z axis.
So using that the A matrix is calced then the b matrix.
Using the formula
-1
b=-(JM F+c)
The F is the force thats placed on the body but what I wonder
is if the velocity is included into that. That is if its converted
from a velocity into a force and added to the existing external
force?
/Joakim E.