So we are working on a project that will use PX4 as its flight stack (on a Pixhawk board) and is currently considering adapting UAVCAN. Our current configuration is that all data acquisition for sensors (including IMU) and actuation (ESCs) are done at boards (with their own MCUs) outside Pixhawk. Sensor values and actuator commands will be sent back and forth via CAN bus.
My question is, what would be the best approach in adapting UAVCAN?
As of the moment, the UAVCAN module inside PX4 1.10 seems to be of a perfect match to my application (but will need some modification and additional sensors/actuators). This is certainly one way to adapt it, but the codebase will soon change as we approach the release of libuavcan v1 (I heard v1 will not be backwards compatible with v0). Going with this approach means having to adapt the legacy version to all the other boards (ESCs and sensors).
The other approach is to work with a bare-bones version of UAVCAN, using maybe a C++ wrapper for libcanard (just like the recently released Arduino UAVCAN Library). I will then have to implement all the details (nodes, serialization/deserialization), but tools are already available for this (Nunavut, pydsdl).