[ODE] Problem with conveyor belts and static object

David Whittaker david at csworkbench.com
Mon Apr 21 12:40:02 2003


Try setting mu to something other than dInfinity.  The "correct" solution
would be a spinning around the static geom, but spinning requires both x
and y components to the applied force, which is expressly forbidden by mu
= infinity.  Adjust mu (probably in the 10-100 range), and it allows the
box to slip in the x direction.  mu and mu2 should probably be the same if
you want realistic behavior.  Also, don't forget that mu affects the
interaction of the box with the static geom as well, but gets a somewhat
random fdir1 perpindicular to the contact normal.  So it might turn out
that it can only slip up and down the static geom with mu2 = 0, thus the
sinking into the ground.  mu = mu2 would help here as well, turning the
contact joint into a weak ball-and-socket joint of sorts.

Hope that helps,
David

> 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
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode