Thanks for all those who tested the initial version of QuikTune. Based on feedback that it was always producing gains that were too high I’ve simplified the script so that it only attempts to calculate the speed and steering (aka turn rate) controllers FeedForward values. The P and I are then set simply based on the FF value.
The new script is here and while I’ve tested it successfully I wonder if others would like to give it a try?
Instructions for running the script are at the top of the script but in short:
- Ensure your autopilot has an H7 CPU (e.g. CubeOrange, Durandal, Pixhawk6, etc). An F7 will probably also work but an F4 definitely will not.
- Ensure Rover-4.4 (or higher) installed on the autopilot
- Set SCR_ENABLE = 1 and reboot the autopilot
- Download rover-quicktune.lua from here
- Upload the above script to your autopilot’s SD card’s APM/scripts directory
- Setup an auxiliary switch to start/stop the tune by setting RCx_OPTIONS = 300 (scripting1) or alternatively you may use MP’s Aux Function tab with one entry set to “scripting1”
- Arm the vehicle and switch to Circle mode
- Start the tuen by moving the RC switch to the middle position or on MP’s Aux Function tab push the “mid” button
- Check the ground station’s “Messages” tab to confirm the tuning is working
- After the tune completes save the tuned values by moving the RC switch to the high position or on MP’s Aux Function tab push the “high” button
- Run the vehicle through a square missing in Auto mode and provide feedback here.
By the way, if you ran an earlier version of the QuikTune script you may see some RTUN_xxx parameter value corruption. It is probably best to check the RTUN_ parameters to be sure the current values match the “Defaults” column.
One key thing that I would like to figure out is what RTUN_xx_P/I_RATIO values work best. I think that for most vehicles the ratio of FF to P and I is probably similar. Perhaps larger vehicles will need a lower ratio.
Thanks!