Hi Leonard and Randy,
Rob and I have been doing some development on PID logging, including
doing realtime PID tuning over MAVLink. I flew it for the first time
today on both plane and heli and it works very nicely.
What it does is:
- replaces RATE DF message with PIDR, PIDP, PIDY and PIDA
messages. These per-axis messages contain the contribution of P, I,
D and FF to each PID, so you can see exactly how much impact each of
the PID tuning components is having
- added a PID_TUNING MAVLink message. This message is disabled by
default, but you can enable it with the GCS_PID_MASK parameter. That
is a bitmask of what axes you want PID_TUNING messages for.
- to tune an axis you can either use DF messages and post-flight
tuning, or you can set GCS_PID_MASK to the axis you are interested
in and watch the PID components plus desired and achieved rates in
real time on a GCS. This gives live PID tuning in a way we've never
had before - you can see immediately what impact a PID change is
having on the desired/achieved rates, plus on the individual
components. It makes manual tuning a lot easier.
To get a high mavlink stream rate I adjusted the rates on my GCS to give
20Hz for SR1_EXTRA1 stream, and lowered to 2Hz for other streams. That
gave me plenty of time resolution for tuning a Trex500 heli in yaw
today.
The branch is here:
https://github.com/tridge/ardupilot/commits/Attitude_Rate_Logging
I'll definately be pushing this for plane, but want to check that you
are OK with this change for copters and you don't mind the new RATE
message being removed and replaced with the separate PID messages.
Cheers, Tridge