javaclient
Class LocalizeInterface

java.lang.Object
  extended by javaclient.PlayerDevice
      extended by javaclient.LocalizeInterface

public class LocalizeInterface
extends PlayerDevice

The localize interface provides pose information for the robot. Generally speaking, localization drivers will estimate the pose of the robot by comparing observed sensor readings against a pre-defined map of the environment. See, for the example, the amcl driver, which implements a probabilistic Monte-Carlo localization algorithm.

This interface accepts no commands.

Version:
Author:
Maxim A. Batalin & Radu Bogdan Rusu

Field Summary
protected  short PLAYER_LOCALIZE_GET_CONFIG_REQ
           
 short PLAYER_LOCALIZE_MAX_HYPOTHS
          the maximum number of pose hypotheses
protected  short PLAYER_LOCALIZE_SET_CONFIG_REQ
           
protected  short PLAYER_LOCALIZE_SET_POSE_REQ
           
 
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
LocalizeInterface(PlayerClient pc, short indexOfDevice)
          Constructor for LocalizeInterface.
 
Method Summary
 void getConfiguration()
          Configuration request: Get configuration.
 int getHypothCount()
          Returns the number of hypotheses.
 PlayerLocalizeConfigT getPLCT()
          Get the configuration data.
 void handleResponse(int size)
          Handle acknowledgement response messages (threaded mode).
 boolean isPLCTReady()
          Check if configuration data is available.
 void readData()
          Read an array of hypotheses.
 void setConfiguration(int numParticles)
          Configuration request: Set configuration.
 void setPose(int[] mean, long[][] cov)
          Configuration request: Set the robot pose estimate.
 
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

PLAYER_LOCALIZE_MAX_HYPOTHS

public final short PLAYER_LOCALIZE_MAX_HYPOTHS
the maximum number of pose hypotheses

See Also:
Constant Field Values

PLAYER_LOCALIZE_SET_POSE_REQ

protected final short PLAYER_LOCALIZE_SET_POSE_REQ
See Also:
Constant Field Values

PLAYER_LOCALIZE_GET_CONFIG_REQ

protected final short PLAYER_LOCALIZE_GET_CONFIG_REQ
See Also:
Constant Field Values

PLAYER_LOCALIZE_SET_CONFIG_REQ

protected final short PLAYER_LOCALIZE_SET_CONFIG_REQ
See Also:
Constant Field Values
Constructor Detail

LocalizeInterface

public LocalizeInterface(PlayerClient pc,
                         short indexOfDevice)
Constructor for LocalizeInterface.

Parameters:
pc - a reference to the PlayerClient object
indexOfDevice - the index of the device
Method Detail

getHypothCount

public int getHypothCount()
Returns the number of hypotheses.


readData

public void readData()
Read an array of hypotheses.

Overrides:
readData in class PlayerDevice

setPose

public void setPose(int[] mean,
                    long[][] cov)
Configuration request: Set the robot pose estimate.

Parameters:
mean - the mean value of the pose estimate (mm, mm, arc-seconds)
cov - the covariance matrix pose estimate (mm$^2$, arc-seconds$^2$)

getConfiguration

public void getConfiguration()
Configuration request: Get configuration.


setConfiguration

public void setConfiguration(int numParticles)
Configuration request: Set configuration.

Parameters:
numParticles - maximum number of particles (for drivers using particle filters)

handleResponse

public void handleResponse(int size)
Handle acknowledgement response messages (threaded mode).

Overrides:
handleResponse in class PlayerDevice
Parameters:
size - size of the payload

isPLCTReady

public boolean isPLCTReady()
Check if configuration data is available.

Returns:
true if ready, false if not ready

getPLCT

public PlayerLocalizeConfigT getPLCT()
Get the configuration data.

Returns:
an object of type PlayerLocalizeConfigT containing the required configuration data