BoundedAccumulator

Accumulator to define clamping limits on the field.

Author

Lucas Bubner, 2024

Since

6.0.0

Constructors

Link copied to clipboard
constructor(@NonNull robotRadius: Measure<Distance>)
Create a new BoundedAccumulator.

Properties

Link copied to clipboard
Time in seconds to use for the delta step in deriving velocity (s'(t) = (s(t) - s(t + dt)) / dt).
Link copied to clipboard
Time in seconds that will be used to inhibit the velocity calculation after the robot pose is rebounded.
Link copied to clipboard
Maximum bounds (default full FTC field)

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
open fun accumulate(@NonNull twist: Twist2dDual<Time>)
Run one accumulation of this accumulator to update the pose with this delta.
Link copied to clipboard
Set areas on the field that the robot should not be able to move into.

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.