[ODE] Some objects pass through other objects
Keith Wiley
kwiley at cs.unm.edu
Fri Nov 11 23:40:29 MST 2005
I have taken the "crash" example provided with ODE and tried to add a
simple trebuchet, a counterweight powered ballistic projectile
machine. This is not the classic trebuchet with a cable and pouch.
It is simpler, basically the way you launch peas off the end of a
spoon. My intention is to add a cable-pouch mechanism once I get the
spoon approach working.
If I construct the trebuchet from separate bodies joined by fixed
joints, it mostly works. The trebuchet loads and launches just
fine. However, the fixed joints don't entirely work. Some bodies
that are connected by fixed joints aren't very "fixed". They
oscillate and eventually the simulation dies due to extreme errors.
If I construct the trebuchet as just two bodies (frame and pendulum)
connected by a hinge joint, where each body is a composite of
multiple geoms, then the structure is quite stable and seems to
perform exactly as expected.
However, when I drop a canonball into the cup of the pendulum, it
falls right through the pendulum to the ground as if there is no
collision detection going on. Even weirder, the ball does
successfully collide (and rest against) the pendulum sometimes, but
not always. In particular, it falls through the pendulum under two
specified circumstances. One, when the cup of the trebuchet is
resting on the ground (so the canonball drops into a cup that is
already at ground level, ready for launch). It passes right through
and rolls away on the ground. Two, if I "trick" it into accepting
the canonball by not adding the canonball until a moment *after* I
release the trebuchet (so the cup is already moving upwards and no
longer on the ground when the canonball is added), then the canonball
gets pushed by the pendulum and cup for some of the rotation, but
before the rotation completes, it falls through the pendulum (you can
also get the pendulum to "accept" the canonball by quickly releasing
the trebuchet before the canonball falls through the pendulum). I
can't make any sense of this.
I have tried playing with the surface parameters that are generated
for the joints corresponding to the surface contacts between the
canonball and the trebuchet. Nothing seems to fix this problem. I
also tried decreasing the stepsize to dWorldQuickStep, but this
didn't solve the problem either.
I have included a link to the file below (which is mostly the
original crash example, with a few additions and modifications for
the trebuchet, plus some other minor changes). If anyone would like
to compile it and see what I am trying to do, I would love some
feedback on what I am doing wrong. I am, quite frankly, tapped for
ideas. I have been banging against this bug/error for a day solid
and I simply don't know what else to try modifying at this point.
Thank you.
Instructions:
When you run the simulation, the trebuchet will automatically push
itself down to the ground. This may take one or two swings. Wait
until it settles down. Then hit the '7' key to drop a canonball into
the cup. Notice the bug, the canonball falls through the cup to the
ground and rolls away (or rests under the cup). You can release the
trebuchet with the '8' key (Reset the simulation to try again with
the 'R' key, as per the original crash example). If you release the
trebuchet before the canonball falls completely through, you will be
able to see the pendulum push the canonball for some of its rotation
(so some collision detection is successful), lifting the canonball
successfully into the air a little bit, but the canonball will
eventually fall through the pendulum before the trebuchet completes
the launch.
Any help is greatly appreciated.
The file can be downloaded at:
http://www.cs.unm.edu/~kwiley/test_crash_with_trebuchet.cpp
________________________________________________________________________
Keith Wiley kwiley at cs.unm.edu http://www.unm.edu/~keithw
"Luminous beings are we, not this crude matter."
-- Yoda
________________________________________________________________________
More information about the ODE
mailing list