[ODE] very slow slider speed?

Thilo Weigel weigel at informatik.uni-freiburg.de
Wed Sep 10 14:06:52 MST 2003


Hello everybody,
I am modelling the rods in a foosball game as an object which moves 
along one axis and also turns around that axis. Part of the code looks 
similar to this:

	world = dWorldCreate();

	body1 = dBodyCreate(world);
	body2 = dBodyCreate(world);

	slider = dJointCreateSlider(world, 0);
   	dJointAttach(slider, body1, 0);
  	dJointSetSliderAxis(slider,0,1,0);
	
	hinge = dJointCreateHinge(world, 0);
	dJointAttach(hinge, body1, body2);
	dJointSetHingeAnchor(hinge, 0, 0, 0.1);
	dJointSetHingeAxis(hinge, 0, 1, 0);

	geom = dCreateBox(0, 0.01, 0.01, 0.01);
	dGeomSetBody(geom, body2);
	dGeomSetPosition(geom, 0, 0, 0);


When movig and turning using dJointSetSliderParam(slider, dParamVel, XY) 
everything works fine. However, if another object (the ball) hits the 
rod (say a man-geom attached to it) it starts to move very slowly. 
dBodyGetLinearVel(body1) gives values around 1e-5 and lower. After the 
collision occured, no further collisions happen. In the sequel the time 
consumed in a dWorldStep goes up considerably and there doesn't seem to 
be a way of stopping the rod (neither dJointSetSliderParam(slider, 
dParamVel, 0) nor dBodySetForce/LinearVel work).

Does anybody now if ODE has a problem with really very slow object 
movements? Is there a way of avoiding/fixing/recovering from the 
increased time consumed in a dWorldStep (10 times more than normal)

Any hints a very appreciated,

thank you very much:

Thilo Weigel



More information about the ODE mailing list