Rigid Wheel (Articulated) Suspension system advice please

I have the suspension system already put together and have the joints and actors all working as they should in a networked environment. The following are a few implementation areas that I could use suggestions for. I’m not asking for anyone’s code, just some suggestions on how you would go about achieving what I need to do.

First let me just say the suspension is comprised of a chassis actor then 4 Dof6 joints connecting actors used for hubs. This portion allows spring suspension and steering. Next is another 4 actors for wheels connected to their corresponding hub actor with a revolute joint to allow for wheel rotation.

  1. How would you recommend steering the wheels?

  2. How would you recommend applying rotational torque to the powered wheels?

  3. How would you implement a anti-sway bar system? In this case I know you need to get the applied vertical force and add it to the adjacent assembly by some sort of factor of the original force.

I’m sure after a while of beating my head into my desk I will figure this out, but I am wise enough to know to ask other programmers for advice when I’m trying to venture into something I am unfamiliar with.

Thank you in advance for any help you give.

The Second question I figured out, mostly. Torque time the radius of the wheel applied as an impulse would be the angular velocity I would want. But how to leave it free rolling when there is not torque being applied?

I would also like to ask if anyone know if there is a variable with the joints that allows you to see what length they are at? You know so I can tell what point a spring is at within its range limits.

Hello,

The answers to your questions really depend on the fidelity you want to achieve and computational budget. Sometimes, though, the simplest ideas work susprisingly well.

For steering the wheels it might be simplest to just set the pose of the wheel from a steer angle that is computed from the keyboard or gamepad. If you do it this way it makes it very simple to model Ackermann correction with simple trigonometry.

If you have the magnitude of the wheel torque you want to apply you can use the function PxRigidBody::addTorque. This needs to be done in the global coordinate frame. Let’s say the wheel rotates abour the right vector (1,0,0) (basis vector 0) and the torque has magnitude T. The torque to apply is then myRigidBody.getGlobalPose().q.getBasisVector0()*T. If you apply the torque with PxForceMode::Enum mode == PxForceMode::eFORCE the angular velocity of the wheel will be updated at the next physx simulate call. This might be the best mode to choose because it keeps all the velocities in sync. If you stop applying a torque to the wheel it should continue rolling until it loses angular velocity from friction.

The simplest anti-sway model I can think of is just to take the difference in spring length between front-left and front-right wheels. A torque can then be computed to apply to the chassis rigid body that is the product of the anti-sway strength and the difference in spring lengths. This process needs to be repeated for the rear wheels too.

I hope this wasn’t too simple for you.

Gordon