[ODE] velocity and friction

naspiri naspiri at yahoo.it
Tue Apr 3 01:35:48 MST 2007


Hi
I've some balls rolling on a plane and have noticed that the balls 
velocity is constant between two collisions,
thats when the balls only roll without colliding with each other, so 
balls never stop.
Why that? Friction with the plane should reduce velocity, shouldn't it?
I've tried different mu and erp, but nothing change...

My nearcallback function is:
void nearCallback (void *data, dGeomID o1, dGeomID o2)
{
    int i;
    dContact contacts[MAX_CONTACTS_NUM];
    dJointID c;
    int n = dCollide(o1, o2, MAX_CONTACTS_NUM, &(contacts[0].geom), 
sizeof(dContact));
   
    for (i=0; i<n; i++){
        contacts[i].surface.mu = 1.0e4;
        contacts[i].surface.mode = dContactBounce;
        contacts[i].surface.bounce = 0.9;
       
        c = dJointCreateContact (world,contactGroup,&contacts[i]);
        dJointAttach (c,dGeomGetBody(contacts[i].geom.g1),
                        dGeomGetBody(contacts[i].geom.g2));
    }
}




More information about the ODE mailing list