libstageplugin - Stage plugin driver for Playerlibstageplugin 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 . With a little care, the same binary program can often control Stage robots and real robots without even being recompiled . 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 .
- Configuration file examples:
# 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 ["position: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:position: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 device of the right type.
- Blobfinder interface
- Fiducial interface
- Graphics2d interface
- Gripper interface
- Laser interface
- Localize interface
- Map interface
- Position interface
- Power interface
- Ptz interface
- Simulation interface
- Sonar interface
Generated on Mon Feb 27 23:30:51 2006 for Stage by 1.4.4