[ODE] Slider joints

Mehmet sanli mehmetsanli81 at hotmail.com
Wed Sep 13 01:28:58 MST 2006


Hi everyone, 

I'm a begginer in ODE and I want to simulate a truck which looks like a unimog. I added (2) slider joints insted of using hinge 2 joints at the back of the truck to obtain more suspension for the truck  but I couldnt get any suspension on slider joints. I want higher and more suspension because I'm planning to drive this truck on big rocks.   I set ted dParamSuspensionERP and CFM as in the hinge 2 joints but it doesnt have any effect. How can I add suspension to my slider joints? Can you please help?

sample code: 

	// slider joint 0,1
		joint[0] = dJointCreateSlider(world,0);
		dJointAttach (joint[0],body[7],body[5]);
		dJointSetSliderAxis(joint[0],0,0,-1);
		dJointSetSliderParam(joint[0],dParamHiStop,0.1);
		dJointSetSliderParam(joint[0],dParamLoStop,0);
		//dJointSetSliderParam (joint[0],dParamFudgeFactor,0.1);
		//dJointSetSliderParam (joint[0],dParamBounce,0.5);
		dJointSetSliderParam(joint[0],dParamFMax,32);
		dJointSetSliderParam(joint[0],dParamVel,1);
		
		joint[1] = dJointCreateSlider(world,0);
		dJointAttach (joint[1],body[8],body[6]);
		dJointSetSliderAxis(joint[1],0,0,-1);
		dJointSetSliderParam(joint[1],dParamHiStop,0.1);
		dJointSetSliderParam(joint[1],dParamLoStop,0);
		//dJointSetSliderParam (joint[1],dParamFudgeFactor,0.1);
		//dJointSetSliderParam (joint[1],dParamBounce,0.5);
		dJointSetSliderParam(joint[1],dParamFMax,32);
		dJointSetSliderParam(joint[1],dParamVel,1);



	for (i=0; i<=1; i++) {
		//dJointSetSliderParam (joint[i],dParamSuspensionERP,ERP);
		//dJointSetSliderParam (joint[i],dParamSuspensionCFM,CFM);
		//dJointSetSliderParam (joint[i],dParamFMax,200);
		dJointSetSliderParam (joint[i],dParamCFM, CFM);
		//dJointAddSliderForce (joint[i], 1000);
	}

this is not a working code and I dont know which param shoul I use!

_________________________________________________________________
Use Messenger to talk to your IM friends, even those on Yahoo!
http://ideas.live.com/programpage.aspx?versionId=7adb59de-a857-45ba-81cc-685ee3e858fe


More information about the ODE mailing list