|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavaclient.PlayerDevice
javaclient.LaserInterface
public class LaserInterface
The laser interface provides access to a single-origin scanning range sensor, such as a
SICK laser range-finder (e.g., sicklms200).
Devices supporting the laser interface can be configured to scan at different angles and
resolutions. As such, the data returned by the laser interface can take different forms. To
make interpretation of the data simple, the laser data packet contains some extra fields
before the actual range data. These fields tell the client the starting and ending angles of
the scan, the angular resolution of the scan, and the number of range readings included. Scans
proceed counterclockwise about the laser (0 degrees is forward). The laser can return a maximum
of 401 readings; this limits the valid combinations of scan width and angular resolution.
This interface accepts no commands.
Field Summary | |
---|---|
protected short |
PLAYER_LASER_GET_CONFIG
|
protected short |
PLAYER_LASER_GET_GEOM
|
int |
PLAYER_LASER_MAX_SAMPLES
maximum number of laser range values |
protected short |
PLAYER_LASER_POWER_CONFIG
|
protected short |
PLAYER_LASER_SET_CONFIG
|
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 | |
---|---|
LaserInterface(PlayerClient pc,
short indexOfDevice)
Constructor for LaserInterface. |
Method Summary | |
---|---|
void |
getGeometry()
Configuration request: Get geometry. |
int[] |
getIntensity()
Return the intensity readings. |
short |
getMaxAngle()
Return the end angle for the laser scan in units of 0.01 degrees. |
short |
getMinAngle()
Return the start angle for the laser scan in units of 0.01 degrees. |
PlayerLaserConfigT |
getPlayerLaserConfig()
Get the laser configuration after a PLAYER_LASER_GET_CONFIG request. |
PlayerLaserGeomT |
getPlayerLaserGeom()
Get the laser geometry after a PLAYER_LASER_GET_GEOM request. |
int |
getRangeRes()
Return the range resolution. |
int[] |
getRanges()
Return the range readings in mm. |
int |
getResolution()
Return the angular resolution in units of 0.01 degrees. |
int |
getSamplesCount()
Return the number of range/intensity readings. |
void |
getScanProperties()
Configuration request: Get scan properties. |
void |
handleResponse(int size)
Handle acknowledgement response messages (threaded mode). |
boolean |
isReadyPLCT()
Check if the configuration data is available. |
boolean |
isReadyPLGT()
Check if the geometry data is available. |
void |
readData()
Read the laser data packet. |
void |
setPower(byte value)
Configuration request: Turn power on/off. |
void |
setScanProperties(short minA,
short maxA,
short res,
short range,
byte intent)
Configuration request: Set scan properties. |
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_LASER_GET_GEOM
protected final short PLAYER_LASER_SET_CONFIG
protected final short PLAYER_LASER_GET_CONFIG
protected final short PLAYER_LASER_POWER_CONFIG
public final int PLAYER_LASER_MAX_SAMPLES
Constructor Detail |
---|
public LaserInterface(PlayerClient pc, short indexOfDevice)
pc
- a reference to the PlayerClient objectindexOfDevice
- the index of the deviceMethod Detail |
---|
public void readData()
readData
in class PlayerDevice
public short getMinAngle()
public short getMaxAngle()
public int getResolution()
public int getRangeRes()
public int getSamplesCount()
public int[] getRanges()
public int[] getIntensity()
public void getGeometry()
public void setScanProperties(short minA, short maxA, short res, short range, byte intent)
minA
- start angle for the laser scanmaxA
- end angle for the laser scanres
- scan resolutionrange
- range resolutionintent
- enable reflection intensity datapublic void getScanProperties()
public void setPower(byte value)
value
- 0 to turn laser off, 1 to turn laser onpublic void handleResponse(int size)
handleResponse
in class PlayerDevice
size
- size of the payloadpublic PlayerLaserGeomT getPlayerLaserGeom()
isReadyPLGT()
public PlayerLaserConfigT getPlayerLaserConfig()
isReadyPLCT()
public boolean isReadyPLGT()
getPlayerLaserGeom()
public boolean isReadyPLCT()
getPlayerLaserConfig()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |