Hive Tags Setup
Set up Hive Tags AprilTag detection with a Limelight 3A or a USB webcam
Hive Tags reads the AprilTag clusters on hive cells and scores them against your alliance rules. It runs on a Limelight 3A or a USB webcam, with a live dashboard in the browser.
Prerequisites:
- FTC SDK 12.0+
- Android Studio
- Limelight 3A, USB webcam, or both
Installation
Section titled “Installation”Two ways to install — pick one.
Use this repository. Clone it, open the FtcRobotController/ folder in Android Studio, let Gradle sync, then build and deploy to the Robot Controller as usual.
git clone https://github.com/hivevisionftc/Hive-Tags.gitAdd it to your own robot project. Add the seven Hive Tags files in TeamCode/ of your FTC project — they depend only on the FTC SDK:
DirectoryTeamCode
Directoryjava
Directoryorg.firstinspires.ftc.teamcode
- AprilTagDashboardOpMode.java //runs detection and the dashboard. This is the OpMode you start
- AprilTagTelemetryOpMode.java //webcam check that prints detections to telemetry
- AprilTagDashboardServer.java //the dashboard’s HTTP server and embedded page
- AprilTagConfig.java //settings the dashboard can change at runtime
- AprilTagTargeting.java //alliance, roll and cluster rules
- LimelightBridge.java //Limelight results to SDK detections, and the tag size patcher
- MjpegFrameGrabber.java //encodes webcam frames for the live view
Paste in each file from the repository: AprilTagDashboardOpMode.java · AprilTagTelemetryOpMode.java · AprilTagDashboardServer.java · AprilTagConfig.java · AprilTagTargeting.java · LimelightBridge.java · MjpegFrameGrabber.java
Limelight 3A
Section titled “Limelight 3A”- Name the Limelight
limelightin the Driver Station configuration. - Run the AprilTag Dashboard OpMode and set source to
LIMELIGHT. - Make sure the camera is on a pipeline that detects AprilTags (
pipe_fiducial).
Drag the tag size slider to your tag’s real size, then press push tag size to Limelight. If the Limelight is not at limelight.local, type its hostname or IP in the host box — the page, the REST calls and the video all follow it.
USB webcam
Section titled “USB webcam”- Plug the webcam into the Control Hub and name it
Webcam 1in the Driver Station configuration. - Run the AprilTag Dashboard OpMode with source set to
WEBCAM.
A different name? Type it in the camera name box and the stream rebuilds. To check a webcam before using the dashboard, run AprilTag Telemetry (Webcam) — it only prints detections to the Driver Station.
Open the dashboard
Section titled “Open the dashboard”The OpMode prints its address in Driver Station telemetry. It asks for port 8080 and moves to the next free port if that one is taken.
| Connection | URL |
|---|---|
| Laptop on the robot’s network | The Dashboard: line from telemetry, for example http://192.168.43.1:8082 |
| Control Hub over USB | Run adb reverse tcp:8082 tcp:8082 with your port, then open http://localhost:8082 |