Welcome to Raspberry Pi 4B repository
1.Introduction to ROS2
Introduction to ROS2
1、ROS2 overview
ROS2 is the second generation of the Robot Operating System, an upgraded version of ROS1 that solves some of the problems with ROS1. The earliest version of ROS2, Arden, was in 2017, and with the iteration of the version, it has been continuously updated and optimized, and now there is a stable version. With ROS1, the choice of Linux version and ROS2 version is also related, and the corresponding versions of the two are as follows:
| ROS2 version | Ubuntu version |
|---|---|
| Foxy | Ubuntu20.04 |
| Galactic | Ubuntu20.04 |
| Humble | Ubuntu22.04 |
Download the ROS2 version according to your Linux version, and this product course is based on the Foxy version.
2、ROS2 characteristics
2.1、ROS2 fully supports all three platforms
- Ubuntu
- Mac OS X
- Windows 10
2.2、A distributed architecture is implemented
Cancel the master central node and realize distributed discovery, publish/subscribe, request/respond communication of nodes.
2.3、Supports real-time
2.4、Use a new version of the programming language
- C++ 11
- Python 3.5+
2.5、The new compilation system ament (Ross for Catkin) was used.
2.6、ROS1 can communicate via Rosbridge and ROS2
3、The difference between ROS2 and ROS1
3.1、platform
ROS1 currently only supports running on Linux, and is commonly built and used in Ubuntu. ROS2 can currently be built and used on Ubuntu, Windows and even embedded development boards, and the platform is more extensive.
3.2、program language
C++
The core of ROS1 is C++03, while ROS2 makes extensive use of C++11.
Python
The Python version used by ROS1 is Python 2, while the Python version used by ROS2 is at least 3.5 or above, and the Python version used by Foxy is 3.8.
3.3、Middleware
ROS1 needs to start roscore before starting, this master controls the communication between all nodes, while ROS2 does not, only an abstract middleware interface through which data is transmitted. Currently, all implementations of this interface are based on the DDS standard. This enables ROS 2 to provide a variety of high-quality QoS service strategies to improve communication across different networks.

3.4、Compile the command
ROS1's compile command is catkin_make, while ROS2's compile command uses the colcon build command.