TeamCode / org.firstinspires.ftc.teamcode.sensing / Vision

Vision

open class Vision : MineralDetection

This class takes care of all your vision needs. Wrapper class for Vuforia that extends MineralDetection. Improves code reusability.

IMPORTANT: Use of the Vision class requires a Vuforia auth key. To learn how to set one up, browse to the VuforiaAuthKey class.

Types

Location

open class Location

A class representing where a robot is on the field. The origin is the center of the field.

Constructors

<init>

Vision(hardwareMap: HardwareMap)

Inherited Properties

LABEL_GOLD_MINERAL

static val LABEL_GOLD_MINERAL: String

LABEL_SILVER_MINERAL

static val LABEL_SILVER_MINERAL: String

cameraDirection

var cameraDirection: CameraDirection

hardwareMap

var hardwareMap: HardwareMap

tfod

var tfod: TFObjectDetector

vuforia

var vuforia: VuforiaLocalizer

Functions

activate

open fun activate(): Unit

getLocation

open fun getLocation(): Location

Attempts to determine the robot's location.

initVuforia

open fun initVuforia(): Unit

Initialize the Vuforia localization engine.

Inherited Functions

getUpdatedRecognitions

open fun getUpdatedRecognitions(): MutableList<Recognition>

Asks TFOD for updated recognitions.

init

open fun init(): Unit

Convenience method to initialize Vuforia and TensorFlow at the same time. Usually called during the init phase of an op mode.

initTfod

open fun initTfod(): Unit

Initialize the Tensor Flow Object Detection engine.

shutdown

open fun shutdown(): Unit

Shut down TFOD. This method is typically called in an OpMode's stop function.