How to Code an AprilTag-Tracking Turret
Автор: Brogan M. Pratt
Загружено: 2026-02-10
Просмотров: 3067
Описание:
Join the community & access CAD files, Code snippets, & more robotics resources ⤵️
https://shop.broganpratt.com/
Want to work with me and get support on your project? ⤵️
https://cal.com/brogan-pratt-a4gcx7
Summary ⤵️
For the 2026 FRC REBUILT and FTC DECODE seasons, having a fast and accurate auto-aim turret system is a huge advantage. In this video, I break down exactly how to program a turret to automatically align to an AprilTag using a camera that's mounted on the turret itself. I start by explaining the core concepts of a PID controller so you understand the theory. Then, I show a simple flowchart for a PD controller. Finally, I walk you step-by-step through the programming in FTC Java. The logic I teach can be used for almost any system, whether you're in FRC, using a Limelight, a standard webcam, or a HuskyLens, and it can be adapted to any programming language. My goal is to give you a powerful tool that will save you time and make your robot more competitive on the field.
My software, tools, & deals (some give me kickbacks—thank you!):
⚙️ Tools Every Workshop Needs: https://amzn.to/47jhPDo
🚀 The Best PETG Filament: https://amzn.to/4mnNloY
Why Watch?
If this is your first view—hi, I’m Brogan! TLDR: I've been teaching robotics and design for over ten years. Today, lots of people talk about robotics but I’ve noticed that very few have practical, real world ways of teaching people to create their own robots. So this channel is me chiming in and showing you what it really takes to build your own.
Hopefully I can help you improve your projects and robots, and in doing so, the rest of your life 🙏
Like, subscribe, and leave me a comment if you have a specific request! Thanks.
Chapters:
0:00 Intro
0:39 Caveats
1:41 What is PID?
4:12 FlowChart Explained
10:50 Safety Notes
12:15 Turret Java Class Variables
14:55 Init Method
15:55 kP kD Getter & Setters
17:01 Main Turret Logic
22:20 Example OpMode
27:01 P&D Tuning on The Fly
28:49 Tuning Setup
30:15 PID Tuning Demo
34:00 Final Result Demo
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: