RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.02k stars 178 forks source link

Lightweight wheels are unstable with Viscous and Locked differentials #3189

Open whitespace-rebel opened 3 days ago

whitespace-rebel commented 3 days ago

Hello everyone,

I'm trying to create 20 kg wheels. They work with the open and split differentials. But they are very unstable with viscous and even more unstable with the locked differential.

The traction control helps to make the wheels more stable. Without traction control the wheels (or the axle?) just explode.

With the viscous differential the wheels accelerate the car while i'm not even pressing the accelerate button. With the locked differential the car just gets reset when i'm trying to accelerate.

I don't know the solution, but I looked at the code for the differentials. Maybe the damping force is too high for lightweight wheels.

For demonstration, here is a modifeied .tuck file based on Ford Mustang (1979-1982) from PoLi. Get the original from: https://forum.rigsofrods.org/resources/ford-mustang-1979-1982.712/

and put the .truck file inside the 1982-Ford-Mustang-351W-PoLi.zip file (or folder if you extracted it): 1982-Ford-Mustang-MODIFIED.zip

CuriousMike56 commented 3 days ago

Please provide an example truck file demonstrating the issue.

whitespace-rebel commented 3 days ago

Please provide an example truck file demonstrating the issue.

I edited my original post.

whitespace-rebel commented 3 days ago

After further investigation it is clear that the forced acceleration is caused by the traction control, and all differentials are affected by this. The instability (exploding) is limited to the Viscous and Locked differentials only.

whitespace-rebel commented 3 days ago

It seems like the traction control is trying to correct the wheel slip even if you decelerate (lift and coast). So when you have enough negative torque on the wheels, the traction control wants to correct it by accelerating?

Also the more pulses/second you have set in the traction control settings, the more error is produced (probably because the values get so small that the floating point precision is not enough).

ohlidalp commented 2 days ago

The game applies torque to wheels by adding forces to all outer nodes. The simpler wheel models don't even have separate rim and tire so there's no other way to do it. I don't know from the top of my head whether the same applies to Tim+tire models, but I expect so.

Wheel stability is a frequent topic around here, I'm not really sure how to approach it. All our wheel models are hard coded and often rely on external tools to add extra reinforcement beams.

whitespace-rebel commented 1 day ago

I would like to summerise.

The wheels themselves seem to be ok. They work with the Open an Split differentials.

There are two problems:

  1. Exploding wheels (or axle?) with Viscous or Locked Differentials
  2. Traction Control accelerating the car even without the acceleration button pressed

Maybe reducing the damping force of the viscous and locked differentials will help with the first problem. I have yet to compile RoR. If I succeed I will try it.