public class OdometryPoseProvider extends java.lang.Object implements PoseProvider, MoveListener, SampleProvider
A PoseProvider keeps track of the robot Pose.
It does this using odometry (dead reckoning)
data contained in a Move, which is supplied by a MoveProvider. When the PoseProivder is constructed, it registers
as listener with its MoveProvider,
| Constructor and Description |
|---|
OdometryPoseProvider(MoveProvider mp)
Allocates a new OdometryPoseProivder and registers it with the MovePovider as a listener.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fetchSample(float[] sample,
int offset)
Fetches a sample from a sensor or filter.
|
Pose |
getPose()
returns a new pose that represents the current location and heading of the robot.
|
void |
moveStarted(Move move,
MoveProvider mp)
called by a MoveProvider when movement starts
|
void |
moveStopped(Move move,
MoveProvider mp)
called by a MoveProvider when movement ends
|
int |
sampleSize()
Returns the number of elements in a sample.
The number of elements does not change during runtime. |
void |
setPose(Pose aPose) |
public OdometryPoseProvider(MoveProvider mp)
public Pose getPose()
getPose in interface PoseProviderpublic void moveStarted(Move move, MoveProvider mp)
moveStarted in interface MoveListenermove - - the event that just startedmp - the MoveProvider that called this methodpublic void setPose(Pose aPose)
setPose in interface PoseProviderpublic void moveStopped(Move move, MoveProvider mp)
moveStopped in interface MoveListenermove - - the event that just startedmp - public int sampleSize()
SampleProvidersampleSize in interface SampleProviderpublic void fetchSample(float[] sample,
int offset)
SampleProviderfetchSample in interface SampleProvidersample - The array to store the sample in.offset - The elements of the sample are stored in the array starting at the offset position.