Nate Koenig - PowerPoint PPT Presentation

About This Presentation
Title:

Nate Koenig

Description:

Create really cool videos. How. Someone has probably already done it, so use it ... Pioneer with a sick laser attached. Sick's xyz relative location to. Pioneer ... – PowerPoint PPT presentation

Number of Views:89
Avg rating:3.0/5.0
Slides: 38
Provided by: roboti4
Learn more at: http://robotics.usc.edu
Category:
Tags: koenig | nate | sick | videos

less

Transcript and Presenter's Notes

Title: Nate Koenig


1
Stage and GazeboThe Instant Experts Guide
  • Nate Koenig
  • 15 Sep 2004

2
Overview
  • Simulators
  • When, why, how, what
  • The right tool Stage or Gazebo?
  • Stage in depth
  • Installation, usage
  • Examples
  • Gazebo in depth
  • Installation and usage
  • Examples
  • Where to get help

3
Working with Simulators
  • What
  • Mimic the real world, to a certain extent
  • When
  • Always!!
  • Why
  • Save time and your sanity
  • Experimentation much less destructive
  • Use hardware you dont have
  • Create really cool videos
  • How
  • Someone has probably already done it, so use it

4
Which Simulator?
Gazebo 3D Sensor-based Player Dynamic
O(n) O(n3) Small teams (10s)
Stage 2D Sensor-based Player interface
Kinematic O(1) O(n) Large teams (100s)
5
The Big Picture
Stage
TCP/UDP
Cmds
Player
Gazebo
Client
Data
SHM
Real Hardware
TCP/UDP
TCP/UDP
6
Stage
7
Stage Environment
  • Simulates mobile robots, sensors and objects on
    2-D bitmapped environment

8
Stage Models
  • Designed for multi-agent autonomous research
  • Each model simple (computationally cheap)
  • Can simulate many such models

9
Stage Control
  • Control models via Player
  • Simulated hardware appear as their real
    counterparts
  • Easy transition between simulation and real world
  • Supports a wide range of devices
  • Pioneers, laser, sonar, camera, pucks, etc.

10
Stage In Depth
  • The result?

11
Stage Worldfile
  • Stage environment specified in a worldfile
  • Describes the robots, sensors and objects
  • Many examples provided in distribution

12
Example Stage Worldfile
the resolution of Stage's raytrace model in
meters resolution 0.02 GUI settings gui (
size 502.000 506.000 origin 5.018 4.950
0 scale 0.021 the size of each bitmap pixel
in meters ) load a bitmapped environment from
a file bitmap ( file "cave.pnm.gz"
resolution 0.02 ) include "pioneer.inc
create a robot, set start position and Player
port, and equip it with laser scanner position (
port 6665 pose 1.0 1.0 20 laser() )
13
Running Stage
  • To run stage
  • Note Stage automatically starts a player server
  • Problem abstract devices not implemented in
    Stage are needed. Such as VFH, or AMCL
  • Solution start another Player server using
    passthrough devices
  • Passthrough devices send data/cmds between Player
    servers
  • A secondary server can collect data from Player,
    and run abstract devices

stage ltmyworldgt
14
Working With Stage
Stage
Player localhost8000
Controller (client)
position0 port 7000 laser0
position0 driver passthrough port
7000 laser0 driver passthrough port
7000 position0 driver vfh position_index 0
laser_index 0 port 7000
Controller (client)
TCP/UDP
TCP/UDP
15
Gazebo
16
Gazebo In Depth
  • Simulates robots, sensors, and objects in a 3-D
    dynamic environment
  • Generates realistic sensor feedback and physical
    interactions between objects

17
Gazebo In Depth
  • Gazebo aims to be a high fidelity simulator
  • Each model is NOT computationally cheap
  • Small robot populations are possible.
  • Dependent on number and type of robots

18
Exception to the rule
19
Gazebo Architecture
20
Gazebo Architecture
21
Gazebo Architecture
22
Gazebo Client Code
  • Client code (your program), can interface to
    Gazebo in two ways
  • libgazebo
  • Shared Memory, direct interface
  • Fast, but requires more work
  • Player
  • Simulation transparency
  • Get all of Players goodies
  • Easier, but with more computational overhead
  • Recommended for most cases

