+ All Categories
Home > Documents > Konstruktion Mobiler RoboterKonstruktion Mobiler Roboter ... · Institut für Softwaretechnologie...

Konstruktion Mobiler RoboterKonstruktion Mobiler Roboter ... · Institut für Softwaretechnologie...

Date post: 02-Sep-2019
Category:
Upload: others
View: 5 times
Download: 1 times
Share this document with a friend
42
Institut für Softwaretechnologie Konstruktion Mobiler Roboter Konstruktion Mobiler Roboter Einführung Software Gerald Steinbauer Institut für Softwaretechnologie Gerald Steinbauer 1 Konstruktion Mobiler Roboter, PR, WS12
Transcript

Institut für Softwaretechnologie

Konstruktion Mobiler RoboterKonstruktion Mobiler RoboterEinführung Software

Gerald SteinbauerInstitut für Softwaretechnologie

Gerald Steinbauer1

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Agenda

R b t O ti S t (ROS)• Robot Operating System (ROS)• Selbstlokalisation und Navigation• Kinect & Point Cloud Library (PCL)• Grasping & Arm Navigation

Gerald Steinbauer2

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Robot Operating System (ROS)

F k fü di E t i kl• Framework für die Entwicklung von Roboter Softwaresoll OS like Funktionalität bieten• soll OS-like Funktionalität bieten

• ursprünglich entwickelt von Stanford AI Lab (SAIL)Lab (SAIL)

• mittlereile führend weiter entwickelt von Willow GarageWillow Garage

• Open Source Plafform• verwendet von alle führenden Robotik-• verwendet von alle führenden Robotik-

Labs • bietet viel Funktionalität auf allen Level

Gerald Steinbauer3

Konstruktion Mobiler Roboter, PR, WS12

bietet viel Funktionalität auf allen Level

Institut für Softwaretechnologie

(Einige) Unterstützte Plattformen

Gerald Steinbauer4

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Prinzipien von ROS

P T P• Peer-To-Peer– viele eigenständige Prozesse und verschiedene Hosts

• Multi Lingual• Multi-Lingual– Kommunikation basiert auf XML-RPC– unterstützt C++, Phyton, Octave, LISP– definierte Datentypen, Interface Definition Language (IDL)

• Tool-Based– Linux Philosophie mit vielen kleinen Bausteinen

• ThinFunktionalität in viele Stand Alone Libraries verpackt auch 3rd Party– Funktionalität in viele Stand-Alone Libraries verpackt, auch 3rd Party

– eigenes Build-System unterstützt

• Open-Source

Gerald Steinbauer5

Konstruktion Mobiler Roboter, PR, WS12

p

Institut für Softwaretechnologie

NavigationSimulation Manipulation

ROSVisualization

gTask Executive

ClientLibratries

MessagePassing

WordProcessing

OS

ocess g

Web Browser

GUIMemoryManagement

File System Scheduler Drivers

Gerald Steinbauer6

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

ROS - Operation

ROS i t d fi iti f d ti ll S it• ROS ist definitiv auf der operationellen Seite• unterstützt Nachrichtentransport

bli h / b ib ( d t i )• publisher/subscriber (nodes, messages, topics)• client/server (services, action-server)

• Runtime AusführungRuntime Ausführung• Threads und verwandte Techniken• Konfiguration

• unterstützt die Entwicklung• wiederverwendbare Klassen und Bibliotheken• Definition von Interfaces• Definition von Interfaces• Debugging, Logging und Visualisierungs-Tools• Build-System

Gerald Steinbauer7

Konstruktion Mobiler Roboter, PR, WS12• …

Institut für Softwaretechnologie

Broadcast

Gerald Steinbauer8

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Client/Server

Gerald Steinbauer9

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

ROS - Funktion

ROS t tüt t d f kti ll Si ht• ROS unterstützt den funktionelle Sicht• Behavioral Control

l l th l• local path planner• obstacle avoidance• trajectory generationtrajectory generation

• Executive• global path plannerg p p• SMACH – state machine for task-level control

• Planning• Cognitive Robot Abstract Machine (CARM) von TUM• Knowledge Processing for Autonomous Personal Robots

(KnowRob) von TUM

Gerald Steinbauer10

Konstruktion Mobiler Roboter, PR, WS12

(KnowRob) von TUM

Institut für Softwaretechnologie

