[ODE] No plane v/s box collision
Yung-Chang Tan
yungchang.tan at gmail.com
Fri Dec 8 11:47:19 MST 2006
With step_size = 0.05, there's no way you can use gravity of -9.81 m/s^2.
Use gravity = -0.5 m/s^2. Reduce step_size if you want more realistic
gravity value.
On 12/4/06, George Laskowsky <glaskows at alumnos.inf.utfsm.cl> wrote:
>
> 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)
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20061208/98157558/attachment.htm
More information about the ODE
mailing list