Skip to content
Hive Vision

Webcam Teleop- Driving

A simple test-friendly teleop for your Webcam presented by Owen Cassidy from team 17113 - Hunga Munga

How this code works: This code acts as an ad-on to the HiveVisionOpmode.java that was created at the end of Webcam installation. It simply tracks the desired entities in your Webcam’s FOV and will drive towards it. This OpMode is likely not to use during a match but can be taken for inspiration on use cases for your team. In order to leave manual mode, and force your robot to detect entities and move towards them, you must enable Auto-Chase as shown below.

During Teleop:
• Right Bumper (RB): Toggles Auto-Chase mode ON or OFF


• Left Stick (Y-axis): Drives Forward / Backward.
• Left Stick (X-axis): Strafes Left / Right (Mecanum functionality).
• Right Stick (X-axis): Turns Left / Right in place.

Since Webcam Installation has been completed, you should be left with a HiveVisionOpmode.java in your teamcode, replace that code with this

To confirm, your file structure should now look like this

  • DirectoryTeamCode
    • Directoryjava
      • Directoryorg.firstinspires.ftc.teamcode
        • BallBlobDetectorPipeline.java
        • BallDetectorPipeline.java
        • HiveVisionOpmode.java //This code

Change the following code

  1. Change the webcam name so that it matches the name in your driver station, on line 23
  2. Similarly, change your drivetrain motor names from lines 47-50 as shown in your driver station

You are all set! Please refer to the top of the page to learn how to operate the HiveVisionOpmode