[ODE] test_buggy strangeness

Adam Rotaru adam_rotaru at yahoo.com
Thu Nov 29 00:37:01 MST 2001


--- Nate W <coding at natew.com> wrote:
> I just finished modifying the 'buggy' test app to
> include a closed loop of
> joints and bodies.  It's behaving a bit strangely,
> and I'm wondering if I
> have overlooked something or introduced an
> instability or what.  The
> modified test_buggy.cpp can be downloaded from
> http://diesel.whatever.net/tmp/test_buggy.cpp

    Hi Nate,

  I played around with it a bit, and it's indeed
behaving strangly.  I managed to fix it by changing
the joint between one conrod and the back wheel from
hinge to balljoint.  The change is straightforward:

  // wheel conrod bearing
  joint[4] = dJointCreateHinge (world, 0);
  dJointAttach (joint[4],body[3],body[5]);
  dJointSetHingeAnchor (joint[4],-0.5*LENGTH -
(RADIUS/2), -WIDTH*0.75, STARTZ);
  dJointSetHingeAxis (joint[4],0,1,0);

  // wheel conrod bearing
  joint[4] = dJointCreateBall (world, 0);
  dJointAttach (joint[4],body[3],body[5]);
  dJointSetBallAnchor (joint[4],-0.5*LENGTH -
(RADIUS/2), -WIDTH*0.75, STARTZ);

My guess is that the two rods are constrained into
one
line by both the prismatic joint and the hinge
joint,
and the solver cannot correctly handle this.
With the ball joint one constraint is removed.

BTW, I noticed that one of the conrods does not
collide
with the ground (you can see this if you remove the
prismatic joint, the first rod just falls through
the ground).  I believe this is caused by the fact
that both rods use the same box object (box[1]).
When I make those separate, the rod collides with
the
ground OK, but not with the chassis (??).
First I thought this might be the cause of the
strange
behaviour, but I was wrong.

cheers,
  --Adam



__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1



More information about the ODE mailing list