UAVCAN to ROS2 bridge?

Hi all,

Since the wonderful announcement that the microros API has support for custom transport, there’s been some talk about integration with CANbus, including a well-polished document (which I can’t find) outlining some of the layers required to move ros2 data over a canbus.

On the other side of the fence, people at UAVCAN have put some thought into how ROS can communicate over a CANbus:

I don’t see this becoming a primary middleware for rclcpp, but it could be very effective as a microros-microros middleware, or as a distributed and robust microros agent.
At very least, there are some great suggestions for mappings between ros2 topic names and (uavcan) CAN IDs, and it offers a ready-made solution for packetising messages.

I’d be interested to see what colcon layer requirements this approach would have, and what complexity would be introduced for non-collision with can-open and other established standards

Cheers,
BrettRD

The well-polished doc you’re referring to can be found as an attachment to this post in the EWG meetings thread: ROS 2 Embedded WG meetings - #11 by FraFin (unfortunately, we don’t have the recording of the session).

Further thoughts on the matter from the micro-ROS’ dev team side coming soon!

2 Likes

Actually, yes, implementing a rmw_uavcan for micro-ROS sounds quite promising, although a major architecture refactor would be needed on the Agent’s side in order to achieve a UAVCAN to DDS bridge. @BrettRD Do you have any such plan in mind?

My imagination only got so far as a Micro-ROS node forwarding everything to an agent, but I suspect it needs to be more like ros1_bridge.

Most of the existing Micro-ROS targets have native canbus hardware, so that’s probably how most people will get started with a hypothetical rmw_uavcan.
Industrial users would want to use SocketCAN on native canbus hardware in embedded Linux devices.
I’d want to write it such that the system integrator can choose whether the bridge is in ROS or Micro-ROS.

I have no idea how you’d tell an agent that a topic should be forwarded from DDS to UAVCAN, and I don’t know how you’d de-duplicate UAVCAN messages that got to the DDS via multiple agents.
I would expect some proper networking nightmare fuel behind the scenes; a simple benchtop case is likely to have two can-busses, two Linux machines, the dds, two agents, and a dozen micro-ros devices.

At the risk of a combinatorial explosion of this-rmw-to-that-rmw bridges, is it possible to implement something like ros1_bridge in rclc behind a Micro-ROS agent?
Do bad things happen when you run two instances of ros1_bridge?

1 Like