23
Gazebo Architecture
24
Libgazebo
  • Simple C library
  • Treat as a blackbox
  • Client and server must run on same machine
  • Read sensor data and send commands to simulated
    devices
  • Devices and Interfaces
  • Devices (Model), represent real world objects
  • Pioneer2AT, SickLMS200
  • The objects within Gazebo simulation
  • Interfaces are general specifications for entire
    classes of devices
  • Position, Laser
  • The programmatic hooks to devices

25
Gazebo Architecture
26
The World
  • A world is composed of a model hierarchy
  • Models define simulated devices
  • Models can be nested
  • Specifies how models are physically attached to
    one another
  • Think of it as bolting one model to another

ltmodelPioneer2ATgt ltidgtrobot1lt/idgt
ltmodelSickLMS200gt ltidgtlaser1lt/idgt
ltxyzgt0.10.0 0.2lt/xyzgt lt/modelSickLMS200gt lt/m
odelPioneer2ATgt
  • Worldfile snippet
  • Pioneer with a sick laser attached
  • Sicks ltxyzgt relative location to Pioneer

27
Gazebo Architecture
28
Models
  • Each model contains a few key properties
  • Physical presence (optional)
  • Body sphere, box, composite shapes
  • Kinematics joints, velocities
  • Dynamics mass, friction, forces
  • Appearance color, texture
  • Interface (optional)
  • Control and feedback interface (libgazebo)

29
Types of Models
  • Static Models
  • Built into Gazebo statically linked into server
  • In general such models added by lead developers
  • Plugin Models
  • Shared objects loaded at runtime. Akin to linux
    kernel modules
  • Recommended for new, experimental, third-party
    models
  • Easier to build, faster code/compile/test cycle,
    source can be maintained in separate repository

30
Available Models
  • Factory
  • GarminGPS
  • GroundPlane
  • LightSource
  • MapExtruder
  • ObserverCam
  • Pioneer2AT
  • Pioneer2DX
  • Pioneer2Gripper
  • Pioneer2Sonars
  • SegwayRMP
  • SickLMS200
  • SimpleSolid
  • SonyVID30
  • Terrain
  • TruthWidget

MapExtruder

31
Working with Player
  • Steps to creating a simulation
  • Write Gazebo worldfile
  • Start Gazebo
  • Write corresponding Player configuration file
  • Start Player
  • Start client program
  • Note
  • Gazebo must be started before Player
  • Player must be re-started whenever Gazebo is
    restarted

32
Example Using a single robot
  • Single robot with a scanning laser range finder

driver ( name "gz_position" devices
"position0" gz_id "robot1_position" )
driver ( name "gz_laser" devices
"laser0" gz_id "robot1_laser" )
ltmodelPioneer2DXgt ltidgtrobot1_positionlt/idgt
ltxyzgt0 0 0.40lt/xyzgt ltrpygt0 0 45lt/rpygt
ltmodelSickLMS200gt ltidgtrobot1_laserlt/idgt
ltxyzgt0.15 0 0.20lt/xyzgt ltrpygt0 0
0lt/rpygt lt/modelSickLMS200gt lt/modelPioneer2D
Xgt
Gazebo world
Player config
33
Example Using a single robot
  • Run Gazebo
  • Run Player
  • Now run your code

gazebo ltmyworldgt
player g default ltmyconfiggt
34
Getting Player/Stage/Gazebo
  • Source distributions from the Player/Stage
    website
  • http//playerstage.sourceforge.net/
  • No binary (pre-built) distributions
  • Basic requirements
  • Posix-like OS (Linux, OS X)
  • GCC
  • Gazebo additional requirements
  • OpenGL with hardware acceleration
  • Open Dynamics Engine (www.ode.org)

35
Installing Packages
  • To use Gazebo
  • Download, install
  • librtk-src-2.2.0
  • gazebo-src-0.2.0
  • player-src-1.4rc1
  • To use Stage
  • Download, install
  • librtk-src-2.2.0
  • player-src-1.3.2
  • stage-src-1.3.2

36
Getting Help
  • Where to get help
  • Your peers
  • Player/Stage website
  • Player/Stage/Gazebo mailing list archives
  • Player/Stage/Gazebo mailing lists

37
Questions?
Write a Comment
User Comments (0)
About PowerShow.com