Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting Started with ROS 2 / DDS

Yutaka Kondo
December 17, 2018

Getting Started with ROS 2 / DDS

The summary report of ROS introduction and ROS 2 update. This slide was shown in the ROS Japan UG #27 meetup https://rosjp.connpass.com/event/111853/

Yutaka Kondo

December 17, 2018
Tweet

More Decks by Yutaka Kondo

Other Decks in Programming

Transcript

  1. Yutaka Kondo <youtalk@> Engineer at Preferred Networks GETTING STARTED WITH

    ROS 2 / DDS Version Date 1 July 24th 2018 2 December 17th 2018
  2. Agenda 1. Background 2. ROS 3. ROS features 4. ROS

    2 and DDS 5. ROS 2 additional features 6. Conclusion 2
  3. Robot software platforms • To prevent re-inventing the wheels –

    Reuse software as a module – Easily manage inter-process and inter-machine software 3 OpenRTM CORBA-based architecture http://openrtm.org OROCOS Mainly for kinematics and dynamics http://www.orocos.org YARP Transport-neutral communication http://www.yarp.it ROS Almost everything you need http://www.ros.org
  4. ROS (Robot Operating System) ROS provides libraries and tools to

    help software developers create robot applications. It provides hardware abstraction, device drivers, libraries, visualizers, message-passing, package management, and more. ROS is licensed under an open source, BSD license. 4 http://wiki.ros.org (accessed 2018-07-24)
  5. Message-passing • Publisher/Subscriber transport – For one way sequential data

    • RPC (Remote Procedure Call) – For round-trip single data • IDL (Interface definition language) 6 Node A Node B Topic X Request Response Service Y Publish Subscribe
  6. Visualizers 7 rqt Qt-based framework for GUI rviz 3D visualization

    tool WillowGarageVideo. “rviz.” YouTube, LLC. https://youtu.be/i--Sd4xH9ZE, (accessed 2018-07-24).
  7. Hardware abstraction • Mobile robots – SLAM – Global /

    local planners – Tele-op commands • Manipulators – Collision avoidance – FK / IK – Position / velocity / effort control – Real-time control support 8 WillowGarageVideo. “ROS Navigation.” YouTube, LLC. https://youtu.be/qziUJcUDfBc, (accessed 2018-07-24). moveitrobot. “MoveIt! Montage 2017.” YouTube, LLC. https://youtu.be/0og1SaZYtRc, (accessed 2018-07-24).
  8. Package management • catkin – Meta build system for ROS

    packages – catkin_tools: CLI to create, build, test, and install package • bloom – Release automation tool – Build artifacts are generated from catkinized package source 9
  9. And more • Gazebo – Dynamics simulation – Advanced 3D

    graphics – Sensors and noise – TCP/IP transport – Cloud simulation 10 chapulinaaa. “Gazebo Compilation 2016.” YouTube, LLC. https://youtu.be/R3xUKYcG_bc, (accessed 2018-07-24).
  10. Use cases # of robots Computation resource Real-time control Network

    quality Applications Current ROS Single robot Workstation- class Special- purpose manner Excellent connectivity Research 11 Future ROS Multiple robots Small embedded platforms Inter- process and inter- machine Loss and/or delay Production environments
  11. ROS 1 and 2 architectures 12 ROSTCP transport ROS master

    C++ client library Python 2 client library Lisp client library User node Robot … DDS abstraction C common library C++ client library Python 3 client library Java client library User node DDS vendor A impl. … DDS vendor B impl. DDS vendor C impl. … Robot ROS 1 ROS 2
  12. DDS (Data Distribution Service) • ROS-like pub/sub transport and RPC

    • Technical credibility • Several vendors and licensing • QoS (Quality of Service) support 13 Reliability History policy Durability Best effort Keep last N samples Transient local Reliable Keep all Volatile
  13. ROS 2 Ardent Multi platform support • ROS 2 is

    officially supported on – Ubuntu 18.04 – Windows 10 with Visual Studio 2017 – macOS 10.12 (Sierra) • It also (unofficially) works on macOS 10.14 (Mojave) 14 RViz2 on macOS
  14. ROS 2 Ardent Intra-process communication • ROS 1 – Special

    manner (Nodelet) • ROS 2 – std::unique_ptr for zero-copy and ownership transfer – Executor pattern 15
  15. ROS 2 Ardent Lifecycle state machine • ROS 1 –

    Only dead or alive – Busy loop to wait until node activation • ROS 2 – 4 states with error handling 16 https://roscon.ros.org/2017/ presentations/ROSCon%20201 7%20ROS2%20Vision.pdf − State change is notified by topic
  16. ROS 2 Ardent Quality of service • QoS profiles –

    Defined profiles – Or you define one 17 Profile Reliability History policy Durability Services Reliable Keep last 10 samples Volatile Sensor data Best effort Keep last 5 samples Volatile Paramet ers Reliable Keep last 1000 samples Volatile
  17. ROS 2 Ardent Co-existence with ROS 1 • Bridge communication

    – Only message and service are available at compile time of the bridge 18 ROS 1 master ROS 1 bridge ROS 1 node ROS 2 node
  18. ROS 2 Bouncy Colcon: new build tool • Ament (build

    tool of ROS 2 Ardent) was deprecated... • Colcon can build – ROS 2 packages $ colcon build $ ament build --isolated – and also ROS 1 packages $ colcon build $ catkin_make_isolated --install 19
  19. ROS 2 Bouncy New launch system • Launch system is

    configured by Python instead of XML $ ros2 launch demo_nodes_cpp add_two_ints.launch.py • XML configuration will be coming back 20
  20. ROS 2 Bouncy Validation and certification • ROS 1 –

    Unsecure raw data transmission • ROS 2 – Authentication and pub/sub permission – Data encryption by DDS-Security 21
  21. ROS 2 Crystal First class support “Action” • In ROS

    1, action is implemented – using a set of topics • In ROS 2, action is implemented – using a combination of asynchronous services and topics – under separated namespace 22 Action client Action server Send/cancel goal Get result Feedback Status Topic Service
  22. ROS 2 Crystal rosbag2 • Storage format plugin architecture –

    By default rosbag2 uses SQLite3 database • Serialization format plugin architecture – By default rosbag2 uses CDR format – CDR: https://www.omg.org/cgi-bin/doc?formal/02-06-51 • ros2 command line interface $ ros2 bag record/play/info 23
  23. ROS 2 Crystal Gazebo integration • Gazebo can be used

    independently of ROS 1 and ROS 2 – Not all functionality from ROS 1 has been ported to ROS 2 yet – https://github.com/ros-simulation/gazebo_ros_pkgs/issues/512 • gazebo_ros_pkgs – gazebo_dev: cmake configuration – gazebo_msgs: Gazebo/ROS 2 data structures – gazebo_ros: convenient C++ classes and functions – gazebo_plugins: plugins exposing sensors and other features 24
  24. Conclusion • ROS is de facto standard for robot software

    platform • ROS 2 aims both for research and commercial use • Core architecture of ROS 2 is almost completed • It’s time to consider migration from ROS 1 – navigation2: https://github.com/ros-planning/navigation2 – image_pipeline: https://github.com/ros-perception/image_pipeline/tree/ros2 – … • For more information in Japanese, see also https://ros.youtalk.jp 25