- 3
- United Kingdom
Thanks for taking the time to reply. So having re-read section IV, I think my mistake was thinking that I needed to somehow calculate/define spin e.g. spin = fwd_velo / radius, whereas it was the actual code/methods outlined in section IV that calculated the spin value.No worries. 🐺 I will add an edit to help clarify this part.
What we're doing here is actually treating a wheel's angular velocity more like an independent physics property, acted upon by the sum of torques on each wheel as shown in section IV. The wheels have their own virtual mass and momentum together with that angular velocity, or spin.
The drive force at the wheels is a product of the tire formula (whether it's the Pacejka formula, Brush formula, or another formula), which involves a comparison betweenspin * radius
and the Z velocity (in a localized reference frame) to calculate the slip ratio,(spin * radius - z_vel) / abs(z_vel)
. So spin has a naturally indirect effect on the force value moving the car with the driven wheels. From Newton's third law, the same tire force that moves the car also exerts a torque back on the wheel, which is used to initialize the torque sum each frame.
In other words, there are distinct relationships of powertrain <-> wheel <-> tire <-> surface.
I suspect I need to re-read the guide and rebuild my implementation as I don't think I've got the all the elements in the right order.