|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javaslam.slam.AbstractSLAMFilter
An abstract class extended by classes that implement filters for the Simultaneous Localization and Mapping (SLAM) problem. This class implements a simple landmark indexing scheme in which each landmark is represented by an integer identifier.
A more sophisticated implementation of this class could implement a cache of landmark marginals.
Field Summary | |
protected Map |
id2lm
A map from Integer landmark identifiers to Variable s representing the corresponding landmark's state. |
protected Map |
lm2id
A map from Variable s representing landmarks' states
to Integer identifiers of the corresponding landmarks . |
Variable |
x
The variable x, which represents the state of the robot. |
Constructor Summary | |
AbstractSLAMFilter(int dim)
Constructor. |
Method Summary | |
Variable |
addLandmark(int id,
int dim)
Adds a new landmark to the map and returns its state variable. |
boolean |
contains(int id)
Return true if this filter contains the landmark
with the supplied identifier. |
abstract double[] |
getLandmarkEstimate(int id)
Returns the filtered estimate of a landmark's state. |
int |
getLandmarkId(Variable lm)
Gets the identifier associated with the supplied landmark state variable. |
int[] |
getLandmarkIds()
Returns the IDs of landmarks known to this filter. |
Variable |
getLandmarkVariable(int id)
Gets the state variable associated with the landmark with the supplied identifier. |
int |
getNumLandmarks()
Returns the number of landmarks known to this filter. |
abstract double[] |
getRobotEstimate()
Returns the filtered estimate of the robot's state. |
Variable |
getRobotVariable()
Gets the state variable associated with the robot. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public final Variable x
protected Map id2lm
Integer
landmark identifiers to Variable
s representing the corresponding landmark's state.
protected Map lm2id
Variable
s representing landmarks' states
to Integer
identifiers of the corresponding landmarks .
Constructor Detail |
public AbstractSLAMFilter(int dim)
dim
- the dimension of the robot state variableMethod Detail |
public final Variable getRobotVariable()
getRobotVariable
in interface SLAMFilter
public Variable getLandmarkVariable(int id)
getLandmarkVariable
in interface SLAMFilter
public int getLandmarkId(Variable lm)
getLandmarkId
in interface SLAMFilter
public int getNumLandmarks()
getNumLandmarks
in interface SLAMFilter
public Variable addLandmark(int id, int dim)
addLandmark
in interface SLAMFilter
public int[] getLandmarkIds()
getLandmarkIds
in interface SLAMFilter
public boolean contains(int id)
true
if this filter contains the landmark
with the supplied identifier.
contains
in interface SLAMFilter
public abstract double[] getRobotEstimate()
getRobotEstimate
in interface SLAMFilter
public abstract double[] getLandmarkEstimate(int id)
getLandmarkEstimate
in interface SLAMFilter
id
- the identifier of the landmark
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |