[ODE] sphere-mesh or sphere-box collision problems

Aras Pranckevicius nearaz at interamotion.com
Mon Apr 28 06:30:02 2003


This is a multi-part message in MIME format.

------=_NextPart_000_00C9_01C30DA3.74E80960
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I'm having problems in my car simulation due to collision detection.

I have a car (standard: box body, four spheres for the wheels, and four =
hinge2's).

The road is a perfectly flat triangle mesh, I'm using tri-collider (gl's =
version) for collision. The problem is that the wheels tend to jump =
upwards when they cross the edge of adjacent triangles. It's almost =
impossible to drive over the flat road without doing fancy flips.

I've tried tuning the contact joint creation (approx1 vs. none, =
bounce/no bounce, various mu values), sphere-tri collider (merge =
contacts vs. no merge), ERP, CFM, hinge suspension, double vs. single =
precision - no acceptable results.

While debugging, I've found that contact normal is always calculated =
correctly, the contact point also, there are some variations in contact =
depth (but the depth always varies while the car is moving).

After some 15 hours of debugging, I've replaced the trimesh with a box =
geometry - now the wheels don't jump on tri edges (obviously), but the =
car tends to jump or dive in random places of the box anyway.



Aras Pranckevicius aka NeARAZ
http://www.gim.ktu.lt/nesnausk/nearaz/

------=_NextPart_000_00C9_01C30DA3.74E80960
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm having problems in my car =
simulation due to=20
collision detection.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have a car (standard: box body, four =
spheres for=20
the wheels, and four hinge2's).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The road is a perfectly flat triangle =
mesh, I'm=20
using tri-collider (gl's version) for collision. The problem is that the =
wheels=20
tend to jump upwards when they cross the edge of adjacent triangles. =
It's almost=20
impossible to drive over the flat road without doing fancy =
flips.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I've tried tuning the contact joint =
creation=20
(approx1 vs. none, bounce/no bounce, various mu values), sphere-tri =
collider=20
(merge contacts vs. no merge), ERP, CFM, hinge suspension, double vs. =
single=20
precision&nbsp;- no acceptable results.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>While debugging, I've found that =
contact normal is=20
always calculated correctly, the contact point also, there are some =
variations=20
in contact depth (but the depth always varies while the car is=20
moving).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>After some 15 hours of debugging, I've =
replaced the=20
trimesh with a box geometry - now the wheels don't jump on tri edges=20
(obviously), but the car tends to jump or dive in random places of the =
box=20
anyway.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Aras Pranckevicius aka NeARAZ<BR><A=20
href=3D"http://www.gim.ktu.lt/nesnausk/nearaz/">http://www.gim.ktu.lt/nes=
nausk/nearaz/</A></FONT></DIV></BODY></HTML>

------=_NextPart_000_00C9_01C30DA3.74E80960--