@rmackay9, I think I’ve discovered the root cause for the oscillation that is exacerbated by increased PSC_VEL_D values on my machine.
During a long mowing/tuning session today, I noticed that I did get very nice straight line results by increasing the D term. However, there was always a pronounced oscillation exiting pivot turns that of course worsened with increased PID gains.
My mower has free-spinning caster wheels on the front, which are always mis-aligned with the direction of travel after a pivot turn. The slight “kick” to one side caused by those casters re-aligning with the direction of travel seems to be enough to set up that oscillation.
There is a happy ending though - after REALLY dialing in every tuning parameter under the sun, I was able set PSC_VEL_I and PSC_VEL_D to VERY low values (0.05 and 0.01, respectively), and still maintain 10cm or better crosstrack error.
It took a lot of work, and a lot of playing with the steering rate gains and ATC_STR_ANG_P vs pivot turn rate and acceleration, but I think I’m pretty happy with the overall tune now.
Additionally, a lot of the perceived delay after pivot turn completion was resolved by re-examining the acceleration tuning values and setting them to a compromise between aggressive maneuvering and smooth handling.
Parameters of note:
ATC_SPEED_P,0.4
ATC_SPEED_I,0.2
ATC_SPEED_D,0
ATC_SPEED_IMAX,1
ATC_ACCEL_MAX,1.25
ATC_DECEL_MAX,1.5
ATC_STR_RAT_MAX,75
ATC_STR_ACC_MAX,90
ATC_STR_ANG_P,2.3
ATC_STR_RAT_FF,0.225
ATC_STR_RAT_P,0.125
ATC_STR_RAT_D,0
ATC_STR_RAT_I,0.125
ATC_STR_RAT_IMAX,1
ATC_TURN_MAX_G,0.2 – While the Rover is technically capable of much greater than this, I found that decreasing it made for nicer “cut” corners.
CRUISE_SPEED,1.4
CRUISE_THROTTLE,45
WP_ACCEL,1.25
WP_JERK,0
WP_PIVOT_ANGLE,45
WP_PIVOT_DELAY,0
WP_PIVOT_RATE,50
WP_RADIUS,0.2
WP_SPEED,1.6
PSC_POS_P,0.5
PSC_VEL_P,2.25
PSC_VEL_I,0.05
PSC_VEL_D,0.01
PSC_VEL_IMAX,1