[ODE] fixed path constraint
jnilson_99 at yahoo.com
jnilson_99 at yahoo.com
Wed Jul 6 15:26:10 MST 2005
Erin,
Is it possible to create a joint that constrains
movement along a plane? This would only make sense for
something other than a hinge, say a universal or a
ball/socket.
The spline idea is great, it's just the plane
constraint equation would be simpler to implement (i
think).
I read Russ's pdf file on how to create new joint
types in ode. I take it you'd have to add another
constraint equation based on a plane. Do you know how
to do this?
Also, what do you think of the solution I posted about
keeping a joint constrained along a plane, that is to
project the body in question's position onto the plane
and then find the difference vector from the bodies
position to the point on the plane. Given that vector,
torque the joint to bring the body back on plane.
Think of a shoulder and upper arm of a ragdoll. Say
you created a plane running through both shoulder
joints and the neck joint, you'd have a plane parallel
with the ground. Assuming the ragdoll is standing in
the classic character pose (arms outstretched) and
gravity pulled the arms down, as the upper arm
position would fall below the plane. The vector from
the upper arm to the plane would show which direction
to torque the shoulder to get the arm back on plane.
thanks,
john
--- Erin Catto <erincatto at sbcglobal.net> wrote:
> This is indeed possible. It would require a new
> joint type. You will need a
> callback to query the spline and some sort of state
> to maintain the current
> spline coordinate.
>
> The constraint is straight forward:
>
> pos - pos_spline(t) = 0 (3 constraints)
>
> At the velocity level:
>
> v + cross(omega, r) - vel_spline(t) = 0
>
> v: velocity of center of mass, omega: angular
> velocity, r: radius vector
>
> Erin
>
>
> -----Original Message-----
> From: ode-bounces at q12.org
> [mailto:ode-bounces at q12.org] On Behalf Of Cristian
> Bianchi
> Sent: Tuesday, July 05, 2005 1:42 AM
> To: ode
> Subject: [ODE] fixed path constraint
>
> Hi to all
> did anyone implement a fixed path constraint? I'd
> like to constraint the
> movement of a body along a curve. I know I can use
> the classic spring/damper
> approach... but I think ODE joint would be more
> precise and reliable. :)
> Any suggestion/code trick?
> Thanks in advance
>
> Cristian Bianchi
> Simulation Software Division
> DIESGroup srl, Rome - Italy
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
More information about the ODE
mailing list