+ All Categories
Home > Documents > Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent...

Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent...

Date post: 23-Jun-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
45
Introduction to ROS Lorenz M¨ osenlechner Technische Universit¨ at M¨ unchen July 18th, 2012
Transcript
Page 1: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Introduction to ROS

Lorenz Mosenlechner

Technische Universitat Munchen

July 18th, 2012

Page 2: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Motivation

• Today’s robotic systems are complex.

• Many sensors.

• Highly distributed, many processes, many computers.

• Teams of engineers.

) ROS — The Robot Operating System.

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS2

Page 3: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Motivation

• Today’s robotic systems are complex.

• Many sensors.

• Highly distributed, many processes, many computers.

• Teams of engineers.

) ROS — The Robot Operating System.

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS3

Page 4: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Outline

Overview

ROS Communication Layer

ROS Build System

Programming with ROS

The TF Library

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS4

Andrew Vardy
Andrew Vardy
Page 5: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Outline

Overview

ROS Communication Layer

ROS Build System

Programming with ROS

The TF Library

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS5

Page 6: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What is ROS?More than just a middleware

• A “meta” operating system for robots

• A collection of packaging, softwarebuilding tools

• An architecture for distributedinter-process/inter-machinecommunication and configuration

• Development tools for system runtime anddata analysis

• A language-independent architecture(c++, python, lisp, java, and more)

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS6

Page 7: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What is ROS not?No confusion

• An actual operating system

• A programming language

• A programming environment / IDE

• A hard real-time architecture

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS7

Page 8: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What does ROS get you?All levels of development

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS8

Page 9: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What does ROS get you?All levels of development

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS9

Page 10: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What does ROS get you?All levels of development

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS10

Page 11: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What does ROS get you?All levels of development

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS11

Page 12: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What does ROS get you?All levels of development

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS12

Page 13: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What does ROS get you?All levels of development

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS13

Page 14: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What does ROS get you?All levels of development

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS14

Page 15: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What does ROS get you?All levels of development

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS15

Page 16: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What does ROS get you?All levels of development

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS16

Page 17: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What does ROS get you?All levels of development

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS17

Page 18: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

What does ROS get you?All levels of development

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS18

Page 19: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

The ROS CommunityResearchers using common tools to enable collaboration

79 Institutional ROS Repositories, all over the world (July, 2011)

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS19

Page 20: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

www.ros.org - The ROS HubA centralized location for ROS users and developers

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS20

Page 21: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

answers.ros.org - ROS Questions & AnswersCommunity-supported help for ROS users

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS21

Page 22: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

ros mailing listsGetting in touch with the developer community

• ROS Users - for general ROS-related discussionshttps://code.ros.org/mailman/listinfo/ros-users

• Other Lists & List Archiveshttp://code.ros.org/lurker

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS22

Page 23: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Outline

Overview

ROS Communication Layer

ROS Build System

Programming with ROS

The TF Library

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS23

Page 24: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

ROS CoreWhere it all comes together

• ROS Master

– A centralized XML-RPC server– Negotiates communication connections– Registers and looks up names for ROS graph resources

• Parameter ServerStores persistent configuration parameters and other arbitrary data

• rosoutEssentially a network-based stdout for human-readable messages

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS24

Page 25: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

ROS “Graph” AbstractionNamed network resources

ROS graph resources:

• nodes

– processes– produce and consume data

• parameters

– persistent data storage– configuration, initialization settings– stored on parameter server

• topicsAsynchronous many-to-many communication streams.

• servicesSynchronous one-to-many network-based functions.

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS25

Page 26: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

ROS “Graph”rxgraph: communication network visualization

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS26

Page 27: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Creating and Running ROS NodesDistributing computation with ROS

Launch files

• XML files for launching nodes

• associate a set of parameters and nodes with a single file

• hierarchically compose collections of other launch files

• automatically re-spawn nodes if they crash

• change node names, namespaces, topics, and other resource nameswithout recompiling

• easily distribute nodes across multiple machines

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS27

Page 28: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Example Launch File

Example launch file

<launch><node name=”my node” pkg=” foo ” type=” bar ”>

<remap from=”/ b a s e l a s e r / scan ” to=” scan ” /><rosparam>

u s e f o o : Truef r am e i d : b a s e l a s e r

</ rosparam></node>

</ launch>

• Launch with roslaunch package foo.launch

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS28

Page 29: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

ROS Communication ProtocolsConnecting nodes over the network

• ROS Topics– Asynchronous “stream-like” communication– Strongly-typed (ROS .msg spec)– Can have one or more publishers– Can have one or more subscribers

• ROS Services– Synchronous “function-call-like” communication– Strongly-typed (ROS .srv spec)– Can have only one server– Can have one or more clients

• Actions– Built on top of topics– Long running processes– Cancellation

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS29

Page 30: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Asynchronous Distributed CommunicationROS TCP Topics

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS30

Page 31: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Asynchronous Distributed CommunicationROS TCP Topics

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS31

Page 32: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Asynchronous Distributed CommunicationROS TCP Topics

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS32

Page 33: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Asynchronous Distributed CommunicationROS TCP Topics

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS33

Page 34: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Asynchronous Distributed CommunicationROS TCP Topics

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS34

Page 35: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Asynchronous Distributed CommunicationROS TCP Topics

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS35

Page 36: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Asynchronous Distributed CommunicationROS TCP Topics

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS36

Page 37: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Asynchronous Distributed CommunicationROS TCP Topics

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS37

Page 38: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Asynchronous Distributed CommunicationROS TCP Topics

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS38

Page 39: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Asynchronous Distributed CommunicationROS TCP Topics

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS39

Page 40: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

Asynchronous Distributed CommunicationROS TCP Topics

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS40

Page 41: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

ROS Graph IntrospectionNo more wireshark

ROS provides several tools for analyzing the data flowing over ROScommuncation resources:

• rosnodeGives a user infomation about a node: publications, subscriptions,etc

• rostopicGives datarate, actual data, publishers, subscribes

• rosserviceEnables a user to call a ROS Service from the command line

• roswtf (wire trouble finder)Diagnoses problems with a ROS network

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS45

Page 42: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

ROS GUI ToolsThere are lots. . .

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS46

Page 43: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

ROS GUI ToolsThere are lots. . .

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS47

Page 44: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

ROS GUI ToolsThere are lots. . .

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS48

Page 45: Introduction to ROSav/courses/6912-s16/manual_uploads/... · Department of Informatics Intelligent Autonomous Systems Technische Universität München Motivation • Today’s robotic

Department of InformaticsIntelligent Autonomous Systems Technische Universität München

rviz - 3D VisualizationModular state and sensor visualization

Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library

Lorenz Mösenlechner Introduction to ROS49


Recommended