[ODE] High density sphere passes into plane?

Elijah Taylor eatmailinglists at gmail.com
Tue Aug 8 11:02:39 MST 2006


I set up your exact scenario (well, not *exact*, I fudged my own math on the
sphere mass because my codebase only uses the *Total mass functions, but I
tried everywhere from 2.6 to 10000 kg, I think this problem should be
mass-independent anyway).  I don't get your problem... the sphere hits the
ground, penetrates for a moment, but then rises up.  It is, though, slower
to rise up with the CFM constant set higher (default is 1e-5 I believe, you
have 1e-4).

However, if I set the MaxCorrectingVel any lower (like .01 instead of .1)
then the thing keeps sinking, and if I set the SurfaceLayer thickness any
higher (like .01 instead of .0001) then it obviously sinks a little more too
(one extra consideration is the scale on which you're viewing things, if
it's super close zoomed in, you may be seeing it interpenetrate by the
SurfaceLayer thickness).  Maybe fiddle with those two values (.1 seems low
to me as a correcting velocity [given the default is infinity], are you
having a lot of problems with things shooting off after interpenetrating?)
along with the CFM and ERP constants, and see if you can get something more
stable.

-Elijah

On 8/7/06, Anna-Beth Fox <anna_beth_fox at yahoo.com.au> wrote:
>
> Yeah, I did set the sphere's position at (0, 8, 0). Forgot to mention
> that. Sorry. Any ideas?
>
>
> *Elijah Taylor <eatmailinglists at gmail.com>* wrote:
>
> Oops, meant to send this to the list...
>
> ------------------
>
> Aside from the usual response of fiddling with CFM and ERP values so that
> only a particular amount of penetration is allowed, I beleve that there's an
> different solution to your problem.
>
> Since you're creating the sphere geom/body without setting its position,
> it's likely created at the origin, and thus immediately penetrating the
> plane (in fact, the plane would split it in half).  Try setting the geom
> position to some positive height (greater than the radius) and see if that
> works.
>
> Also, to set the sphere's mass by value rather than by density, use
> dMassSetSphereTotal, the *Total versions of these functions accept total
> mass as an argument.
>
> -Elijah
>
> On 8/7/06, Anna-Beth Fox <anna_beth_fox at yahoo.com.au> wrote:
> >
> > Hello again all,
> >
> > I have setup a simple ODE test bed for experiments and the like and when
> > I create a plane (for the floor/ground representation) and a sphere, the
> > sphere "sinks" into the plane under gravity. For example:
> >
> > ...
> >    dMass m;
> >
> >    my_world = dWorldCreate();
> >    my_space = dHashSpaceCreate(NULL);
> >    contact_group = dJointGroupCreate(0);
> >    dWorldSetGravity(my_world, 0.0f, - 9.81f, 0.0f);
> >    dWorldSetCFM(my_world, 0.0001f);
> >    dWorldSetContactMaxCorrectingVel(my_world, 0.1f);
> >    dWorldSetContactSurfaceLayer(my_world, 0.0001f);
> >    dCreatePlane(my_space, 0.0f, 1.0f, 0.0f, 0.0f); // Floor
> >
> >    the_ball.body = dBodyCreate(my_world);
> >    the_ball.geom = dCreateSphere(my_space, 0.5f);
> >    dGeomSetBody(the_ball.geom, the_ball.body);
> >
> >    dMassSetZero(&m);
> >    dMassSetSphere(&m, 5.0f, 0.5f); // Really any density greater than
> > 2.0!!!
> >    dBodySetMass(the_ball.body, &m);
> >
> > What's the issue here? What am I missing or stuffed up? And how do I set
> > the mass of the sphere to be like 21Kg.
> >
> > TIA peeps.
> >
> > Anna-Beth
> > Send instant messages to your online friends http://au.messenger.yahoo.com
> >
> >
> > _______________________________________________
> > ODE mailing list
> > ODE at q12.org
> > http://q12.org/mailman/listinfo/ode
> >
> >
> >
>
> Send instant messages to your online friends http://au.messenger.yahoo.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20060808/4ec66f8d/attachment.htm


More information about the ODE mailing list