[ODE] No plane v/s box collision

George Laskowsky glaskows at alumnos.inf.utfsm.cl
Mon Dec 4 08:44:35 MST 2006


Hi,

 I am trying to stack some boxes above a plane. I am using x-right,
y-up, z-out coordinate system.
 My sim values are:
	ERP 0.2
	CFM 1e-5
 	Contact Surface Layer 0.001
	World Gravity (0.0, -9.81, 0.0)
	Step Size 0.05

 I created the plane using
	dCreatePlane (espacio, 0, 1, 0, 0);

 The callback collision function is
	
static void callback (void *data, dGeomID o1, dGeomID o2) {
  dBodyID b1 = dGeomGetBody(o1);
  dBodyID b2 = dGeomGetBody(o2);
  dContact contact[MAX_CONTACTS];
  for (int i = 0; i < MAX_CONTACTS; i++)
  {
    contact[i].surface.mode = dContactBounce | dContactSoftCFM;
    contact[i].surface.mu = dInfinity;
    contact[i].surface.mu2 = 0;
    contact[i].surface.bounce = 0.01;
    contact[i].surface.bounce_vel = 0.1;
    contact[i].surface.soft_cfm = 0.01;
  }
  if (int numc = dCollide(o1, o2, MAX_CONTACTS, &contact[0].geom,
sizeof(dContact)))
  {
    for (int i = 0; i < numc; i++)
    {
      dJointID c = dJointCreateContact(Simulacion::mundo,
Simulacion::contactos, contact + i);
      dJointAttach(c, b1, b2);
    }
  }
}

	When I check o1 or o2 against the dGeomID for the plane I get positive
answers (there are collisions). But ODE is not doing a thing about it.

 If you can help me, I will really happy :)

 Thanks guys (and girls)



More information about the ODE mailing list