What you’ll learn
- What is micro-ROS?
- Why micro-ROS is important to ROS?
- How micro-ROS works.
The micro-ROS and the ROS are open-source projects. ROS 2, the latest version, is being used in a wide range of robots. ROS uses device drivers to interface with peripherals like cameras, range sensors, and bump sensors. ROS is a large platform that's not always suitable for microcontrollers often used in smaller robots or that control robot subsystems. This is where micro-ROS fits in (see figure).
A ROS 2 platform adds a ROS 2 Agent that links to a micro-ROS Micro XRCE-DDS client, which easily fits on a microcontroller. It can run on top of small operating systems or RTOSes like Zephyr, FreeRTOS, and Nuttx.
This approach is used with the upcoming Turtlebot 4. A small microcontroller handles the robot peripherals while a Raspberry Pi runs Linux and ROS. The micro operates the motors and grabs information from the sensors, while the application running on the Raspberry Pi handles tasks like mapping, planning, and overall integration of sensor information.
Wong: A lot of you may have heard about the Robot Operating System (ROS), but trying to squeeze that into a microcontroller can be a challenge. There's something called micro-ROS. Kat, can you tell us about it?
Scott: Yeah. So in ROS 1, the way things used to be, you usually had a main computer, and then you had like a sensor actuator thing. Something else that you connected the main computer. It had a tiny microcontroller, and it usually spoke something like I2C or serial or some protocol. They would change all the time. They are basically connecting it to your main raw system. It was a kind of a pain. You had to sort of hand roll it. It was very complex to get things connected together. It took a lot more time than it probably should have.
In ROS 2, and in full disclosure, I don't work on micro-ROS, they're an associated group mainly primarily in Europe. They went and said, "We really just need a set of ROS tools to run on embedded microcontrollers" and so they got this huge grant. They've been working on this for quite a while.
Micro-ROS effectively goes on your microcontroller. You set up your RTOS. You set up basically a variant of a BDS communication protocol, and then you can use all of the stripped-down versions of all the ROS primitives.
So services, messages, topics, parameters, can all be done in micro-ROS. The end effect, once you do all of that, is to put it all together like this robot Turtle. Inside this little drawer is a Raspberry Pi, and then the robot itself has a microcontroller that speaks micro-ROS.
What happens with these two is basically once it's all set up, you plug in the two and they can just share information really easily. It's actually set up in here so that they can do it over USB or they can do it over Wi-Fi. We're getting to the point with the robots and the robot peripherals so that you can get to plug-and-play.
I think it's really exciting that you do this not too far in the future. We're still pretty early here. You can go and buy a sensor somewhere like a humidity sensor or depth sensors, get a little microcontroller, plug it in a robot, and it just appears. You're ready to go once you put in micro-ROS. I think it's going to be a big innovation for ROS. I probably didn't do the best job explaining all this, but all of the docs are available on micro.ros.org.
Wong: Excellent. Well, everybody, go check it out. It sounds like a very exciting technology.
Scott: Thank you.