IN THIS LESSON

You will learn the software architecture of ROS.

A robot’s software has to control many things: cameras, LiDARs, motors, arms, vision, mapping, navigation, task planning, motion planning, speech and natural language processing etc..

ROS stands for Robot Operating System and is one of the most widely used open source systems among researchers and developers. The software architecture of ROS is component based and each function is wrapped in its own module. This requires a communication mechanism between components, ultimately allowing a more modular and stable approach to robotic systems.

ROS is a middleware residing on top of Ubuntu (Linux) with a collection of software libraries and developer tools ranging from hardware drivers to start-of-the-art algorithms. The main programming languages for ROS are C/C++ and Python.

This tutorial will focus on ROS 2 which is the newer version of ROS. Comparing to ROS 1, ROS 2 is a fully distributed architecture and is more lightweight. All code samples in this training course refer to ROS 2.

An illustration of ROS Software Architecture

What programming languages are supported in ROS?

1. Officially Supported Languages

Python

• Used with ROS client library: rospy

• Ideal for scripting, automation, and rapid prototyping

• Popular in AI and machine learning integration (TensorFlow, OpenCV)

C++

• Used with ROS client library: roscpp

• Preferred for high-performance applications and real-time control

• Used in industrial robotics, navigation, and embedded systems

2. ROS 2 Enhancements

With ROS 2, there is improved support for multiple programming languages, making it more flexible for different applications.

Best for Performance: C++

Best for Ease of Use & AI Integration: Python

Best for Web Control & UI: JavaScript (roslibjs)

Best for Safety & Embedded Systems: Rust