Class SwervePoseEstimator2.InterpolationRecord

java.lang.Object
swervelib.math.SwervePoseEstimator2.InterpolationRecord
All Implemented Interfaces:
edu.wpi.first.math.interpolation.Interpolatable<SwervePoseEstimator2.InterpolationRecord>
Enclosing class:
SwervePoseEstimator2

private class SwervePoseEstimator2.InterpolationRecord extends Object implements edu.wpi.first.math.interpolation.Interpolatable<SwervePoseEstimator2.InterpolationRecord>
Represents an odometry record. The record contains the inputs provided as well as the pose that was observed based on these inputs, as well as the previous record and its inputs.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final edu.wpi.first.math.geometry.Rotation2d
     
    private final edu.wpi.first.math.geometry.Rotation2d
     
    private final edu.wpi.first.math.geometry.Rotation2d
     
    private final edu.wpi.first.math.kinematics.SwerveModulePosition[]
     
    private final edu.wpi.first.math.geometry.Pose2d
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    InterpolationRecord(edu.wpi.first.math.geometry.Pose2d poseMeters, edu.wpi.first.math.geometry.Rotation2d gyro, edu.wpi.first.math.geometry.Rotation2d gyroPitch, edu.wpi.first.math.geometry.Rotation2d gyroRoll, edu.wpi.first.math.kinematics.SwerveModulePosition[] modulePositions)
    Constructs an Interpolation Record with the specified parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    Return the interpolated record.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • poseMeters

      private final edu.wpi.first.math.geometry.Pose2d poseMeters
    • gyroAngle

      private final edu.wpi.first.math.geometry.Rotation2d gyroAngle
    • gyroPitch

      private final edu.wpi.first.math.geometry.Rotation2d gyroPitch
    • gyroRoll

      private final edu.wpi.first.math.geometry.Rotation2d gyroRoll
    • modulePositions

      private final edu.wpi.first.math.kinematics.SwerveModulePosition[] modulePositions
  • Constructor Details

    • InterpolationRecord

      private InterpolationRecord(edu.wpi.first.math.geometry.Pose2d poseMeters, edu.wpi.first.math.geometry.Rotation2d gyro, edu.wpi.first.math.geometry.Rotation2d gyroPitch, edu.wpi.first.math.geometry.Rotation2d gyroRoll, edu.wpi.first.math.kinematics.SwerveModulePosition[] modulePositions)
      Constructs an Interpolation Record with the specified parameters.
      Parameters:
      poseMeters - The pose observed given the current sensor inputs and the previous pose.
      gyro - The current gyro angle.
      gyroPitch - The current gyro pitch.
      gyroRoll - The current gyro roll.
      modulePositions - The distances and rotations measured at each wheel.
  • Method Details