The Player universal driver and the Stage simulator
Download
Report
Transcript The Player universal driver and the Stage simulator
The Player universal driver and the
Stage and Gazebo simulators
Daniele Calisi
The Player/Stage/Gazebo project
Long term project
Started in 2000
Moved to SourceForge in 2001
Gazebo (3D simulator) development started in 2003
The project maintains three piece of software:
Player: a universal driver for robotics
Stage: scalable 2D multiple robot simulator
Gazebo: high-fidelity 3D multiple robot simulator
“Player is a collaborative development effort aimed at producing
high-quality open source tools for robotics researchers”
7 active core developers (Player + Stage + Gazebo)
17 contributors
Funding by DARPA, NSF, SRI, ONR, JPL
Many organizations provide facilities
Thousand of downloads per month
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
2
What is Player
Addresses two problems
There is a huge variety of hardware related to robotics (robot
bases, sensors, actuators, etc.), each of which has its own
interface, connection (Serial, USB, Ethernet, I2C, CAN-bus, etc.)
and protocol
In the robotic scientific community, “the wheel gets reinvented
over and over again”
The goal
Provides a “robotic operating system” that hides hardware
details and uses standard interfaces (in the same way an
operating system allows the user to interact to the hardware
using drivers)
Provides standard basic tools for robotic researchers (e.g.
viewers, simulators, etc.)
Support code reuse
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
3
The Player structure
Controller
(client)
Player
(server)
Gazebo (3D simulation)
Stage (2D simulation)
Controller
(client)
Controller
(client)
Player
(server)
Controller
(client)
TCP, UDP,
Jini, Ice
RS232, USB, 1394,
TCP, Shared Mem
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
© Brian Gerkey
4
Supported hardware and interfaces
Robot bases
Laser range finders
Sony, Canon, Amtec, Direct Perceptions
IMU
ACTS, CMVision, CMUCam
PTZ
SICK, Hokuyo
Vision
ActivMedia, RWI, Erratic, Segway
Evolution, Nomadics...
ISense, XSens, ...
GPS
Speech
Festival, Sphinx2
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
5
Player and OpenRDK
Different goals
Player is (mostly) an interface to the hardware/simulators
OpenRDK is a framework for higher-level processing and
behaviors
Clients
Hardware/Simulator
player2client
localizer
Player
mapper
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
6
How to configure Player
Player is run with a configuration file that
specifies the devices to be used
Example
driver (
name "p2os"
provides [ "odometry:::position2d:0" "sonar:0" "power:0"
"bumper:0" "gripper:::gripper:0"
"blobfinder:0" "sound:0" ]
port "/dev/ttyS0"
)
driver (
name "sicklms200"
provides [ "laser:0" ]
port "/dev/ttyS2"
)
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
7
How to configure the OpenRDK agent (1)
Problem
Simulator
client modules (and Player2ClientModule
as well) often contains all properties for all sensors
and actuators simulated
This results in a cluttered configuration file and
property tree
Solution (coming soon)
Optional
properties allow the user to choose which
properties will be created
This is one of the possible uses of
initInterfaceProperties()
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
8
How to configure the OpenRDK agent (2)
Example
• Properties created in initConfigurationProperties()
/robot/params/groundTruthPoseEnabled=Yes
/robot/params/laserConfig=laser0 laser1
/robot/params/sonarConfig=
/robot/params/gpsConfig=
• Properties created in initInterfaceProperties()
/robot/out/groundTruthPose
/robot/out/laser0/laserData
/robot/out/laser1/laserData
Automatic loading from Player config file?
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
9
Player and its simulators
Stage
2D environment model
Robot kinematics
Light simulation
( O(1) ~ O(n) )
Large population of robots
(~100?)
Indoor environments
Gazebo
3D environment model
Robot dynamics
Uses ODE
(Open Dynamics Engine)
More expensive simulation
( O(n) ~ O(n3) )
Small robot teams
(~10?)
Outdoor environments
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
10
The Gazebo 3D simulator
Advantages
- ODE for physics
- 3D modeling
Problems
- Proprietary XML format for world
and robot descriptions
- No import facility from 3D modeling
software
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
11
The Stage 2D simulator
2D environments and
multiple robots
Light simulation
The world is specified as
a text file and a B/W
image
Fast and easy on-line
interaction with the
environment
Supports all Player
sensors, moving objects,
a simple vision simulation
(BLOB finder), etc.
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
12
A brief analysis of Stage
Intermediate simulation
Grid world
Stage
Complex 3D realistic simulator
complexity
Widely used
If you need a 2D simulator, Stage is the choice
Simulation
The Stage developer claims that simple simulation can make
you create robust algorithms (e.g., discretization, etc.)
For this reason, no noise is added to sensor data or to actions,
“noise” is obtained indirectly through discretization
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
13
Past and current OpenRDK + Stage uses
Performance
measurements for motion
algorithms (MoVeME
benchmark database)
Multi-agent multi-object
tracking
Coordination (tokenpassing technique)
experiments
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
14
How to use Player with Stage
Player configuration file
driver (
name "stage"
provides [ "simulation:0" ]
plugin "libstageplugin"
worldfile "hospital.world"
)
driver (
name "stage"
provides [ "position2d:0" "laser:0" ]
model "robot1"
samples 180
fov 180
range_min 0.0
range_max 4.0
World file
// ...
map (
bitmap "hospital.png"
size [8 16]
name "cave"
)
pioneer2dx (
name "robot1"
color "red"
pose [1 2 0]
sick_laser()
)
)
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
15
Thank you for your attention
Questions?
Official Player/Stage website: http://playerstage.sf.net
Player, Stage and Gazebo - OpenRDK Workshop - March 2009
16