setPose

abstract fun setPose(@NonNull newPose: Pose2d)

Reset the accumulated pose estimate to this pose. Further updates from an internal localizer will continue from this supplied pose estimate.

Parameters

newPose

the new pose to continue localization from, may no-op if the drive does not support localization


open fun setPose(@NonNull vector: Vector2d, @NonNull vectorUnit: Distance, heading: Double, @NonNull headingUnit: Angle)

Reset the accumulated pose estimate to this pose. Further updates from an internal localizer will continue from this supplied pose estimate. This method internally composes a Geometry call to construct a united pose, that will be interpreted back into an inches and radians pose.

Parameters

vector

the vector component of the pose

vectorUnit

the unit of the vector component distances

heading

the heading component of the pose

headingUnit

the unit of the heading component angles