ROS 1 uses a central master node to manage communication. ROS 2 replaces this with a decentralized discovery system based on DDS, allowing nodes to find each other without a master.
ROS 2 improves language support beyond ROS 1 and adds features for real-time execution, unlike ROS 1 which is more limited.
from launch import LaunchDescription from launch_ros.actions import Node def generate_launch_description(): return LaunchDescription([ Node( package='demo_nodes_cpp', executable='talker', output='screen' ) ])
ROS 2 replaces the XML launch files of ROS 1 with Python-based launch files using the launch and launch_ros packages.
ROS 2 uses DDS domains for discovery. If nodes are on different domains, they cannot communicate. There is no ROS master in ROS 2.
If the subscriber uses best effort, it may drop messages even if the publisher is reliable. QoS mismatch can cause message loss but not errors.
