Commit 41f7883
Merge pull request #43 from Pioneer-Robotics/RedGoalAuto
Summary:
Large refactor and functionality merge across vision, turret, spindexer, autos, hardware abstraction, and supporting utilities. Includes AprilTag pipeline cleanup, major Spindexer overhaul, turret tracking updates, auto restructuring, and numerous fixes discovered during hardware testing.
Details:
Vision / AprilTag:
- Added AprilTagMeta; increased camera resolution; fixed camera setup.
- Moved AprilTag back to vision package; updated processing integration.
- Refactored AprilTagMeta interfaces and classes.
- Refactored AprilTag class to avoid conflicting distance/angle units.
- Added Apriltag metadata and conversion utilities.
- Fixed quaternionToEuler typo; simplified variable usage.
- Refactored GoalTag classes:
- Merged Processing and Metadata classes.
- Removed decode from naming.
- Removed obelisk tags from navigation (replaced by obelisk/motif).
- Cleaned names, types, formatting.
- Added simple helper methods and placeholder shooting offset.
- Added neutral-alliance motif tag identifiers.
- Enhanced GoalTagProcessor with detection and validation via AprilTagDetection.
- Refactored GoalTagProcessor logic, neutral-alliance support, method names.
- Removed companion object; replaced with standard static declarations.
- Converted GoalTagProcessor to singleton and fixed test usage.
- Cleaned camera and AprilTag methods after merge.
- Calculated relative X/Y distances to tags in field space (WIP).
- Updated camera calibration files; removed unused scripts.
Spindexer / Artifact Handling:
- Started implementing spindexer hardware.
- Simplified MotorPosition enum and added functionality.
- Refactored Artifact class to enum-based design.
- Refactored motif handling; removed nullable artifacts.
- Refactored Spindexer artifact detection and intake logic:
- Simplified moveToNextOpenIntake via takeIf.
- Renamed getArtifact → detectArtifact.
- Added currentSensor, scanArtifact, and improved modular logic.
- Removed indexer helper.
- Refactored Spindexer class for improved sensor integration and readability.
- Added RevColorSensor; consolidated logic; added utility methods.
- Unified movement state transitions using moveToNext and runMotorToState.
- Refactored SpindexerTest accordingly; simplified onLoop logic.
- Updated artifact storage to use internal copy for safety.
- Fixed switchMode behavior regression.
- Added Color Sensor Gain Calibration; separated motif logic from Spindexer.
- Additional refactors for readability, consistency, and consolidation under Constants.
- Implemented physical encoder support.
- Improved motor control with angle wrapping, corrected ticks/radian math, PID updates, and RUN_WITHOUT_ENCODER.
- Cleaner init pattern via apply.
- Many cleanup passes to Spindexer and artifact methods; added rescanAllArtifacts.
- Merged Spindexer into RedGoalAuto.
- Switched Spindexer back to motor-based design for testing.
Turret:
- Added turret hardware and auto-tracking.
- Refactored angle calculation:
- Defined wrapping.
- Renamed constants class.
- Reduced duplication using Kotlin mapping utilities.
- Moved auto-track to turret-scoped state machine for richer context.
- Small tracking fix after refactor.
- Flipped turret direction; added field-centric behavior.
Flywheel:
- Added launch-servo functionality; defined servo positions in Constants.
- Added flywheel velocity estimator based on distance.
- Added current draw property.
- Set PID coefficients.
Autos:
- Added basic red-side goal-side auto (needs hardware).
- Refactored RedGoalSideAuto using Points class; separated start/complete steps.
- Added AutoOptions for partial autos.
- Filled in Teleop methods; fixed issues.
- Merged Spindexer into RedGoalAuto.
- Added intake to auto.
- Added camera to AudienceSideAuto.
- Renamed goal-side auto.
- Streamlined GoalSideAuto; removed unused states; fixed Points initialization.
- Optimized initialization flow in AudienceSideAuto and GoalSideAuto.
- Improved Launcher and AudienceSideAuto encapsulation; dynamic alliance color in RedGoalSideAuto.
- Disabled various calibration/testing opmodes.
- Added more teleop/auto work before tournament.
- Various cleanup and formatting.
Hardware / Bot Infrastructure:
- Removed redundant name properties across components; replaced with simpleName getter.
- Refactored HardwareComponent with default update().
- Added Bot.updateAll(dt) and updated BaseOpMode accordingly.
- Cleaned MecanumBase, Flywheel, Intake, Turret initialization patterns.
- Updated constants consolidation across codebase.
- Added intake hardware and competition-bot framework.
- Small hardware fixes; updated robot constants; ongoing hardware bring-up.
Follower / Movement:
- Implemented heading interpolation (still buggy; FIXME).
- Cleaned state_shoot imports.
- Refactored Follower.kt for null-safety and clarity.
- Fixed follower to use calculateVelocityConstraint.
- Added new method for relative distance calculation; fixed method 2.
- Translation to field coordinates WIP.
General Maintenance:
- Added Points class.
- Added Phone placeholder class.
- Cleaned various utilities.
- Removed unused imports, redundant methods.
- Fixed build issues (override annotations, motor visibility, missing gain access).
- Style cleanup via ktlint.
- Updated .gitattributes to ignore FTC SDK generated files.
Co-authored-by: milopeters <[email protected]>
Co-authored-by: nwazus <[email protected]>
Co-authored-by: Braeden Gracy <[email protected]>
Co-authored-by: Braeden Gracy <[email protected]>
Co-authored-by: braedeng2008 <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>File tree
69 files changed
+2842
-1515
lines changed- FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples
- TeamCode/src/main
- kotlin/pioneer
- decode
- general
- hardware
- helpers
- localization/localizers
- opmodes
- auto
- calibration
- other
- teleop
- drivers
- pathing
- follower
- motionprofile
- paths
- vision
- res/xml
- camera_calibration
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
69 files changed
+2842
-1515
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | 71 | | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
200 | | - | |
201 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
| 11 | + | |
9 | 12 | | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
| |||
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| 40 | + | |
| 41 | + | |
33 | 42 | | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
37 | 46 | | |
| 47 | + | |
| 48 | + | |
38 | 49 | | |
39 | 50 | | |
| 51 | + | |
| 52 | + | |
40 | 53 | | |
41 | 54 | | |
42 | 55 | | |
43 | 56 | | |
44 | 57 | | |
45 | | - | |
46 | | - | |
| 58 | + | |
| 59 | + | |
47 | 60 | | |
48 | 61 | | |
49 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
50 | 69 | | |
51 | 70 | | |
52 | 71 | | |
| |||
68 | 87 | | |
69 | 88 | | |
70 | 89 | | |
71 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
72 | 103 | | |
73 | 104 | | |
74 | 105 | | |
| |||
0 commit comments