Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
37c9c6d
Seed development branch with 2024 and 2025 snapshots
dawilson9 Jan 11, 2026
cc5500e
Populate prototype_projects with a couple of unmodified examples
dawilson9 Jan 11, 2026
472a8dd
Merge pull request #2 from frc9577/1-complete-the-repos-readme
dawilson9 Jan 13, 2026
0ac28a5
Ported the experimental drivetrain.
Capyblapy Jan 13, 2026
85d58fb
Ported Experimental_Drivetrain_2025 to WPILIB 2026
Capyblapy Jan 13, 2026
3487f45
Updated VendorDeps & Fixed Changed thing for Experimental2026
Capyblapy Jan 13, 2026
d4c7c84
(2025-Reefscape) Gradle Updates
Capyblapy Jan 14, 2026
df28d0c
(Experimental_Drivetrain_2026) Added dashboard control for smooth dri…
Capyblapy Jan 14, 2026
4dc5682
(Experimental_Drivetrain_2026) Made drivetrain units consistant and c…
Capyblapy Jan 16, 2026
a7f32a7
Made Velocity and acceleration be MPS by default & removed unused PID…
Capyblapy Jan 17, 2026
64a6337
Updated VelocityClosedLoop to work with our mule drivetrain
Capyblapy Jan 17, 2026
89773ec
Changed the smoothdrive PID values to the example & it started working.
Capyblapy Jan 17, 2026
a8dd799
Updated talonfx factory to use the new api updates.
Capyblapy Jan 17, 2026
623b09f
Added motormagic for accleration control and tuned it.
Capyblapy Jan 17, 2026
b12d810
Working path following
Capyblapy Jan 17, 2026
c1dffdf
Added 2nd autoprogram, updated shuffleboard, and removed debug statem…
Capyblapy Jan 17, 2026
3500f46
Added a arcade drive command that uses the PID.
Capyblapy Jan 17, 2026
c865c30
Added a no pid arcade option, make a chooser list to select drivemode.
Capyblapy Jan 17, 2026
7394295
Added new paths & attempted to debug not zeroing on auto
Capyblapy Jan 21, 2026
e176301
Add prototype fuel transport example
Capyblapy Jan 21, 2026
006c927
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Jan 21, 2026
0e82e97
implement github ci (#8)
jee7s Jan 22, 2026
f684491
Added a chooser list for drive commands (untested)
Capyblapy Jan 23, 2026
7e22f0a
Tested and Debuged the new drivetrain chooser.
Capyblapy Jan 24, 2026
c792505
Fixed the improper reset of position in resetPose
Capyblapy Jan 24, 2026
cf804c6
Initial Fuel Intake
Capyblapy Jan 24, 2026
26bfd0d
Add initial Launcher Code
Capyblapy Jan 24, 2026
4bad4b7
fixup paths for non-windows machines
Capyblapy Jan 24, 2026
6b8163f
Added a arcade PID from dashboard
Capyblapy Jan 24, 2026
5c345ae
Combo auto, plus repeatability statistics.
Capyblapy Jan 24, 2026
7918d50
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Jan 24, 2026
ed34a25
Removed the spaces from all of the pathplanner paths
Capyblapy Jan 24, 2026
acb1d37
Made comments on the initDefaultCommand clearer
Capyblapy Jan 24, 2026
b26e2d1
Replaced shuffleboard with elastic.
Capyblapy Jan 24, 2026
f5fb8c5
Created PoseTrackerClass
Capyblapy Jan 24, 2026
0497437
Updated Elastic & Added robot pose to it
Capyblapy Jan 24, 2026
2b702d0
Create PID controlled launcher projects for Kraken and Neo
Capyblapy Jan 24, 2026
39c6e63
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Jan 24, 2026
50d8674
Tweak some controller parameters for launcher_neo
dawilson9 Jan 24, 2026
b18da36
Debug Limelight-based pose estimation
Capyblapy Jan 28, 2026
3b8a575
Swaped the sign on the intake for fuel
Capyblapy Jan 31, 2026
c7cfdbd
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Jan 31, 2026
cc9102d
Made the limelight zero the gyro orientation on auto & teleop init.
Capyblapy Jan 31, 2026
84f18d6
Update Limelight odometry code and add new auto commands
dawilson9 Feb 4, 2026
fdf13a0
Got forward drive from position working.
dawilson9 Feb 7, 2026
36b2dcd
Added dual Kraken support in launcher test project
Capyblapy Feb 7, 2026
73a14ad
Fix a few typos in comments
dawilson9 Feb 7, 2026
52a3fd1
Skeleton Robot Code
SheoTheNailmaster Feb 7, 2026
04c56ed
Added kraken launcher elastic layout.
SheoTheNailmaster Feb 7, 2026
b6b4e01
Updated Constants.java with info from robot specification
dawilson9 Feb 7, 2026
9283396
Defined class interface for intake subsystem
SheoTheNailmaster Feb 7, 2026
70e3c29
Defined class interface for indexerbulk subsystem
SheoTheNailmaster Feb 7, 2026
377a342
Implement code for L1 climb subsystem
dawilson9 Feb 7, 2026
800bafd
Added PneumaticsHub support and replaced deprecated Command.schedule(…
dawilson9 Feb 7, 2026
58a1085
Added a RotateToRotation2D, and started on path finding to the start …
Capyblapy Feb 7, 2026
6af84f7
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Feb 7, 2026
f796d6b
Updated differential drive command to square user inputs
dawilson9 Feb 10, 2026
9b8cf26
Got pathfind to auto working & a lineup tower test command.
Capyblapy Feb 10, 2026
0bc6378
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Feb 10, 2026
4bbeef3
Got backwards auto working, also added a aim to hub command.
Capyblapy Feb 11, 2026
2086576
Removed warnings and reworked alliance fetch
Capyblapy Feb 12, 2026
8784791
Transfered the experimental drive code to 2026 comp code.
Capyblapy Feb 14, 2026
d58bef5
Add skeleton for Launcher subsystem class interface.
dawilson9 Feb 14, 2026
4f68c99
Continue fleshing out launcher subsystem
dawilson9 Feb 14, 2026
55a7734
Completed LauncherSubsystem and hopefully fixed optional subsystem ha…
dawilson9 Feb 14, 2026
fe4f7c3
Fleshed out the indexer/bulk transport subsystem.
dawilson9 Feb 14, 2026
08061e4
Tested Auto commands after merge.
Capyblapy Feb 14, 2026
4e14e14
Fixed AimAtHub not accounting for team propperly.
Capyblapy Feb 14, 2026
11eb674
Make intake subsystem dependent upon PneumaticHub being detected.
dawilson9 Feb 14, 2026
31a2547
Made a HubUtils class for hub related calculations and added path vis…
Capyblapy Feb 14, 2026
d6f5956
Fleshed out intake subsystem.
dawilson9 Feb 17, 2026
868c44b
Fix optional handling for PneumaticHub and launcher subsystems
Capyblapy Feb 17, 2026
170daed
Some auto planning + Dead reckoning over bump testing
dawilson9 Feb 18, 2026
2e4e866
Changed max speed back to 3.0
dawilson9 Feb 21, 2026
a86c87c
Remove debug print
dawilson9 Feb 21, 2026
2d21372
Implement and bind all trivial commands based on 2026 Robot User Manual
dawilson9 Feb 21, 2026
1e4bdb4
Remove an import for an unused class.
dawilson9 Feb 21, 2026
e39af57
Add test command to start flywheel at a fixed rate.
dawilson9 Feb 21, 2026
183abdf
Made documentation for deadreckon clearer.
dawilson9 Feb 21, 2026
d56ded3
Added a no drive command, and setup the launcher for a test
Capyblapy Feb 21, 2026
69782c1
Added Start/StopLiftCommand classes
dawilson9 Feb 21, 2026
f8af7fd
Made auto configure check if the drivesubystem existed.
Capyblapy Feb 21, 2026
bd51ee5
Merge branch 'development' into 2026-autonomnous
Capyblapy Feb 21, 2026
2649829
Made red hubcenter accurate, and made a TODO
Capyblapy Feb 21, 2026
592caeb
Add command to keep flywheel at correct speed for launching
dawilson9 Feb 21, 2026
c013004
Corrected the cordinate system for red.
Capyblapy Feb 24, 2026
a671d72
Fixed the issue with it crashing on second auto run.
Capyblapy Feb 24, 2026
c0455c1
Orgnized commands into sub-forlders.
Capyblapy Feb 25, 2026
c6e6dab
Made an auto that scoops up the 8 "corral" balls and shoots them
Capyblapy Feb 25, 2026
15f4ac3
Added new Auto & Saved layout
Capyblapy Feb 28, 2026
2b4022e
Added a proof of concept smooth pathfind
Capyblapy Feb 28, 2026
afd42d6
Started rewrite.
Capyblapy Feb 28, 2026
8f01cca
Create BulkMoveCommand.java
SheoTheNailmaster Feb 28, 2026
c7105f1
Almost done fixing the issue where the auto freaks out when the degre…
Capyblapy Feb 28, 2026
9af27ec
Created paths for DepoSideAuto A and B
Capyblapy Mar 3, 2026
d5e7d7b
Created Skeleton Depo Side Auto A
Capyblapy Mar 3, 2026
fb1f1ff
Fixed an issue with the config used in the DepoSideAutoA
Capyblapy Mar 3, 2026
3008ea5
Added clarfication comments to DepoSideAutoA
Capyblapy Mar 3, 2026
3f05a7a
raahhh comments
Capyblapy Mar 3, 2026
9ed5714
Got backup into wall working, need to look into drive in a line.
Capyblapy Mar 3, 2026
da17a17
Tested bulk move code and added test mode interface
SheoTheNailmaster Mar 3, 2026
403fd13
Moved my path modification logic from AutoFromList into a util
Capyblapy Mar 3, 2026
c554fa8
Merge branch 'development' into Pathfinding-With-Group-Rewrite
Capyblapy Mar 4, 2026
d393bff
Added driveauto interupt on joystick input > 0.5
Capyblapy Mar 4, 2026
657e605
Added subsystem test mode controls
SheoTheNailmaster Mar 4, 2026
9e6d4d3
Merge branch 'development' of https://github.com/frc9577/recoil into …
SheoTheNailmaster Mar 4, 2026
96d11da
Wired up test mode for all subsystems in RobotContainer
dawilson9 Mar 4, 2026
5eec791
Worked on tuning RotateToRotation2D and Pathfinding logic in AutoFrom…
Capyblapy Mar 4, 2026
be8768e
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Mar 4, 2026
44470b8
Cleanup of recent in-dev files
Capyblapy Mar 4, 2026
fa1508f
Got deadreackoing over the bump working
Capyblapy Mar 7, 2026
96a8bac
Wired up launcher fuel sensor to SmartDashboard
dawilson9 Mar 7, 2026
ac4f222
Move all subsystem SmartDashboard widget creation to top of constructors
dawilson9 Mar 7, 2026
87b7b6a
Tweak error reporting in RobotContainer to enable simulator runs on mac.
dawilson9 Mar 7, 2026
7f9298b
Add test mode/pit test UI to Elastic layout
dawilson9 Mar 7, 2026
352ce66
Got the core auto code for going over the bump and back with paths wo…
Capyblapy Mar 7, 2026
1638364
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Mar 7, 2026
836e03b
Added subsystem presence indicators to Pit Test tab in Elastic
dawilson9 Mar 9, 2026
801dac4
Fix up DIOs after indexer sensor was removed
dawilson9 Mar 10, 2026
e089c58
Started working on some of the basic autos
Capyblapy Mar 10, 2026
99167dc
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Mar 10, 2026
1bedbe5
Converted AutoFromList to use path on the fly, and fixed an issue wit…
Capyblapy Mar 11, 2026
4acaf35
Made AutoFromList improvments.
Capyblapy Mar 14, 2026
bbb9994
Started on collect from depot and shoot auto
Capyblapy Mar 14, 2026
dc84c21
Add indexer motor and update test mode to include it
dawilson9 Mar 14, 2026
97b80f4
Motor bring up and debug.
SheoTheNailmaster Mar 14, 2026
1ab2fd3
Launcher graph added to elastic
SheoTheNailmaster Mar 14, 2026
6a7f589
Add test mode dashboard control of launcher PID tuning parameters
dawilson9 Mar 14, 2026
e959b92
Update LauncherUtils with characterization data
dawilson9 Mar 14, 2026
ea625a7
Converted to pidgeon and autos
Capyblapy Mar 14, 2026
6d4e179
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Mar 14, 2026
44ea01b
Made BackupAndClimb be in the correct location for climbup
Capyblapy Mar 14, 2026
de21d22
Changed lift speed to max
SheoTheNailmaster Mar 17, 2026
aa7d9f1
Added RangeLauncherCommand that spins the flywheel to correct rate fo…
dawilson9 Mar 17, 2026
f7140a2
Added indexer control to bulk move commands
SheoTheNailmaster Mar 17, 2026
e085a21
Uncommented bulk move subsystem motor present check
SheoTheNailmaster Mar 17, 2026
f649dba
Implement turn/range/shoot command
dawilson9 Mar 18, 2026
a6dd42a
Rearrange PID controls for launcher in test mode Elastic layout
DeliriousDean Mar 18, 2026
1c8af24
wooo!!! autos!!!!!
Capyblapy Mar 18, 2026
c39980d
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Mar 18, 2026
ab1dd28
Uncommented thing.
Capyblapy Mar 18, 2026
386627f
Compressor pneumatic debug
DeliriousDean Mar 20, 2026
6c12d7b
Debugged intake solonoid
DeliriousDean Mar 20, 2026
b33bdc6
Started a investigative rewrite of limelightSubsystem
Capyblapy Mar 20, 2026
7b555c9
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Mar 20, 2026
3b14419
Made mt1 vispose w/ ambiguty
Capyblapy Mar 20, 2026
5633477
Added Elastic indicator indicating within scoring distance of hub
dawilson9 Mar 21, 2026
d4ceb0d
Reverse intake motor direction after robot testing
DeliriousDean Mar 21, 2026
7b05afc
Speed up bulk move after robot testing
DeliriousDean Mar 21, 2026
76f8509
Tested new limelight pose & started on start pose
Capyblapy Mar 21, 2026
89c4a12
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Mar 21, 2026
0aa8c33
Fixed some isRed naming issues
Capyblapy Mar 21, 2026
a0e1c8d
Orgnized some locations of code
Capyblapy Mar 21, 2026
04b915f
Fixed some issues with refreshing start position
Capyblapy Mar 21, 2026
f15b0e9
Made the pidgeon only update if its outside of a degree of agrement
Capyblapy Mar 21, 2026
804e815
Ensure lift motor control in test mode matches other similar, fixed s…
DeliriousDean Mar 21, 2026
6f1fbb3
Merge branch 'development' of https://github.com/frc9577/recoil into …
DeliriousDean Mar 21, 2026
bf35c79
Added lift subsystem
Capyblapy Mar 24, 2026
cb22808
Update lift-related commands after Lift/Launcher subsystem split
dawilson9 Mar 24, 2026
bb2621e
Fixed the broken code!!
Capyblapy Mar 24, 2026
4529f0f
Fixed up test mode following split of Launcher and Lift subsystems
dawilson9 Mar 24, 2026
db3af5a
Updated BackupAndShoot to have launcher and lift
Capyblapy Mar 24, 2026
40da67d
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Mar 24, 2026
0af3243
BackupAndShoot is ready for testing
Capyblapy Mar 24, 2026
347b4ef
Increase indexer motor speed
Capyblapy Mar 25, 2026
d050073
Update dashboard layout
Capyblapy Mar 25, 2026
5f3d58b
Fix test mode for lift subsystem
Capyblapy Mar 25, 2026
62ac265
Made all subsystems with motors set speed to 0 on init
Capyblapy Mar 25, 2026
243b8d7
Made all motors be set to 0 on disabled init
Capyblapy Mar 25, 2026
80869b9
Theoretically got RotateToShoot working on hold Y
Capyblapy Mar 25, 2026
08ddd2e
Update elastic-layout.json
Capyblapy Mar 26, 2026
d3b1091
Remove redundant TODOs and unused imports
DeliriousDean Mar 26, 2026
fa8ec91
Updated operator x & b to use shoot command
Capyblapy Mar 26, 2026
e36ec39
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Mar 26, 2026
40ba4ce
More tidying
DeliriousDean Mar 26, 2026
b8318da
Fixed the double bindings
Capyblapy Mar 26, 2026
4de06fe
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Mar 26, 2026
4e7ac56
Committed PDF version of Robot User Manual
DeliriousDean Mar 27, 2026
5d749ca
Merge branch 'development' of https://github.com/frc9577/recoil into …
DeliriousDean Mar 27, 2026
d98b3d4
Changed turn a tad bit less sensitive
Capyblapy Mar 27, 2026
bde6c47
Merge branch 'development' of https://github.com/frc9577/recoil into …
Capyblapy Mar 27, 2026
c936f18
Finished testing and added a way to reverse bulk
Capyblapy Mar 27, 2026
e9cfc54
Merge branch 'main' into development
Capyblapy Mar 27, 2026
39a739f
User manual update
DeliriousDean Mar 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
.DS_Store
Binary file modified 2024-Crescendo/documentation/2024 Robot User Manual.pdf
Binary file not shown.
35 changes: 20 additions & 15 deletions 2024-Crescendo/src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/
public final class Constants {
public static class RobotConstants {
public static final double minPnuematicsPressure = 80.0;
public static final double maxPnuematicsPressure = 120.0;
public static final double minPnuematicsPressure = 80.0; // default 80.0
public static final double maxPnuematicsPressure = 120.0; // default 120.0

public static final int periodicTicksPerSecond = 50;
public static final int pnuematicReportingFreq = 1;
Expand All @@ -36,19 +36,16 @@ public static class DrivetrainConstants {
}

public static class DriverConstants {
public static final int kLeftDriveJoystick = 0;
public static final int kRightDriveJoystick = 1;
public static final int kDriveJoystick = 0;

public static final double kTurnDivider = 2.0;
public static final double kLowGearDivider = 2.0;

// Left Joystick
public static final int kLowGear = 1; // Joystick Trigger
public static final int kReverseMode = 9; // Joystick button 9
public static final int kReverseMode = 11; // Joystick button 11
public static final int kForwardMode = 7; // Joystick button 7

// Right Joystick
public static final int kDriveStraight = 1; // Joystick Trigger

}

public static class OperatorConstants {
Expand All @@ -69,8 +66,8 @@ public static class OperatorConstants {
public static final int kSpitOut = 10; // right joystick down

public static final double kGooseAngleIncrement = 1.0;
public static final double kGooseAngleMax = 130.0;
public static final double kGooseAngleMin = -10.0;
public static final double kGooseAngleMax = 120.0;
public static final double kGooseAngleMin = 0.0;
}

public static class ClimbConstants {
Expand Down Expand Up @@ -100,6 +97,7 @@ public static class NoteHandlingConstants {

public static class GooseRotationConstants {
public static final int kRotateMotorCANID = 40;
public static final int kSmartMotionSlot = 0;

// TODO: Need to tune
// SparkMax PID coefficients for the rotation controller.
Expand All @@ -112,21 +110,28 @@ public static class GooseRotationConstants {
public static final double kMinOutput = -1.0;
public static final double kMaxOutput = 1.0;

public static final double kMaxVelocity = 1500.0;
public static final double kMinVelocity = 0.0;
public static final double kMaxAcceleration = 500.0;
public static final double kMaxError = 0.1;

public static final boolean kUseSmartMotion = false;

// Starting in a non-end positon, there will be a switch at one or both of the end positions.
// When the switch(s) are hit the software will reset to the known position.
// Currently we are presuming there will be a thing to set the arm at the start of the game.
// TODO: The next 7 values are guesses and need to be measured.
public static final double kStartingAngle = 30.0;

public static final double kBottomRawEncoderValue = 0.680;
public static final double kBottomAngle = -10.0;
public static final double kBottomRawEncoderValue = 0.523;
public static final double kBottomAngle = 0.0;

public static final double kTopRawEncoderValue = 0.386;
public static final double kTopAngle = 115.0;
public static final double kTopRawEncoderValue = 0.205;
public static final double kTopAngle = 115.0;

public static final double kScoreAngle = 130.0;
public static final double kMiddleAngle = 40.0;
public static final double kIntakeAngle = -5.7;
public static final double kIntakeAngle = 0.0;

// This defines the gear ratio between the motor and output shafts. Divide
// the motor rotation count by this number to determine the output shaft
Expand Down
36 changes: 6 additions & 30 deletions 2024-Crescendo/src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import frc.robot.commands.ClimbCommand;
import frc.robot.commands.NoteHandlingSpeedCommand;
import frc.robot.commands.RotateCommand;
import frc.robot.commands.SetDriveStraightCommand;
import frc.robot.commands.SetGearCommand;
import frc.robot.commands.SetModeCommand;
import frc.robot.subsystems.DriveSubsystem;
Expand All @@ -38,7 +37,6 @@ public class RobotContainer {

// Create SmartDashboard chooser for autonomous routines
private final SendableChooser<Command> m_autoChooser = new SendableChooser<>();
private final SendableChooser<Boolean> m_driveTypeChooser = new SendableChooser<>();

// The robot's subsystems and commands are defined here...
private final PneumaticHub m_pnuematicHub = new PneumaticHub();
Expand All @@ -49,20 +47,16 @@ public class RobotContainer {

// Joysticks
private final XboxController m_operatorController = new XboxController(OperatorConstants.kOperatorController);
private final Joystick m_driverJoystickLeft = new Joystick(DriverConstants.kLeftDriveJoystick);
private final Joystick m_driverJoystickRight = new Joystick(DriverConstants.kRightDriveJoystick);
private final Joystick m_driverJoystick = new Joystick(DriverConstants.kDriveJoystick);

// Driver Buttons
public final JoystickButton m_lowGearButton =
new JoystickButton(m_driverJoystickLeft, DriverConstants.kLowGear);
new JoystickButton(m_driverJoystick, DriverConstants.kLowGear);

public final JoystickButton m_forwardModeButton =
new JoystickButton(m_driverJoystickLeft, DriverConstants.kForwardMode);
new JoystickButton(m_driverJoystick, DriverConstants.kForwardMode);
public final JoystickButton m_reverseModeButton =
new JoystickButton(m_driverJoystickLeft, DriverConstants.kReverseMode);

public final JoystickButton m_driveStraightButton =
new JoystickButton(m_driverJoystickRight, DriverConstants.kDriveStraight);
new JoystickButton(m_driverJoystick, DriverConstants.kReverseMode);

// Pnuematics Climb Buttons
private final JoystickButton m_climbUpButton =
Expand Down Expand Up @@ -112,12 +106,6 @@ public void reportStatus() {
SmartDashboard.putBoolean("Compressor Running", m_pnuematicHub.getCompressor());
}

if(m_tickCount % (RobotConstants.periodicTicksPerSecond/RobotConstants.imuReportingFreq) == 0)
{
// Report IMU state.
SmartDashboard.putNumber("Heading", m_driveSubsystem.getHeading());
}

if(m_tickCount % (RobotConstants.periodicTicksPerSecond/RobotConstants.gooseReportingFreq) == 0)
{
// Report Goose ARM state.
Expand All @@ -139,28 +127,18 @@ private void configureDriverStationControls()
m_autoChooser.addOption("Drive forward 4 Seconds", new AutonomousDrive4Sec(m_driveSubsystem));
m_autoChooser.addOption("Drive forward 6 Seconds", new AutonomousDrive6Sec(m_driveSubsystem));
SmartDashboard.putData(m_autoChooser);

// Drive control option selector
m_driveTypeChooser.setDefaultOption("Arcade Drive", true);
m_driveTypeChooser.addOption("Tank Drive", false);
SmartDashboard.putData(m_driveTypeChooser);
}

private void configureBindings()
{
// Drive Controllers. We set arcade drive as the default here but may change this
// during teleopInit depending upon the value of a dashboard chooser.
m_driveSubsystem.initDefaultCommand(m_driverJoystickLeft, m_driverJoystickRight, true);

m_lowGearButton.onTrue(new SetGearCommand(m_driveSubsystem, true));
m_lowGearButton.onFalse(new SetGearCommand(m_driveSubsystem, false));

m_forwardModeButton.onTrue(new SetModeCommand(m_driveSubsystem, false));
m_reverseModeButton.onTrue(new SetModeCommand(m_driveSubsystem, true));

m_driveStraightButton.onTrue(new SetDriveStraightCommand(m_driveSubsystem, true));
m_driveStraightButton.onFalse(new SetDriveStraightCommand(m_driveSubsystem, false));

// Climb Buttons
m_climbUpButton.onTrue(new ClimbCommand(m_climbSubsystem, ClimbSubsystem.State.LIFTED));
m_climbDownButton.onTrue(new ClimbCommand(m_climbSubsystem, ClimbSubsystem.State.GROUNDED));
Expand Down Expand Up @@ -206,11 +184,9 @@ public Command getAutonomousCommand() {
return m_autoChooser.getSelected();
}

// Set the driver's choice of control mode based on the selection provided
// in a dashboard control.
// Set drive command to arcade
public void setDriveType()
{
Boolean bArcade = m_driveTypeChooser.getSelected();
m_driveSubsystem.initDefaultCommand(m_driverJoystickLeft, m_driverJoystickRight, bArcade);
m_driveSubsystem.initDefaultCommand(m_driverJoystick);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,26 @@
package frc.robot.subsystems;

import frc.robot.Constants.*;
import frc.robot.commands.TankDriveCommand;
import frc.robot.commands.ArcadeDriveCommand;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj.SPI;

import com.ctre.phoenix6.controls.Follower;
import com.ctre.phoenix6.hardware.TalonFX;
import com.kauailabs.navx.frc.AHRS;
import com.ctre.phoenix6.signals.NeutralModeValue;

public class DriveSubsystem extends SubsystemBase
{
private final TalonFX m_leftFrontMotor = new TalonFX(DrivetrainConstants.kLeftFrontMotorCANID);
private final TalonFX m_leftBackMotor = new TalonFX(DrivetrainConstants.kLeftBackMotorCANID);
private final TalonFX m_rightFrontMotor = new TalonFX(DrivetrainConstants.kRightFrontMotorCANID);
private final TalonFX m_rightBackMotor = new TalonFX(DrivetrainConstants.kRightBackMotorCANID);
private final AHRS m_NavX = new AHRS(SPI.Port.kMXP);
private DifferentialDrive m_Drivetrain;
private double m_leftSpeed = 0.0;
private double m_rightSpeed = 0.0;
private double m_speedDivider = 1.0;
private double m_speedDivider = 2.5; // Default 1.0
private double m_modeMultiplier = 1.0;
private boolean m_driveStraight = false;

Expand All @@ -42,28 +39,24 @@ public DriveSubsystem()
m_rightFrontMotor.setInverted(true);
m_rightBackMotor.setInverted(true);

// Set all motors to brake mode for safety. In the default, coast mode,
// the robot takes very much longer to stop if the joystick is released or
// and emergency stop occurs. In this mode, it stops very quickly.
m_leftFrontMotor.setNeutralMode(NeutralModeValue.Brake);
m_leftBackMotor.setNeutralMode(NeutralModeValue.Brake);
m_rightFrontMotor.setNeutralMode(NeutralModeValue.Brake);
m_rightBackMotor.setNeutralMode(NeutralModeValue.Brake);

/* Set back motors to follow the front motors. */
m_leftBackMotor.setControl(new Follower(m_leftFrontMotor.getDeviceID(), false));
m_rightBackMotor.setControl(new Follower(m_rightFrontMotor.getDeviceID(), false));

m_Drivetrain = new DifferentialDrive(m_leftFrontMotor, m_rightFrontMotor);


// Set gyro 0 angle to point forward.
m_NavX.reset();
m_NavX.zeroYaw();
}

public void initDefaultCommand(Joystick leftJoystick, Joystick rightJoystick, Boolean bArcadeDrive)
public void initDefaultCommand(Joystick leftJoystick)
{
if (bArcadeDrive)
{
setDefaultCommand(new ArcadeDriveCommand(this, leftJoystick));
}
else
{
setDefaultCommand(new TankDriveCommand(this, leftJoystick, rightJoystick));
}
setDefaultCommand(new ArcadeDriveCommand(this, leftJoystick));
}

// Sets left and right motors to set speeds to support tank drive models.
Expand Down Expand Up @@ -118,11 +111,6 @@ public double getSpeed(boolean bLeft)
}
}

public double getHeading()
{
return (double)m_NavX.getYaw();
}

@Override
public void periodic() {
// This method will be called once per scheduler run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ public GooseRotationSubsystem()
m_pidController.setFF(m_kFF);
m_pidController.setOutputRange(m_kMinOutput, m_kMaxOutput);

if (GooseRotationConstants.kUseSmartMotion)
{
m_pidController.setSmartMotionMaxVelocity(GooseRotationConstants.kMaxVelocity, GooseRotationConstants.kSmartMotionSlot);
m_pidController.setSmartMotionMinOutputVelocity(GooseRotationConstants.kMinVelocity, GooseRotationConstants.kSmartMotionSlot);
m_pidController.setSmartMotionMaxAccel(GooseRotationConstants.kMaxAcceleration, GooseRotationConstants.kSmartMotionSlot);
m_pidController.setSmartMotionAllowedClosedLoopError(GooseRotationConstants.kMaxError, GooseRotationConstants.kSmartMotionSlot);
}

// display PID coefficients on SmartDashboard
SmartDashboard.putNumber("P Gain", m_kP);
SmartDashboard.putNumber("I Gain", m_kI);
Expand Down Expand Up @@ -104,7 +112,14 @@ public void setSetPointAngle(double angleDegrees)
double setpoint = getMotorPositionFromAngle(angleDegrees);
SmartDashboard.putNumber("Set Degress", m_angleSet);
SmartDashboard.putNumber("Set Reference", setpoint);
m_pidController.setReference(setpoint, CANSparkBase.ControlType.kPosition);
if(GooseRotationConstants.kUseSmartMotion)
{
m_pidController.setReference(setpoint, CANSparkBase.ControlType.kSmartMotion);
}
else
{
m_pidController.setReference(setpoint, CANSparkBase.ControlType.kPosition);
}
}

public double getSetPointAngle()
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
2 changes: 2 additions & 0 deletions 2025-Reefscape/.gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Tue Jan 13 18:35:10 CST 2026
gradle.version=8.11
Empty file.
Loading
Loading