Class TrcDriveBase.Odometry

java.lang.Object
trclib.drivebase.TrcDriveBase.Odometry
Enclosing class:
TrcDriveBase

public static class TrcDriveBase.Odometry extends Object
This class implements the drive base odometry. It consists of the position as well as velocity info in all three degrees of movement (x, y, angle).
  • Field Details

  • Constructor Details

    • Odometry

      public Odometry()
      Constructor: Create an instance of the object.
    • Odometry

      public Odometry(TrcPose2D position, TrcPose2D velocity)
      Constructor: Create an instance of the object.
      Parameters:
      position - specifies the initial position.
      velocity - specifies the initial velocity.
  • Method Details

    • toString

      public String toString()
      This method returns the string representation of the object.
      Overrides:
      toString in class Object
      Returns:
      string representation of the object.
    • clone

      public TrcDriveBase.Odometry clone()
      This method creates and returns a copy of this odometry.
      Overrides:
      clone in class Object
      Returns:
      a copy of this odometry.
    • setPositionAs

      void setPositionAs(TrcPose2D pose)
      This method sets the position info of the odometry to the given pose.
      Parameters:
      pose - specifies the pose to set the position info to.
    • setVelocityAs

      void setVelocityAs(TrcPose2D pose)
      This method sets the velocity info of the odometry to the given pose.
      Parameters:
      pose - specifies the pose to set the velocity info to.