This is a topic for John Easton’s wobbly navigation which was initially raised on facebook.
Both steering and throttle are having real troubles. Below is a graph of the throttle output (channel 3) vs the vehicle’s speed. It shows a very big oscillation in the output speed almost perfectly out of phase with the output to the motor.
I think this will help with the speed control:
- reduce ATC_SPEED_FILT to “1” (it’s possible even lower value will be required) This will smooth output the input to the speed controller so that it responds much more slowly. I’ll reduce the defaults in master as well so future users get a better starting point.
- reduce ATC_SPEED_P to 0.02
- reduce ATC_SPEED_I to 0.02
It’s actually possible that the unstable throttle output is affecting the steering control because (I think) on a boat the turn response is proportional to the motor output so fixing the above may help steering too. Anyway, in the steering control we still see that it’s not able to achieve the desired lateral acceleration.
This may help:
- set TURN_MAX_G to 0.2 (currently it’s an unrealistic 1G). This should stop the controllers from attempting the impossibly high lateral acceleration requests.
- set NAVL1_PERIOD to 12. This will slow the aggressiveness to get back on the path
- set NAVL1_XTRACK_I to 0. This will stop I term build-up in case the navigation controller’s requests cannot be executed by the lower level turn controller.
- reduce ATC_STR_RAT_FILT to 5. this will slow down the steering response.
- reduce ATC_STR_RAT_P to 0.2.
By the way, what type of GPS are you using? If it’s a Ublox could you try setting GPS_TYPE to “2”.
As a side note, it would be great if the logs could be made smaller. It looks like the vehicle was powered on for about 2hrs 15min. Shorter tests as we get it tuned will help me by making the logs smaller and speed up the viewing of logs.
Hopefully this helps.