I’m interested in making my webcam identify Apriltag and tell me how far it is from the robot, I managed to identify the apriltag part, but making the code tell me how far away it is from the robot is not working. but I have no idea how to do this, if anyone can help me!
Photonvision is a good place to start,
Edit, I FTC wasn’t in the title when I replied.
This post is tagged FTC, so PhotonVision will not help here.
The SDK provides examples for AprilTags: https://github.com/FIRST-Tech-Challenge/FtcRobotController/blob/master/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptAprilTag.java
in the part of creating an apriltag identifier I managed to create it, but the part of the code showing me the distance from the apriltag is confusing, I saw this video that does what I want but with a red cone https://www.youtube.com/watch?v=0_w7UTN9LnE&list=LL&index=4 but I don’t know how to modify it to be an apriltag
i would first read this: AprilTag Introduction — FIRST Tech Challenge Docs 0.2 documentation
right, but I couldn’t get any information from these documents on how to make the code tell me how far away it is from the robot
The AprilTags will give you xyz and rotation coordinates per the documentation and you should be able to figure out distance from robot with that
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.