Fix: `actuator_outputs` and `esc_status` topic not logged for UAVCAN
Solved Problem
actuator_outputs topic never logged for UAVCAN-powered vehicles.
Problem found here: https://github.com/PX4/PX4-Autopilot/pull/20597#issuecomment-3633248382
actuator_outputsis an optional topic advertised before logger starts pr starts UAVCAN after logger nothing gets logged anymore
Solution
Change order again to some extent reverting https://github.com/PX4/PX4-Autopilot/pull/20597
- UAVCAN is still started directly before logger and not early on like before.
- zenoh is also started before logger because it could publish potentially optional uORB topics from external components which should be logged. (FYI @PetervdPerk-NXP )
Changelog Entry
Fix: `actuator_outputs` and `esc_status` topic not logged for UAVCAN
Test coverage
I verified on fmu-v5x hardware (Skynode) that this indeed fixes the problem exactly because of the order.
Context
Before: actuator_outputs only logged after manually restarting logger after every boot
After: actuator_outputs logged as expected
I just realized esc_status has the exact same issue and that's maybe part of why @dakejahl commented out the optional and rate limit here: https://github.com/PX4/PX4-Autopilot/commit/543851db50231197060b57ada50f84518565bece#diff-a58612b34e98d7c47e0b13294ccc0c5077dbab967450a7bc84acd596825a8151R65 Is that intentional?
The commented out esc_status looks like something that got left behind. I changed it to make it unlimited. This issue with logger not logging optional topics from CAN has been an ongoing problem. I thought the issue was that logger isn't logging the topics unless they've been advertised, and the CAN driver advertises on first publish? I'd need to look more closely to know for sure. Maybe it's just been startup timing all along :see_no_evil:
@MaEtUgR: The change looks good. I am a bit concerned about the problem reported in https://github.com/PX4/PX4-Autopilot/pull/20597#issuecomment-1568704081.
@AlexKlimaj: Do you still remember reproduction steps for the SD card problem? So we can ensure that it is not back now.
That's a good question. Its been so long since that PR. We'll have to test this with a uavcan firmware file on the SD card with an update to a node.