Hi everyone,
On my drone I’m using 6 Myxas connected on a UAVCAN network to a Cube FC and 2 Herelink GPSs.
I suspect the UAVCAN network is experiencing interference when the vehicle is flying.
I’m looking for a method of measuring the UAVCAN network integrity and health using the tools I have:
Babel + UAVCAN GUI
Myxas + Kucher
Measuring it in real-time is preferable, but in measuring in retrospect would also work for now.
I would appreciate any help with this.
Thanks for the reply @pavel-kirienko but I’ll need a bit more technical guidance:
Technically - where do I go to query these stats from my PC? I’m using UAVCAN gui.
Do you happen to have a rule-of-thumb figures for what is Good, Mid and Bad ranges for transfer errors?
You can double-click on your node and in the opened window click “Get transport stats”. Alternatively, you could write a Python script to poll this service periodically while the vehicle is operational. This tutorial should help:
Normally, there should be no errors at all. Up to one error per minute should be acceptable in a typical UAV application. If your numbers are higher than that, perhaps your wiring needs to be optimized.
@pavel-kirienko
Can you explain a bit in layman’s terms about the meaning of each section in the “transport stats” window?
Especially about “transfer_errors” and interface errors, the difference between them and the rule of thumb regarding the normal range of values of each.
We suspect we might have a CANbus issue and got the following values after a short flight:
A “transfer” is an arbitrary block of data containing the serialized representation of an application-layer object. For example, when your flight controller publishers an ESC setpoint message, it emits one transfer. A transfer is carried over the network by CAN frames. There is at least one CAN frame per transfer, usually more. The sending node splits the transfer across multiple frames, the receiving node reassembles the transfer back from the set of frames it receives one by one. Transfer reassembly is a comparatively complex procedure due to the large number of corner cases and error states that have to be handled correctly.
transfers_tx/transfers_rx – the number of transfers successfully sent/received.
transfer_errors – the number of transfers that could not be reassembled due to missing frames, out-of-order frames, bad CRC, malformed transfer, duplicate transfer. This value should ideally be zero.
can_iface_stats refers to the statistics per CAN interface. CAN interfaces operate on frames, not transfers, which is one level lower.
frames_tx/frames_rx – the number of frames sent/received. There is at least one frame per transfer.
errors – the number of frame errors reported by the CAN controller hardware. This value is incremented whenever the CAN controller detects a disturbance on the bus. An increment here does not necessarily signify data loss but indicates that the bus may be experiencing some EMI issues. Generally speaking, it is impossible to keep this counter at zero, as any functional network will exhibit occasional transient disturbances. I’ve seen several increments per minute on well-designed networks, so you can use this as a rerferencce.