Rover Cross Tracker error


I have some issues tuning my Rover, using 3.2.0 firmware.

In auto mode the (skidsteer) rover the desired PID values are very nervous. this is strange since I have a negative cross track error of about a 1.5 meters negative. I would expect that my rover would turn into one direction, in order to eliminate the cross track error.

Why is the PID acting very nervous, while expecting a sharp/clear turn to eliminate the big cross track error?


Hi Gerber,

It’s best to include a dataflash log.

My guess is that what you are seeing is the pivot turn kicking in. I see that the controls for pivot steering aren’t on the wiki so I’ll add that.

In any case, for now you can prove that it’s the pivot steering by turning it off by setting the PIVOT_TURN_ANGLE parameter to 0.

Hi rmackay9,

thanks, setting PIVOT_TURN_ANGLE to 0 solved the strange PID behaviour. Navigation (based on GPS RTK) is way more stable now.

Navigation still is a bit inaccurate, the rover is not able to make sharp turns or quickly react on cross track error. Also, when hitting a waypoint, the rover isn’t making a sharp turn in order to get the right orientation moving to the next waypoint.

After doing some logfile investigation (thanks for the tip), I noticed the navigation controller is not using the available servo output bandwidth. When there is not a big difference between right and left servo the rover is not able to make sharp turns.

Any idea what can be done to improve?
Logfile is too large to share, I will create a smaller snapshot when needed.



Good news about the pivot turn stuff.
For the next steps I really need to see a log. The part to focus on I think is the steering rate tuning.

Hi, rmackay9,

I wasn’t really successful in improving the steering performance by
following the tuning steering rate description.
Please find the logfile attached.


2018-02-10 (2.83 MB)

Hi rmackay9,

any idea why the servo outputs are not getting below 1700?

Max-Min settings servos are 1900-1100.



Looks like the vehicle is running an old version of Rover. It’s 3.2.0-dev (from November last year). Could you upgrade to Rover-3.2.1? We’ve made quite a few significant change after that, in particular there’s some important logging informationt that’s missing from this older version.

Hi rmackay9,

I did the update to 3.2.1. That made a difference. Now the servo’s are
hitting 1500 (Idle?) as a minimum. With 1500 as a minimum I still have
quite some (constant) oscillation when moving from waypoint to waypoint.
Attached the 3.2.1 logfile.


2018-02-12 (2.33 MB)


do you know where to find parameter “STEER2SRV_P”? This parameter is mentioned in the description below.

Based on firmware 3.2.1 I cannot find this parameter.



I think I answered this question on another thread but in any case, we’ve replaced the steering and speed controllers in 3.2 so the STEER2SRV_P parameter is now ATC_STR_RAT_P. Here is the new steering tuning guide for 3.2.

Looking at the log, the ATC_STR_RAT_FF (the most important steering tuning parameter) and the ATC_STR_RAT_P parameter are far far too high so we get large overshoots when we compare the desired turn rate (STER.DesTurnRate) vs the actual turn rate (STER.TurnRate).

I think it would help to make these changes:

  • reduce ATC_STR_RAT_FF to 0.2
  • reduce ATC_STR_RAT_P and _I to 0.2
  • increase ATC_STR_RAT_FILT to 50
  • reduce TURN_MAX_G from 10 to 0.3

The speed controller tuning is also incredibly far off: Here is a graph of the desired speed (the red line at 5m/s) vs the actual (the green line down at about 0.3m/s).

The speed tuning wiki guide talks about how to set the CRUISE_SPEED and CRUISE_THROTTLE parameters but initially setting them to the values below will probably help a bit:


Hi rmacky9,

thanks for your input. We changed the settings you mentioned regarding
steering and speed.

Still the Rover is having a oscillating cross track error. Is seems like
the navigation controller is reacting very slow.
Speed is very slow (0.2m/s), so there should be time enough to converge the
cross track error to zero.

Cross track error compared to steering output:

Any idea how this oscillating can be eleminated and the cross track error
can be reduced to a minimum?
Please find the logfile attached.


2018-03-10 (3.17 MB)


It looks like the oscillation is coming from the steering controller’s I term so it may help to disable the I term by setting ATC_STR_RAT_IMAX to 0.

The contribution from the P term is also quite large so it might be good to reduce ATC_STR_RAT_P to a much lower number (0.05 or maybe even 0) and then increase the ATC_STR_RAT_FF if necessary.

Beyond this i think we may need a different steering controller to handle these very low speeds well.

Hi rmacky9,

I have tested the recommended settings, but still to much oscillation. I
digged a little into navigation controller source code.


Try setting ATC_STR_RAT_P and ATC_STR_RAT_I to zero. Surely the oscillations will go away after that.

Hi rmackay9,

ATC_STR_RAT_P and ATC_STR_RAT_I both set to zero. Only ATC_STR_RAT_FF is

Still having cross track oscillations of +10cm:

This graph is shown that the steering/navigation controller is responding
fast enough when the cross track error gets close to 0, causing overshoot
and oscillation.
Please find the logfile attached.

Are you aware of Ardupilot Rover applications able to fully benefit GPS RTK
accuracy during navigation? Not sure if we can get it any better than


2018-03-16 (2.03 MB)