In recent master, the UAVCAN stack is still based on a very early experimental version of the protocol. The protocol and the driver in PX4 have evolved quite a bit in between, offering many interesting new features like node id auto configuration and device firmware updates via UAVCAN. It is to be expected that new devices sold today with recent firmwares are not working with ArduPilot at all. This is especially annoying, as new UAVCAN hardware seems to become available.
I made an effort to backport the latest stack from the PX4 project into ArduPilot's fork of PX4/Firmware (there are no source changes in APM involved). The preliminary results could be found in the submodules of my branch:
The result is working fine with a UAVCAN 1.0 GNSS module, however there are a few things to consider and maybe to be resolved before merging any changes:
1. the libuavcan repository (formerly knwon as "uavcan") now contains submodules on it's own (UAVCAN DSDL, DSDL compiler, UAVCAN Python bindings). All of them are needed for our purposes, so we should define how to handle them.
2. We should decide if we still need our own fork repository of libuavcan (currently diydrones/uavcan) at all. The UAVCAN driver in the PX4 repo now contains libuavcan as a submodule (src/modules/uavcan/libuavcan). All device firmwares will depend on the official repo anyway, so maintaining an independent (incompatible) version does not make too much sense to me. Going the same way like the PX4 project here would also obsolete point 1.
3. The NuttX version used in ArduPilot master has a few bugs regarding the namespaces of C standard library functions. The repo PX4/NuttX contains fixes for these problems. Regarding to the commit comments, the Solo FW seems to suffer from the same problems. Maybe this would be a good opportunity to pull in these fixes instead of working around them in the UAVCAN driver?
4. Node id autoconfiguration (new feature of UAVCAN 1.0) is not implemented in APM yet. While this feature would be a great usability improvement, it is in no way mandatory. All UAVCAN devices still can be configured manually the same way as the have to be today with the old stack.
5. The status of UAVCAN device firmware update from SD card is untested (code is there, so it might work).
I am looking forward to hear any feedback.
Regards,
Holger