libstageplugin - simulation driver for Player
libstageplugin is a plugin for Player that allows Player clients to access simulated robots as if they were normal Player devices.Stage robots and sensors work like any other Player device: users write robot controllers and sensor algorithms as `clients' to the Player `server'. Typically, clients cannot tell the difference between the real robot devices and their simulated Stage equivalents (unless they try very hard). We have found that robot controllers developed as Player clients controlling Stage robots will work with little or no modification with the real robots and vice versa [1]. With a little care, the same binary program can often control Stage robots and real robots without even being recompiled [2]. Thus the Player/Stage system allows rapid prototyping of controllers destined for real robots. Stage can also be very useful by simulating populations of realistic robot devices you don't happen to own [3].
- Authors
[refs]
- Configuration file examples:
# this is a comment # create a position model - it can drive around like a robot position ( name "marvin" color "red" pose [ 1 1 0 ] # add a laser scanner on top of the robot laser() ) # create a position model with a gripper attached to each side position ( name "gort" color "silver" pose [ 6 1 0 ] size [ 1 2 ] gripper( pose [0 1 90] ) gripper( pose [0 -1 -90] ) )
Attaching Player interfaces to the Stage models "marvin" and "gort" in a Player config (.cfg) file:
# Present a simulation interface on the default port (6665). # Load the Stage plugin driver and create the world described # in the worldfile "example.world" # The simulation interface MUST be created before any simulated devices # models can be used. driver ( name "stage" provides ["simulation:0"] plugin "libstageplugin" worldfile "example.world" ) # Present a position interface on the default port (6665), connected # to the Stage position model "marvin", and a laser interface connected to # the laser child of "marvin". driver ( name "stage" provides ["position2d:0" "laser:0"] model "marvin" ) # Present three interfaces on port 6666, connected to the Stage # position model "gort" and its two grippers. driver ( name "stage" provides ["6666:position2d:0" "6666:gripper:0" "6666:gripper:1"] model "gort" )
More examples can be found in the Stage source tree, in directory <stage-version>/worlds.
- Player configuration file options
- worldfile <string>
- where <string> is the filename of a Stage worldfile. Player will attempt to load the worldfile and attach interfaces to Stage models specified by the "model" keyword
- model <string>
- where <string> is the name of a Stage position model that will be controlled by this interface. Stage will search down the tree of models starting at the named model to find a previously-unassigned device of the right type.
- Provides
- Blobfinder interface
- PLAYER_BLOBFINDER_DATA_BLOBS
- Bumper interface
- PLAYER_BUMPER_DATA_STATE
- PLAYER_BUMPER_GET_GEOM
- Fiducial interface
- PLAYER_FIDUCIAL_DATA_SCAN
- PLAYER_FIDUCIAL_REQ_GET_GEOM
- PLAYER_FIDUCIAL_REQ_SET_ID
- PLAYER_FIDUCIAL_REQ_GET_ID
- Graphics2d interface
- PLAYER_GRAPHICS2D_CMD_CLEAR
- PLAYER_GRAPHICS2D_CMD_POINTS
- PLAYER_GRAPHICS2D_CMD_POLYLINE
- PLAYER_GRAPHICS2D_CMD_POLYGON
- Graphics3d interface
- PLAYER_GRAPHICS3D_CMD_CLEAR
- PLAYER_GRAPHICS3D_CMD_DRAW
- PLAYER_GRAPHICS3D_CMD_TRANSLATE
- PLAYER_GRAPHICS3D_CMD_ROTATE
- Gripper interface
- PLAYER_GRIPPER_DATA_STATE
- PLAYER_GRIPPER_CMD_STATE
- PLAYER_GRIPPER_REQ_GET_GEOM
- Laser interface
- PLAYER_LASER_DATA_SCAN
- PLAYER_LASER_REQ_SET_CONFIG
- PLAYER_LASER_REQ_GET_CONFIG
- PLAYER_LASER_REQ_GET_GEOM
- Localize interface
- PLAYER_LOCALIZE_DATA_HYPOTHS
- Map interface
- PLAYER_MAP_REQ_GET_INFO
- PLAYER_MAP_REQ_GET_DATA
- Position interface
- PLAYER_POSITION2D_CMD_POS
- PLAYER_POSITION2D_CMD_VEL
- PLAYER_POSITION2D_CMD_CAR
- PLAYER_POSITION2D_DATA_STATE
- PLAYER_POSITION2D_REQ_GET_GEOM
- PLAYER_POSITION2D_REQ_MOTOR_POWER
- PLAYER_POSITION2D_REQ_RESET_ODOM
- PLAYER_POSITION2D_REQ_SET_ODOM
- PLAYER_POSITION2D_REQ_POSITION_MODE
- Power interface
- PLAYER_POWER_DATA_STATE
- Ptz interface
- PLAYER_PTZ_DATA_STATE
- PLAYER_PTZ_REQ_GEOM
- Simulation interface
- PLAYER_SIMULATION_REQ_SET_POSE2D
- PLAYER_SIMULATION_REQ_GET_POSE2D
- PLAYER_SIMULATION_REQ_SET_PROPERTY_INT
- "fiducial_return" 0-32767
- "laser_return" 0-2
- "gripper_return" 0-1
- "ranger_return" 0-1
- "obstacle_return" 0-1
- "color" 0xRRGGBB
- PLAYER_SIMULATION_REQ_SET_PROPERTY_FLOAT
- "mass" 0 <= N
- "watts" 0 <= N
- Sonar interface
- PLAYER_SONAR_DATA_RANGES
- PLAYER_SONAR_REQ_GET_GEOM
- Speech interface
- PLAYER_SPEECH_CMD_SAY
Generated on Wed Jul 30 11:36:06 2008 for Stage by 1.4.7