Auto-publish: training content update 2026-05-15 11:26:33
This commit is contained in:
@@ -89,12 +89,10 @@ Mothman/
|
||||
|
||||
### 🎮 Subsystems
|
||||
|
||||
| File | What it Controls |
|
||||
|------|------------------|
|
||||
| `ClimberSubsystem.java` | Robot climber mechanism |
|
||||
| `IntakeSubsystem.java` | Game piece intake |
|
||||
| `ShooterSubsystem.java` | Scoring shooter |
|
||||
| `TargetingSubsystems.java` | Aim assist |
|
||||
- `ClimberSubsystem.java` — Robot climber mechanism
|
||||
- `IntakeSubsystem.java` — Game piece intake
|
||||
- `ShooterSubsystem.java` — Scoring shooter
|
||||
- `TargetingSubsystems.java` — Aim assist
|
||||
|
||||
**Training value:**
|
||||
- Subsystem architecture (commands bound to triggers)
|
||||
@@ -104,17 +102,15 @@ Mothman/
|
||||
|
||||
### ⚙️ Vendor Dependencies (vendordeps/)
|
||||
|
||||
| Library | Purpose |
|
||||
|---------|---------|
|
||||
| `Phoenix5-replay-5.36.0.json` | TalonFX (legacy) |
|
||||
| `Phoenix6-replay-26.1.0.json` | TalonFX (new) |
|
||||
| `REVLib.json` | NEO, SparkFlex motors |
|
||||
| `PathplannerLib-2026.1.2.json` | Auto/path planning |
|
||||
| `photonlib.json` | PhotonVision |
|
||||
| `yagsl-2026.1.14.json` | Swerve library |
|
||||
| `ReduxLib-2026.1.1.json` | Sensors |
|
||||
| `Studica-2026.0.0.json` | Contour following |
|
||||
| `ThriftyLib-2026.json` | Thrifty cameras |
|
||||
- `Phoenix5-replay-5.36.0.json` — TalonFX (legacy)
|
||||
- `Phoenix6-replay-26.1.0.json` — TalonFX (new)
|
||||
- `REVLib.json` — NEO, SparkFlex motors
|
||||
- `PathplannerLib-2026.1.2.json` — Auto/path planning
|
||||
- `photonlib.json` — PhotonVision
|
||||
- `yagsl-2026.1.14.json` — Swerve library
|
||||
- `ReduxLib-2026.1.1.json` — Sensors
|
||||
- `Studica-2026.0.0.json` — Contour following
|
||||
- `ThriftyLib-2026.json` — Thrifty cameras
|
||||
|
||||
---
|
||||
|
||||
@@ -122,13 +118,11 @@ Mothman/
|
||||
|
||||
**For C++ teams learning from Java code:**
|
||||
|
||||
| Pattern | Java (Mothman) | C++ (WPILib) |
|
||||
|---------|----------------|--------------|
|
||||
| Subsystem class | `extends SubsystemBase` | Inherit `frc::SubsystemBase` |
|
||||
| Command binding | `+=` operator | `AddCommands()` |
|
||||
| Motor controller | `.set()` | `Set()` |
|
||||
| Joystick input | `driver.getRawButton()` | `GetRawButton()` |
|
||||
| Auto commands | `pathplanner` | `pathplanner` (same lib) |
|
||||
- **Subsystem class** — Java: `extends SubsystemBase` → C++: Inherit `frc::SubsystemBase`
|
||||
- **Command binding** — Java: `+=` operator → C++: `AddCommands()`
|
||||
- **Motor controller** — Java: `.set()` → C++: `Set()`
|
||||
- **Joystick input** — Java: `driver.getRawButton()` → C++: `GetRawButton()`
|
||||
- **Auto commands** — `pathplanner` (same library in both languages)
|
||||
|
||||
---
|
||||
|
||||
@@ -148,11 +142,9 @@ Mothman/
|
||||
|
||||
## External Mirrors
|
||||
|
||||
| Repo | URL | Purpose |
|
||||
|------|-----|---------|
|
||||
| PhotonVision | Team2890/PhotonVision | Vision processing (mirrored from github) |
|
||||
| YAGSL | Team2890/YAGSL | Swerve library (mirrored) |
|
||||
| allwpilib | Team2890/allwpilib | WPILib source (mirrored) |
|
||||
- **PhotonVision** → Team2890/PhotonVision — Vision processing (mirrored from github)
|
||||
- **YAGSL** → Team2890/YAGSL — Swerve library (mirrored)
|
||||
- **allwpilib** → Team2890/allwpilib — WPILib source (mirrored)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -47,13 +47,11 @@ Ask these questions:
|
||||
|
||||
For each mechanism:
|
||||
|
||||
| Mechanism | Key Metric | Typical Range |
|
||||
|-----------|------------|---------------|
|
||||
| Drivetrain | Top speed | 10-15 ft/s |
|
||||
| Elevator | Lift speed | 3-6 ft/s |
|
||||
| Arm | Rotation speed | 90-180°/sec |
|
||||
| Intake | Roll speed | Fast (1-2 sec) |
|
||||
| Shooter | RPM | 3000-6000 RPM |
|
||||
- **Drivetrain** — Key metric: top speed. Typical: 10-15 ft/s
|
||||
- **Elevator** — Key metric: lift speed. Typical: 3-6 ft/s
|
||||
- **Arm** — Key metric: rotation speed. Typical: 90-180°/sec
|
||||
- **Intake** — Key metric: roll speed. Typical: fast (1-2 sec)
|
||||
- **Shooter** — Key metric: RPM. Typical: 3000-6000 RPM
|
||||
|
||||
### Step 3: Match Motor to Load
|
||||
|
||||
@@ -78,14 +76,10 @@ Find gear ratio
|
||||
|
||||
Team 2890 uses **L1 and L3** on MK4i modules with NEO Vortex:
|
||||
|
||||
| Ratio | Speed | Torque | Use When |
|
||||
|-------|-------|--------|----------|
|
||||
| **L1** (8.14:1) | ~14.4 ft/s | Lower | High speed needed, less pushing |
|
||||
| **L3** (6.12:1) | ~12.8 ft/s | Higher | More pushing power, climbing |
|
||||
- **L1 (8.14:1)** — ~14.4 ft/s, lower torque. Use when high speed needed, less pushing.
|
||||
- **L3 (6.12:1)** — ~12.8 ft/s, higher torque. Use when more pushing power, climbing.
|
||||
|
||||
**L1 = faster, less torque. L3 = slower, more torque.**
|
||||
|
||||
Swap based on game demands. Field-swappable.
|
||||
**L1 = faster, less torque. L3 = slower, more torque.** Swap based on game demands. Field-swappable.
|
||||
|
||||
## Mechanism Design Guidelines
|
||||
|
||||
@@ -138,12 +132,10 @@ Motor → Direct or light reduction → Roller
|
||||
|
||||
## Common FRC Motor/Gearbox Pairings
|
||||
|
||||
| Motor | Typical Gearbox | Output | Use |
|
||||
|-------|----------------|--------|-----|
|
||||
| NEO Vortex | Built-in 4:1 | 1696 RPM | Drivetrain, mechanisms |
|
||||
| NEO Vortex + planetary | External reduction | Variable | Elevators, arms |
|
||||
| Falcon 500 | Integrated | 1680 RPM | Drivetrain, high torque |
|
||||
| Kraken X60 | Integrated | ~1680 RPM | Newer alternative to Falcon |
|
||||
- **NEO Vortex** — Built-in 4:1, 1696 RPM output. Drivetrain, mechanisms.
|
||||
- **NEO Vortex + planetary** — External reduction, variable output. Elevators, arms.
|
||||
- **Falcon 500** — Integrated, 1680 RPM output. Drivetrain, high torque.
|
||||
- **Kraken X60** — Integrated, ~1680 RPM output. Newer alternative to Falcon.
|
||||
|
||||
## The Calculation
|
||||
|
||||
@@ -180,7 +172,7 @@ When designing a mechanism:
|
||||
|
||||
## Related
|
||||
|
||||
- [[swere-modules]] — MK4i gear options for drivetrain
|
||||
- [[swerve-modules]] — MK4i gear options for drivetrain
|
||||
- [[neo-vortex-motor]] — motor specs
|
||||
- [[spark-flex]] — controller configuration
|
||||
- [[motor-basics]] — understanding motor curves
|
||||
|
||||
@@ -29,12 +29,8 @@ MegaTag is a **Limelight-specific** robot localization system that uses AprilTag
|
||||
|
||||
## MegaTag vs. MegaTag2
|
||||
|
||||
| Feature | MegaTag 1 | MegaTag 2 |
|
||||
|---------|-----------|-----------|
|
||||
| Data source | AprilTag vision only | AprilTag + IMU fusion |
|
||||
| Accuracy | Good when tags visible | Better — gyro corrects drift |
|
||||
| Drift | Accumulates over time | Reduced by gyro correction |
|
||||
| Tag visibility required | Yes | Yes (but less sensitive) |
|
||||
- **MegaTag 1** — AprilTag vision only. Good when tags visible, accumulates drift over time.
|
||||
- **MegaTag 2** — AprilTag + IMU fusion. Gyro corrects drift, less sensitive to partial tag visibility.
|
||||
|
||||
**MegaTag 2** fuses robot orientation data from the IMU with vision pose. This means even if vision is slightly noisy or a tag is partially visible, the gyro steadies the reading.
|
||||
|
||||
@@ -91,13 +87,11 @@ This is critical for:
|
||||
|
||||
## Common Issues and Troubleshooting
|
||||
|
||||
| Problem | Likely Cause | Fix |
|
||||
|---------|--------------|-----|
|
||||
| Pose always offset in same direction | Camera calibration wrong | Check camera tilt, height, direction |
|
||||
| Pose jumps when tag visible | Vision trusting single reading | Add filtering, check timing |
|
||||
| No pose when tags visible | Camera not processing tags | Check PhotonVision pipeline |
|
||||
| Odometry drifts despite vision | Vision not being added to estimator | Check `addVisionMeasurement` call |
|
||||
| Gyro disagrees with vision | Gyro calibration issue | Re-calibrate gyro, check wiring |
|
||||
- **Pose always offset in same direction** → Camera calibration wrong. Check camera tilt, height, direction.
|
||||
- **Pose jumps when tag visible** → Vision trusting single reading. Add filtering, check timing.
|
||||
- **No pose when tags visible** → Camera not processing tags. Check PhotonVision pipeline.
|
||||
- **Odometry drifts despite vision** → Vision not being added to estimator. Check `addVisionMeasurement` call.
|
||||
- **Gyro disagrees with vision** → Gyro calibration issue. Re-calibrate gyro, check wiring.
|
||||
|
||||
## Connection to Training
|
||||
|
||||
@@ -112,7 +106,7 @@ The MegaTag concept (vision + gyro fusion) is the same regardless of whether you
|
||||
## Related
|
||||
|
||||
- [[photonvision]] — Team 2890's vision system
|
||||
- [[swere-modules]] — MK4i with encoders for odometry
|
||||
- [[swerve-modules]] — MK4i with encoders for odometry
|
||||
- [[systemcore]] — upcoming controller with improved processing
|
||||
|
||||
---
|
||||
|
||||
@@ -306,15 +306,13 @@ See [[photonvision]] for the full AprilTag pipeline.
|
||||
|
||||
## Common Problems
|
||||
|
||||
| Problem | Likely Cause | Fix |
|
||||
|----------|-------------|-----|
|
||||
| Wheel spins backward | `inverted.drive` is wrong | Flip the boolean |
|
||||
| Wheel steers wrong direction | `inverted.angle` is wrong | Flip the boolean |
|
||||
| Robot drifts while driving straight | Encoder offset wrong, or angle PID not tuned | Re-verify offsets, then tune angle PID |
|
||||
| Robot won't go straight on its own | No heading correction enabled | Use `swerveDrive.setHeadingCorrection(true)` |
|
||||
| "Invalid year" vendordep error | YAGSL JSON has wrong FRC year | Update vendordep URL to current year |
|
||||
| Modules don't align on startup | Offset not set or wrong CAN ID | Verify offsets and CAN IDs |
|
||||
| Odometry doesn't match field | Module physical positions in JSON are wrong | Re-measure and update `location` fields |
|
||||
- **Wheel spins backward** → `inverted.drive` is wrong. Flip the boolean.
|
||||
- **Wheel steers wrong direction** → `inverted.angle` is wrong. Flip the boolean.
|
||||
- **Robot drifts while driving straight** → Encoder offset wrong, or angle PID not tuned. Re-verify offsets, then tune angle PID.
|
||||
- **Robot won't go straight on its own** → No heading correction enabled. Use `swerveDrive.setHeadingCorrection(true)`.
|
||||
- **"Invalid year" vendordep error** → YAGSL JSON has wrong FRC year. Update vendordep URL to current year.
|
||||
- **Modules don't align on startup** → Offset not set or wrong CAN ID. Verify offsets and CAN IDs.
|
||||
- **Odometry doesn't match field** → Module physical positions in JSON are wrong. Re-measure and update `location` fields.
|
||||
|
||||
## 2026 Migration Notes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user