Skip to content

prepAnywhere - #71

Open
jaymendo670-png wants to merge 2 commits into
mainfrom
PrepAnywhere
Open

prepAnywhere#71
jaymendo670-png wants to merge 2 commits into
mainfrom
PrepAnywhere

Conversation

@jaymendo670-png

Copy link
Copy Markdown
Contributor

No description provided.

@jaymendo670-png
jaymendo670-png requested a review from a team as a code owner June 14, 2026 04:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR appears to add a “Prep Anywhere” capability by computing robot-to-hub distance and using interpolated lookup tables to set hood angle and flywheel RPM dynamically, plus a small command helper to apply those targets.

Changes:

  • Added interpolated distance→hood-angle and distance→flywheel-speed maps, with helper accessors.
  • Added hub pose + robot-to-hub distance tracking to support distance-based prep/aiming.
  • Introduced SubCommands.aim(...) and updated PrepAnywhere to use it and toggle drivetrain “manual drive” behavior.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main/java/frc/robot/subsystems/Rotors.java Adds distance→flywheel speed mapping helper.
src/main/java/frc/robot/subsystems/RobotPoses.java Tracks hub pose and computes distanceToHub each periodic cycle.
src/main/java/frc/robot/subsystems/Motion.java Adds distance→hood angle mapping helper.
src/main/java/frc/robot/subsystems/Drivetrain.java Adds setManualDrive(...) API (currently stubbed).
src/main/java/frc/robot/constants/ConstRotors.java Adds interpolating map for flywheel speed vs. distance.
src/main/java/frc/robot/constants/ConstMotion.java Adds interpolating map for hood angle vs. distance.
src/main/java/frc/robot/constants/ConstField.java Adds hub pose constant and alliance-aware pose set.
src/main/java/frc/robot/commands/SubCommands.java Adds shared aim(...) helper that sets hood, flywheel, and drivetrain target rotation.
src/main/java/frc/robot/commands/states/preps/PrepAnywhere.java Enables vision, sets PREP_ANYWHERE state, and calls SubCommands.aim(true) while active.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +240 to +243
public void setManualDrive(boolean b) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'setManualDrive'");
}
Comment on lines 7 to +11
import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.RobotContainer;
import frc.robot.commands.SubCommands;
import frc.robot.constants.ConstRotors;
import frc.robot.subsystems.StateMachine.RobotState;
Comment on lines +13 to 16
import edu.wpi.first.math.interpolation.InterpolatingDoubleTreeMap;
import edu.wpi.first.math.interpolation.InterpolatingTreeMap;
import edu.wpi.first.units.Units;
import edu.wpi.first.units.measure.AngularVelocity;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants