Skip to content
Hive Vision

Limelight Teleop- Pathing

A simple auto-generated spline traveling through detected entities. Though this prorgam is a teleop, aspects of it can be carried over to autonomous. This program was presented by Ajay Govindarajan | 22297 - Infinibots

How this code works:

Run CVTest to play the program, your robot will attempt to find an ideal path between the etities yellow_pollen for example.

When gamepad1.a is pressed, the robot will spline through the pollen/nectar, once it sees balls in the FOV.



Video

Add the following code into your teamcode folder

  1. CVConstants
  2. CVCostAlgo
  3. CVPathGen
  4. CVTest

It should look like this

  • DirectoryTeamCode
    • Directoryjava
      • Directoryorg.firstinspires.ftc.teamcode
        • CVConstants.java //Add this
        • CVPathGen.java //Add this
        • CVCostAlgo.java //Add this
        • CVTest.java //Add this
  1. Measure how high your limelight is from the ground in inches, subtract 1.4 from that number, and update CAMERA_HEIGHT in CVConstants to this number
  2. Measure the angle that your limelight is pointing downwards in degrees, (Pointing straight means 0!), put that number inside the CAMERA_PITCH in CVConstants inside the Math.toRadians()
  3. Measure how far forward your limelight lens is from the center of the robot in inches, put this number inside FORWARD_OFFSET in CVConstants
  4. In CVPathGen update your limelight configuration name to the one listed in your driver station on line 39
  5. In CVPathGen update your pipeline to the one that contains Hive Vision in your limelight on line 41.

Congrats, you now have Teleop - Pathing program set up for your Limelight 3A. Simply follow the directions on how to use the program at the top. Thank you for using Hive Vision!