[ODE] Interesting... quirks

Wesley Paugh wespaugh at gmail.com
Mon Jul 17 16:48:29 MST 2006


I'm getting the hang of ODE basics, but I'm encountering some very odd
errors and I'm not sure what is going wrong. Collision detection has not
been smooth sailing, by any means.

For instance,  when creating a group of contact joints, the line

int numC = dCollide(*leftBox, *rightBox, 1, contactGroup,
(int)sizeof(dContactGeom));

always fails, with the error

Assertion "skip >= (int)sizeof(dContactGeom));" Box.xpp

This almost seems impossible. I've been runnning the simulation with 2 *
(int)sizeof(dContactGeom), and it works fine, but it is difficult to see
what long-term effects such a hack might have.

Another question regards the Plane geometry. The manual has indicated that
to set a plane's position you set its parameters a, b, and c such that a*x +
b*y + c*z gives a unit vector in the direction you wish the plane to face,
and then give d to be the distance from the global origin the plane is along
the vector specified by a, b, and c. Is that accurate?

dMass has also given me some confusion. I understand how to set the center
of mass, but am unclear as to the purpose of the 3x3 matrix that also needs
to be set, and am currently setting all values to 0.

I do not know when to call dJointGroupEmpty(). I apologize for asking as I
know I have read the answer somewhere but I cannot seem to find it again.

Finally, dSpaceCollide does not work as promised. I call it, giving it a
parameter of the space in which three objects exist, a null pointer and a
reference to a function copy and pasted from what has worked to give me the
brief 2-object collisions that almost work above. However, calling this
function ensures that none of the objects collide.

The ultimate problem I am encountering is that objects exhibit random
behaviors on collision. Sometimes they bounce as expected (never colliding
with the plane, however), Sometimes they collide and double in velocity.
Sometimes they disappear almost instantly. I don't have an explanation for
any of it, most of all why no two runs are ever the same.

Any help with any of these question would be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20060717/a716a35a/attachment.htm


More information about the ODE mailing list