Repository Notice: This is the official code archive for Team 27570 DECODE's 2025-2026 DECODE™ presented by RTX season. This codebase powered our robot to break world records and qualify for the Houston World Championship.
仓库声明:本仓库为 FTC 27570 DECODE 战队 2025-2026 DECODE™ 赛季的官方代码存档。这套控制系统帮助我们打破了世界纪录并成功晋级休斯顿世锦赛。
This season, DECODE pushed the limits of software and hardware integration in the DECODE arena: 本赛季,DECODE 在 DECODE 赛场上挑战了软硬件结合的极限,取得了以下成就:
- 🥇 World Record Holder (Highest Scoring Match in Elimination) | 世界纪录保持者
- 🥈 China National Championship - Inspire Award 2nd Place | 中国区总决赛 启发奖第二名
- 🏆 Regional Qualifier - Winning Alliance Partner | 资格赛 冠军联盟队友
- 🥇 Regional Qualifier - Inspire Award 1st Place | 资格赛 启发奖第一名
- 🎟️ 2025 Houston World Championship Qualified | 2025 休斯顿世锦赛晋级战队
Our control system is designed to master the DECODE game mechanics: Artifact Classification, Pattern Building, and Gate Management. 我们的控制系统专为掌控 DECODE 比赛机制而设计:包括文物(Artifact)分类、图案(Pattern)构建以及闸门(Gate)管理。
- PedroPathing for Dynamic Navigation:
- Optimized paths to navigate between the Loading Zone and Goal while avoiding the Secret Tunnel traffic.
- Uses Bezier Curves to maintain high velocity while launching Artifacts into the Goal's top opening.
- 技术解析:利用 PedroPathing 规划从装载区(Loading Zone)到得分目标(Goal)的高速贝塞尔曲线路径,在避开秘密通道(Secret Tunnel)拥堵的同时,保持发射所需的动能。
- Motif Decoding & Pattern Logic:
- Obelisk Vision: Automatically decodes the randomized Motif (e.g.,
GPP,PGP) using AprilTags (ID 21-23) on the Obelisk during Auto. - Artifact Sorting: The
SmartColorSorterpipeline identifies Purple and Green Artifacts to ensure they are loaded onto the Ramp in the correct sequence to maximize Pattern Points. - 技术解析:自动阶段通过识别方尖碑(Obelisk)上的 AprilTag 解码图案(Motif),结合机器视觉识别紫色和绿色文物(Artifact),确保落入坡道(Ramp)的顺序完美匹配图案得分。
- Shooter PIDF & Trajectory Control:
- Since DECODE requires launching Artifacts into the Goal, we use a tuned PIDF controller (
SHOOTER_F,SHOOTER_P) to maintain constant RPM under rapid fire. - Slew Rate Limiter: Protects the motors during the frequent spin-up/spin-down cycles required between the Loading Zone and Launch Zone.
- 技术解析:鉴于本赛季需要将文物发射进球门,我们采用了高精度的 PIDF 闭环控制维持飞轮转速,并增加了转换率限制器(Slew Rate Limiter)以保护电机应对频繁的加减速。
- Gate & Classifier FSM:
- Automated
GATEmanagement ensures Artifacts are retained on the Ramp for Pattern validation and released efficiently to avoid Overflow. - 技术解析:通过状态机(FSM)自动化管理分类器(Classifier)和闸门(Gate),确保文物在坡道上正确排列以验证图案,并在合适的时机开启闸门避免溢出(Overflow)。
Strategies are designed based on the Motif and Alliance starting position (Red/Blue). 策略基于场上的图案(Motif)和联盟颜色(红/蓝)动态调整。
- Objective: Score Preload + 3 Cycles + Pattern + Base Park.
- Logic Flow:
- Decode: Reads Obelisk (Tag 21/22/23) to determine the Pattern (e.g., Green-Purple-Purple).
- Launch: Moves to Launch Zone and fires preloaded Artifacts.
- Intake & Sort: Cycles to the Spike Marks or Loading Zone, intakes Artifacts, and uses the
MOZARTmechanism to sort/reject wrong colors based on the active Motif. - Gate Crash: Intentionally impacts the Gate mechanism (as permitted by physics) to release the Ramp stack efficiently (
Path5,Path10). - 亮点:利用
Path5和Path10的路径规划,在高速运动中完成撞击开门动作,极大缩短了从分类(Classifier)到清空坡道(Ramp)的时间。
- Objective: Consistent 2 Cycles + Pattern validation.
- Adaptation: Skips the risky 3rd cycle gate interaction. Instead of clearing the ramp, it focuses on filling the Depot or securing the Base Zone points.
- 亮点:在防守严密或机构疲劳时使用的稳健策略,放弃第三次开门风险,转而确保护送机器人返回基地(Base)。
- Objective: Cross-field traversing from the far side.
- Logic: Navigates through the Secret Tunnel Zone (if clear) or around the perimeter to collect distant Artifacts.
Class: TeleOpProMax
- Artifact Launch Assist:
- One-touch macros (D-Pad) to set Shooter RPM for specific distances (Launch Line vs. Depot).
- Feedback: LED Module flashes Green when the Ramp has 9 Artifacts (Full Pattern) and Red if Overflow is detected.
- 技术解析:通过 D-Pad 预设发射转速。当自定义传感器检测到坡道积满9个文物(图案完成)时,LED 模块闪烁绿色;检测到溢出(Overflow)时闪烁红色。
- Field-Centric with IMU Lock:
- Crucial for the DECODE field geometry. The driver controls the robot relative to the Alliance Area, while the IMU locks the heading towards the Goal for consistent launching.
- 技术解析:针对 DECODE 场地几何形状,采用场地位移控制。无论车头朝向何处,推杆方向永远相对于联盟区域(Alliance Area),并利用 IMU 将射击角度锁定指向球门。
- Gate & Ramp Automation:
- Automated sequence to
Open Gate->Agitate Ramp->Close Gateto quickly clear Classified Artifacts and reset for the next Pattern.
| Device Name | Motor Type | Function / 功能 (DECODE) |
|---|---|---|
LeftFrontDrive... |
GoBilda 312 | Mecanum Chassis |
SH / HS |
GoBilda 6000 | Dual Flywheel Launcher (Artifact Shooter) |
Intake |
Matrix | Active Intake (Collection from Floor/Spike) |
MOZART |
Matrix | Blender/Feeder (Sorting into Classifier) |
| Device Name | Type | Function / 功能 (DECODE) |
|---|---|---|
Hold |
CRServo | Gate Release / Trigger Mechanism |
RP / LP |
Servo | Launcher Angle Adjustment |
juju |
Digital | Ramp Entry Sensor (Beam Break) |
bigjuju |
Digital | Overflow Sensor (Detects >9 Artifacts) |
imu |
Internal | Robot Heading (Yaw) |
leddd |
I2C Device | Custom Feedback Driver (Status Indicators) |
ClassifyCam |
Webcam | Artifact Color & Obelisk Detection |
- Clone:
git clone https://github.com/BlueDarkUP/FTC-27570-DECODE.git
- Prerequisites:
- Android Studio (Hedgehog or newer).
- PedroPathing Library (Included).
- OpenCV dependencies (Check
build.gradle).
- Deploy:
- Connect to Control Hub via Wi-Fi.
- Build & Run.
- Configuration: Ensure Hardware Map matches the table above exactly.
- Team 27570 DECODE Members: For decoding the game and encoding the victory.
- PedroPathing: For the smooth path generation.
- FIRST & RTX: For the incredible DECODE season experience.
Repository Archived. This code represents our state at the conclusion of the 2025-2026 Season.
Created with ❤️ by DECODE. Houston 2026, here we come! 🚀