Download - Ros Cc 1 Intro
-
7/31/2019 Ros Cc 1 Intro
1/124
ROS Crash-Course, Part I
Introduction to ROS distribution, build system and infrastructure
Jonathan BohrenWith some information and figures adapted from http: //www.ros.org
and the COTESYS-ROS School 2010 presentation given by Radu Rusu
http://www.ros.org/http://www.ros.org/ -
7/31/2019 Ros Cc 1 Intro
2/124
Outline
1 Introduction
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 2 / 30
-
7/31/2019 Ros Cc 1 Intro
3/124
Outline
1 IntroductionHigh-Level
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 2 / 30
-
7/31/2019 Ros Cc 1 Intro
4/124
Outline
1 IntroductionHigh-LevelThe ROS Ecosystem
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 2 / 30
-
7/31/2019 Ros Cc 1 Intro
5/124
Outline
1 IntroductionHigh-LevelThe ROS EcosystemROS Community
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 2 / 30
-
7/31/2019 Ros Cc 1 Intro
6/124
Outline
1 IntroductionHigh-LevelThe ROS EcosystemROS Community
2 ROS as a Communication Platform
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 2 / 30
-
7/31/2019 Ros Cc 1 Intro
7/124
Outline
1 IntroductionHigh-LevelThe ROS EcosystemROS Community
2 ROS as a Communication PlatformThe ROS Network Graph
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 2 / 30
-
7/31/2019 Ros Cc 1 Intro
8/124
Outline
1 IntroductionHigh-LevelThe ROS EcosystemROS Community
2 ROS as a Communication PlatformThe ROS Network GraphRunning and Connecting Nodes
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 2 / 30
-
7/31/2019 Ros Cc 1 Intro
9/124
Outline
1 IntroductionHigh-LevelThe ROS EcosystemROS Community
2 ROS as a Communication PlatformThe ROS Network GraphRunning and Connecting NodesAnalyzing the System at Runtime
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 2 / 30
-
7/31/2019 Ros Cc 1 Intro
10/124
Outline
1 IntroductionHigh-LevelThe ROS EcosystemROS Community
2 ROS as a Communication PlatformThe ROS Network GraphRunning and Connecting NodesAnalyzing the System at Runtime
3 ROS as a Build Platform
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 2 / 30
-
7/31/2019 Ros Cc 1 Intro
11/124
Outline
1 IntroductionHigh-LevelThe ROS EcosystemROS Community
2 ROS as a Communication PlatformThe ROS Network GraphRunning and Connecting NodesAnalyzing the System at Runtime
3 ROS as a Build PlatformDistribution & Package Management System
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 2 / 30
-
7/31/2019 Ros Cc 1 Intro
12/124
Outline
1 IntroductionHigh-LevelThe ROS EcosystemROS Community
2 ROS as a Communication PlatformThe ROS Network GraphRunning and Connecting NodesAnalyzing the System at Runtime
3 ROS as a Build PlatformDistribution & Package Management SystemBuild System
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 2 / 30
Introduction
-
7/31/2019 Ros Cc 1 Intro
13/124
Outline (revisted)
1 IntroductionHigh-LevelThe ROS EcosystemROS Community
2 ROS as a Communication PlatformThe ROS Network GraphRunning and Connecting NodesAnalyzing the System at Runtime
3 ROS as a Build PlatformDistribution & Package Management SystemBuild System
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 3 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
14/124
What is ROS?More than just middleware
A meta operating system for robots
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 4 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
15/124
What is ROS?More than just middleware
A meta operating system for robots
A collection of packaging, software building tools
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 4 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
16/124
What is ROS?More than just middleware
A meta operating system for robots
A collection of packaging, software building tools
An architecture for distributed* inter-process/inter-machinecommunication and configuration
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 4 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
17/124
What is ROS?More than just middleware
A meta operating system for robots
A collection of packaging, software building tools
An architecture for distributed* inter-process/inter-machinecommunication and configuration
Development tools for system runtime and data analysis
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 4 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
18/124
What is ROS?More than just middleware
A meta operating system for robots
A collection of packaging, software building tools
An architecture for distributed* inter-process/inter-machinecommunication and configuration
Development tools for system runtime and data analysis
Open-source under permissive BSD licenses (ros core libraries)
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 4 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
19/124
What is ROS?More than just middleware
A meta operating system for robots
A collection of packaging, software building tools
An architecture for distributed* inter-process/inter-machinecommunication and configuration
Development tools for system runtime and data analysis
Open-source under permissive BSD licenses (ros core libraries)
A language-independent architecture (c++, python, lisp, java, andmore)
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 4 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
20/124
What is ROS?More than just middleware
A meta operating system for robots
A collection of packaging, software building tools
An architecture for distributed* inter-process/inter-machinecommunication and configuration
Development tools for system runtime and data analysis
Open-source under permissive BSD licenses (ros core libraries)
A language-independent architecture (c++, python, lisp, java, andmore)
A scalable platform (ARM CPUS to Xeon Clusters)
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 4 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
21/124
What is ROS?More than just middleware
A meta operating system for robots
A collection of packaging, software building tools
An architecture for distributed* inter-process/inter-machinecommunication and configuration
Development tools for system runtime and data analysis
Open-source under permissive BSD licenses (ros core libraries)
A language-independent architecture (c++, python, lisp, java, andmore)
A scalable platform (ARM CPUS to Xeon Clusters)
With the intent to enable researchers to rapidly develop new robotic
systems without having to reinvent the wheel through use of
standard tools and interfaces.
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 4 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
22/124
What is ROS not?No confusion
Anactual
operating system
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 5 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
23/124
What is ROS not?No confusion
An actual operating system
A programming language
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 5 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
24/124
What is ROS not?No confusion
An actual operating system
A programming language
A programming environment / IDE
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 5 / 30
Introduction High-Level
-
7/31/2019 Ros Cc 1 Intro
25/124
What is ROS not?No confusion
An actual operating system
A programming language
A programming environment / IDE
A hard real-time architecture*
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 5 / 30
Introduction The ROS Ecosystem
-
7/31/2019 Ros Cc 1 Intro
26/124
What does ROS get you?All levels of development
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 6 / 30
Introduction The ROS Ecosystem
-
7/31/2019 Ros Cc 1 Intro
27/124
What does ROS get you?All levels of development
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 6 / 30
Introduction The ROS Ecosystem
-
7/31/2019 Ros Cc 1 Intro
28/124
What does ROS get you?All levels of development
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 6 / 30
Introduction The ROS Ecosystem
-
7/31/2019 Ros Cc 1 Intro
29/124
What does ROS get you?All levels of development
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 6 / 30
Introduction The ROS Ecosystem
-
7/31/2019 Ros Cc 1 Intro
30/124
What does ROS get you?All levels of development
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 6 / 30
Introduction The ROS Ecosystem
-
7/31/2019 Ros Cc 1 Intro
31/124
What does ROS get you?All levels of development
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 6 / 30
Introduction The ROS Ecosystem
-
7/31/2019 Ros Cc 1 Intro
32/124
What does ROS get you?All levels of development
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 6 / 30
Introduction The ROS Ecosystem
-
7/31/2019 Ros Cc 1 Intro
33/124
What does ROS get you?All levels of development
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 6 / 30
Introduction The ROS Ecosystem
-
7/31/2019 Ros Cc 1 Intro
34/124
What does ROS get you?All levels of development
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 6 / 30
Introduction The ROS Ecosystem
-
7/31/2019 Ros Cc 1 Intro
35/124
What does ROS get you?All levels of development
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 6 / 30
Introduction The ROS Ecosystem
-
7/31/2019 Ros Cc 1 Intro
36/124
What does ROS get you?All levels of development
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 6 / 30
Introduction ROS Community
-
7/31/2019 Ros Cc 1 Intro
37/124
The ROS CommunityResearchers using common tools to enable collaboration
79 Institutional ROS Repositories, all over the world (July, 2011)(jhu-lcsr-ros-pkg would make 80)
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 7 / 30
Introduction ROS Community
-
7/31/2019 Ros Cc 1 Intro
38/124
www.ros.org - The ROS HubA centralized location for ROS users and developers
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 8 / 30
Introduction ROS Community
-
7/31/2019 Ros Cc 1 Intro
39/124
answers.ros.org - ROS Questions & AnswersCommunity-supported help for ROS users
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 9 / 30
Introduction ROS Community
-
7/31/2019 Ros Cc 1 Intro
40/124
code.ros.org - Willow Garage, Inc CodeHosting and project management for official packages
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 10 / 30
Introduction ROS Community
-
7/31/2019 Ros Cc 1 Intro
41/124
ros mailing listsGetting in touch with the developer community
ROS Users - for general ROS-related discussionshttps://code.ros.org/mailman/listinfo/ros-users
ROS Developers - for ROS core developmenthttps://code.ros.org/mailman/listinfo/ros-developers
Other Lists & List Archiveshttp://code.ros.org/lurker
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 11 / 30
ROS as a Communication Platform
l ( )
https://code.ros.org/mailman/listinfo/ros-usershttps://code.ros.org/mailman/listinfo/ros-developershttp://code.ros.org/lurkerhttp://code.ros.org/lurkerhttps://code.ros.org/mailman/listinfo/ros-developershttps://code.ros.org/mailman/listinfo/ros-users -
7/31/2019 Ros Cc 1 Intro
42/124
Outline (revisted)
1 IntroductionHigh-LevelThe ROS EcosystemROS Community
2 ROS as a Communication PlatformThe ROS Network GraphRunning and Connecting NodesAnalyzing the System at Runtime
3 ROS as a Build PlatformDistribution & Package Management SystemBuild System
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 12 / 30
ROS as a Communication Platform The ROS Network Graph
ROS C
-
7/31/2019 Ros Cc 1 Intro
43/124
ROS CoreWhere it all comes together
Thr ROS core is a set of the only three programs that are necessary for theROS runtime. They include:
ROS Master
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 13 / 30
ROS as a Communication Platform The ROS Network Graph
ROS C
-
7/31/2019 Ros Cc 1 Intro
44/124
ROS CoreWhere it all comes together
Thr ROS core is a set of the only three programs that are necessary for theROS runtime. They include:
ROS Master
A centralized XML-RPC server
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 13 / 30
ROS as a Communication Platform The ROS Network Graph
ROS C
-
7/31/2019 Ros Cc 1 Intro
45/124
ROS CoreWhere it all comes together
Thr ROS core is a set of the only three programs that are necessary for theROS runtime. They include:
ROS Master
A centralized XML-RPC serverNegotiates communication connections
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 13 / 30
ROS as a Communication Platform The ROS Network Graph
ROS C
-
7/31/2019 Ros Cc 1 Intro
46/124
ROS CoreWhere it all comes together
Thr ROS core is a set of the only three programs that are necessary for theROS runtime. They include:
ROS Master
A centralized XML-RPC serverNegotiates communication connectionsRegisters and looks up names for ROS graph resources
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 13 / 30
ROS as a Communication Platform The ROS Network Graph
ROS C
-
7/31/2019 Ros Cc 1 Intro
47/124
ROS CoreWhere it all comes together
Thr ROS core is a set of the only three programs that are necessary for theROS runtime. They include:
ROS Master
A centralized XML-RPC serverNegotiates communication connectionsRegisters and looks up names for ROS graph resources
Parameter ServerStores persistent configuration parameters and other arbitrary data
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 13 / 30
ROS as a Communication Platform The ROS Network Graph
ROS Core
-
7/31/2019 Ros Cc 1 Intro
48/124
ROS CoreWhere it all comes together
Thr ROS core is a set of the only three programs that are necessary for theROS runtime. They include:
ROS Master
A centralized XML-RPC serverNegotiates communication connectionsRegisters 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
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 13 / 30
ROS as a Communication Platform The ROS Network Graph
ROS Graph Abstraction
-
7/31/2019 Ros Cc 1 Intro
49/124
ROS Graph AbstractionNamed network resources
The ROS runtime designates several classes of named ROS graphresources. These resources can exist in namespaces to reduce namingcollisions, and fall into the following categories:
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 14 / 30
ROS as a Communication Platform The ROS Network Graph
ROS Graph Abstraction
-
7/31/2019 Ros Cc 1 Intro
50/124
ROS Graph AbstractionNamed network resources
The ROS runtime designates several classes of named ROS graphresources. These resources can exist in namespaces to reduce namingcollisions, and fall into the following categories:
nodesRepresent processes distributed across the ROS network. A ROS nodeis a source and sink for data that is sent over the ROS network.
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 14 / 30
ROS as a Communication Platform The ROS Network Graph
ROS Graph Abstraction
-
7/31/2019 Ros Cc 1 Intro
51/124
ROS Graph AbstractionNamed network resources
The ROS runtime designates several classes of named ROS graphresources. These resources can exist in namespaces to reduce namingcollisions, and fall into the following categories:
nodesRepresent processes distributed across the ROS network. A ROS nodeis a source and sink for data that is sent over the ROS network.
parametersPersistent (while the core is running) data such as configuration &initialization settings, stored on the parameter server.
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 14 / 30
ROS as a Communication Platform The ROS Network Graph
ROS Graph Abstraction
-
7/31/2019 Ros Cc 1 Intro
52/124
ROS Graph AbstractionNamed network resources
The ROS runtime designates several classes of named ROS graphresources. These resources can exist in namespaces to reduce namingcollisions, and fall into the following categories:
nodesRepresent processes distributed across the ROS network. A ROS nodeis a source and sink for data that is sent over the ROS network.
parametersPersistent (while the core is running) data such as configuration &initialization settings, stored on the parameter server.
topicsAsynchronous many-to-many communication streams.
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 14 / 30
ROS as a Communication Platform The ROS Network Graph
ROS Graph Abstraction
-
7/31/2019 Ros Cc 1 Intro
53/124
ROS Graph AbstractionNamed network resources
The ROS runtime designates several classes of named ROS graphresources. These resources can exist in namespaces to reduce namingcollisions, and fall into the following categories:
nodesRepresent processes distributed across the ROS network. A ROS nodeis a source and sink for data that is sent over the ROS network.
parametersPersistent (while the core is running) data such as configuration &initialization settings, stored on the parameter server.
topicsAsynchronous many-to-many communication streams.
servicesSynchronous one-to-many network-based functions.
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 14 / 30
ROS as a Communication Platform The ROS Network Graph
ROS Graph
-
7/31/2019 Ros Cc 1 Intro
54/124
ROS Graphrxgraph: communication network visualization
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 15 / 30
ROS as a Communication Platform Running and Connecting Nodes
Creating and Running ROS Nodes
-
7/31/2019 Ros Cc 1 Intro
55/124
Creating and Running ROS NodesDistributing computation with ROS
ROS provides a mechanism for simultaneously configuring and launchingcollections of ROS nodes. This is done with lightweight xml files and theroslaunch program.
Launch files enable users to:
Associate a set of parameters and nodes with a single file
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 16 / 30
ROS as a Communication Platform Running and Connecting Nodes
Creating and Running ROS Nodes
-
7/31/2019 Ros Cc 1 Intro
56/124
Creating and Running ROS NodesDistributing computation with ROS
ROS provides a mechanism for simultaneously configuring and launchingcollections of ROS nodes. This is done with lightweight xml files and theroslaunch program.
Launch files enable users to:
Associate a set of parameters and nodes with a single file
Hierarchically compose collections of other launch files
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 16 / 30
ROS as a Communication Platform Running and Connecting Nodes
Creating and Running ROS Nodes
-
7/31/2019 Ros Cc 1 Intro
57/124
Creating and Running ROS NodesDistributing computation with ROS
ROS provides a mechanism for simultaneously configuring and launchingcollections of ROS nodes. This is done with lightweight xml files and theroslaunch program.
Launch files enable users to:
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
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 16 / 30
ROS as a Communication Platform Running and Connecting Nodes
Creating and Running ROS Nodes
-
7/31/2019 Ros Cc 1 Intro
58/124
g gDistributing computation with ROS
ROS provides a mechanism for simultaneously configuring and launchingcollections of ROS nodes. This is done with lightweight xml files and theroslaunch program.
Launch files enable users to:
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
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 16 / 30
ROS as a Communication Platform Running and Connecting Nodes
Creating and Running ROS Nodes
-
7/31/2019 Ros Cc 1 Intro
59/124
g gDistributing computation with ROS
ROS provides a mechanism for simultaneously configuring and launchingcollections of ROS nodes. This is done with lightweight xml files and theroslaunch program.
Launch files enable users to:
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
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 16 / 30
-
7/31/2019 Ros Cc 1 Intro
60/124
ROS as a Communication Platform Running and Connecting Nodes
ROS Communication Protocols
-
7/31/2019 Ros Cc 1 Intro
61/124
Connecting nodes over the network
ROS supports a growing number of communication capabilities that enabledistributing computation in a robotic system. These capabilities arecurrently built entirely on two high-level communication APIs:
ROS Topics
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 17 / 30
ROS as a Communication Platform Running and Connecting Nodes
ROS Communication Protocols
-
7/31/2019 Ros Cc 1 Intro
62/124
Connecting nodes over the network
ROS supports a growing number of communication capabilities that enabledistributing computation in a robotic system. These capabilities arecurrently built entirely on two high-level communication APIs:
ROS Topics
Asynchronous stream-like communication
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 17 / 30
-
7/31/2019 Ros Cc 1 Intro
63/124
ROS as a Communication Platform Running and Connecting Nodes
ROS Communication Protocols
-
7/31/2019 Ros Cc 1 Intro
64/124
Connecting nodes over the network
ROS supports a growing number of communication capabilities that enabledistributing computation in a robotic system. These capabilities arecurrently built entirely on two high-level communication APIs:
ROS Topics
Asynchronous stream-like communication
TCP/IP or UDP TransportStrongly-typed (ROS .msg spec)
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 17 / 30
ROS as a Communication Platform Running and Connecting Nodes
ROS Communication Protocols
-
7/31/2019 Ros Cc 1 Intro
65/124
Connecting nodes over the network
ROS supports a growing number of communication capabilities that enabledistributing computation in a robotic system. These capabilities arecurrently built entirely on two high-level communication APIs:
ROS Topics
Asynchronous stream-like communication
TCP/IP or UDP TransportStrongly-typed (ROS .msg spec)Can have one or more publishers
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 17 / 30
ROS as a Communication Platform Running and Connecting Nodes
ROS Communication Protocols
-
7/31/2019 Ros Cc 1 Intro
66/124
Connecting nodes over the network
ROS supports a growing number of communication capabilities that enabledistributing computation in a robotic system. These capabilities arecurrently built entirely on two high-level communication APIs:
ROS Topics
Asynchronous stream-like communication
TCP/IP or UDP TransportStrongly-typed (ROS .msg spec)Can have one or more publishersCan have one or more subscribers
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 17 / 30
ROS as a Communication Platform Running and Connecting Nodes
ROS Communication Protocols
-
7/31/2019 Ros Cc 1 Intro
67/124
Connecting nodes over the network
ROS supports a growing number of communication capabilities that enabledistributing computation in a robotic system. These capabilities arecurrently built entirely on two high-level communication APIs:
ROS Topics
Asynchronous stream-like communication
TCP/IP or UDP TransportStrongly-typed (ROS .msg spec)Can have one or more publishersCan have one or more subscribers
ROS Services
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 17 / 30
ROS as a Communication Platform Running and Connecting Nodes
ROS Communication ProtocolsC d h k
-
7/31/2019 Ros Cc 1 Intro
68/124
Connecting nodes over the network
ROS supports a growing number of communication capabilities that enabledistributing computation in a robotic system. These capabilities arecurrently built entirely on two high-level communication APIs:
ROS Topics
Asynchronous stream-like communication
TCP/IP or UDP TransportStrongly-typed (ROS .msg spec)Can have one or more publishersCan have one or more subscribers
ROS Services
Synchronous function-call-like communication
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 17 / 30
ROS as a Communication Platform Running and Connecting Nodes
ROS Communication ProtocolsC i d h k
-
7/31/2019 Ros Cc 1 Intro
69/124
Connecting nodes over the network
ROS supports a growing number of communication capabilities that enabledistributing computation in a robotic system. These capabilities arecurrently built entirely on two high-level communication APIs:
ROS Topics
Asynchronous stream-like communication
TCP/IP or UDP TransportStrongly-typed (ROS .msg spec)Can have one or more publishersCan have one or more subscribers
ROS Services
Synchronous function-call-like communicationTCP/IP or UDP Transport
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 17 / 30
ROS as a Communication Platform Running and Connecting Nodes
ROS Communication ProtocolsC ti d th t k
-
7/31/2019 Ros Cc 1 Intro
70/124
Connecting nodes over the network
ROS supports a growing number of communication capabilities that enabledistributing computation in a robotic system. These capabilities arecurrently built entirely on two high-level communication APIs:
ROS Topics
Asynchronous stream-like communication
TCP/IP or UDP TransportStrongly-typed (ROS .msg spec)Can have one or more publishersCan have one or more subscribers
ROS Services
Synchronous function-call-like communicationTCP/IP or UDP TransportStrongly-typed (ROS .srv spec)
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 17 / 30
ROS as a Communication Platform Running and Connecting Nodes
ROS Communication ProtocolsC ti d th t k
-
7/31/2019 Ros Cc 1 Intro
71/124
Connecting nodes over the network
ROS supports a growing number of communication capabilities that enabledistributing computation in a robotic system. These capabilities arecurrently built entirely on two high-level communication APIs:
ROS Topics
Asynchronous stream-like communication
TCP/IP or UDP TransportStrongly-typed (ROS .msg spec)Can have one or more publishersCan have one or more subscribers
ROS Services
Synchronous function-call-like communicationTCP/IP or UDP TransportStrongly-typed (ROS .srv spec)Can have only one server
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 17 / 30
ROS as a Communication Platform Running and Connecting Nodes
ROS Communication ProtocolsConnecting nodes over the network
-
7/31/2019 Ros Cc 1 Intro
72/124
Connecting nodes over the network
ROS supports a growing number of communication capabilities that enabledistributing computation in a robotic system. These capabilities arecurrently built entirely on two high-level communication APIs:
ROS Topics
Asynchronous stream-like communication
TCP/IP or UDP TransportStrongly-typed (ROS .msg spec)Can have one or more publishersCan have one or more subscribers
ROS Services
Synchronous function-call-like communicationTCP/IP or UDP TransportStrongly-typed (ROS .srv spec)Can have only one serverCan have one or more clients
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 17 / 30
ROS as a Communication Platform Running and Connecting Nodes
Asynchronous Distributed* CommunicationROS TCP Topics
-
7/31/2019 Ros Cc 1 Intro
73/124
ROS TCP Topics
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 18 / 30
ROS as a Communication Platform Running and Connecting Nodes
Asynchronous Distributed* CommunicationROS TCP Topics
-
7/31/2019 Ros Cc 1 Intro
74/124
ROS TCP Topics
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 18 / 30
ROS as a Communication Platform Running and Connecting Nodes
Asynchronous Distributed* CommunicationROS TCP Topics
-
7/31/2019 Ros Cc 1 Intro
75/124
ROS TCP Topics
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 18 / 30
ROS as a Communication Platform Running and Connecting Nodes
Asynchronous Distributed* CommunicationROS TCP Topics
-
7/31/2019 Ros Cc 1 Intro
76/124
ROS TCP Topics
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 18 / 30
ROS as a Communication Platform Running and Connecting Nodes
Asynchronous Distributed* CommunicationROS TCP Topics
-
7/31/2019 Ros Cc 1 Intro
77/124
ROS TCP Topics
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 18 / 30
ROS as a Communication Platform Running and Connecting Nodes
Asynchronous Distributed* CommunicationROS TCP Topics
-
7/31/2019 Ros Cc 1 Intro
78/124
p
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 18 / 30
ROS as a Communication Platform Running and Connecting Nodes
Asynchronous Distributed* CommunicationROS TCP Topics
-
7/31/2019 Ros Cc 1 Intro
79/124
p
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 18 / 30
ROS as a Communication Platform Running and Connecting Nodes
Asynchronous Distributed* CommunicationROS TCP Topics
-
7/31/2019 Ros Cc 1 Intro
80/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 18 / 30
ROS as a Communication Platform Running and Connecting Nodes
Asynchronous Distributed* CommunicationROS TCP Topics
-
7/31/2019 Ros Cc 1 Intro
81/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 18 / 30
ROS as a Communication Platform Running and Connecting Nodes
Asynchronous Distributed* CommunicationROS TCP Topics
-
7/31/2019 Ros Cc 1 Intro
82/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 18 / 30 ROS as a Communication Platform Running and Connecting Nodes
Asynchronous Distributed* CommunicationROS TCP Topics
-
7/31/2019 Ros Cc 1 Intro
83/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 18 / 30 ROS as a Communication Platform Analyzing the System at Runtime
rosout Messagingstdout on steroids
-
7/31/2019 Ros Cc 1 Intro
84/124
ROS provides mechanisms in all languages for specifying different levels ofhuman-readable log messages. The five default levels are:
fatal
error
warninfo
debug
Jonathan Bohren (JHU LCSR) ROS Crash-Course Part I: Introduction 19 / 30 ROS as a Communication Platform Analyzing the System at Runtime
rosout Messagingstdout on steroids
-
7/31/2019 Ros Cc 1 Intro
85/124
ROS provides mechanisms in all languages for specifying different levels ofhuman-readable log messages. The five default levels are:
fatal
error
warninfo
debug
These enable a user to add printfs to their code for debugging, andselectively enable and disable them at runtime without a large
performance hit. For example, useful debug messages that might benecessary to diagnose a problem could be left in the code and re-enabledat a critical time.
Jonathan Bohren (JHU LCSR) ROS Crash-Course Part I: Introduction 19 / 30 ROS as a Communication Platform Analyzing the System at Runtime
ROS Graph IntrospectionNo more wireshark
-
7/31/2019 Ros Cc 1 Intro
86/124
ROS provides several tools for analyzing the data flowing over ROScommuncation resources:
rosnode
Gives a user infomation about a node: publications, subscriptions, etc
Jonathan Bohren (JHU LCSR) ROS Crash-Course Part I: Introduction 20 / 30 ROS as a Communication Platform Analyzing the System at Runtime
ROS Graph IntrospectionNo more wireshark
-
7/31/2019 Ros Cc 1 Intro
87/124
ROS provides several tools for analyzing the data flowing over ROScommuncation resources:
rosnode
Gives a user infomation about a node: publications, subscriptions, etc
rostopic
Gives datarate, actual data, publishers, subscribes
Jonathan Bohren (JHU LCSR) ROS Crash-Course Part I: Introduction 20 / 30 ROS as a Communication Platform Analyzing the System at Runtime
ROS Graph IntrospectionNo more wireshark
-
7/31/2019 Ros Cc 1 Intro
88/124
ROS provides several tools for analyzing the data flowing over ROScommuncation resources:
rosnode
Gives a user infomation about a node: publications, subscriptions, etc
rostopic
Gives datarate, actual data, publishers, subscribes
rosservice
Enables a user to call a ROS Service from the command line
Jonathan Bohren (JHU LCSR) ROS Crash-Course Part I: Introduction 20 / 30 ROS as a Communication Platform Analyzing the System at Runtime
ROS Graph IntrospectionNo more wireshark
-
7/31/2019 Ros Cc 1 Intro
89/124
ROS provides several tools for analyzing the data flowing over ROScommuncation resources:
rosnode
Gives a user infomation about a node: publications, subscriptions, etc
rostopic
Gives datarate, actual data, publishers, subscribes
rosservice
Enables a user to call a ROS Service from the command line
roswtf (wire trouble finder)Diagnoses problems with a ROS network
Jonathan Bohren (JHU LCSR) ROS Crash-Course Part I: Introduction 20 / 30 ROS as a Communication Platform Analyzing the System at Runtime
ROS GUI ToolsThere are lots. . .
-
7/31/2019 Ros Cc 1 Intro
90/124
Jonathan Bohren (JHU LCSR) ROS Crash Course Part I: Introduction 21 / 30 ROS as a Communication Platform Analyzing the System at Runtime
ROS GUI ToolsThere are lots. . .
-
7/31/2019 Ros Cc 1 Intro
91/124
Jonathan Bohren (JHU LCSR) ROS Crash Course Part I: Introduction 21 / 30 ROS as a Communication Platform Analyzing the System at Runtime
ROS GUI ToolsThere are lots. . .
-
7/31/2019 Ros Cc 1 Intro
92/124
Jonathan Bohren (JHU LCSR) ROS Crash Course Part I: Introduction 21 / 30 ROS as a Communication Platform Analyzing the System at Runtime
ROS GUI ToolsThere are lots. . .
-
7/31/2019 Ros Cc 1 Intro
93/124
Jonathan Bohren (JHU LCSR) ROS Crash Course Part I: Introduction 21 / 30 ROS as a Communication Platform Analyzing the System at Runtime
ROS GUI ToolsThere are lots. . .
-
7/31/2019 Ros Cc 1 Intro
94/124
Jonathan Bohren (JHU LCSR) ROS Crash Course Part I: Introduction 21 / 30 ROS as a Communication Platform Analyzing the System at Runtime
ROS GUI ToolsThere are lots. . .
-
7/31/2019 Ros Cc 1 Intro
95/124
Jonathan Bohren (JHU LCSR) ROS Crash Course Part I: Introduction 21 / 30 ROS as a Communication Platform Analyzing the System at Runtime
rviz - 3D VisualizationModular state and sensor visualization
-
7/31/2019 Ros Cc 1 Intro
96/124
Jonathan Bohren (JHU LCSR) ROS Crash Course Part I: Introduction 22 / 30 ROS as a Build Platform
Outline (revisted)
1 Introduction
-
7/31/2019 Ros Cc 1 Intro
97/124
1 Introduction
High-LevelThe ROS EcosystemROS Community
2 ROS as a Communication Platform
The ROS Network GraphRunning and Connecting NodesAnalyzing the System at Runtime
3 ROS as a Build Platform
Distribution & Package Management SystemBuild System
Jonathan Bohren (JHU LCSR) ROS Crash Co rse Part I Introd ction 23 / 30 ROS as a Build Platform Distribution & Package Management System
ROS Stacks & PackagesHow to organize code in a ROS ecosystem
-
7/31/2019 Ros Cc 1 Intro
98/124
ROS code is grouped at two different levels:
Packages
A named collection of software that is built and treated as an atomicdependency in the ROS build system.
StacksA named collection of packages for distribution.
J th B h (JHU LCSR) ROS C h C P t I I t d ti 24 / 30 ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
99/124
J th B h (JHU LCSR) ROS C h C P t I I t d ti 25 / 30 ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
100/124
J th B h (JHU LCSR) ROS C h C P t I I t d ti 25 / 30 ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
101/124
J th B h (JHU LCSR) ROS C h C P t I I t d ti 25 / 30 ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
102/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 25 / 30
ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
103/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 25 / 30
ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
104/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 26 / 30
ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
105/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 26 / 30
ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
106/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 26 / 30
ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
107/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 26 / 30
ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
108/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 26 / 30
ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
109/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 26 / 30
ROS as a Build Platform Distribution & Package Management System
ROS DistributionsDelivering ROS packages to the masses
-
7/31/2019 Ros Cc 1 Intro
110/124
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 26 / 30
ROS as a Build Platform Build System
ROS Meta-FilesystemIncreasing codebase flexibility
-
7/31/2019 Ros Cc 1 Intro
111/124
The minimal representation of a ROS package is a directory in the$ROS_PACKAGE_PATH which contains a single file:
manifest.xml
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 27 / 30
ROS as a Build Platform Build System
ROS Meta-FilesystemIncreasing codebase flexibility
-
7/31/2019 Ros Cc 1 Intro
112/124
The minimal representation of a ROS package is a directory in the$ROS_PACKAGE_PATH which contains a single file:
manifest.xml
Contains package metadata (author, license, url, etc)
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 27 / 30
ROS as a Build Platform Build System
ROS Meta-FilesystemIncreasing codebase flexibility
-
7/31/2019 Ros Cc 1 Intro
113/124
The minimal representation of a ROS package is a directory in the$ROS_PACKAGE_PATH which contains a single file:
manifest.xml
Contains package metadata (author, license, url, etc)
Specifies system and package dependencies
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 27 / 30
ROS as a Build Platform Build System
ROS Meta-FilesystemIncreasing codebase flexibility
-
7/31/2019 Ros Cc 1 Intro
114/124
The minimal representation of a ROS package is a directory in the$ROS_PACKAGE_PATH which contains a single file:
manifest.xml
Contains package metadata (author, license, url, etc)
Specifies system and package dependenciesSpecifies language-specific export flags
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 27 / 30
ROS as a Build Platform Build System
ROS Meta-FilesystemIncreasing codebase flexibility
-
7/31/2019 Ros Cc 1 Intro
115/124
The minimal representation of a ROS package is a directory in the$ROS_PACKAGE_PATH which contains a single file:
manifest.xml
Contains package metadata (author, license, url, etc)
Specifies system and package dependenciesSpecifies language-specific export flags
CMakeLists.txt
Contains ROS build rules (executables, libraries, custom build flags,etc)
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 27 / 30
ROS as a Build Platform Build System
ROS Meta-FilesystemIncreasing codebase flexibility
-
7/31/2019 Ros Cc 1 Intro
116/124
The minimal representation of a ROS package is a directory in the$ROS_PACKAGE_PATH which contains a single file:
manifest.xml
Contains package metadata (author, license, url, etc)
Specifies system and package dependenciesSpecifies language-specific export flags
CMakeLists.txt
Contains ROS build rules (executables, libraries, custom build flags,etc)
Makefile
Just a proxy to build this package
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 27 / 30
-
7/31/2019 Ros Cc 1 Intro
117/124
ROS as a Build Platform Build System
ROS Meta-Filesystem
-
7/31/2019 Ros Cc 1 Intro
118/124
This meta-filesystem allows ROS (rospack, specifically) to locate anypackage in the designated path, be it at compile time or runtime.
Since ROS can find any package at any time, it enables packages to bemoved aoround in the actual filesystem and greater codebase flexibility.
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 28 / 30
ROS as a Build Platform Build System
Building Code with ROSEasier CMake
-
7/31/2019 Ros Cc 1 Intro
119/124
While ROS uses CMake (www.cmake.org) internally to compile and linkcode, the ROS build system it adds several useful features that make iteasier to build ROS code.
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 29 / 30
ROS as a Build Platform Build System
Building Code with ROSEasier CMake
http://www.cmake.org/http://www.cmake.org/ -
7/31/2019 Ros Cc 1 Intro
120/124
While ROS uses CMake (www.cmake.org) internally to compile and linkcode, the ROS build system it adds several useful features that make iteasier to build ROS code.
rosbuild pulls compile and linker flags out of ROS package manifests,
so compiling against other ROS code is as easy as specifying thepackage name
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 29 / 30
ROS as a Build Platform Build System
Building Code with ROSEasier CMake
http://www.cmake.org/http://www.cmake.org/ -
7/31/2019 Ros Cc 1 Intro
121/124
While ROS uses CMake (www.cmake.org) internally to compile and linkcode, the ROS build system it adds several useful features that make iteasier to build ROS code.
rosbuild pulls compile and linker flags out of ROS package manifests,
so compiling against other ROS code is as easy as specifying thepackage name
rosdep can be used to install system dependencies specified in apackages manifest.xml
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 29 / 30
ROS as a Build Platform Build System
Building Code with ROSEasier CMake
http://www.cmake.org/http://www.cmake.org/ -
7/31/2019 Ros Cc 1 Intro
122/124
While ROS uses CMake (www.cmake.org) internally to compile and linkcode, the ROS build system it adds several useful features that make iteasier to build ROS code.
rosbuild pulls compile and linker flags out of ROS package manifests,
so compiling against other ROS code is as easy as specifying thepackage name
rosdep can be used to install system dependencies specified in apackages manifest.xml
ROS CMake macros enable rapid building of executables, libaries, andautomated regression tests
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 29 / 30
ROS as a Build Platform Build System
http://www.cmake.org/http://www.cmake.org/ -
7/31/2019 Ros Cc 1 Intro
123/124
Thank you!
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 30 / 30
ROS as a Build Platform Build System
http://www.ros.org/wiki/ROS/Tutorials -
7/31/2019 Ros Cc 1 Intro
124/124
Thank you!Now proceed to the ROS Beginner Tutorials!http://www.ros.org/wiki/ROS/Tutorials
Jonathan Bohren (JHU LCSR) ROS Crash-Course, Part I: Introduction 30 / 30
http://www.ros.org/wiki/ROS/Tutorialshttp://www.ros.org/wiki/ROS/Tutorials