Open RickReeser opened 5 years ago
On Wed, 16 Oct 2019, RickReeser wrote:
Interesting!
module load messagerate
play with that command to see if things are actually coming in at different rates....
The parameters reverting would appear to be explained by mavproxy acting according to its streamrate parameter, yes?
The parameters reverting would appear to be explained by mavproxy acting according to its streamrate parameter, yes?
Yeah, this is expected behavior - the params get set to whatever streamrate
is.
Output from messagerate:
LOITER> messagerate status
LOITER> AHRS: 4.0/s
AHRS2: 4.0/s
AHRS3: 4.0/s
ATTITUDE: 4.0/s
BATTERY_STATUS: 4.0/s
DISTANCE_SENSOR: 4.0/s
EKF_STATUS_REPORT: 4.0/s
GLOBAL_POSITION_INT: 4.0/s
GPS_RAW_INT: 4.0/s
HEARTBEAT: 1.0/s
HWSTATUS: 4.0/s
MEMINFO: 4.0/s
MISSION_CURRENT: 4.0/s
MOUNT_STATUS: 4.0/s
NAV_CONTROLLER_OUTPUT: 4.0/s
POWER_STATUS: 4.0/s
RANGEFINDER: 4.0/s
RAW_IMU: 4.2/s
RC_CHANNELS: 4.0/s
RC_CHANNELS_RAW: 4.0/s
SCALED_IMU2: 4.2/s
SCALED_IMU3: 4.0/s
SCALED_PRESSURE: 4.0/s
SCALED_PRESSURE2: 4.0/s
SENSOR_OFFSETS: 0.4/s
SERVO_OUTPUT_RAW: 4.0/s
STATUSTEXT: 0.4/s
SYSTEM_TIME: 4.0/s
SYS_STATUS: 4.0/s
TIMESYNC: 0.2/s
VFR_HUD: 4.0/s
VIBRATION: 4.0/s
APM: PERF: 37/4000 max=6249 min=2207 F=2551 sd=185
APM: PERF: 41/4000 max=6274 min=2221 F=2554 sd=185
After setting SR params to 0:
messagerate status
LOITER> AHRS: 4.2/s
AHRS2: 4.2/s
AHRS3: 4.2/s
ATTITUDE: 4.2/s
BATTERY_STATUS: 4.2/s
DISTANCE_SENSOR: 4.2/s
EKF_STATUS_REPORT: 4.2/s
GLOBAL_POSITION_INT: 4.4/s
GPS_RAW_INT: 4.2/s
HEARTBEAT: 1.0/s
HWSTATUS: 4.2/s
MEMINFO: 4.2/s
MISSION_CURRENT: 4.2/s
MOUNT_STATUS: 4.2/s
NAV_CONTROLLER_OUTPUT: 4.2/s
POWER_STATUS: 4.2/s
RANGEFINDER: 4.2/s
RAW_IMU: 4.2/s
RC_CHANNELS: 4.2/s
RC_CHANNELS_RAW: 4.2/s
SCALED_IMU2: 4.2/s
SCALED_IMU3: 4.2/s
SCALED_PRESSURE: 4.2/s
SCALED_PRESSURE2: 4.2/s
SENSOR_OFFSETS: 0.4/s
SERVO_OUTPUT_RAW: 4.2/s
SYSTEM_TIME: 4.2/s
SYS_STATUS: 4.2/s
VFR_HUD: 4.2/s
VIBRATION: 4.2/s
APM: PERF: 10/4000 max=6175 min=2289 F=2546 sd=174
APM: PERF: 10/4000 max=6267 min=2345 F=2544 sd=176
So whatever has changed does not appear in the message rates. I'm going to do some more testing with/without MAVProxy and other GCS.
On a related note, how do I get MAVProxy to display the sched_debug 3
overrun and slip messages? It displays them by default on my Windows client, but not on Ubuntu.
Can switch --stramrate=1 be used?
MAVProxy is doing something that is causing flight controller performance slowdowns. It seems to be caused by MAVLink streaming.
I have a system with a Cube Black connected via serial UART to a TX1 running MAVProxy.
This is typical performance on one of my drones in Loiter while inactive (using
sched_debug 1
):Current streamrate settings:
As you can see, I set most streamrates to 0 except serial1 which are 4Hz, MAVProxy default. Performance is steady at ~40 loop overruns.
Just to make a point, set SR1 params to existing values
Performance hasn't changed, of course.
Now set streamrate params to 0
param fetch
to refresh params. Once it's finished, check streamrate params again and observe that some streamrates are reset to 4Hz:Params are exactly the same as they were at the start. Mavproxy is requesting these streams at its default rate.
Performance has improved, even though the params are unchanged!
This performance improvement lasts until the FC is rebooted. Restarting MAVproxy doesn't change anything. I tested this on multiple Cubes and TX1s. Changing the SR params one at a time has incremental performance gains, so they all seem involved.
I am trying to find where this performance hit is coming from. It's apparently related to mavlink streaming - maybe MAVProxy is accidentally requesting a very high stream rate on these messages? I do not specify
set streamrate
, so it defaults to 4.