[ODE] Values required to produce at least semi-realistic frictionusing the default constant-force-limit model?

akio cullum_a at bellsouth.net
Sun Mar 14 19:02:22 MST 2004


A simplest way to add friction, as Russ mentions in his doc, is to apply
some sort of drag on the body.  This should be done at every frame, and code
sniplet looks something like what's shown below.  Forces will eventually
settle to 0.

VOID SOMECLASSBODYOBJ::ApplyLinearVelocityDrag(FLOAT dragCoef)
{
    const dReal *temp;
    dReal fX;
    dReal fY;
    dReal fZ;

    temp = dBodyGetLinearVel(m_BodyId);
    fX = temp[0]*(dReal)dragCoef*-1;
    fY = temp[1]*(dReal)dragCoef*-1;
    fZ = temp[2]*(dReal)dragCoef*-1;

    dBodyAddForce(m_BodyId, fX, fY, fZ);
}


----- Original Message ----- 
From: "Megan Fox" <shalinor at circustent.us>
To: "Ode" <ode at q12.org>
Sent: Sunday, March 14, 2004 6:33 PM
Subject: [ODE] Values required to produce at least semi-realistic
frictionusing the default constant-force-limit model?


> I've been using the default friction (constant-force-limit, looking at the
> docs), and I can't seem to find any value that results in even
> semi-realistic friction.  I either set some fraction of dInfinity, and
> get -very- sticky objects that barely even respond to objects 300x their
> mass (they go flying if I drop the bullet on them, but only barely move if
I
> roll the bullet into them), or I set a constant to mu (I believe I tried
> values up into the thousands), and end up with ice-skating boxes.
>
> Is it just not possible to get reasonable results out of the default
> friction?  I'm sure the friction-pyramid implementation is more accurate,
> but the docs seem to suggest that it is significantly more expensive (and
so
> not the the best choice for general case "random box bouncing across a
> surface" collisions).
>
>
> I don't need ultra-accurate results here, this is far from a sim... I just
> need to, say, create a room.  The floor is wood, as are the walls, and
there
> is a counter-top to one side.  The objects sitting on the counter top
should
> clunk around on the wooden not-horribly-slick-but-not-sandpaper-either
floor
> a bit if I knock the table over; They shouldn't ice skate, but they also
> shouldn't act as if the ground is made of an adhesive/sandpaper blend
should
> the player kick one after it has fallen to rest.
>
>
> (and I realize having a bullet 300x as massive is going to break the
> system - I would never have something that massive in the final product -
I
> was just trying to get the dratted objects to move when the bullet rolled
> into them, with largely no success.)
>
> Thanks,
>
> -Megan Fox
> Lead Developer, Elium Project (http://www.elium.tk)
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list