Playerstage - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Playerstage

Description:

Compiles on X Windows computers (Linux, Mac OS x, etc) Why use player stage. Robot availability ... Player program is in /usr/local/bin ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 15
Provided by: MonicaA150
Category:

less

Transcript and Presenter's Notes

Title: Playerstage


1
Player/stage
2
What is player stage
  • System of programs designed to test robot control
    software
  • Open source
  • Compiles on X Windows computers (Linux, Mac OS x,
    etc)

3
Why use player stage
  • Robot availability
  • Power requirements
  • Initial debugging easier

4
Components
Robot Control Software
Player
Stage
simple.cfg
simple.world
5
Configuration files
  • .cfg
  • Defines the actual robot implementation
  • Defines how player will interface with the robot
    implementation
  • .world
  • Used when testing in the simulator
  • Defines the environment and initial placement of
    the robots

6
Running the simulator
  • Player program is in /usr/local/bin
  • Example cfg and world files are in
    /usr/local/share/stage/worlds
  • /usr/local/bin/player /usr/local/share/stage/wor
    lds/simple.cfg

7
Controlling the robot
  • Control programs interface to player via sockets
  • Libraries are provided in C, C, and Java that
    manage the interface
  • Programs contain mostly logic

8
Program initialization
  • parse_args
  • Create instances of robot and its sensors
  • PlayerClient robot(gHostname,gPort)
  • Position2dProxy pp(robot,gIndex)
  • LaserProxy lp(robot, gIndex)
  • pp.SetMotorEnable(true)

9
Control Loop
  • try
  • for ()
  • robot.Read() //reads all robot data
  • //do action
  • pp.SetSpeed(.100,.5) //100 mm/sec and .5
    radians/sec
  • catch (PlayerCcPlayerError e)
  • //handle/print error

10
Interfaces Position
  • SetSpeed(velocity_mm_sec,angular
    velocity_rad_sec)
  • robot_X_coord_metersGetXPos()
  • robot_Y_coord_metersGetYPos()
  • robot_Yaw_radGetYaw()
  • isRobotStalled_boolGetStall()

11
Interfaces Laser
  • lp.GetCount()
  • lpindex//get range reading
  • Many more functions in documentations

12
Interfaces Sonar
  • Similar to laser
  • Usually fewer so ranges are accessed by number
  • sp.GetCount()
  • spindex

13
Homework
14
Resources
  • General documentation
  • http//playerstage.sourceforge.net/index.php?srcd
    oc
  • Tutorial
  • http//playerstage.sourceforge.net/doc/Player-2.0.
    0/player/group__cplusplus__example.html
  • Interface documentation
  • http//playerstage.sourceforge.net/doc/Player-2.0.
    0/player/group__player__clientlib__cplusplus__prox
    ies.html
  • Sample configuratiosn and world files
  • /usr/local/share/stage/worlds
Write a Comment
User Comments (0)
About PowerShow.com