FS-Driverless / Formula-Student-Driverless-Simulator

A virtual world where Autonomous Systems from different Formula Student teams can compete in time-trial challenges
https://fs-driverless.github.io/Formula-Student-Driverless-Simulator
GNU General Public License v2.0
204 stars 85 forks source link

Throttle has a dead zone in the beggining #342

Open DavidMRGomes opened 2 years ago

DavidMRGomes commented 2 years ago

Hey guys, I have been struggling a bit with the throttle values used in the topic /fsds/control_command.throttle in these last days. Firstly, I used the released version of FSDS v2.1.0 and when I sent a command lower than 0.278 in the throttle field the car would simply not move. When this threshhold was surpassed it would accelerate instantly reaching really high speeds. I then decided to download UnrealEngine and change the Torque Curve in order to better fit an eletric car Torque curve. This indeed produced a change. The deadzone changed from 0-0.278 to 0-0.085. The behaviour after this is the same as before, the car accelerates abruptly acquiring really high speeds. I wonder if anyone had the same problems. Any help is appreciated. Cheers!

wouter-heerwegh commented 2 years ago

Hi @DavidMRGomes,

I was aware of the 0.2-ish deadzone but saw this more as the needed amount of torque to overcome friction of the gearbox, etc. If you go above this threshold, the car keeps accelerating, but in real life, I guess it would have more friction due to wind. I'm not sure if this is properly handled in the current model, but I would expect it to accelerate at a slower pace than using full throttle.

I guess it all depends on the behaviour you want to get. Could you explain a bit more in detail what you were expecting when just going above the threshold?