ROS1 vs ROS2: What Are Differences?
The following are some differences between ROS1 and ROS2.
Difference 1: Master-Slave vs Distributed Network Architecture
ROS1 communication is based on TCPROS (a custom TCP communication) with master-slave network architecture, where one computer/robot should serve as ROS Master while the others serve as slaves. If ROS Master fails, the whole network fails.
ROS2 is based on an existing and well-established middleware interface called Data Distribution Service (DDS) that does not require ROS Master. This gives two advantages:
- More suitability for distributed system or multi-robot system.
- Better network reliability.
Difference 2: Non-real-time vs Real-time
ROS1 is not designed to be a real-time system, whereas ROS2 can be used for real-time performance.
Difference 3: Security
ROS1 is not designed for high-security application, whereas ROS2 provides some security features such as authorization etc.
Difference 4: Compatibility with Windows
Most ROS1 distros cannot be used on Windows. Only the very latest distros (Melodic and Noetic) are compatible with Windows. ROS2 is designed to be compatible with Windows from the beginning.
Difference 5: Build System
The build system in ROS1 is catkin, whereas the build system in ROS2 is colcon.
Difference 6: Client Libraries (Client Interfaces)
In ROS1, roscpp (for C++) and rospy (for Python) are used as client libraries. In ROS2, rclcpp (for C++) and rclpy (for Python) are used as client libraries.
Difference 7: Launch File
Launch file in ROS1 is written in XML. In ROS2, a launch file can be written either in Python, XML, or YAML.
Due to the major moves in ROS2, more and more industrial applications have been developed on top of the new generation of ROS.