[ODE] Problem with conveyor belts and static object
Antonio Tejada Lacaci
wildfred at teleline.es
Mon Apr 21 08:57:02 2003
Dear ODErs,
I'm doing my first tests with ODE (I plan to use ODE with a robotic
arm programming environment I've developed) and I've encountered a
problem with static objects (objects with geometry but no body) and
conveyors (implemented with friction, as suggested by ODE faq).
The program is just a straight copy of test_boxstack.c example,
compiled with VC 6.0 and run on Win98.
I've added the following code to the nearcallback so the ground of the
example acts as a conveyor:
for (i=0; i<MAXCONTACTS ; i++) {
contact[i].surface.mode = dContactBounce | dContactSoftCFM;
contact[i].surface.mu = dInfinity;
contact[i].surface.mu2 = 0;
contact[i].surface.bounce = 0.1;
contact[i].surface.bounce_vel = 0.1;
contact[i].surface.soft_cfm = 0.01;
if ( ((o1 == g_dgPlane) || (o2 == g_dgPlane) )) {
contact[i].surface.mode |= dContactMotion1 | dContactFDir1;
contact[i].surface.motion1 = 0.01f;
contact[i].fdir1[0] = 1;
contact[i].fdir1[1] = 0;
contact[i].fdir1[2] = 0;
}
}
where g_dgPlane is the ground geometry.
The static geometry is just a dCreateBox done at the start of the
program.
When I drop a box, it begins to slide along the ground, which is OK,
but as soon as it collides against the static box, instead of
"torquing" left or right, it sinks, goes below and through the static
box and then it bounces up as if affected by bouyancy.
You can see pictures of the problem at
http://www.telefonica.net/web/atejadalacaci/pfc/ode/index.html
I've tried several other approaches
- Increasing the number of contact points.
- Using forces instead of friction to simulate the conveyor: whenever
a contact point is created for a box/conveyor collision, I create a
force on that contact point in the direction of the conveyor belt.
- Decreasing the time step.
- Disabling dContactBounce from the contact point.
- Insetting & outsetting the static object wrt the ground.
but in all cases the problem remains.
Any hint on whether it's possible to fix this and how to fix it?
Thanks!
Cheers!
Antonio Tejada Lacaci