Skip to content
This repository was archived by the owner on Nov 4, 2025. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
855597e
Initial choreo projects (Field too small)
ChrisAReed Feb 1, 2025
64d9f98
Starting to put in auto factory/chooser
ChrisAReed Feb 4, 2025
1d1d0bf
Merge branch 'main' into feat-choreo
samfreund Feb 4, 2025
14ffd4a
Merge main into feat-choreo
github-actions[bot] Feb 4, 2025
6c58d29
Merge main into feat-choreo
github-actions[bot] Feb 4, 2025
2e292a6
Merge main into feat-choreo
github-actions[bot] Feb 4, 2025
a06876c
Merge main into feat-choreo
github-actions[bot] Feb 4, 2025
89e11fb
Merge main into feat-choreo
github-actions[bot] Feb 6, 2025
3c871cb
Merge main into feat-choreo
github-actions[bot] Feb 6, 2025
df0442a
Merge main into feat-choreo
github-actions[bot] Feb 6, 2025
6bd52b1
Merge main into feat-choreo
github-actions[bot] Feb 7, 2025
16e502d
Merge main into feat-choreo
github-actions[bot] Feb 7, 2025
46da5f1
Merge main into feat-choreo
github-actions[bot] Feb 7, 2025
75a38ba
Merge main into feat-choreo
github-actions[bot] Feb 7, 2025
6d447d9
Merge main into feat-choreo
github-actions[bot] Feb 7, 2025
a77d81e
Merge main into feat-choreo
github-actions[bot] Feb 8, 2025
7a353d4
choreo stuff
ChrisAReed Feb 8, 2025
d7c54bc
chore: Temporary commit
HENRYMARTIN5 Feb 11, 2025
13231cd
refactor: Clean up code formatting and remove unused files, fix chore…
HENRYMARTIN5 Feb 11, 2025
676e86b
fix: Update PID controller parameters and adjust coordinates in autos…
HENRYMARTIN5 Feb 11, 2025
e7c2516
Merge branch 'main' into feat-choreo
samfreund Feb 11, 2025
e0da482
Merge main into feat-choreo
github-actions[bot] Feb 11, 2025
db7f934
Merge main into feat-choreo
github-actions[bot] Feb 12, 2025
8ee3fe4
Merge main into feat-choreo
github-actions[bot] Feb 12, 2025
e7a49ca
Merge branch 'main' into feat-choreo
samfreund Feb 13, 2025
7b695ad
Merge main into feat-choreo
github-actions[bot] Feb 13, 2025
0c9cf20
Merge main into feat-choreo
github-actions[bot] Feb 13, 2025
78d0951
Merge main into feat-choreo
github-actions[bot] Feb 15, 2025
8adb181
Creating autonomous routines and a Choreo Position Library to use acr…
HENRYMARTIN5 Feb 15, 2025
7d65924
Adding individual routines to test accuracy (Simulator not getting to…
HENRYMARTIN5 Feb 15, 2025
29405d9
Routine using multiple trajectories - Chris Reed
HENRYMARTIN5 Feb 15, 2025
694a880
In progress
HENRYMARTIN5 Feb 15, 2025
1077e9a
more debug
tk2217 Feb 18, 2025
72a1736
Merge main into feat-choreo
github-actions[bot] Feb 19, 2025
eaabd60
Merge main into feat-choreo
github-actions[bot] Feb 22, 2025
f97c605
we use vortexes
tk2217 Mar 1, 2025
1e465c1
Merge main into feat-choreo
github-actions[bot] Mar 2, 2025
d72458e
Merge main into feat-choreo
github-actions[bot] Mar 3, 2025
d2d4a77
feat: change control to joysticks and add throttle support (#65)
samfreund Mar 3, 2025
5f80e8c
fix
tk2217 Mar 10, 2025
bdca538
.
tk2217 Mar 10, 2025
379cfb4
more
tk2217 Mar 10, 2025
0cd81ff
more
tk2217 Mar 15, 2025
0c161ff
Merge remote-tracking branch 'origin/main' into auto-alignment
tk2217 Mar 15, 2025
5a15024
i think this is right
tk2217 Mar 15, 2025
88f7f87
more
tk2217 Mar 15, 2025
8200239
i hate this code
tk2217 Mar 17, 2025
76334dd
Merge remote-tracking branch 'origin/main' into auto-alignment
tk2217 Mar 17, 2025
7f68807
more
tk2217 Mar 17, 2025
3e65ed9
chore: Spotless
HENRYMARTIN5 Mar 18, 2025
a032aed
Oh boy! An update!
MKECyberCheese Mar 18, 2025
f95af4a
Oh boy! An update!
MKECyberCheese Mar 18, 2025
a1e0878
Oh boy! An update!
MKECyberCheese Mar 18, 2025
1d42d93
Oh boy! An update!
MKECyberCheese Mar 18, 2025
d6822a9
Oh boy! An update!
MKECyberCheese Mar 18, 2025
00a32a8
simple at offsets work
tk2217 Mar 18, 2025
522451a
Merge remote-tracking branch 'refs/remotes/origin/auto-alignment' int…
tk2217 Mar 18, 2025
ee7ae05
chore: Owen didn't run spotlessApply
HENRYMARTIN5 Mar 18, 2025
ce126bc
feat: Drive input mixing, station align, only run when held, add LS c…
HENRYMARTIN5 Mar 19, 2025
0203140
require drivetrain
samfreund Mar 19, 2025
0bf5188
changing name for clarity
samfreund Mar 19, 2025
e3f606b
the way the gamepad works, shit should be inverted
samfreund Mar 20, 2025
83d5f6e
Oh boy! An update!
MKECyberCheese Mar 20, 2025
e6d07a1
Oh boy! An update!
MKECyberCheese Mar 20, 2025
6b0ffc2
Oh boy! An update!
MKECyberCheese Mar 24, 2025
5c4953a
Oh boy! An update!
MKECyberCheese Mar 27, 2025
64b756e
Oh boy! An update!
MKECyberCheese Mar 27, 2025
ed0a21e
Oh boy! An update!
MKECyberCheese Apr 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions simgui.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"/SmartDashboard/IMU": "Alerts",
"/SmartDashboard/JSON": "Alerts",
"/SmartDashboard/Motors": "Alerts",
"/SmartDashboard/PathPlanner": "Alerts",
"/SmartDashboard/Scheduler": "Scheduler",
"/SmartDashboard/Swerve Drive": "Alerts"
"/SmartDashboard/Swerve Drive": "Alerts",
"/SmartDashboard/VisionSystemSim-Vision/Sim Field": "Field2d"
},
"windows": {
"/SmartDashboard/Field": {
Expand Down Expand Up @@ -51,7 +51,6 @@
"width": 0.30000001192092896
},
"bottom": 1638,
"builtin": "2025 Reefscape",
"height": 8.051901817321777,
"left": 534,
"right": 3466,
Expand All @@ -71,8 +70,8 @@
"open": true
}
},
"Auto Controllers": {
"X": {
"Controllers": {
"Xbox": {
"open": true
},
"open": true
Expand All @@ -87,8 +86,7 @@
"swerve": {
"modules": {
"open": true
},
"open": true
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static final class IOConstants {

// When test mode is enabled, the operator controller is used for driving and testing
// This should always be false on the main branch
public static final boolean kTestMode = false;
public static final boolean kTestMode = Robot.isSimulation();
}

public static final class Vision {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public void robotInit() {
DriverStation.silenceJoystickConnectionWarning(true);
SimulatedArena.getInstance().resetFieldForAuto();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I kinda like having it in the periodic since that's a much more obvious reminder. I will grant that it gets annoying, however. Let's leave it here, and then throw a warning if we have the joysticks connected and we're in test mode.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That might be worth doing in #88

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.

Maybe make it only fire in console every 30s or smth? Should make it visible but still allow other debug output to be seen and scrolled through. I'll also have all of this send alerts to the dashboard too.

if (Constants.IOConstants.kTestMode) {
System.out.println("Test Mode Enabled\nNot for competition use");
}
}

public static Robot getInstance() {
Expand All @@ -80,14 +84,10 @@ public void robotPeriodic() {
SmartDashboard.putData(CommandScheduler.getInstance());

if (Constants.IOConstants.kTestMode) {
System.out.println("Test Mode Enabled\nNot for competition use");
// System.out.println("Test Mode Enabled\nNot for competition use");
}
}

/** This function is called once each time the robot enters Disabled mode. */
@Override
public void disabledInit() {}

@Override
public void disabledPeriodic() {
if (m_autonomousCommand != null) {
Expand Down
46 changes: 43 additions & 3 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import choreo.auto.AutoChooser;
import choreo.auto.AutoFactory;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.Filesystem;
import edu.wpi.first.wpilibj.XboxController;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
Expand All @@ -16,17 +17,20 @@
import frc.robot.commands.GrabCoralCommand;
import frc.robot.commands.ReleaseCoralCommand;
import frc.robot.commands.drive.Drive;
import frc.robot.commands.drive.MoveToPose;
import frc.robot.subsystems.ChuteSubsystem;
import frc.robot.subsystems.ClimberSubsystem;
import frc.robot.subsystems.CoralHandlerSubsystem;
import frc.robot.subsystems.ElevatorSubsystem;
import frc.robot.subsystems.sim.CoralHandlerSubsystemSim;
import frc.robot.subsystems.sim.ElevatorSubsystemSim;
import frc.robot.subsystems.swervedrive.SwerveSubsystem;
import frc.robot.utils.AprilTags;
import frc.robot.utils.FilteredButton;
import frc.robot.utils.FilteredJoystick;
import java.io.File;
import java.util.Optional;
import java.util.Set;

/*
* This class is where the bulk of the robot should be declared. Since Command-based is a
Expand Down Expand Up @@ -75,13 +79,18 @@ public RobotContainer() {
m_autoChooser.addRoutine("Blue Reef K Routine", m_routines::blueCoralToReefK);
m_autoChooser.addRoutine("Blue Test Full Routine", m_routines::blueTestFull);
SmartDashboard.putData("Auto Chooser", m_autoChooser);
SmartDashboard.putData("Xbox Controller Debug", m_controller.getHID());

if (Robot.isSimulation()) {
Comment thread
samfreund marked this conversation as resolved.
DriverStation.silenceJoystickConnectionWarning(true);
}

if (IOConstants.kTestMode) {
m_drive.setDefaultCommand(
new Drive(
m_drive,
m_controller::getLeftY,
m_controller::getLeftX,
() -> -m_controller.getLeftY(),
() -> -m_controller.getLeftX(),
() -> -m_controller.getRightX(),
() -> m_controller.rightBumper().getAsBoolean(),
Optional.empty()));
Expand Down Expand Up @@ -121,10 +130,10 @@ private void configureButtonBindings() {

// Test mode allows everything to be run on a single controller
// Test mode should not be enabled in competition

if (IOConstants.kTestMode) {
m_controller.a().onTrue(Commands.runOnce(m_drive::zeroGyro));
} else {

// drop chute
m_buttons.getChuteSwitch().onTrue(Commands.runOnce(m_chute::drop));

Expand All @@ -140,5 +149,36 @@ private void configureButtonBindings() {
m_controller.rightBumper().onTrue(new ReleaseCoralCommand(m_coral));
m_controller.leftBumper().onTrue(new GrabCoralCommand(m_coral));
}

m_controller
.rightStick()
.whileTrue(
Commands.defer(
() ->
MoveToPose.tagRelative(
this.m_drive,
AprilTags.findReefTagForAlignment(this.m_drive.getPose()),
AprilTags.REEF_ALIGN_OFFSET)
.withDriveInputs(
m_controller::getLeftX,
m_controller::getLeftY,
() -> -m_controller.getRightX(),
0.5),
Set.of(this.m_drive)));
m_controller
.leftStick()
.whileTrue(
Commands.defer(
() ->
MoveToPose.tagRelative(
this.m_drive,
AprilTags.findStationTagForAlignment(this.m_drive.getPose()),
AprilTags.STATION_ALIGN_OFFSET)
.withDriveInputs(
m_controller::getLeftX,
m_controller::getLeftY,
() -> -m_controller.getRightX(),
0.5),
Set.of(this.m_drive)));
}
}
Loading