AprilTagPoseEstimator

Combines an AprilTag processor and RoadRunner drive to supply updates in pose estimation.

Author

Lucas Bubner, 2024

Since

3.2.0

Constructors

Link copied to clipboard
constructor(processor: AprilTag, drive: RoadRunnerDrive)
Constructor for AprilTagPoseEstimator.

Functions

Link copied to clipboard
open fun run()
Propagate interpretation of AprilTag processor and set the pose estimate to the tag, if available by the SDK.
Link copied to clipboard
open fun setActive(setPoseAutomatically: Boolean): AprilTagPoseEstimator
Whether to set the drive pose to the vision estimate.
Link copied to clipboard
open fun setCameraOffset(poseInchRad: Pose2d): AprilTagPoseEstimator
open fun setCameraOffset(forwardFromCenter: Measure<Distance>, leftFromCenter: Measure<Distance>, rotationOnRobot: Measure<Angle>): AprilTagPoseEstimator
Set a robot-relative offset of the webcam from the center of your robot, facing towards your defined robot's forward.
Link copied to clipboard
open fun setHeadingEstimate(setHeadingAutomatically: Boolean): AprilTagPoseEstimator
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.