Slide 1

Slide 1 text

Yutaka Kondo Engineer at Preferred Networks GETTING STARTED WITH ROS 2 / DDS Version Date 1 July 24th 2018 2 December 17th 2018

Slide 2

Slide 2 text

Agenda 1. Background 2. ROS 3. ROS features 4. ROS 2 and DDS 5. ROS 2 additional features 6. Conclusion 2

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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)

Slide 5

Slide 5 text

5 OSRF. “ROS 8 Year Montage.” Vimeo, Inc. https://vimeo.com/146183080, (accessed 2018-07-24).

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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).

Slide 8

Slide 8 text

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).

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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).

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

WE ARE HIRING ROBOTICIST!! 26 https://preferred-networks.connpass.com/event/112628/ https://preferred-networks.connpass.com/event/82967/

Slide 27

Slide 27 text

Copyright © 2014- Preferred Networks All Right Reserved. 27