|
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.hemisson.HemissonPlayer
public class HemissonPlayer
Class for communicating with a simulated Hemission in the Player/Stage system. The HemissonPlayer class creates a connection to a Player server with a Hemisson model simulation running. This class can be used just as a regular Hemisson 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. Note: when adding a HemissonSonar, player can only send back 1 echo. Therefore, an exception is thrown if a HemissonSonar is added requesting more than 1 echo.
| Field Summary | |
|---|---|
static PlayerDeviceConfiguration |
PLAYER_PROXIMITY_CONFIG
The configuration data for player for the Hemisson IR sensor. |
static PlayerDeviceConfiguration |
PLAYER_SONAR_CONFIG
The configuration data for player for the Hemisson Sonar sensor. |
static int |
PROX_GROUND_CONSTANT
Since player cannot use the ground proximity sensors, a default value will be returned each time for that sensor. |
| Fields inherited from class dlife.robot.player.PlayerRobot |
|---|
PLAYER_POSITION_CONFIG, TIMEOUT |
| Constructor Summary | |
|---|---|
HemissonPlayer()
Construct a new HemissonPlayer. |
|
HemissonPlayer(File dLifePlayerConfig,
int port,
boolean noise)
Connect to a HemissonPlayer 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. |
|
HemissonPlayer(File dLifePlayerConfig,
int port,
boolean noise,
String playerCmd)
Connect to a HemissonPlayer 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.. |
|
HemissonPlayer(PlayerSimulation sim,
int port,
boolean noise)
Connect to a HemissonPlayer using the configuration contained in the PlayerSimuation object. |
|
HemissonPlayer(PlayerSimulation sim,
String playerCmd,
int port,
boolean noise)
Connect to a HemissonPlayer using the configuration contained in the PlayerSimuation object. |
|
HemissonPlayer(String address,
int port)
Creates a new HemissonPlayer 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 Polygon 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 HemissonPlayer. |
String |
sendMessage(String msg)
Interpret the message intended for a Hemisson robot and make the necessary calls to player. |
| 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_SONAR_CONFIG
public static final PlayerDeviceConfiguration PLAYER_PROXIMITY_CONFIG
public static final int PROX_GROUND_CONSTANT
| Constructor Detail |
|---|
public HemissonPlayer()
RobotCreationCanceledException - if the user cancels the creation of the robot via the dialog
box.
UnknownHostException - thrown if the host name cannot be resolved
public HemissonPlayer(PlayerSimulation sim,
int port,
boolean noise)
sim - the PlayerSimulation used to setup playerport - the port to connect tonoise - if noise should be used
public HemissonPlayer(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 HemissonPlayer(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 HemissonPlayer(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 HemissonPlayer(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 to interpret
public 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 | |||||||||