Bausteine von ROS

pha node is an executable that uses ROS to communicate with other nodes and does

computation

nodes can publish messages to a topic as well subscribe to a topic to receive

messages (many-to-many communication)

puta

tion

Gra

p

messages are ROS data type used when subscribing or publishing to a topic

a service is a node with one defined input and one defined output message type

once

pt: C

omp

Co

the master is a node that is the name service for ROS

it helps nodes find each other nodes

the parameter server provides and manages parameter across the network

astru

ctur

e

rosout is the decentralized ROS equivalent of stdout/stderr

roscore is Master + rosout + parameter server B

asic

Infra

Gerald Steinbauer11

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Computation Graph

robot laser imu map

localization

planner

Gerald Steinbauer12

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Organisation in ROSa package is an organization unit in ROS a manifests provide metadata about aa package is an organization unit in ROS

the goal is to provide functionalityit can contain a node, a library, data,

configurations …

a manifests provide metadata about a package, including its license information and dependencies, as well as language-

specific information such as compiler flags.

stacks are collections of packages that provide aggregate functionality, such as a

"navigation stack"

stack manifests provide data about a stack, including its license information and

its dependencies on other stacks

launch files are used to configure and gstart a set of nodes/packages at once

a bag is a file format in ROS for storingROS message data

Gerald Steinbauer13

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Naming in ROS

hi hi h N t kt• hierarchische Namenstruktur• verwendet für alle Ressourcen

d– nodes– parameter– topics– services

• nodes haben einen Namespace/ d /t i/node_name/topic_name

• parameter sind auch hirarchisch strukturiert/p3at/odometry/frequency/p3at/odometry/frequency

• können wie das Linux Dateisystem verwendet werden (relativ global)

Gerald Steinbauer14

Konstruktion Mobiler Roboter, PR, WS12

werden (relativ, global)

Institut für Softwaretechnologie

Tools in ROS

rxgraph display a visualization of a ROS computation graph

client library supports the development of nodes

allows easy access to topics, paramter, …C++ & PhytonC++ & Phyton

rviz is a 3d visualization toolit is online configurable and is able to g

display sensor data, point clouds, paths, coordinate systems

ROS is able to record and playback all topics in an transparent way and in the

proper timing

Gerald Steinbauer15

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Features in ROS

K di t t f ti it tf• Koordinatentransformation mit tf– Verwalten verschiedener

ReferensystemeReferensysteme– automatische Umrechnung

• vereinheitlichte Datentypen für ypähnliche Sensoren oder Aktoren– z.B. point clouds für Laser Scanner

D tDaten– z.B. velocity_command für Pioneer

• Remote Access von anderen• Remote Access von anderen Rechnern– transparentes Netzwerk

Gerald Steinbauer16

Konstruktion Mobiler Roboter, PR, WS12

p

Institut für Softwaretechnologie

Transformation

iti d d t i t i• positions and data points are in a definitive frameframes can build transformation• frames can build transformation chains

tip_link

map

odom base_linkb l li k

kinect_base_link

Gerald Steinbauer17

Konstruktion Mobiler Roboter, PR, WS12

base_laser_link

Institut für Softwaretechnologie

Driver in ROS

ROS fü t üb i ß M St d d• ROS verfügt über eine große Menge von Standard-Nodes für Roboter und Sensoren

Pioneer Roboter Familie– Pioneer Roboter Familie– Forbot– Sick Laser Scanner Familie– Hokuyo Laser Scanner Familie– GPS (NMEA)– Xsense IMU– Roboter Arm

Firewire and USB Kameras– Firewire and USB Kameras– Kinect

Gerald Steinbauer18

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Funktionalität in ROS

M i ( i )• Mapping (gmapping)– basiert auf der freien gmapping

ImplementierungImplementierung– einfaches Erstellen von 2d Karten

• Navigationg– kompletter navigation stack– ermöglicht Autonomes Fahren

• Organisation von Verhalten– Standard Templates für Verhalten

(actionlib)(actionlib)

• Entscheidungsfindung– Finite State Machine (SMACH )

Gerald Steinbauer19

Konstruktion Mobiler Roboter, PR, WS12

Finite State Machine (SMACH )

Institut für Softwaretechnologie

Installation auf Ubuntu

ROS t tüt t ll Ub t• ROS unterstützt voll Ubuntu• eigenes Notebook hat Vorteile

