Conversation
|
This isn't ready for merge yet, it needs the remainder of the shot maps for the hub and then I'll probably also use it for passing. I wanted to create it so we could track it and make sure to keep it up to date. |
Merge branch 'main' into 95-better-shot-lookahead
There was a problem hiding this comment.
Pull request overview
This PR updates the robot’s shot lookahead / passing-vs-hub behavior, plus several related mechanism and match-state improvements (dejam logic, timing, and field-location representations).
Changes:
- Add position/time-of-flight lookahead to map-based shot calculation, and switch yaw representation to
Rotation2d. - Introduce
ShotMode-dependent “ready to shoot” thresholds for turret/hood/shooter, and auto-switchShotModebased on alliance-zone position. - Rework hopper/transfer-roller dejam state transitions and add more robust match-time tracking.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| state_machine_graphs/transferroller.dot | Updates transfer roller state machine transitions (adds dejam transition + timeout). |
| state_machine_graphs/hopper.dot | Updates hopper dejam transition label to timeout-based behavior. |
| src/main/java/frc/robot/subsystems/turret/TurretSubsystem.java | Makes aim correctness depend on ShotMode threshold and logs manually. |
| src/main/java/frc/robot/subsystems/transferroller/TransferRollerSubsystem.java | Adds debounced dejam detection and changes dejam transitions (spin→dejam + timeout). |
| src/main/java/frc/robot/subsystems/shooter/ShooterSubsystem.java | Adds ShotMode-based velocity threshold + falling-edge debounced “at goal”. |
| src/main/java/frc/robot/subsystems/intake/IntakeState.java | Updates pivot “set current position” reference to minPivotAngle. |
| src/main/java/frc/robot/subsystems/indexer/IndexerSubsystem.java | Brakes instead of profiling when commanded near-zero velocity. |
| src/main/java/frc/robot/subsystems/hopper/HopperSubsystem.java | Adds debounce + cooldown timer and changes dejam exit to timeout-based. |
| src/main/java/frc/robot/subsystems/hopper/HopperState.java | Restarts dejam cooldown on spinning entry; adds WiggleState. |
| src/main/java/frc/robot/subsystems/hood/HoodSubsystem.java | Makes aim correctness depend on ShotMode threshold and logs manually. |
| src/main/java/frc/robot/coordination/MatchState.java | Adds “precise match time” timer and uses it to compute shifts/time-left. |
| src/main/java/frc/robot/constants/TurretConstants.java | Adds passing setpoint epsilon for turret. |
| src/main/java/frc/robot/constants/TransferRollerConstants.java | Adds dejamTime constant. |
| src/main/java/frc/robot/constants/StrategyConstants.java | Adds acceptable error threshold for precise match time. |
| src/main/java/frc/robot/constants/ShooterConstants.java | Adds passing velocity epsilon. |
| src/main/java/frc/robot/constants/RobotInfo.java | Adds derived robotToShooter2d transform for 2D shot math. |
| src/main/java/frc/robot/constants/IntakeConstants.java | Changes pivot neutral mode to coast. |
| src/main/java/frc/robot/constants/HopperConstants.java | Adds dejam debounce/time/cooldown constants. |
| src/main/java/frc/robot/constants/HoodConstants.java | Adds passing setpoint epsilon for hood. |
| src/main/java/frc/robot/constants/FieldLocations.java | Switches pass target locations to Translation2d. |
| src/main/java/frc/robot/constants/FieldLocationInstance.java | Switches stored pass targets to Translation2d. |
| src/main/java/frc/robot/constants/AllianceBasedFieldConstants.java | Adds caching, 2D hub center, and alliance-zone helper. |
| src/main/java/frc/robot/ShotCalculations.java | Refactors map-based shot calc to use pose lookahead + iterative virtual target; yaw is Rotation2d. |
| src/main/java/frc/robot/CoordinationLayer.java | Adds effective autonomy field, auto shot-mode switching by position, integrates ShotMode readiness checks, and updates shot calculator callsites. |
| src/main/deploy/constants/comp/TurretConstants.json | Adds turret passing epsilon in deploy constants. |
| src/main/deploy/constants/comp/TransferRollerConstants.json | Adds dejam time and adjusts dejam velocity in deploy constants. |
| src/main/deploy/constants/comp/StrategyConstants.json | Adds acceptable precise match time error in deploy constants. |
| src/main/deploy/constants/comp/ShotMaps.json | Adjusts numeric formatting and updates pass map datapoints. |
| src/main/deploy/constants/comp/ShooterConstants.json | Updates gains and adds passing epsilon in deploy constants. |
| src/main/deploy/constants/comp/RedFieldLocations.json | Updates pass target coordinates (2D). |
| src/main/deploy/constants/comp/ManualModeConstants.json | Swaps/updates manual pass/hub headings. |
| src/main/deploy/constants/comp/IntakeConstants.json | Updates intake roller speed and homing voltage. |
| src/main/deploy/constants/comp/IndexerConstants.json | Updates indexing velocity and gains. |
| src/main/deploy/constants/comp/HopperConstants.json | Updates dejam voltage/thresholds and adds dejam timing params. |
| src/main/deploy/constants/comp/HoodConstants.json | Adds hood passing epsilon in deploy constants. |
| src/main/deploy/constants/comp/FeatureFlags.json | Disables transfer roller via feature flag in comp config. |
| src/main/deploy/constants/comp/BlueFieldLocations.json | Updates pass target structure to 2D format. |
| elastic_layouts/competition.json | Adds a competition dashboard layout (match time/shift, shot mode, alerts, etc.). |
| .vscode/settings.json | Increases Java language server max heap to 16G. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 39 out of 39 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…debounce short circuit
godmar
left a comment
There was a problem hiding this comment.
Would you mind adding a few clarifications? See below.
|
|
|
Renamed to AllianceBasedValue. I was thinking it could be named better too, I just hadn't decided on a name yet. |
|
no time to waste |
No description provided.