Professional Documents
Culture Documents
Lorenz Mosenlechner
Motivation
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
2
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Motivation
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
3
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Outline
Overview
The TF Library
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
4
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Outline
Overview
The TF Library
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
5
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
What is ROS?
More than just a middleware
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
6
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
7
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
8
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
9
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
10
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
11
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
12
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
13
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
14
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
15
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
16
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
17
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
18
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
19
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
20
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
21
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
22
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Outline
Overview
The TF Library
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
23
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Core
Where it all comes together
ROS Master
A centralized XML-RPC server
Negotiates communication connections
Registers and looks up names for ROS graph resources
Parameter Server
Stores persistent configuration parameters and other arbitrary data
rosout
Essentially a network-based stdout for human-readable messages
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
24
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Graph
rxgraph: communication network visualization
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
26
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
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 names
without recompiling
easily distribute nodes across multiple machines
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
27
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
<launch>
<node name= my node pkg= f o o t y p e= b a r >
<remap from=/ b a s e l a s e r / s c a n t o= s c a n />
<rosparam>
u s e f o o : True
frame id: base laser
</ rosparam>
</node>
</ launch>
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
30
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
31
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
32
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
33
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
34
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
35
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
36
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
37
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
38
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
39
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
40
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Debugging
rosout
ROS provides mechanisms in all languages for specifying different levels
of human-readable log messages.
The five default levels are:
fatal
error
warn
info
debug
Corresponding logging commands (C++):
ROS_FATAL(...)
ROS_ERROR(...)
ROS_WARN(...)
ROS_INFO(...)
ROS_DEBUG(...)
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
41
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Debugging
rxconsole
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
42
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Debugging
rxconsole
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
43
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Debugging
rxconsole
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
44
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS provides several tools for analyzing the data flowing over ROS
communcation 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
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
45
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
46
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
47
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
48
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
rviz - 3D Visualization
Modular state and sensor visualization
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
49
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Outline
Overview
The TF Library
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
50
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
51
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Distributions
Delivering ROS packages to the masses
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
52
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Distributions
Delivering ROS packages to the masses
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
53
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Distributions
Delivering ROS packages to the masses
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
54
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Distributions
Delivering ROS packages to the masses
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
55
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Distributions
Delivering ROS packages to the masses
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
56
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Distributions
Delivering ROS packages to the masses
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
57
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Distributions
Delivering ROS packages to the masses
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
58
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Distributions
Delivering ROS packages to the masses
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
59
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Distributions
Delivering ROS packages to the masses
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
60
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Distributions
Delivering ROS packages to the masses
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
61
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Distributions
Delivering ROS packages to the masses
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
62
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Meta-Filesystem
Increasing codebase flexibility
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
Specifies language-specific export flags
CMakeLists.txt: contains ROS build rules (executables, libraries,
custom build flags, etc)
Makefile: just a proxy to build this package
Create package with roscreate-pkg
$ roscreate-pkg foo roscpp std_msgs
Build package with rosmake
$ rosmake foo
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
63
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Packages
The manifest.xml file
<package>
<d e s c r i p t i o n b r i e f = f o o >
foo
</ d e s c r i p t i o n>
<author>L o r e n z M o e s e n l e c h n e r</ author>
<l i c e n s e>BSD</ l i c e n s e>
<r e v i e w s t a t u s= u n r e v i e w e d n o t e s= />
<u r l> h t t p : // r o s . o r g / w i k i / f o o</ u r l>
<depend package= r o s c p p />
<depend package= s t d m s g s />
</ package>
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
64
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROS Packages
rosbuild init ()
rosbuild genmsg ()
rosbuild gensrv ()
r o s b u i l d a d d l i b r a r y ( f o o s r c / f o o . cpp )
r o s b u i l d a d d e x e c u t a b l e ( h e l l o w o r l d s r c / h e l l o w o r l d . cpp )
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
65
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Outline
Overview
The TF Library
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
66
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
ROSCPP
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
67
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Messages
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
68
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
r o s : : P u b l i s h e r pub =
nh . a d v e r t i s e <s t d m s g s : : S t r i n g >( c h a t t e r , 1 0 0 0 ) ;
r o s : : Rate l o o p r a t e ( 1 0 ) ;
w h i l e ( r o s : : ok ( ) ) {
s t d m s g s : : S t r i n g msg ;
msg . d a t a = h e l l o w o r l d ;
pub . p u b l i s h ( msg )
ros : : spinOnce ( ) ;
loop rate . sleep ();
}
return 0;
}
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
69
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
i n t main ( i n t a r g c , c h a r a r g v [ ] ) {
r o s : : i n i t ( argc , argv , t a l k e r ) ;
r o s : : NodeHandle nh ;
r o s : : S u b s c r i b e r sub =
nh . s u b s c r i b e <s t d m s g s : : S t r i n g >( c h a t t e r ,
1000 , msgCallback ) ;
ros : : spin ( );
return 0;
}
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
70
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Services
Defined in package-name/srv/*.srv.
Definition similar to message files, Request message + response
message.
Example: beginner tutorials/AddTwoInts
int64 a
int64 b
---
int64 sum
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
71
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Service Client
i n t main ( i n t a r g c , c h a r a r g v )
{
r o s : : i n i t ( argc , argv , a d d t w o i n t s c l i e n t ) ;
r o s : : NodeHandle n ;
r o s : : S e r v i c e C l i e n t c l i e n t = n . s e r v i c e C l i e n t <AddTwoInts >(
add two ints );
AddTwoInts s r v ;
srv . request . a = 1;
srv . request . b = 2;
i f ( c l i e n t . c a l l ( srv )) {
ROS INFO ( Sum : %l d , ( l o n g i n t ) s r v . r e s p o n s e . sum ) ;
} else {
ROS ERROR( F a i l e d t o c a l l s e r v i c e a d d t w o i n t s ) ;
return 1;
}
return 0;
}
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
72
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Actions
Using function calls and callbacks
request goals (client side)
execute goals (server side)
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
73
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Actions
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
74
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Action Definitions
Similar to messages and services.
Definition: Request + result + feedback
Defined in ros-package/action/*.action
Generated by CMake macro genaction().
Example: actionlib tutorials/Fibonacci.action
#goal definition
int32 order
---
#result definition
int32[] sequence
---
#feedback
int32[] sequence
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
75
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
i n t main ( i n t a r g c , c h a r a r g v ) {
r o s : : i n i t ( argc , argv , t e s t f i b o n a c c i ) ;
a c t i o n l i b : : S i m p l e A c t i o n C l i e n t <F i b o n a c c i A c t i o n > ac (
f i b o n a c c i , true ) ;
ac . w a i t F o r S e r v e r ( ) ;
l e a r n i n g a c t i o n l i b : : FibonacciGoal goal ;
goal . order = 20;
ac . s e n d G o a l ( g o a l ) ;
b o o l f i n i s h e d b e f o r e t i m e o u t = ac . w a i t F o r R e s u l t (
ros : : Duration ( 3 0 . 0 ) ) ;
return 0;
}
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
76
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Outline
Overview
The TF Library
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
77
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Coordinate frames
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
78
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Coordinate frames
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
79
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
80
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
What is TF?
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
81
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
82
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Utilities
rosrun tf tf_echo <source_frame> <target_frame>
rosrun tf tf_monitor
rosrun view_frames
rosrun tf static_transform_publisher
rviz
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
83
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Utilities
rosrun tf tf_echo <source_frame> <target_frame>
rosrun tf tf_monitor
rosrun view_frames
rosrun tf static_transform_publisher
rviz
tf echo
$ rosrun tf tf_echo turtle1 turtle2
Success at 1253585684.557003974
[0.000000 0.000000 0.140754 0.990045] Euler(0.282446 -0.000000 0.000000)
Translation: [-0.000036 -0.000010 0.000000]
Success at 1253585685.544698953
[0.000000 0.000000 0.140754 0.990045] Euler(0.282446 -0.000000 0.000000)
Translation: [-0.000036 -0.000010 0.000000]
Success at 1253585686.557049989
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
84
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Utilities
rosrun tf tf_echo <source_frame> <target_frame>
rosrun tf tf_monitor
rosrun view_frames
rosrun tf static_transform_publisher
rviz
tf monitor
$ rosrun tf tf_monitor
RESULTS: for all Frames
Frames:
Frame: turtle1 published by /turtle1_tf_broadcaster Average Delay: 0.000382455 Max Delay: 0...
Frame: turtle2 published by /turtle2_tf_broadcaster Average Delay: 0.000267847 Max Delay: 0...
All Broadcasters:
Node: /turtle1_tf_broadcaster 64.6996 Hz, Average Delay: 0.000382455 Max Delay: 0.000991178
Node: /turtle2_tf_broadcaster 64.7127 Hz, Average Delay: 0.000267847 Max Delay: 0.00133464
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
85
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Utilities
rosrun tf tf_echo <source_frame> <target_frame>
rosrun tf tf_monitor
rosrun view_frames
rosrun tf static_transform_publisher
rviz
view frames
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
86
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Utilities
tf_echo
tf_monitor
view_frames
static_transform_publisher
rviz
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
87
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
TF data types
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
88
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
Publishing transforms
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
89
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
t f : : TransformBroadcaster br ;
t f : : Transform t r a n s f o r m ;
transform . s e t O r i g i n ( t f : : Vector (x , y , z ) ) ;
transform . setRotation (
t f : : c r e a t e Q u a t e r n i o n F r o m R P Y ( yaw , p i t c h , r o l l ) ) ;
br . sendTransform (
t f : : StampedTransform (
t r a n s f o r m , r o s : : Time : : now ( ) , /map , /odom ) ) ;
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
90
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
canTransform
lookupTranform
transformPoint
transformPose
transformQuaternion
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
91
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
canTransform
lookupTranform
transformPoint
transformPose
transformQuaternion
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
92
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
TF and time
Overview ROS Communication Layer ROS Build System Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
93
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
TF and time
TransformListener methods
l i s t e n e r . lookupTransform ( / t u r t l e 2 , / t u r t l e 1 ,
r o s : : Time ( 0 ) , t r a n s f o r m ) ;
l i s t e n e r . lookupTransform ( / t u r t l e 2 , / t u r t l e 1 ,
r o s : : Time : : now ( ) , t r a n s f o r m ) ;
lookupTransform
Time 0: return the newest transform
Time now: would lead to an error because TF doesnt do
extrapolation
waitForTransform:
Overview block until
ROS Communication Layer transform
ROS Build System is possible
Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
94
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen
TF and time
TransformListener methods
l i s t e n e r . lookupTransform ( / t u r t l e 2 , / t u r t l e 1 ,
r o s : : Time ( 0 ) , t r a n s f o r m ) ;
l i s t e n e r . lookupTransform ( / t u r t l e 2 , / t u r t l e 1 ,
r o s : : Time : : now ( ) , t r a n s f o r m ) ;
lookupTransform
Time 0: return the newest transform
Time now: would lead to an error because TF doesnt do
extrapolation
waitForTransform:
Overview block until
ROS Communication Layer transform
ROS Build System is possible
Programming with ROS The TF Library
Lorenz Msenlechner Introduction to ROS
95
Department of Informatics
Intelligent Autonomous Systems Technische Universitt Mnchen