This page decribes how to tune the Navigation control including the “L1 controller”.
The L1 one controller is the highest level steering controller. It accepts position targets (i.e. latitude, longitude points) and the vehicle’s current speed and outputs a desired lateral acceleration which is then fed into lower level controllers (including the Steering Rate controller). Together this leads to the vehicle tracking a line towards the target. This controller is used in all the autonomous modes including Auto, Guided, RTL and SmartRTL.
Recommended steps for tuning the L1 controller:
- connect the ground station to the vehicle using a telemetry radio
- create an rectangular or back-and-forth mission (perhaps using the Mission Planner’s Flight Plan screen) and upload to the vehicle
- arm the vehicle (in Manual or Hold) and switch to Auto mode.
- if the rover weaves along the straights, then raise NAVL1_PERIOD (aka “Lat Acc Cntrl Period”) in increments of 0.5
- if the rover does not turn sharply enough then lower NAVL1_PERIOD (aka “Lat Acc Cntrl Period”) in increments of 0.5
- raise NAVL1_DAMPING (aka “Lat Acc Cntrl Damp”) by increments of 0.05 to improve navigation in tight courses
- WP_SPEED defines the target speed (in m/s) that the vehicle should drive at in Auto and Guided (will also be used in RTL and SmartRTL if RTL_SPEED is set to zero)
- TURN_MAX_G defines the maximum lateral acceleration (in Gs = 9.81m/s/s) the controllers will attempt during cornering. If the vehicle leans dangerously or flips in corners this number should be reduced
- WP_RADIUS specifies the distance before the waypoint that the vehicle may begin turning towards the next waypoint
- WP_OVERSHOOT is used to slow the vehicle before it reaches a waypoint. It is the maximum distance (in meters) that the vehicle may drive beyond the waypoint as it turns towards the next waypoint
- PIVOT_TURN_ANGLE is only used by skid steering vehicles. If the vehicle’s heading error becomes larger than this value (in degrees) the vehicle will momentarily stop and pivot towards the target before continuing.