@rmackay9, I’ve been digging into the changes to AR_AttitudeControl and AP_MotorsUGV and I’ve found something that makes me go “hmmm”.
3.3: AR_AttitudeControl applies a 1/speed scaling factor in calculation of the steering output through the PID, then constrains the result to +/-1.0 before returning it. That steering is then sent out unchanged in AP_MotorsUGV.cpp
AR_AttitudeControl.cpp line 253 from this change: https://github.com/ArduPilot/ardupilot/commit/5563691bd1ced5cca2f91d0a78a8e7845e853c09
3.4: You remove the 1/speed scale factor in AR_AttitudeControl (so the calculated values will be a lot larger), but you still constrain it to +/1 before returning it.
The output (now constrained to +/1) then gets divided by the speed in the updated AP_MotorsUGV - line 410 here: https://github.com/ArduPilot/ardupilot/commit/3db2cc700ea994e4edc38302a5645ba172ba48af
This (I think) explains some of the funky behaviour I’ve been seeing where servo output is clipped at high speeds in Acro mode. If my servo range is 1000-1500-2000, the most steering I can get at 10m/s is 1450 or 1550. Set up 3.4 with a high turn_max_g (like 7), a high FF (2), and speed_turn_gain of 100%, then run your kart track at 10m/s. It will go nuts, but if you watch the ch1out, once it’s at speed it will never go outside of 1450-1550.
The same thing in 3.3 will show a greater range of steering output.
I think the fix is removing the “constrain” at the end of get_steering_out_rate, and from “set_steering” in AP_MotorsUGV to leave the clipping to the final output.
The alternative would be to do the speed correction / scaling in mode.cpp (calc_steering_from_lateral_acceleration) since that’s where you have a direct link between the steering and the velocity, just before it gets sent to g2.motors.set_steering(). There’s almost no need for the motor to manage that side of things. (IMHO).
It wont show up at low speeds if your required steering is less than 1/speed % - i.e. if you need less than 20% steering at 5m/s it wont clip.