|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
dlife.robot.Robot
dlife.robot.player.PlayerRobot
dlife.robot.pioneer.PioneerPlayer
public class PioneerPlayer
A PioneerPlayer creates a connection to a Player server with a Pioneer model simulation running. This class can be used just as a regular Pioneer robot as long as a valid Player server is running. This class uses a PlayerClient to communicate with the server. The provided playerclient2.jar contains the necessary class files to run.
| Field Summary | |
|---|---|
static PlayerDeviceConfiguration |
PLAYER_FRONT_BUMPERS_CONFIG
The configuration data for player for the front bumper array. |
static PlayerDeviceConfiguration |
PLAYER_GRIPPER_CONFIG
The configuration data for player for the gripper. |
static PlayerDeviceConfiguration |
PLAYER_REAR_BUMPERS_CONFIG
The configuration data for player for the rear bumper array. |
static PlayerDeviceConfiguration |
PLAYER_SONAR_CONFIG
The configuration data for player for the Sonar sensor. |
| Fields inherited from class dlife.robot.player.PlayerRobot |
|---|
PLAYER_POSITION_CONFIG, TIMEOUT |
| Constructor Summary | |
|---|---|
PioneerPlayer()
Construct a new PioneerPlayer. |
|
PioneerPlayer(File dLifePlayerConfig,
int port,
boolean noise)
Connect to a PioneerPlayer with the given DLP configuration file, port to attempt to connect to, and if we should load and use the noise profile for this robot. |
|
PioneerPlayer(File dLifePlayerConfig,
int port,
boolean noise,
String playerCmd)
Connect to a PioneerPlayer with the given DLP configuration file, port to attempt to connect to, if we should load and use the noise profile for this robot, and absolute player command.. |
|
PioneerPlayer(PlayerSimulation sim,
int port,
boolean noise)
Connect to a PioneerPlayer using the configuration contained in the PlayerSimuation object. |
|
PioneerPlayer(PlayerSimulation sim,
String playerCmd,
int port,
boolean noise)
Connect to a PioneerPlayer using the configuration contained in the PlayerSimuation object. |
|
PioneerPlayer(String address,
int port)
Creates a new PioneerPlayer and connects to a Player Server at the supplied address and port number. |
|
| Method Summary | |
|---|---|
static String[] |
getPlayerConfigBody()
Get the main body definition for player. |
static PlayerRobotIconInfo |
getPlayerSimulationBuilderIcon()
This will return a PlayerRobotIconInfo containing the icon of this robot to be used in a PlayerSimulationBuilder. |
protected boolean |
isValidDevice(Device newDevice)
Checks if the device is valid for a PioneerPlayer. |
String |
sendMessage(String msg)
Interprets the message given and sends an appropriate command to the PlayerClient. |
| Methods inherited from class dlife.robot.player.PlayerRobot |
|---|
addDevice, getAddress, getAngle, getGripperData, getPlayerClient, getPort, getRotation, getSonarValues, getTranslation, getXPos, getYPos, hasGripper, resetPositionData, setGripper, setPositionData, setPositionUnits, setSonarUnits, setSpeed, shutDown, startUp |
| Methods inherited from class dlife.robot.Robot |
|---|
freeze, getDevices, getRunTime, isAlive, removeDevice, setAlive |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final PlayerDeviceConfiguration PLAYER_REAR_BUMPERS_CONFIG
public static final PlayerDeviceConfiguration PLAYER_FRONT_BUMPERS_CONFIG
public static final PlayerDeviceConfiguration PLAYER_SONAR_CONFIG
public static final PlayerDeviceConfiguration PLAYER_GRIPPER_CONFIG
| Constructor Detail |
|---|
public PioneerPlayer()
RobotCreationCanceledException - if the user cancels the creation
of the robot via the dialog box.
UnknownHostException - thrown if the host name cannot be resolved
public PioneerPlayer(PlayerSimulation sim,
int port,
boolean noise)
sim - the PlayerSimulation used to setup playerport - the port to connect tonoise - if noise should be used
public PioneerPlayer(PlayerSimulation sim,
String playerCmd,
int port,
boolean noise)
sim - the PlayerSimulation used to setup playerplayerCmd - the absolute system command to start playerport - the port to connect tonoise - if noise should be used
public PioneerPlayer(File dLifePlayerConfig,
int port,
boolean noise)
dLifePlayerConfig - the DLP file for this simulationport - the port of the robot to connect to in Playernoise - if a noise profile should be loaded and used
public PioneerPlayer(File dLifePlayerConfig,
int port,
boolean noise,
String playerCmd)
dLifePlayerConfig - the DLP file for this simulationport - the port of the robot to connect to in Playernoise - if a noise profile should be loaded and usedplayerCmd - the absolute system command to start player
public PioneerPlayer(String address,
int port)
throws UnknownHostException
address - the address where the Player Server is runningport - the port number that the Player Server is using
UnknownHostException - thrown if the host name cannot be resolved.| Method Detail |
|---|
protected boolean isValidDevice(Device newDevice)
isValidDevice in class PlayerRobotnewDevice - the Device to check
public String sendMessage(String msg)
sendMessage in class Robotmsg - the message interpret for the PlayerClient
RobotCommunicationException - thrown if the robot is not alive or
communication with Player is lostpublic static String[] getPlayerConfigBody()
public static PlayerRobotIconInfo getPlayerSimulationBuilderIcon()
PlayerConfigurationDataException - if this method was not
overridden
|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||