[ODE] attn: Erin Catto, concerning: fixed path constraint

jnilson_99 at yahoo.com jnilson_99 at yahoo.com
Mon Jul 18 01:35:39 MST 2005


Erin,

I've given this a lot of thought as I'd like to create
an additional "planar" constraint for any joint. Take
a ball and socket joint for example. You mention "It
is best to formulate constraints like other joints and
let ODE's solver compute the appropriate forces to
make the body movements honor the constraints."

By this I take it that you mean ADD a constraint to
the existing constraint matrix. For a ball and socket
joint, the solver calls "ballGetInfo2" which in turn
calls "setBall". "setBall" merely populates the
joint's "Info2" structure consisting of the Jacobian
matrix rows,cfm (constrain force mixing), and lo and
hi limits.

If I wanted to add a PLANAR constraint to this joint,
would I have to add an addition member to the "Info2"
structure? That is somehow add "information" to the
"Info2" structure that would add an additional row to
the existing Jacobian Matrix, the additional row being
the equation limiting the joint to a certain "Plane"?


Thanks,


John
--- Erin Catto <erincatto at sbcglobal.net> wrote:

> It is best to formulate constraints like other
> joints and let ODE's solver
> compute the appropriate forces to make the body
> movements honor the
> constraints.
> 
> A planar joint can be formed using three constraint
> equations:
> 
> - one to prevent motion along the plane normal
> - two to prevent rotation perpendicular to the
> normal
> 
> dot(p2 - p1, n1) = 0
> dot(tx2, n1) = 0
> dot(ty2, n1) = 0
> 
> where
> 
> p1 = x1 + r1
> p2 = x2 + r2
> 
> and
> 
> x1, x2: body positions
> r1, r2: body anchor points
> n1: plane normal bound to body 1
> tx2, ty2: in plane basis vectors bound to body2
> 
> Now you just need to differentiate the constraint
> equations to get the
> velocity Jacobians. These can be used to create a
> new joint in ODE.
> 
> Erin
> 
> 
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
> 



More information about the ODE mailing list