AprilTagRelocalizingAccumulator

Combines an AprilTag processor with an Accumulator to relocalize the robot. This serves as the modernised version of the previous AprilTagPoseEstimator.

Author

Lucas Bubner, 2024

Since

6.0.0

Constructors

Link copied to clipboard
constructor(@NonNull processor: AprilTag)
Create a new AprilTag relocalizing accumulator.

Properties

Link copied to clipboard
open var DEFAULT_Q: Double
Default Q gain for Kalman filtering.
Link copied to clipboard
open var DEFAULT_R: Double
Default R gain for Kalman filtering.

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 a standard accumulation while also relocalizing based on the presence of library AprilTags.
Link copied to clipboard
Add a data filter that will apply to the detections of the processor whether to accept processing this tag.
Link copied to clipboard
Link copied to clipboard
open fun setActive(setPoseAutomatically: Boolean): AprilTagRelocalizingAccumulator
Whether to set the drive pose to the vision estimate.
Link copied to clipboard
Whether to set the drive pose to the vision estimate with heading information.
Link copied to clipboard
Set the gains used in the Kalman filter for the x, y, and r components.

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.