Documente Academic
Documente Profesional
Documente Cultură
Getting Started
with ROS
Benjamin Cohen
University of Pennsylvania
4/9/2010
Disclaimer! Achtung!
2
Outline
6
Nodes
is a process that performs some function.
nodes communicate with each other using topics &
services.
nodes are assigned unique names
nodes are intended to be modular and 'operate on the
fine-grained scale'
a robotic system should be made up of many many
nodes – it provides some fault tolerance when an
isolated node crashes
7
Nodes
8
Messages
nodes communicate by passing around messages
a message is a data structure with typed fields
many standard messages already exist, new messages can be defined
with a simple text file
a message can be comprised of other messages
ROS generates a data structure for new message that contains many
standard stl type of functions (size(), resize(),etc.)
mapping_msgs/CollisionMap
CollisionMap.msg Header header
uint32 seq
#header for interpreting box positions
time stamp
Header header string frame_id
OrientedBoundingBox[] boxes
#boxes for use in collision testing geometry_msgs/Point32 center
OrientedBoundingBox[] boxes float32 x
float32 y
float32 z
geometry_msgs/Point32 extents
float32 x
float32 y
float32 z 9
float32 angle
Params
10
Topics
18
Command Line Tools
Debugging
19
Command Line Tools
Debugging
20
Command Line Tools
Debugging
Command Description
*** rostopic *** displays a lot of information about a topic
●lists all topics available (list')
roswtf outputs possible errors/warnings with the current roscore based on a set
of defined rules
rosnode displays a list of nodes, can get detailed information about them
rosservice same as rostopic but for services
rostopic echo
21
Command Line Tools
Documentation
rosmsg show
22
Simulation: Gazebo
open source 3D simulator
has been around for a while but has now been converted to
using ROS for communication, is a ros package offered by WG
uses ODE library for ridgid body dynamics
supports multiple robots
good for experiments that include motion planning, control &
perception of ground vehicles
less good for experiments that require precise contact between
robot & environment such as manipulation
world and objects in world are described in an XML '.world' file
offers fake localization & fake sensors
fully integrated into ROS
we will discuss in more in the more technical half of the 23
presentation
Simulation: Gazebo
Screenshots
24
Simulation: Stage
25
Visualizers: rviz
rviz visualization
27
Other
tf library
'transform' library can fetch a transform from one frame to
another frame at a specific point in time
uses description of robot, the state of joints
can also transform from one point in time to another point in time
ROS Play/Record
can record any information passed over ROS to a 'bag' file
the file can be played back later
ex. log sensor data for later analysis
ex. great for debugging hard to recreate situations
glc-record
record gazebo & rviz windows at the same time to create a
multi-window video
28
can easily record many OpenGL apps simultaneously.
Documentation
www.ros.org
documentation has been improving
there are many tutorials available
many schools have made public their own ros-
package repository (there is a list at
https://code.ros.org/gf/)
drivers for lots of common hardware are available
29
Summary
ROS
a message passing system between processes on
a single computer or on a network
easy build system
easy to navigate in huge code library
valuable debugging tools are critical to hunting
down bugs in complicated systems
ROS-Packages
Simulators: Gazebo & Stage
many other packages are available that perform
30
functions you might want
Part 2
31
Part 2: Create a simple node
roscreate-pkg meam620_tutorial
33
create a new package (cont'd)
34
start coding
35
using messages
36
launching stuff
37
Play!
38