PeriodicIMUAccumulator

Accumulator that periodically updates the heading field of the pose estimate to the reading of an IMU. Useful for three-wheel odometry, reducing I2C calls while maintaining accuracy.

Author

Lucas Bubner, 2024

Since

6.0.0

Constructors

Link copied to clipboard
constructor(@Nullable imu: IMU, @NonNull relocalizationInterval: Measure<Time>)
Create a new PeriodicIMUAccumulator.

Inherited properties

Link copied to clipboard
The minimum interval at which to auto-log all pose and drive command data to the FlightRecorder.
Link copied to clipboard
The maximum pose history length that should be stored in an accumulator.
Link copied to clipboard
protected open var pose: Pose2d
Link copied to clipboard
@get:NonNull
open val poseHistory: LinkedList<Pose2d>
Link copied to clipboard
protected open var velocity: PoseVelocity2d

Functions

Link copied to clipboard
open fun accumulate(@NonNull twist: Twist2dDual<Time>)
Run one accumulation of this accumulator to update the pose with this delta.
Link copied to clipboard
open fun setOrigin(@NonNull origin: Measure<Angle>)
Sets the angle origin to use.

Inherited functions

Link copied to clipboard
fun copyTo(@NonNull other: Accumulator)
Copy the state of this accumulator to another accumulator.
Link copied to clipboard
fun getPose(): Pose2d
Calculate the accumulated pose from an internal localizer.
Link copied to clipboard
fun getVelocity(): PoseVelocity2d
Calculate the first derivative of the accumulated pose from an internal localizer.
Link copied to clipboard
open fun setPose(@NonNull vector: Vector2d, @NonNull vectorUnit: Distance, heading: Double, @NonNull headingUnit: Angle)
fun setPose(@NonNull newPose: Pose2d)
Reset the accumulated pose estimate to this pose.