introduction to ros - computer vision group€¦ · tools – rosbag+rxbag rosbag record – create...

13
Computer Vision Group Prof. Daniel Cremers VisNav Exercise 01 Dr. Jürgen Sturm Jakob Engel Christian Kerl Introduction to ROS

Upload: others

Post on 19-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

Computer Vision Group Prof. Daniel Cremers

VisNav Exercise 01

Dr. Jürgen Sturm

Jakob Engel Christian Kerl

Introduction to ROS

Page 2: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

What is ROS?

Robot Operating System

Open-Source Middleware for Robotics

Drivers, Communication, Package System, …

Supports C++, Python, …

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 2

Page 3: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

ROS in Numbers

175+ organizational/individual contributors

90+ types of robots supported

3699+ packages

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 3

Page 4: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

Concepts – Nodes

Every ROS-enabled program is a node

Registers with ROS master

Unique name

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 4

Page 5: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

Concepts – Master

Registry for

Nodes

Topics

Services

Parameters

One instance per system

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 5

Page 6: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

Concepts – Topics

Message channel between nodes

Unique name

/ardrone/front/image_raw

Fixed type

sensor_msgs/Image

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 6

namespace name

Page 7: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

Concepts – Topics

Node sending messages is a publisher

Node receiving messages is a subscriber

Topic has to be advertised beforehand

Multiple publishers/subscribers per topic possible

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 7

Page 8: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

Concepts – Bags

Containers to store messages

Supports recording and playback of messages

Good for testing, debugging, logging

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 8

Page 9: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

Tools – roscore

Starts the ROS master

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 9

Page 10: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

Tools – rosrun/roslaunch

Starts a node

rosrun ardrone_autonomy ardrone_driver

Important environment variable $ROS_PACKAGE_PATH

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 10

package node

Page 11: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

Tools – rostopic

rostopic

list – display available topics

info – show details of a topic

hz – measure publishing rate

echo – print messages

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 11

Page 12: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

Tools – rosbag+rxbag

rosbag

record – create new bag file

play – playback a bag

info – display details about a bag

rxbag – GUI to view bag files

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 12

Page 13: Introduction to ROS - Computer Vision Group€¦ · Tools – rosbag+rxbag rosbag record – create new bag file play – playback a bag info – display details about a bag rxbag

Tools – rviz

Visualization tool

Dr. Jürgen Sturm, Computer Vision Group, TUM Visual Navigation for Flying Robots 13