New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorganize subsystems/commands to be more readable & consistent #2
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TaxiThenShoot (and by extension RampThenShoot) no longer depend on supplying a controller. ClimbEasyHighBar and ClimbTimed timings have been tuned a bit. Timeouts were also added for AlignWithHubSmart because it wasn't reaching its goal, preventing drivers from driving the robot.
Also added in some delays to ClimbTimed. The default angle in ShooterSubsystem was changed to 12 from 5 as well.
Increased feedforward constant for turning with Smart Motion because of increase friction due to the carpet. Increased the current limit for the intake arm to 15 amps, and Increased its max power to full power. Undo port forwarding because it might be causing robot code to cut out? Added reversal for intake and indexer. Intake now runs for all of TaxiThenShoot autonomous. Also fixed RampThenShoot, as it was throwing a NullPointerException in the past. Intake lift motors were changed to coast mode from brake mode to avoid shredding the gears (they're aluminum).
Added arbitrary feedforward power for turning using Smart Motion. Secondary camera feed is now functional, but for some reason the limelight feed doesn't work on the driver station. Adjusted ClimbTimed timings again. Started implementing speed switching in DefaultDrive but didn't finish. IntakeLift is meant to be used when the intake lift motors are in brake mode to reduce wear on the gears. Shooter ramp time in RampThenShoot was increased to a maximum of 1 second.
Also move calculations to utilities/ShooterMath.java, although that might not be necessary.
I don't know why this was necessary but here we are.
src/main/java/frc/robot/commands/intake/LowerAndSpinIntake.java
Outdated
Show resolved
Hide resolved
src/main/java/frc/robot/commands/utilities/TurnOffLimelightLEDs.java
Outdated
Show resolved
Hide resolved
This also required a few changes elsewhere due to removed/renamed methods.
This included the renaming of some methods & changes elsewhere to reflect these new names. An enum switch is now used for RunUpperIndexer, just as with RunIntakeRoller.
Also fixed a few NullPointerExceptions and the like elsewhere.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For commands, I tried to rename them to better reflect what they do. I've also started trying to migrate away from
InstantCommand
s since they're meant to be used in only one place, and we were repeating them. Commands were also moved to the respective folders based on the subsystems they act on, or the utilities folder if they don't act on a subsystem.In the way of subsystems:
ShooterSubsystem
, and moved calculations toutilities/ShooterMath.java
(although this file only has one method).DriveSubsystem
more, as well as added odometry back in for use with RAMSETE control.I haven't really touched the other subsystems yet, but I might in future commits.
We should also definitely test these changes before merging them into
main
.