본문 바로가기

연구 관련

ROS1 vs. ROS2 (Short Description)

반응형
  • Why ROS2?
    • Real time
    • Safety
    • Certification
    • Security
  • ROS1 vs. ROS2 - API
    • ROS1: Linux >> TCPROS/UDPROS >> rospy and roscpp >> Master & Your code
    • ROS2 (has more layaers): Linux/Windows/MacOS >> DDS >> rclpy, rclcpp, rcl... >> Your code
  • Writing a node
    • ROS1:
      • def callback_number(msg):
      • def callback_reset_counter(req):
      • if __name__ == '__main__':
    • ROS2:
      • class NumberCounterNode(Node):
        • def __init__(self):
        • def callback_number(self, msg):
        • def callback_reset_counter(self, request, response):
      • def main(args=None):
  • ROS2 Components
    • ROS1
      • Excutable 01 > Node 01
      • Excutable 02 > Node 02 ...
    • ROS2
      • Solution with ROS1 Nodelets
      • Only one Excutable > Node 01 (component), Node 02 (component), Node 03 (component) ...
  • Writig launch files
    • ROS1: .launch file with xml format.
    • ROS2: .launch.py with python format - allows you to customize your luanch file much more than before with xml. Python launch files bring more modularities.
  • No more ROS master
    • ROS1: Centralized. Each Node communicates through ROS Master.
    • ROS2: Decentralized. No ROS master. Each node is independent and communicates directly with other Nodes.
  • ROS Parameters (ROS1)
    • ROS1: Parameter server is defined in ROS Master.
    • ROS2:
      • No global parameters anymore.
      • Each Node declares and manages its own parameters.
      • Real time.
  • ROS Services
    • Synchronous (ROS1)
    • Asynchronous (ROS2) - with option to make them synchronous.
  • ROS Actions
    • ROS1:
      • Service is not asynchronous.
      • Communication based on ROS topics.
      • Action Clinet class <------> Action Server class
    • ROS2:
      • Native.
      • Communication based on Topics and Services.
      • Clinet Node <-----> Server Node
  • Msg, Srv, Action Definitions
    • Create definitions under folder:
      • msg
      • srv
      • action
    • >> ROS1 compilation, no namespace added.
    • >> After ROS2 compilation, new namespage:
      • msg/...
      • srv/...
      • action/...
    • Ex) Package: my_robot_msgs, Message: Temperature, Service: ActivateButton
      • ROS1
        • my_robot_msgs/Temperature
        • my_robot_msgs/ActivateButton
      • ROS2
        • my_robot_msgs/msg/Temerature
        • my_robot_msgs/srv/ActivateButton
  • Building Your Nodes
    • ROS1: catkin_make
    • ROS2: colcon build
  • Command Line Tools
    • ROS1: rostopic list...
    • ROS2: ros2 topic list...
  • ROS2 Overlays
    • ROS1
      • 1. Source >> ROS installation
      • 2. Source >> ROS workspace
    • ROS2
      • 1. Source >> ROS2 installation
      • 2. Source >> ROS2 workspace (overlay 1)
      • 3. Source >> ROS2 workspace (overlay 2)
      • 4. Source >> ....
  • ROS - Supported Platforms
    • ROS1: Ubuntu
    • ROS2: Ubuntu, Windows, MacOS

 

반응형