How to model a connected axis suspension

Hi,

the PxVehicle classes seem to provide only support for independent wheel suspension but we need to model a axis-wise connected suspension like it is found at tractors front axles (both wheels are connected to an axle which is connected in one point to the chassis, so with no spring and damper if right wheel goes up left wheel should go down). I found the thread about an articulated vehicle ([url]Articulated Vehicles, PhysX 3.2.2 - Physics Modeling (closed) - NVIDIA Developer Forums) where it is mentioned that oscillating axles are supported but not how. As far as I understand oscillating axis means exactly such a tractor front axle. Using joints looks like beeing problematic as both front wheels are driven and the kinematic and connection to rear axle and drivetrain is lost.
Is there someone who has an idea or a good starting point?
I hope I gave a understandable description of my problem. Asking this in english and in lack of the correct technical term is quite challenging. Otherwise feel free to ask.

Thanks for your ideas

Steffen

We got some vehicles with oscillating axles in our application. But we just fake them, the difference between the oscillating and independent wheel suspension is minor. Ocillating seem more unstable to be honset, since the need of extra joints.

Then we just make it look like it’s Ocillating in the graphics, so that the user atleast get some immersion.

Thanks for your answer. At least it shows me that someone understood our problem. Faking it is quite hard in our case because it is an vehicle without suspension at all. So the left wheel of the oscillating axle will react directly to the right one only restricted by the completely rigid rear axle. While searching for a solution and discussion with mechanical engineers we came to the same conclusion as Edy ([url]http://projects.edy.es/trac/edy_vehicle-physics/wiki/TheStabilizerBars[/url]) does: no stable vehicle without stabilizers. So if there would be some construct of stabilizer bars at the PhysX vehicles basis it would be easy to also implement a oscillating axle. So for now we will search for a way to directly influence force computation of the opposite wheels.

I think you could quite quickly add stabilizer bars by adding forces to the rigid body immediately after the vehicle update has completed. It would just be a question of computing the application point of the force, the direction of the force (this would be the suspension travel direction) and the magnitude of the force (this would probably be proportional to the difference in spring compression between the left and right wheels).

Here is some pseudo-code for 3.3 for the front stabiliser bar:

PxRigidDynamic* rd = myVehicle->getRigidDynamicActor();

const PxVec3 posLeft = rd->getGlobalPose().transform(rd->getCMassLocalPose().p + myVehicle->mWheelsSimData.getSuspForceAppPointOffset(PxVehicleDrive4WWheelOrder::eFRONT_LEFT));
const PxVec3 posRight = rd->getGlobalPose().transform(rd->getCMassLocalPose().p + myVehicle->mWheelsSimData.getSuspForceAppPointOffset(PxVehicleDrive4WWheelOrder::eFRONT_RIGHT));

const PxReal forceMag = wheelQueryResults[PxVehicleDrive4WWheelOrder::eFRONT_LEFT] - wheelQueryResults[PxVehicleDrive4WWheelOrder::eFRONT_RIGHT];

const PxVec3 dirLeft = rd->getGlobalPose().transform(myVehicle->mWheelsSimData.getSuspensionTravelDir(PxVehicleDrive4WWheelOrder::eFRONT_LEFT);
const PxVec3 dirRight = rd->getGlobalPose().transform(myVehicle->mWheelsSimData.getSuspensionTravelDir(PxVehicleDrive4WWheelOrder::eFRONT_RIGHT);

const PxVec3 forceLeft = dirLeft * (-forceMag);
const PxVec3 forceRight = dirRight * (+forceMag);

PxRigidBodyExt::addForceAtPos(*rd, forceLeft, posLeft, PxForceMode::eFORCE);
PxRigidBodyExt::addForceAtPos(*rd, forceRight, posRight, PxForceMode::eFORCE);

//////////////////////

I’m not certain that the magnitude of the force is exactly what you want in the above code but I hope it gives you an idea of what you could do (there might also be a minus sign missing somewhere).

Gordon

That is the way to go as I thought. Thanks Gordon for the detailed explanation how to do it. I was off for a week now but we will try to integrate this in our simulation framework. This will mainly consists of the where.
One question remains open: wouldn’t that be a reasonable extension to the classes in PhysX Vehicle SDK in general ???

This is an excellent request. We’ll definitely add this to a future release but I’m afraid I can’t guarantee a schedule for this at the moment.

Thanks,

Gordon