Class OdometryPoseProvider

    • Constructor Summary

      Constructors 
      Constructor Description
      OdometryPoseProvider​(MoveProvider mp)
      Allocates a new OdometryPoseProivder and registers it with the MovePovider as a listener.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OdometryPoseProvider

        public OdometryPoseProvider​(MoveProvider mp)
        Allocates a new OdometryPoseProivder and registers it with the MovePovider as a listener.
    • Method Detail

      • getPose

        public Pose getPose()
        returns a new pose that represents the current location and heading of the robot. If called while the robot is moving, the PoseProvider will get updated odometry data from its MoveProvider
        Specified by:
        getPose in interface PoseProvider
        Returns:
        pose
      • moveStarted

        public void moveStarted​(Move move,
                                MoveProvider mp)
        called by a MoveProvider when movement starts
        Specified by:
        moveStarted in interface MoveListener
        Parameters:
        move - - the event that just started
        mp - the MoveProvider that called this method
      • moveStopped

        public void moveStopped​(Move move,
                                MoveProvider mp)
        called by a MoveProvider when movement ends
        Specified by:
        moveStopped in interface MoveListener
        Parameters:
        move - - the event that just started
        mp -
      • sampleSize

        public int sampleSize()
        Description copied from interface: SampleProvider
        Returns the number of elements in a sample.
        The number of elements does not change during runtime.
        Specified by:
        sampleSize in interface SampleProvider
        Returns:
        the number of elements in a sample
      • fetchSample

        public void fetchSample​(float[] sample,
                                int offset)
        Description copied from interface: SampleProvider
        Fetches a sample from a sensor or filter.
        Specified by:
        fetchSample in interface SampleProvider
        Parameters:
        sample - The array to store the sample in.
        offset - The elements of the sample are stored in the array starting at the offset position.