[ODE] Ball joints

SJS ode at pulsecode.net
Sat Jul 30 01:03:44 MST 2005


Might be realistic gyroscopic effect (conservation of angular momentum: try
holding a spinning wheel by its axle and rotate it about an axis
perpendicular to the axle-- it will twist around a third axis).

There's an angular momentum factor added in the step function that you could
disable (disabling this makes the simulation less realistic, but you might
not be requiring realism)-- there have been a few past posts about this, and
I think there is a descriptive comment in the ODE code (see StepFast and
QuickStep functions).  I think disabling this term would eliminate the
gyroscopic effect, but I'd have to double check to be sure.

Might also just be integrator error (introduced by linear approximations).
There's not much you can do about this except add some kind of active (e.g.
motor) or passive (e.g. spring) control to compensate.

SJS


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Brad
Sent: Friday, July 29, 2005 1:45 PM
To: ode at q12.org
Subject: [ODE] Ball joints


I've been fighting with this thing for at least a week now.

What I want is two bodies connected via a ball joint. The 1st body is a
"base" and just sits on the ground and doesn't move. The 2nd body is the
body I want moving around. So I give the base a large mass and the upper
body (the "head") a lower mass.

Let's say the head is spinning around the Z axis (the up/down axis) at a
fairly low velocity (one revolution every five seconds or so). Now I
want to add a torque to the body to get it to rotate around the lower
body's X axis (since the lower body is aligned to the world, this is
effectivly the global X axis). So I do this:

dBodyAddTorque(HeadBody, 1, 0, 0);

In my mind this should make the head continue rotating around its own Z
axis, and then begin rotating around the global X axis. The problem is
the head doesn't stay aligned with the Y axis (since it should be
rotating around the X axis). Instead it begins to rotate, as if the
body's velocity, which should be completely along the Y axis, is being
transformed as it rotates around its Z axis.

I hope that makes sense. Can anyone tell what I'm doing wrong?
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode



More information about the ODE mailing list