A bi b it R b t d L b– Ausprobieren abseits von Roboter und Lab– Remote Access auf Roboter

• funktioniert am besten mit Ubuntu 12 04 und ROS• funktioniert am besten mit Ubuntu 12.04 und ROS Furet

• Step-by-Step Anleitung im ROS WikiStep by Step Anleitung im ROS Wikihttp://www.ros.org/

• Bootstrap System• zusätzliche Packages könne einfach nach installiert

(kompiliert) werden

Gerald Steinbauer20

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Selbstlokalisation

f d t l P bl i d R b tik• fundamentales Problem in der Robotik• Bestimmung der Position des Roboters in Relation zu

seiner Umgebungseiner Umgebung• Pose = Position + Orientierung

I d i 3 di i l P bl ( Θ)• Indoor ein 3 dimensionales Problem (x,y,Θ)• Outdoor ein 6 dimensionales Problem (x,y,z,Φ,Θ,Ψ)

P bl• Probleme– Sensorungenauigkeiten– MehrdeutigkeitenMehrdeutigkeiten– mehrfache Hypothesen

Gerald Steinbauer21

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Lokalisierungsarten

P T ki• Pose Tracking– Verfolgung einer bekannten Position– einfach zu löseneinfach zu lösen– für bestimmte Aufgaben ausreichend– Kalman-Filter

• Globale Lokalisierung– löst das “kidnapped robot” Problem

aufwendiger zu lösen– aufwendiger zu lösen– generelle Lösung– Partikelfilter

Gerald Steinbauer22

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Geschlossene Darstellung der Unsicherheit

Gerald Steinbauer23

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Prinzip Partikel Filter (1-dimensional)

allgemeines Partikel: <x,y,Θ,w>

© Sebastian Thrun

Gerald Steinbauer24

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Localization in ROS• ROS provides a ready to use localization stack• ROS provides a ready-to use localization stack• the “Adaptive Monte Carlo Localization” (amcl)

packagepackage• laser-based localization• particle filter localization (MCL)• KLD sampling to control the sample size• augmented MCL to recover from localization errors• Sensor model

• beam range finder model• likelihood field model

• Motion modelMotion model• sample-based odometry model (differential drive)• sample-based odometry model (omni-directional drive)

f d t l k t th t t i lGerald Steinbauer

25

Konstruktion Mobiler Roboter, PR, WS12

• for usage and parameter look to the tutorial

Institut für Softwaretechnologie

amcl overview

Map Server

Laser Node

i i i l / i h i

acml

initial pose/pose with covarianceparticles/pose array

Robot Nodeodometry/odometry-tf

Gerald Steinbauer26

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

ROS Navigation Stack

ROS id f ll i ti t k• ROS provides a full navigation stack• global planning – A* and LPN• local planning – Dynamic Window

Approach or Trajectory Rolloutpp j y• supports differential drive and omni-directional robots• works with and without global localization and mapg p• can work with 2d and/or 3d maps and sensors

• for usage and parameter look to the tutorial

Gerald Steinbauer27

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

ROS Navigation Stack Overview

Gerald Steinbauer28

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Cost Maps

t d t t th d hi• cost maps are used to generate a path or do achieve obstacle avoidancecost maps are 2d• cost maps are 2d

• Global Cost Map• initialized by the global map• initialized by the global map• updated by sensor information• map coordinate frame

• Local Cost Map• rolling window – centered around

the robotthe robot• cares about local obstacles• updated by sensor information

Gerald Steinbauer29

Konstruktion Mobiler Roboter, PR, WS12

• odometry coordinate frame

Institut für Softwaretechnologie

Rescue Arena RoboCup 2012

Gerald Steinbauer30

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Team Hector (Final Run RoboCup 2012)

Gerald Steinbauer31

Konstruktion Mobiler Roboter, PR, WS12

Map, Victims Found (red), QR Codes Located (green)

Institut für Softwaretechnologie

Point Cloud

t ti f th ld• easy representation of the world• represent the scene as a collection/set (cloud) of nD

pointspoints• usually n = 3

b t h i t i ht h dditi l i f RGB• but each point might have additional info, e.g. RGB color, intensity, uncertainty (n>3)

• point cloud P with m points P={p p p p }• point cloud P with m points, P={p1,p2,…,pm-1,pm}, pi={xi,yi,zi}

