[ODE] Constraint equations and the famous J matrix

Russ Smith russ at q12.org
Mon Jun 30 20:24:01 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).

russ.

-- 
Russell Smith
http://www.q12.org