Canhub FMU add common sensor sets and uxrce-dds drivers #22408
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
The canhub is an experimental platform with very few sensor sets enabled by default. Adding in common pressure, distance, optical flow, mag will allow interfacing with add-on sensors that extend the capability beyond the mr-canhubk3-adap board which includes IMU, SD card, compass, and RC + gps2 connectors.
Solution:
Add in common sensor sets. Also enable uxrce-dds client. I have tested the dds client to work over the GPS2 port on the ADAP board. There are several other serial ports on the base canhub board that could be used for uxrce-dds but will need to disable either gps or telem on those ports before attempting to run the driver. Additionally since this board includes many serial ports I've enabled the sf45 rotating lidar.
Alternative solutions:
Since the board has lots of CAN, additional sensor sets could be added via DroneCAN or Cyphal. However, DroneCAN peripherals are difficult to find for specialized sensors such as rangefinders which normally interface over I2c or serial. There are still challenges with the future of DroneCAN & Cyphal on px4:
Cyphal driver only supports the CAN0 interface at this time, and setup for Cyphal is still challenging for beginners and not as easy to troubleshoot as DroneCAN.
DroneCAN still supports the libuavcan backend that px4 leverages, but it may be reluctant to update the DSDL. DroneCAN believes the libcanard implementation is superior so libuavcan will always be a second class citizen in terms of support.