Accumulator

Accumulates pose estimates from a Localizer to expose Localizable properties.

Author

Lucas Bubner, 2024

Since

6.0.0

Inheritors

Constructors

Link copied to clipboard
constructor(@NonNull initialPose: Pose2d)
Construct an Accumulator base.
constructor()
Create an Accumulator base with the last known robot position.

Properties

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
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
fun setPose(@NonNull newPose: Pose2d)
Reset the accumulated pose estimate to this pose.

Inherited functions

Link copied to clipboard
open fun setPose(@NonNull vector: Vector2d, @NonNull vectorUnit: Distance, heading: Double, @NonNull headingUnit: Angle)
Reset the accumulated pose estimate to this pose.