[ODE] Some objects pass through other objects
Keith Wiley
kwiley at cs.unm.edu
Sun Nov 13 16:18:04 MST 2005
Thanks for all the good advice. I found the bug. The crash example
was using dAreConnected in its nearCallback, which worked fine for it
because it didn't have any composited objects in it. I had to change
it to dAreConnectedExcluding and everything worked fine, for reasons
I now understand in excruciating detail after slogging through the
ODE code with the debugger meticulously. My trebuchet simulation is
fantastic right now. I have two designs, one doesn't use a sling,
the pendulum is a rigid body and the canonball flies off the end just
like a pea off a spoon. I have also designed one with a sling, using
a chain to represent the sling with a pouch in the middle. However,
I haven't learned how to use trimeshes in ODE yet, so my pouch is
actually a few links in the middle of my chain that are wider than
the rest of the chain, so they have the quality of planks on a rope
bride. It works great, but if I can actually moddle a pouch with a
trimesh then I would really like to learn how to do that.
I'll post a version of the trebuchet tonight if people would like to
see it. Truly, it is wonderful fun to play with. You can even
adjust the parameters during the simulation to experiment on hitting
a target or achieving distance, or power, or whatever. It's very
cool. I'm loving ODE.
Cheers!
On Nov 13, 2005, at 2:11 PM, Jon Watte (ODE) wrote:
>
> My observation is that, when you find yourself using a fixed joint,
> you have not simplified the problem sufficiently (this is akin to
> finding the normal form of a database). I'm not sure whether this
> is the cause of your actual bug, but it's something you'll want to
> work on.
>
> If the Trebuchet doesn't move (only the catapult pin does), then I
> would model this case as a trimesh (or some collection of box
> geoms) for the frame, a single box geom and body for the moving
> pin, and a hinge joint between the catapult pin and the NULL static
> world.
>
> If the Trebuchet actually moves, then attach the various geoms
> (using dGeomTransforms) and the joint to a single body, which
> represents the frame. If you need a "pouch" for the ball to sit in,
> then model the pouch as a trimesh geom, and attach this to the
> catapult pin body (that also has a box geom for the actual pin).
>
> Btw: one reason why things may fall through a trimesh geom would be
> if you pass in the number of triangles when you're creating the
> trimesh; you're supposed to pass in the number of indices. Another
> reason for problems is if you dispose your index or vertex array
> after building the trimesh; they're used by the trimesh collider
> during each collision, and it's your responsibility to keep them
> alive.
>
> Cheers,
>
> / h+
>
>
>
> Keith Wiley wrote:
>
>> I'm looking at the code right now trying to find the bug, but I'm
>> brand new to ODE and it's taking me a while to decipher the path
>> of execution.
________________________________________________________________________
Keith Wiley kwiley at cs.unm.edu http://www.unm.edu/~keithw
"The easy confidence with which I know another man's religion is folly
teaches me to suspect that my own is also."
-- Mark Twain
________________________________________________________________________
More information about the ODE
mailing list