[ODE] Problems to walk on a Trimesh

Simon Adler s.adler at sensator.com
Mon Nov 14 03:16:43 MST 2005


Hello,

I hope somebody can help with FDS Values and a Problem to walk over a
Trimesh.
I've got a Box embeded Character which has to walk over a Trimesh surface.
If my Character stays on the Ground and I accelerate him with dAddForceRel
it
don't move forward. It fall over the front edge.
I know that the Force is atached to the Point of Mass, but I translated the
Masspoint down (Translate mass to (0,-1.5 * boxcenter.y, 0)). This shouldn't
be the point.
I use in my callback:

void
StateLevel2::CollideCallback(dGeomID geom1, dGeomID geom2)
{
  nOpendeWorld * world = (nOpendeWorld *)manager.Get("world");
  const int NoCollision = 100;
  dContact * hitspace = new dContact[NoCollision];
  int hits = nOpende::Collide(geom1, geom2, NoCollision, &hitspace[0].geom,
sizeof(dContact));

  while (hits--)
  {
    hitspace[hits].surface.mode     = dContactSlip1 | dContactSlip2 |
dContactSoftERP | dContactSoftCFM | dContactApprox1;
    hitspace[hits].surface.soft_erp = 0.2f;
    hitspace[hits].surface.soft_cfm = 0.0f;
    hitspace[hits].surface.slip1    = 0.001f;
    hitspace[hits].surface.slip2    = 0.001f;
    hitspace[hits].surface.mu       = 9.0f;
    dJointID joint = JointCreateContact(world->id, ContactGroup ,
hitspace+hits);
    JointAttach(joint, GeomGetBody(geom1), GeomGetBody(geom2));
  }
  delete[] hitspace;
}

I tried to not use dContactApprox1 and mu = dInfintiy, but same Result.

My other Question is about the Force Depended Slip. I use dContactSlip with
both Directions, with
a small Value. If I don't my Object fall right through the TriMesh Surface.
Why? I don't understand!

I thought - with my understanding - this should be enogh:

hitspace[hits].surface.mode     = dContactSoftERP | dContactSoftCFM;
hitspace[hits].surface.soft_erp = 0.2f;
hitspace[hits].surface.soft_cfm = 0.0f;
hitspace[hits].surface.mu       = dInfinity;

By the Way: My Character has a mass of 1.0f, accelerated with (50,0,0) to
walk forward (rel),
and a force of (0,-10,0) directed to his bottom to ensure that he can stand
on non-plane
Surfaces.


Thanks for any Ideas

Simon





More information about the ODE mailing list