SwitchableLocalizer

open class SwitchableLocalizer : Localizer

SwitchableLocalizer is a composite localizer that allows self-tests to be performed, and to allow a "fallback" localizer to kick in if the self-test fails.

Author

Lucas Bubner, 2024

Since

4.0.0

Constructors

Link copied to clipboard
constructor(main: Localizer, fallback: Localizer)
Create a new SwitchableLocalizer.

Types

Link copied to clipboard
open inner class Tasks
Self-test tasks for SwitchableLocalizer.

Properties

Link copied to clipboard
@get:NonNull
open var poseEstimate: Pose2d
Link copied to clipboard
Available tasks for self-tests on this localizer.
Link copied to clipboard
Whether the fallback localizer should be used.

Functions

Link copied to clipboard
open fun getPoseVelocity(): Pose2d
Link copied to clipboard
open fun switchToFallback()
Switch to the backup localizer for all pose data.
Link copied to clipboard
open fun switchToMain()
Switch to the main localizer for all pose data.
Link copied to clipboard
open fun update()

Inherited functions

Link copied to clipboard
abstract fun getPoseEstimate(): Pose2d
Link copied to clipboard
abstract fun setPoseEstimate(p: Pose2d)