ODE - trying to make a car/vehicle

I too have been making a vehicle with ODE, exactly like Q described (if anyone remembers my previous questions about the built in Panda physics, I have seen the light and started using ODE. If anyone else is apprehensive about it’s complexity, just dive in, its actually very logical!). I am using 4 spheres for wheels, attached to a body via hinge2 joints.

My car rolls over very easily when cornering, which I understand is because the ODE physics are realistic, so I need to implement realistic solutions, such as sway bars and lower center of gravity.

The solution in the ODE wiki makes some sense, but I have two issues with their calculation of the “anti sway force”

The force is proportional to the difference in the vertical (relative to the vehicle) displacement of the opposite wheels, i.e. how much the suspension is compressed.

Issue 1) This solution depends on how “flexy” the suspension is, and I cannot find out how to adjust this in the OdeHinge2Joint. Does anyone know how to adjust/set the travel and stiffness?

Issue 2) The sway force will be applied even if the wheels aren’t on the ground, so this might make for some weird rollover dynamics.

I think the logical solution is to get the upward force being applied to a wheel by the ground (or by the wheel on the suspension) and then apply it in the opposite direction on the opposite wheel, but how do I find that force?

Hope I haven’t been too verbose, just trying to be clear :wink: