Ask Your Question
0

Benefit from implementing ROS(2) on microcontrollers

asked 2020-04-20 05:55:42 -0500

Hirnrich gravatar image

updated 2020-04-20 06:13:14 -0500

Hi

Lately I started to do some research and test with the ROS framework. I'm mainly interessted in connecting sensors and actuators/motors to ROS. As far as I understood there are two main concepts to realize this:

  1. Implement a (light version) ROS on your microcontroller
  2. Communicate with a linux device where all your ROS code is excecuted (via Serial, CAN,...) and implement a bridge which translates the information to your ROS application.

With micro-ROS and many other great projects they do a lot of effort implementing ROS2 on microcontrollers (Concept 1). I mean thats cool and all but why is this so interessting? Is there a real benefit from doing it? At the moment I see only the disadvantage that there is more overhead on your microcontroller if you do it like that but I guess I oversee something important.

Thanks if you can give me some hints

edit retag flag offensive close merge delete

Comments

1

One of the main benefits I see is that it removes the intermediate node (ie: the bridge or relay) if the nodes are actually running on the microcontroller (instead of using a bridging approach).

This has multiple advantages:

  1. remove possible bottleneck (the bridge)
  2. remove possible point of failure (the bridge)
  3. allow plug-and-play bringup of nodes on microcontrollers (ie: just plug in the network cable and out come the ROS 2 messages)

As it was really difficult to run ROS 1 on (actual) embedded devices (due to resource constraints), having to start these bridge nodes (also called: drivers) was necessary. But at the same time I've always found it really limiting, annoying and cumbersome.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-20 06:05:30 -0500 )edit

Thanks for sharing your opinion.

I see your point, was already thinking in the same direction. But for me this is not a "real" benefit. Conceptually it's sounds for sure nicer but I guess both ways would work. However bridging seems to be implemented faster adding the benefit of not limiting your ressources on the microcontroller side. But i never implemented one of those approaches so maybe thinking too unrealistic. My thougths about your advantages:

  1. Where you think the bridge could be a bottleneck? Beeing to slow in converting the data into ROS? Can you avoid it with the Ros on uC approach or do you only shift it?
  2. Is a risk yes but should be avoidable by serious programming/testing
  3. plug-and-play is for sure a nice feature and so far the strongest benefit i can think of
Hirnrich gravatar image Hirnrich  ( 2020-04-20 06:38:30 -0500 )edit

Yes in the end it is about your user needs and development time. If you have a longer development time frame, I think building a reliable bridge in your own format will likely be more efficient that was ROS or ROS2 can offer. However, a lot of times, we do not have the time at hand to do so, and creating your own bridge can be tricky and might require some experience depending on the type of board you work with (arduino, teensy, some other microcontroller with even less processing power, etc). Sacrificing some performance to quickly begin higher level development can sometimes be very crucial. I have done projects where lightweight ROS ran on microcontroller due to time constrains and lack of time to develop and debug custom protocols and other projects where we had a huge team with months of development time and hence developed our own customized ...(more)

hashirzahir gravatar image hashirzahir  ( 2020-04-20 07:42:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-01-22 05:04:05 -0500

ralph-lange gravatar image

When launching micro-ROS in 2018, we discussed this question very intensively. Our main motivation to bring the core layers (rmw, rcl) of the ROS 2 stack on the microcontroller as they are (with small exceptions) was to ease porting of software that has been developed on standard ROS 2 as much as possible. This came from the observation that many research and advance development projects in industry start with a strong microprocessor and typically Linux but then are forced to reimplement their algorithms when getting closer to a product development project, which typically employs smaller computing devices. We are aware that there is still a relevant gap, by the focus on a C client library in micro-ROS.

Secondly, by using mainline rmw and rcl, we also hope to keep the long-term maintenance efforts small.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2020-04-20 05:55:42 -0500

Seen: 809 times

Last updated: Jan 22 '21