[ODE] jitter again && [ODE] asked a different way

Chris Brodie Chris.Brodie at macquarie.com
Sat Jan 18 00:25:02 2003


Sent again with no files attached...

-----Original Message-----
From: Chris Brodie 
Sent: Saturday, 18 January 2003 6:03 PM
To: 'ode@q12.org'
Subject: RE: [ODE] jitter again && [ODE] asked a different way


Not that it helps you but I have similar problems with my own buggies, though not boxes. My buggies jitter on the floor until they flip, followed 10 mins later by is blasting in to light speed. Occationally they dance around like ballarina's spinning on a single wheel. Fun but not the point of the simulation :)

My box piling code seens to work well on my simple ground plane based world but oddly not if I replace the plane with a massive box. Here is my collision code is it provides you with any insights. The box data I use is:


static void ProximityTest (void *data, dGeomID o1, dGeomID o2)
{
	const size_t N = 6;
	dContact contacts[N];
	const size_t n = dCollide(o1, o2, N, &contacts[0].geom, sizeof(dContact));
	for(size_t i = 0; i < n; ++i)
	{
        contacts[i].surface.mode = dContactBounce;
		contacts[i].surface.mu = 250;
		contacts[i].surface.bounce = 0.3f;
		contacts[i].surface.bounce_vel = 0.05f;
		dJointID c = dJointCreateContact(CDynamics::GetInstance().GetWorld(), CDynamics::GetInstance().GetCollisionGroup(), &contacts[i]);
		dJointAttach(c, dGeomGetBody(contacts[i].geom.g1), dGeomGetBody(contacts[i].geom.g2));
	}
}


Here is my world data(So you can see the three boxes positioned above each other:

<World Gravity="0.5">
	<Camera Position="-2 3 15" Angle="0 0 0" />
	<Camera Position="2 5 15" Angle="0 0 0" />
	
	<Light Style="Directional" Position="10 10 10" Range="200"/>

	<DynamicEntity Position="1 8 0" Angle="0 45 0" File="Test\UnitBox.Model"/>
	<DynamicEntity Position="0 6 -1" Angle="0 0 0" File="Test\UnitBox.Model"/>
	<DynamicEntity Position="0 4 1" Angle="0 0 0" File="Test\UnitBox.Model"/>
	<DynamicEntity Position="1 4 -1" Angle="0 0 0" File="Test\UnitBox.Model"/>
	<DynamicEntity Position="-1 7 1" Angle="0 0 0" File="Test\UnitBox.Model"/>
	<DynamicEntity Position="0 10 0" Angle="0 0 0" File="Test\UnitBox.Model"/>

	<DynamicEntity Position="-2 1 0" Angle="0 0 0" File="Test\UnitBox.Model"/>
	<DynamicEntity Position="-2 3 0" Angle="0 0 0" File="Test\UnitBox.Model"/>
	<DynamicEntity Position="-2 5 0" Angle="0 0 0" File="Test\UnitBox.Model"/>

	<StaticEntity Position="0 0 0" Angle="0 0 0" File="Ground.lwo"/>

</World>

As you can see from the pic  http://fourth.flipcode.com/screenshots/large/18.html it works fine. This was compiled on ODE 0.35



NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank.