[ODE] Contact in articulated bodies (newbie question)
Erin Catto
erincatto at sbcglobal.net
Thu Nov 18 20:40:36 MST 2004
Here's a couple hints:
- Use quick step
- Set erp = 0.1*time_step
- Set softness = 0
Erin
-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of Joshua
Hale
Sent: Thursday, November 18, 2004 4:46 PM
To: ode at q12.org
Subject: [ODE] Contact in articulated bodies (newbie question)
Dear List-members,
I have just put together a simple articulated humanoid model and am
trying to sort out the contacts. I find that the contacts are frequently
resolved with excessive forces so that the figure is launched into the
air. I am wondering if there is something simple I should do to resolve
the problem?
I have set the masses/dimensions around the value 1. I am only checking
for contact between my figure's feet and the floor since I don't want it
to fall over (so I don't care if it goes through the floor since falling
over at all is a mistake). I have managed a simulation step of
0.0001-0.0005 (with a frame rate of 0.05). I've copied my contact
callback below (which is taken from test_buggy.cpp).
Any suggestions very much appreciated!
Thanks,
Josh.
static void nearCallback(void *data, dGeomID o1, dGeomID o2)
{
int i, n;
// only collide things with the ground
int g1 = (o1 == ground);
int g2 = (o2 == ground);
if (!(g1 ^ g2))
return;
const int N = 10;
dContact contact[N];
n = dCollide(o1, o2, N, &contact[0].geom, sizeof (dContact));
if (n > 0) {
for (i = 0; i < n; i++) {
contact[i].surface.mode = dContactSlip1 | dContactSlip2 |
dContactSoftERP | dContactSoftCFM | dContactApprox1;
contact[i].surface.mu = dInfinity;
contact[i].surface.slip1 = 0.1;
contact[i].surface.slip2 = 0.1;
contact[i].surface.soft_erp = 0.5;
contact[i].surface.soft_cfm = 0.3;
dJointID c = dJointCreateContact(world, contactgroup,
&contact[i]);
dJointAttach(c,
dGeomGetBody(contact[i].geom.g1),
dGeomGetBody(contact[i].geom.g2));
}
}
}
--
Joshua G. Hale, Ph.D. Tel +81 774 95 2403
ATR Computational Neuroscience Laboratories Fax +81 774 95 1236
2-2-2 Hikaridai "Keihanna Science City" josh(at)joshhale.com
Seiko-cho Souraku-gun Kyoto 619-0288 Japan www.joshhale.com
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode
More information about the ODE
mailing list