CustomAccumulator

An accumulator that is defined by the user.

Custom accumulators can be used to combine accumulator readings, or to provide custom logic for the accumulation of pose estimates.

Author

Lucas Bubner, 2024

Since

6.0.0

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
A read-only list of all accumulators registered in this CustomAccumulator.

Inherited 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
abstract 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 internalAccumulate(@NonNull twist: Twist2dDual<Time>)
Run one accumulation of the underlying accumulator to update the pose with this delta.
Link copied to clipboard
open fun register(@NonNull accumulators: Array<Accumulator>)
Register accumulators that are used internally by this custom accumulator.

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.