una-auxme / paf

MIT License
6 stars 0 forks source link

[Feature]: Fix steering PID in vehicle_controller to fix wrong steering in PurePursuit #141

Closed hellschwalex closed 8 months ago

hellschwalex commented 10 months ago

Description

In Leaderboard 2 the carla vehicle seemingly reacts differently to the input steering values. For once it looks like, they inverted the steer [-1 ; 1] in the carla_control_cmd message to now steer right on negative values?? ( negative was "steer left" in Leaderboard1)

There is a PID in vehicle controller that controls the steering to smoothly instead of abruptly steer into the newly calculated steering_angle. -> This PID is not tuned, and in fact that badly tuned, for leaderboard 2, that we can not drive with it. -> Tuning this PID and inverting the steering for the carla comand message will hopefully finally get us to finally drive again in leaderboard 2.

Definition of Done

hellschwalex commented 10 months ago

We may do not need this PID since it only delays the steer input (which should be optimal from our steering controllers) so if at a given time/position a steer of 30° to the right is optimal, we should just drive at 30° right steering and not slowly go from 0 to 30°. This needs further testing as absolut steering inputs ARE POSSIBLE (tho not realistic but the simulation does not punish us for using jumpy steering inputs) BUT MAYBE the jumpy nature of this leads to more unstable trajectory following?

hellschwalex commented 9 months ago

Disabled the PID in vehicle controller and also the strange tuning of the calculated Steering-Inputs from the Steering Controllers. This also removed the clipping of the carla-steering-singal to -0.75 ; 0.75 to now use the full range -1 ; 1. Vehicle_Controller should only "map" the steering-Inputs (in rad) to [-1 ; 1] and invert them (since for the carla_steering-signal right and left are just inverted from what is calculated in both controllers). This simplifies the understanding of the signalflow for steering alot, and allows proper tuning of PurePursuit and Stanley in the future.