How to Use Player Stage

  • Upload
    sboy888

  • View
    224

  • Download
    0

Embed Size (px)

Citation preview

  • 8/10/2019 How to Use Player Stage

    1/20

    Installing and Using Software

    from the Player ProjectRobert N. Lass

    Drexel University

    April 1st, 2010 (no joke)(some slides adapted from Cannon & Winners)

  • 8/10/2019 How to Use Player Stage

    2/20

    Overview

    Simulation

    Player, Stage, and Gazebo

    Installation Configuration

    Writing Clients

    Demo

  • 8/10/2019 How to Use Player Stage

    3/20

    Simulation

    Approximate of the real-world.

    Why would we want to do this?

    Faster, easier and cheaper to create;

    Easier to experiment with and demonstrate;

    Experimental repeatability.

    What are some draw backs of simulations?

    Not reality; Harder to transition to real life (although PS makes

    it a bit easier).

  • 8/10/2019 How to Use Player Stage

    4/20

    Software Overwiew

    Player:

    A server, that provides an abstraction layer to robots.

    Stage:

    A simulator; 2D;

    Low fidelity, but can emulate more virtual robots.

    Gazebo:

    Another simulator;

    3D;

    High fidelity, but can not emulate as many virtual robots.

  • 8/10/2019 How to Use Player Stage

    5/20

  • 8/10/2019 How to Use Player Stage

    6/20

    What is Player?

    Hardware abstraction layer for robots.

    Implements a client/server model.

    Communication over TCP sockets using thePlayer protocol.

    Officially supported client libraries:

    C, C++, Python Unofficially supported client libraries:

    Java, LISP, Matlab

    6Chris Cannon & Marc Winners

  • 8/10/2019 How to Use Player Stage

    7/20

    Partial List of Supported Robotics

    Hardware ManufacturerDevice(s)Driver

    AcronameGarcia

    BotricsObot d100

    Evolution RoboticsER1 and ERSDK robots

    iRobotRoomba vaccuming robot

    K-TeamRobotics Extension Board (REB) attached to Kameleon 376BC

    K-TeamKhephera MobileRobots(formerly ActivMedia) PSOS/P2OS/AROS-based robots (e.g., Pioneer, AmigoBot)

    and integrated accessories, including a CMUcamconnected to the AUX port.

    Nomadics NOMAD200 (and possibly related) mobile robots

    RWI/iRobot RFLEX-based robots (e.g., B21r, ATRV Jr) and integrated accessories.

    Segway Robotic Mobility Platform (RMP), a custom-modified version of the Human Transport(HT)

    UPenn GRASP Clodbuster

    Videre Design ERRATIC mobile robot platform

    White Box Robotics 914 PC-BOT

    Also supports numerous devices (sensors, actuators), software (e.g.: for speechrecognition), algorithms (e.g.: obstacle detection and avoidance), and simulators(which we talk about next).

    * This list is taken from the Player Project Wiki.

    http://www.acroname.com/http://www.botrics.com/http://www.evolution.com/http://www.irobot.com/http://www.irobot.com/sp.cfm?pageid=122http://www.k-team.com/http://playerstage.sourceforge.net/doc/Player-cvs/player/classREB.htmlhttp://www.k-team.com/http://www.mobilerobots.com/http://www-2.cs.cmu.edu/~cmucamhttp://www.activrobots.com/ROBOTS/p2dx.htmlhttp://www.activrobots.com/ROBOTS/amigobot.htmlhttp://www-2.cs.cmu.edu/~cmucamhttp://www-2.cs.cmu.edu/~cmucamhttp://www.activrobots.com/ROBOTS/amigobot.htmlhttp://www.activrobots.com/ROBOTS/p2dx.htmlhttp://www.mobilerobots.com/http://www.k-team.com/http://www.k-team.com/http://www.k-team.com/http://playerstage.sourceforge.net/doc/Player-cvs/player/classREB.htmlhttp://www.k-team.com/http://www.k-team.com/http://www.k-team.com/http://www.irobot.com/sp.cfm?pageid=122http://www.irobot.com/http://www.evolution.com/http://www.botrics.com/http://www.acroname.com/
  • 8/10/2019 How to Use Player Stage

    8/20

    Switch

    This is where you should switch to the Stage /

    Gazebo slide 6.

  • 8/10/2019 How to Use Player Stage

    9/20

    Other Simulator

    What if Gazebo and Stage are not suitable for

    your purposes?

    Write your own!

  • 8/10/2019 How to Use Player Stage

    10/20

    Installation

    Instructions on

    Player website; Ubuntu is

    recommended;

    Try running

    /usr/share/stage/worlds/simple.cfgshould see thisimage -->

    Use robot-playerv

    to play with it.

  • 8/10/2019 How to Use Player Stage

    11/20

    Installation, continued

    I am not going to recreate every students

    development environment;

    I will be testing your assignments on Ubuntu ;

    Windows: Ubuntu VM?

    Macintosh: Probably works.

  • 8/10/2019 How to Use Player Stage

    12/20

  • 8/10/2019 How to Use Player Stage

    13/20

    Configuration Files

    For details about any configuration issues, check thePlayer website, or Google player stage tutorial andread the first hit (a PDF by Jennifer Owen)

    There are three main types of configuration files in

    Player / Stage: .inc: Use these files to define objects that can appear in

    worlds.

    .world: This describes everything in the world (robot,objects, their layout, etc)

    .cfg: This describes your robot, what drivers it has (whichwill always be stage in this class), how to interface witheach item, etc.

  • 8/10/2019 How to Use Player Stage

    14/20

    Example: map.inc

    define map model

    (

    # sombre, sensible, artistic

    color "black"

    # most maps will need a bounding box boundary 1

    gui_nose 0

    gui_grid 1

    gui_movemask 0

    gui_outline 0

    gripper_return 0

    )

  • 8/10/2019 How to Use Player Stage

    15/20

    Example: maze-laser.world

    # defines Roomba-like robots

    include "roomba.inc"

    # defines Roomba-like IR sensor

    include "sick.inc"

    # defines 'map' object used for floorplans

    include "map.inc"

    # size of the world in meters

    size [50 50]

    # set the resolution of the underlying raytrace model inmeters

    resolution 0.02

    # update the screen every 10ms (we need fast update for thestest demo)

    gui_interval 20

    # configure the GUI window

    window

    (

    size [ 800.000 600.000 ]

    center [-23.0 23.0]

    scale 0.02

    )

    # load an environment bitmap

    map (

    bitmap "maze.png"

    size [50 50]

    name "maze"

    )

    # create a robot

    pioneer2dx

    ( name "robot1"

    color "red"

    pose [-23.0 23.0 0.0]

    sick_laser(samples 361 laser_sample_skip 4)

    )

  • 8/10/2019 How to Use Player Stage

    16/20

    Example: maze-laser.cfg

    # load the Stage plugin simulationdriver

    driver

    (

    name "stage"

    provides ["simulation:0" ]

    plugin "libstageplugin"

    # load the named file into thesimulator

    worldfile "maze-laser.world"

    )

    driver

    (

    name "stage"

    provides ["map:0"]

    model "maze"

    )

    # Create a Stage driver and attachposition2d and laser interfaces

    # to the model "robot1"

    driver

    ( name "stage"

    provides [ "position2d:0" "laser:0"]

    model "robot1"

    )

  • 8/10/2019 How to Use Player Stage

    17/20

    Map Descriptions

    Located in the world file;

    Accepts bitmaps;

    Black pixels are considered walls, everythingelse is ignored;

    Also describes the size of the simulation (the

    unit is meters).

  • 8/10/2019 How to Use Player Stage

    18/20

  • 8/10/2019 How to Use Player Stage

    19/20

    Assignment One

    I have provided a template. Feel free to

    ignore it; its mainly to help you get started.

    Please note that the JavaDocs on the website

    are not current. Either refer to the generated

    JavaDocs or the code for function names, etc.

  • 8/10/2019 How to Use Player Stage

    20/20

    Switch to Terminal

    This is where you should switch to the

    terminal and show how to use Player / Stage.