|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavaclient.PlayerDevice
javaclient.TruthInterface
public class TruthInterface
The truth interface provides access to the absolute state of entities. Note that, unless your robot has superpowers, truth devices are only avilable in simulation.
| Field Summary | |
|---|---|
protected short |
PLAYER_TRUTH_GET_FIDUCIAL_ID
|
protected short |
PLAYER_TRUTH_GET_POSE
|
protected short |
PLAYER_TRUTH_SET_FIDUCIAL_ID
|
protected short |
PLAYER_TRUTH_SET_POSE
|
protected short |
PLAYER_TRUTH_SET_POSE_ON_ROOT
|
| Fields inherited from class javaclient.PlayerDevice |
|---|
device, DIFFERENCE_SYNCH_FACTOR, index, is, os, pc, PLAYER_MAX_REQREP_SIZE, PLAYER_STXX, reserved, size, t_sec, t_usec, ts_sec, ts_usec |
| Constructor Summary | |
|---|---|
TruthInterface(PlayerClient pc,
short indexOfDevice)
Constructor for TruthInterface. |
|
| Method Summary | |
|---|---|
int |
getPhead()
Get P orientation in millirad. |
int |
getRhead()
Get R orientation in millirad. |
int |
getXpos()
Get X position in mm. |
int |
getYhead()
Get Y orientation in millirad. |
int |
getYpos()
Get Y position in mm. |
int |
getZpos()
Get Z position in mm. |
void |
handleResponse(int size)
Handle acknowledgement response messages (threaded mode). |
boolean |
isTeleported()
Check if the teleportation (PLAYER_TRUTH_SET_POSE) was successful or not. |
void |
readData()
Read the current state of the entity. |
void |
teleport(int x,
int y)
Set the pose of the current entity. |
void |
teleport(int x,
int y,
int z)
Set the pose of the current entity. |
void |
teleport(int xp,
int yp,
int zp,
int ro,
int po,
int yo)
Set the pose of the current entity. |
| Methods inherited from class javaclient.PlayerDevice |
|---|
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, handleEARMessage, handleNARMessage, readHeader, sendHeader |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final short PLAYER_TRUTH_GET_POSE
protected final short PLAYER_TRUTH_SET_POSE
protected final short PLAYER_TRUTH_SET_POSE_ON_ROOT
protected final short PLAYER_TRUTH_GET_FIDUCIAL_ID
protected final short PLAYER_TRUTH_SET_FIDUCIAL_ID
| Constructor Detail |
|---|
public TruthInterface(PlayerClient pc,
short indexOfDevice)
pc - a reference to the PlayerClient objectindexOfDevice - the index of the device| Method Detail |
|---|
public void readData()
readData in class PlayerDevicepublic int getXpos()
public int getYpos()
public int getZpos()
public int getRhead()
public int getPhead()
public int getYhead()
public void teleport(int x,
int y)
x - X position in mmy - Y position in mm
public void teleport(int x,
int y,
int z)
x - X position in mmy - Y position in mmz - Z position in mm
public void teleport(int xp,
int yp,
int zp,
int ro,
int po,
int yo)
xp - X position in mmyp - Y position in mmzp - Z position in mmro - R orientation in milliradpo - P orientation in milliradyo - Y orientation in milliradpublic boolean isTeleported()
public void handleResponse(int size)
handleResponse in class PlayerDevicesize - size of the payload
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||