AgentSkillsCN

decode

解码2025-2026 FTC比赛参考。在编程自主程序、计算得分、理解场地布局或处理比赛特定坐标时使用。

SKILL.md
--- frontmatter
name: decode
description: DECODE 2025-2026 FTC game reference. Use when programming autonomous routines, calculating scores, understanding field layout, or working with game-specific coordinates.
license: MIT
compatibility: Claude Code, Codex CLI, VS Code Copilot, Cursor
metadata:
  author: ncssm-robotics
  version: "1.1.0"
  category: game
  season: "2025-2026"

DECODE 2025-2026 FTC Game

DECODE presented by RTX is the 2025-2026 FIRST Tech Challenge game where teams collect, classify, and score artifacts to unlock patterns and motifs.

Quick Start

ElementDescription
ArtifactsBall-shaped game pieces (Purple and Green)
Control LimitMaximum 3 artifacts at a time
CycleCollect → Classify/Score → Repeat
Field144" × 144" (12ft × 12ft)

Match Structure

PeriodDurationNotes
Autonomous30 secondsPre-programmed robot actions
Driver-Controlled2 minutesManual control with gamepad
End GameLast 30 secondsBonus scoring opportunities

Field Layout (Pedro Coordinates)

code
        Y = 144" (back wall)
    ┌────────────────────────────────────┐
    │                                    │
    │     [GOALS]      [GOALS]           │
    │                                    │
    │  ┌─────────┐                       │
    │  │CLASSIFIER                       │
    │  └─────────┘                       │
    │                                    │
    │        [ARTIFACTS]                 │
    │                                    │
    │  ┌──────┐              ┌──────┐    │
    │  │ RED  │              │ BLUE │    │
    │  │START │              │START │    │
    │  └──────┘              └──────┘    │
    └────────────────────────────────────┘
        Y = 0" (audience wall)

    X = 0"                          X = 144"

Key Positions (Pedro Coordinates)

See FIELD_POSITIONS.md for complete coordinates.

LocationX (in)Y (in)Heading (°)
Red Start770
Blue Start1377180
Classifier247290

Robot Mechanisms

Based on game strategy:

  1. Intake - Collect artifacts from field
  2. Indexer - Hold up to 3 artifacts, feed to shooter
  3. Shooter - Flywheel + turret + hood for launching
  4. Vision - Limelight 3A for target tracking

Coordinate Conversion Scripts

Use python to execute conversion scripts (no external dependencies required):

bash
# FTC (meters) to Pedro (inches)
python scripts/convert.py ftc-to-pedro 0 0 90

# Tile coordinates to Pedro
python scripts/convert.py tile-to-pedro 3 3
python scripts/convert.py tile-center 2 4

# Mirror red alliance pose for blue
python scripts/convert.py mirror-blue 7 6.75 0

# Show all coordinate systems for a point
python scripts/convert.py all 72 72

Reference Documentation

Anti-Patterns

Don't: Hard-code field positions

kotlin
// BAD - Magic numbers scattered throughout code
val scorePose = Pose(24.0, 48.0, Math.toRadians(90.0))

// GOOD - Centralized constants with clear names
object FieldPositions {
    val SCORE_HIGH_LEFT = Pose(24.0, 48.0, Math.toRadians(90.0))
}
val scorePose = FieldPositions.SCORE_HIGH_LEFT

Don't: Ignore artifact control limits

kotlin
// BAD - No tracking of artifact count
fun collectArtifact() {
    intake.run()  // May exceed 3-artifact limit
}

// GOOD - Enforce the limit in code
fun collectArtifact() {
    if (artifactCount < 3) {
        intake.run()
        artifactCount++
    }
}

Don't: Mix coordinate systems

kotlin
// BAD - Mixing FTC (meters, center origin) with Pedro (inches, corner origin)
val pose = Pose(ftcX, pedroY, heading)  // Inconsistent units!

// GOOD - Always convert to one system
val pedroPose = CoordinateConversion.ftcToPedro(ftcX, ftcY, heading)

Official Resources