Confusion about what to use in new implementations - Cyphal and Libuavcan

Hello,
I’m writing software for a new implementation of a project - I wanted to point out that there is some confusion on what to use for new implementations. After googling, I found libuavcan, which really appealed to me for my project, and that research often redirects to the DroneCan website. After implementing a lot of it, I realized DroneCan is the V0 system, and Cyphal is V1, which is really not clear on the DroneCAN website at all.

DroneCAN also offers a c++ implementation of libuavcan, which seemed best for linux systems, and it’s hard to navigate and find a clear alternative in the Cyphal repo’s - I finally noticed that only on this page of the DroneCAN site it recommends to “Please use libcanard with the new canard C++ interface” with no link. I then tried to Google for the C++ interface which takes me to Cyphal’s libcanard, which has in big letters at the top of the README - Compact Cyphal/CAN in C. In addition, the libuavcan page eventually directs you to find platform drivers which only exist on the Cyphal github - And the linux drivers only exist in an old commit, and not on current master, which makes it really unclear how to use Cyphal on linux!

This post has two points:

  1. I suggest that the maintainers look at the process of how a new user might find and setup Cyphal, especially considering the confusion around all the name changes - Keep in mind that we find this library by Googling for libuavcan because most of the forum posts suggesting to use it, and a bunch of the current code, has that name.

  2. I was wondering what the current recommended library to use with a Linux/SocketCAN system is, as I’m still not clear entirely. I’m trying to get a linux machine to talk to an STM chip utilizing fdcan (which I just made a separate post about) - and it’s unclear how to set up the linux side of things because of the split between DroneCan and Cyphal. I also see that there’s an in development ‘libcyphal’ which may be what I need, but it’s confusing that it’s not released and at the same time libuavcan is seemingly deprecated and tries to point to the non-existing new version.

Thank you for the helpful feedback, Alex.

It’s hard to be certain whether this is effective or not but we have a pretty concise list of relevant projects on the front page under “How do I use Cyphal?”. If you want things to be more hands-on, consider GitHub - OpenCyphal-Garage/demos: Demo applications and reference implementations

Perhaps PyCyphal is the way to go? Alternatively, use libcanard with the SocketCAN platform driver.

Hi Pavel,
As for the “finding Cyphal” - I think the issue that I ran into is the following - When searching for a CAN tool, I found lots of references to libuavcan, and when Googling ‘libuavcan’, you get a full page of links redirecting you to DroneCAN github and documentation site, you need to scroll pretty far to see anything related to Cyphal. And on those DroneCAN pages there is nothing prominently displayed about libuavcan being deprecated, DroneCAN being v0, or Cyphal at all. I’m not sure how closely you work with the maintainers of the DroneCAN site, but having some information up there about the current state of the project, and explaining why there are two libuavcan projects with different names, would be helpful.

Perhaps PyCyphal is the way to go? Alternatively, use libcanard with the SocketCAN platform driver.

I need this to work with a C++ application, so PyCyphal won’t work for me unfortunately. I’ll consider using libcanard, though I did already implement a lot of code with DroneCAN before realizing it was deprecated.

Will the DroneCAN C++ implementation work with libcanard on the other device? I wasn’t sure if Cyphal/libcanard is a direct fork off of libuavcan/libcanard, or if there has been changes to the API that break compatibility.

There are two implementations of libcanard that share nothing: one from DroneCAN and one from Cyphal. They are neither wire-compatible nor API-compatible. You need to use Cyphal on all nodes in order for them to communicate. Libuavcan is a DroneCAN-only project, there is no counterpart in Cyphal.

107-Arduino-Cyphal can be compiled via CMake.

Here’s an example how the library can be used to write a Cyphal node written in C++ running on your PC.

Here’s a ROS package that acts as a bridge between a Cyphal/CAN network and ROS, again using 107-Arduino-Cyphal as submodule.

1 Like