Benefit from implementing ROS(2) on microcontrollers
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:
- Implement a (light version) ROS on your microcontroller
- 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
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:
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.
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:
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)