• large amount of data for detailed representations• large amount of data for detailed representations

Gerald Steinbauer32

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Point Cloud - Examples

[pointcloud org]

Gerald Steinbauer33

Konstruktion Mobiler Roboter, PR, WS12

[pointcloud.org]

Institut für Softwaretechnologie

Kinect

d i d l h• own driver and launch package (open-ni)provides different data• provides different data– ordinary RGB image– depth imagesdepth images– point clouds– registered depth image

Gerald Steinbauer34

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Point Cloud Library (PCL)

lib t d l ith i t l d• an open-source library to deal with point clouds• allows to represent and manipulate point clouds

easilyeasily• provides a number of standard building blocks –

basic algorithms are therebasic algorithms are there• based on work of Radu Bogdan Rusu (TUM)• stand alone library but developed and used by the• stand alone library but developed and used by the

ROS community as well• a standard representation of 3D data in ROS• a standard representation of 3D data in ROS

Gerald Steinbauer35

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

PCL Features

t l t b d t t l i t t• template-based to support several point types• a number of standard types, e.g. {X,Y,Z}• allows also more complex types e g including normal vectorsallows also more complex types, e.g. including normal vectors,

RGB color,…

• highly optimized• memory alignment (i.e., simple point types)• SSE support (i.e., simple point types)• reuses high performance libraries Eigen (linear algebra), FLANNreuses high performance libraries Eigen (linear algebra), FLANN

(nearest neighbor)• prepared for easy parallelization on multi-cores (Intel TBB)

id i i li• provides a processing pipeline• data acquisition – computation – visualization

• multi OS support (Windows Mac Linux Android)Gerald Steinbauer

36

Konstruktion Mobiler Roboter, PR, WS12

• multi-OS support (Windows, Mac, Linux, Android)

Institut für Softwaretechnologie

Useful Operations• PCL supports building blocks in several smaller libraries• filters

• standard filter mechanism, different types such as downsampling

• features• calculation of 3D features, surface normals, descriptors

I/O• I/O• reading/writing PCL files

• segmentation• segmentation• cluster extraction, consensus methods for parametric models (cylinder,..)

• surfaces• meshing, convex hull

• registration

Gerald Steinbauer37

Konstruktion Mobiler Roboter, PR, WS12

• point cloud registration, e.g. ICP, own algorithms

Institut für Softwaretechnologie

OpenCV

i f l Vi i lib• is a powerful open source Vision library• fully integrated in ROS• bridge between ROS and OpenCV image format• supports a lot of functionality

– feature extraction– segmentation– tracking– tracking– transformation– filtering

Gerald Steinbauer38

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

OpenCV Bridge

t d d ROS i• standard ROS image message typebasic ROS driver for• basic ROS driver for common cameras, e.g. USB IEEE1394 KinectUSB, IEEE1394, Kinect

• image converter from ROS to OpenCVp

• thermal-camera acts as a grey-scale camera

Gerald Steinbauer39

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Grasping• bottles/walky talky will be• bottles/walky-talky will be

red cylinders• use the Kinect and PCL to• use the Kinect and PCL to

detect the object• find the shelf-top (plane)find the shelf top (plane)• cut-off shelf-top• cluster the remaining pointscluster the remaining points• fit a cylinder with RANSAC• approach and grasp theapproach and grasp the

object along a cylinder normal

Gerald Steinbauer40

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Arm Navigation Stack

ROS id t k th t l i ti• ROS provides a stack that solves arm navigation– solves the inverse kinematic problem

plans arm trajectories with/without obstacles– plans arm trajectories with/without obstacles

• Schunk PowerBall worksin simulation – real armin simulation real armis on the way

• provide global attitudep gand send the arm there

• attitude = position +orientation (quaternion)

Gerald Steinbauer41

Konstruktion Mobiler Roboter, PR, WS12

Institut für Softwaretechnologie

Empfohlene Literatur

M h I t d ti t AI R b ti• Murphy: Introduction to AI Robotics • Thrun, Fox, Burgard: Probabilistic Robotics• ROS Wiki (http://www.ros.org)• ROS Tutorials• Robotics Wiki am IST

(http://www.ist.tugraz.at/robotics)

• PDFs zum download auf der Praktikums-Webseite

Gerald Steinbauer42

Konstruktion Mobiler Roboter, PR, WS12


Recommended