mirror of
https://github.com/Team4388/RiseOfRidgebotics2020.git
synced 2026-06-09 00:38:00 -06:00
Merge pull request #60 from Team4388/highlanders-day
Highlanders Day Merge
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
# Details
|
||||
|
||||
Date : 2020-03-13 19:46:18
|
||||
|
||||
Directory c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main
|
||||
|
||||
Total : 83 files, 4888 codes, 1770 comments, 1110 blanks, all 7768 lines
|
||||
|
||||
[summary](results.md)
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [src/main/deploy/paths/DriveOffLineBackward.wpilib.json](/src/main/deploy/paths/DriveOffLineBackward.wpilib.json) | JSON | 1 | 0 | 0 | 1 |
|
||||
| [src/main/deploy/paths/DriveOffLineForward.wpilib.json](/src/main/deploy/paths/DriveOffLineForward.wpilib.json) | JSON | 1 | 0 | 0 | 1 |
|
||||
| [src/main/deploy/paths/EightBallMid0.wpilib.json](/src/main/deploy/paths/EightBallMid0.wpilib.json) | JSON | 1 | 0 | 0 | 1 |
|
||||
| [src/main/deploy/paths/EightBallMid1.wpilib.json](/src/main/deploy/paths/EightBallMid1.wpilib.json) | JSON | 1 | 0 | 0 | 1 |
|
||||
| [src/main/deploy/paths/EightBallMid2.wpilib.json](/src/main/deploy/paths/EightBallMid2.wpilib.json) | JSON | 1 | 0 | 0 | 1 |
|
||||
| [src/main/deploy/paths/EightBallMidComplete.wpilib.json](/src/main/deploy/paths/EightBallMidComplete.wpilib.json) | JSON | 1 | 0 | 0 | 1 |
|
||||
| [src/main/deploy/paths/FiveBallMidComplete.wpilib.json](/src/main/deploy/paths/FiveBallMidComplete.wpilib.json) | JSON | 1 | 0 | 0 | 1 |
|
||||
| [src/main/deploy/paths/SixBallMid0.wpilib.json](/src/main/deploy/paths/SixBallMid0.wpilib.json) | JSON | 1 | 0 | 0 | 1 |
|
||||
| [src/main/deploy/paths/SixBallMid1.wpilib.json](/src/main/deploy/paths/SixBallMid1.wpilib.json) | JSON | 1 | 0 | 0 | 1 |
|
||||
| [src/main/deploy/paths/SixBallMidComplete.wpilib.json](/src/main/deploy/paths/SixBallMidComplete.wpilib.json) | JSON | 1 | 0 | 0 | 1 |
|
||||
| [src/main/deploy/paths/TenBallMidComplete.wpilib.json](/src/main/deploy/paths/TenBallMidComplete.wpilib.json) | JSON | 1 | 0 | 0 | 1 |
|
||||
| [src/main/driverStation/GOAT DRIVERSTATION.json](/src/main/driverStation/GOAT DRIVERSTATION.json) | JSON | 1,014 | 0 | 0 | 1,014 |
|
||||
| [src/main/driverStation/themes/Ridgbotics/ridgeboticstheme.css](/src/main/driverStation/themes/Ridgbotics/ridgeboticstheme.css) | CSS | 8 | 0 | 1 | 9 |
|
||||
| [src/main/java/frc4388/robot/Constants.java](/src/main/java/frc4388/robot/Constants.java) | Java | 157 | 32 | 41 | 230 |
|
||||
| [src/main/java/frc4388/robot/Main.java](/src/main/java/frc4388/robot/Main.java) | Java | 9 | 16 | 5 | 30 |
|
||||
| [src/main/java/frc4388/robot/Robot.java](/src/main/java/frc4388/robot/Robot.java) | Java | 59 | 63 | 24 | 146 |
|
||||
| [src/main/java/frc4388/robot/RobotContainer.java](/src/main/java/frc4388/robot/RobotContainer.java) | Java | 312 | 145 | 96 | 553 |
|
||||
| [src/main/java/frc4388/robot/commands/InterruptSubystem.java](/src/main/java/frc4388/robot/commands/InterruptSubystem.java) | Java | 21 | 14 | 8 | 43 |
|
||||
| [src/main/java/frc4388/robot/commands/auto/AutoPath1FromCenter.java](/src/main/java/frc4388/robot/commands/auto/AutoPath1FromCenter.java) | Java | 22 | 19 | 6 | 47 |
|
||||
| [src/main/java/frc4388/robot/commands/auto/AutoPath2FromRight.java](/src/main/java/frc4388/robot/commands/auto/AutoPath2FromRight.java) | Java | 26 | 23 | 6 | 55 |
|
||||
| [src/main/java/frc4388/robot/commands/auto/DriveOffLineBackward.java](/src/main/java/frc4388/robot/commands/auto/DriveOffLineBackward.java) | Java | 13 | 14 | 5 | 32 |
|
||||
| [src/main/java/frc4388/robot/commands/auto/DriveOffLineForward.java](/src/main/java/frc4388/robot/commands/auto/DriveOffLineForward.java) | Java | 11 | 14 | 5 | 30 |
|
||||
| [src/main/java/frc4388/robot/commands/auto/EightBallAutoMiddle.java](/src/main/java/frc4388/robot/commands/auto/EightBallAutoMiddle.java) | Java | 11 | 14 | 5 | 30 |
|
||||
| [src/main/java/frc4388/robot/commands/auto/FiveBallAutoMiddle.java](/src/main/java/frc4388/robot/commands/auto/FiveBallAutoMiddle.java) | Java | 12 | 13 | 4 | 29 |
|
||||
| [src/main/java/frc4388/robot/commands/auto/SixBallAutoMiddle.java](/src/main/java/frc4388/robot/commands/auto/SixBallAutoMiddle.java) | Java | 16 | 14 | 6 | 36 |
|
||||
| [src/main/java/frc4388/robot/commands/auto/TankDriveVelocity.java](/src/main/java/frc4388/robot/commands/auto/TankDriveVelocity.java) | Java | 42 | 14 | 12 | 68 |
|
||||
| [src/main/java/frc4388/robot/commands/auto/TenBallAutoMiddle.java](/src/main/java/frc4388/robot/commands/auto/TenBallAutoMiddle.java) | Java | 40 | 16 | 4 | 60 |
|
||||
| [src/main/java/frc4388/robot/commands/auto/Wait.java](/src/main/java/frc4388/robot/commands/auto/Wait.java) | Java | 40 | 16 | 16 | 72 |
|
||||
| [src/main/java/frc4388/robot/commands/climber/DisengageRachet.java](/src/main/java/frc4388/robot/commands/climber/DisengageRachet.java) | Java | 26 | 14 | 9 | 49 |
|
||||
| [src/main/java/frc4388/robot/commands/climber/RunClimberWithTriggers.java](/src/main/java/frc4388/robot/commands/climber/RunClimberWithTriggers.java) | Java | 42 | 15 | 9 | 66 |
|
||||
| [src/main/java/frc4388/robot/commands/climber/RunLevelerWithJoystick.java](/src/main/java/frc4388/robot/commands/climber/RunLevelerWithJoystick.java) | Java | 28 | 17 | 9 | 54 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/DrivePositionMPAux.java](/src/main/java/frc4388/robot/commands/drive/DrivePositionMPAux.java) | Java | 60 | 25 | 9 | 94 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/DriveStraightAtVelocityPID.java](/src/main/java/frc4388/robot/commands/drive/DriveStraightAtVelocityPID.java) | Java | 29 | 17 | 7 | 53 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionMM.java](/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionMM.java) | Java | 56 | 22 | 9 | 87 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionPID.java](/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionPID.java) | Java | 49 | 22 | 9 | 80 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/DriveWithJoystick.java](/src/main/java/frc4388/robot/commands/drive/DriveWithJoystick.java) | Java | 54 | 43 | 14 | 111 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/DriveWithJoystickAuxPID.java](/src/main/java/frc4388/robot/commands/drive/DriveWithJoystickAuxPID.java) | Java | 48 | 17 | 13 | 78 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/DriveWithJoystickDriveStraight.java](/src/main/java/frc4388/robot/commands/drive/DriveWithJoystickDriveStraight.java) | Java | 93 | 31 | 19 | 143 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/DriveWithJoystickUsingDeadAssistPID.java](/src/main/java/frc4388/robot/commands/drive/DriveWithJoystickUsingDeadAssistPID.java) | Java | 132 | 41 | 22 | 195 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/GotoCoordinatesFieldRelative.java](/src/main/java/frc4388/robot/commands/drive/GotoCoordinatesFieldRelative.java) | Java | 10 | 14 | 5 | 29 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/GotoCoordinatesRobotRelative.java](/src/main/java/frc4388/robot/commands/drive/GotoCoordinatesRobotRelative.java) | Java | 54 | 14 | 20 | 88 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/PlaySongDrive.java](/src/main/java/frc4388/robot/commands/drive/PlaySongDrive.java) | Java | 28 | 16 | 9 | 53 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/SkipSong.java](/src/main/java/frc4388/robot/commands/drive/SkipSong.java) | Java | 32 | 14 | 11 | 57 |
|
||||
| [src/main/java/frc4388/robot/commands/drive/TurnDegrees.java](/src/main/java/frc4388/robot/commands/drive/TurnDegrees.java) | Java | 41 | 16 | 17 | 74 |
|
||||
| [src/main/java/frc4388/robot/commands/intake/RunExtenderOutIn.java](/src/main/java/frc4388/robot/commands/intake/RunExtenderOutIn.java) | Java | 46 | 16 | 16 | 78 |
|
||||
| [src/main/java/frc4388/robot/commands/intake/RunIntake.java](/src/main/java/frc4388/robot/commands/intake/RunIntake.java) | Java | 25 | 14 | 8 | 47 |
|
||||
| [src/main/java/frc4388/robot/commands/intake/RunIntakeWithTriggers.java](/src/main/java/frc4388/robot/commands/intake/RunIntakeWithTriggers.java) | Java | 36 | 19 | 9 | 64 |
|
||||
| [src/main/java/frc4388/robot/commands/shooter/CalibrateShooter.java](/src/main/java/frc4388/robot/commands/shooter/CalibrateShooter.java) | Java | 44 | 15 | 11 | 70 |
|
||||
| [src/main/java/frc4388/robot/commands/shooter/HoodPositionPID.java](/src/main/java/frc4388/robot/commands/shooter/HoodPositionPID.java) | Java | 33 | 18 | 9 | 60 |
|
||||
| [src/main/java/frc4388/robot/commands/shooter/PrepChecker.java](/src/main/java/frc4388/robot/commands/shooter/PrepChecker.java) | Java | 28 | 14 | 11 | 53 |
|
||||
| [src/main/java/frc4388/robot/commands/shooter/RunHoodWithJoystick.java](/src/main/java/frc4388/robot/commands/shooter/RunHoodWithJoystick.java) | Java | 29 | 17 | 9 | 55 |
|
||||
| [src/main/java/frc4388/robot/commands/shooter/ShootPrepGroup.java](/src/main/java/frc4388/robot/commands/shooter/ShootPrepGroup.java) | Java | 16 | 15 | 4 | 35 |
|
||||
| [src/main/java/frc4388/robot/commands/shooter/ShooterGoalPosition.java](/src/main/java/frc4388/robot/commands/shooter/ShooterGoalPosition.java) | Java | 32 | 13 | 8 | 53 |
|
||||
| [src/main/java/frc4388/robot/commands/shooter/ShooterManual.java](/src/main/java/frc4388/robot/commands/shooter/ShooterManual.java) | Java | 25 | 13 | 8 | 46 |
|
||||
| [src/main/java/frc4388/robot/commands/shooter/ShooterTrenchPosition.java](/src/main/java/frc4388/robot/commands/shooter/ShooterTrenchPosition.java) | Java | 32 | 13 | 8 | 53 |
|
||||
| [src/main/java/frc4388/robot/commands/shooter/ShooterVelocityControlPID.java](/src/main/java/frc4388/robot/commands/shooter/ShooterVelocityControlPID.java) | Java | 37 | 15 | 10 | 62 |
|
||||
| [src/main/java/frc4388/robot/commands/shooter/TrackTarget.java](/src/main/java/frc4388/robot/commands/shooter/TrackTarget.java) | Java | 84 | 30 | 22 | 136 |
|
||||
| [src/main/java/frc4388/robot/commands/shooter/TrimShooter.java](/src/main/java/frc4388/robot/commands/shooter/TrimShooter.java) | Java | 41 | 14 | 11 | 66 |
|
||||
| [src/main/java/frc4388/robot/commands/storage/ManageStorage.java](/src/main/java/frc4388/robot/commands/storage/ManageStorage.java) | Java | 90 | 35 | 23 | 148 |
|
||||
| [src/main/java/frc4388/robot/commands/storage/ManageStoragePID.java](/src/main/java/frc4388/robot/commands/storage/ManageStoragePID.java) | Java | 86 | 33 | 24 | 143 |
|
||||
| [src/main/java/frc4388/robot/commands/storage/RunStorage.java](/src/main/java/frc4388/robot/commands/storage/RunStorage.java) | Java | 25 | 14 | 8 | 47 |
|
||||
| [src/main/java/frc4388/robot/commands/storage/StoragePrep.java](/src/main/java/frc4388/robot/commands/storage/StoragePrep.java) | Java | 33 | 14 | 8 | 55 |
|
||||
| [src/main/java/frc4388/robot/subsystems/Camera.java](/src/main/java/frc4388/robot/subsystems/Camera.java) | Java | 24 | 15 | 6 | 45 |
|
||||
| [src/main/java/frc4388/robot/subsystems/Climber.java](/src/main/java/frc4388/robot/subsystems/Climber.java) | Java | 58 | 20 | 16 | 94 |
|
||||
| [src/main/java/frc4388/robot/subsystems/Drive.java](/src/main/java/frc4388/robot/subsystems/Drive.java) | Java | 506 | 275 | 148 | 929 |
|
||||
| [src/main/java/frc4388/robot/subsystems/Intake.java](/src/main/java/frc4388/robot/subsystems/Intake.java) | Java | 36 | 36 | 14 | 86 |
|
||||
| [src/main/java/frc4388/robot/subsystems/LED.java](/src/main/java/frc4388/robot/subsystems/LED.java) | Java | 44 | 32 | 12 | 88 |
|
||||
| [src/main/java/frc4388/robot/subsystems/Leveler.java](/src/main/java/frc4388/robot/subsystems/Leveler.java) | Java | 29 | 18 | 11 | 58 |
|
||||
| [src/main/java/frc4388/robot/subsystems/LimeLight.java](/src/main/java/frc4388/robot/subsystems/LimeLight.java) | Java | 18 | 10 | 8 | 36 |
|
||||
| [src/main/java/frc4388/robot/subsystems/Pneumatics.java](/src/main/java/frc4388/robot/subsystems/Pneumatics.java) | Java | 50 | 27 | 14 | 91 |
|
||||
| [src/main/java/frc4388/robot/subsystems/Shooter.java](/src/main/java/frc4388/robot/subsystems/Shooter.java) | Java | 73 | 38 | 32 | 143 |
|
||||
| [src/main/java/frc4388/robot/subsystems/ShooterAim.java](/src/main/java/frc4388/robot/subsystems/ShooterAim.java) | Java | 108 | 31 | 39 | 178 |
|
||||
| [src/main/java/frc4388/robot/subsystems/ShooterHood.java](/src/main/java/frc4388/robot/subsystems/ShooterHood.java) | Java | 65 | 20 | 23 | 108 |
|
||||
| [src/main/java/frc4388/robot/subsystems/Storage.java](/src/main/java/frc4388/robot/subsystems/Storage.java) | Java | 84 | 33 | 28 | 145 |
|
||||
| [src/main/java/frc4388/utility/Gains.java](/src/main/java/frc4388/utility/Gains.java) | Java | 33 | 28 | 5 | 66 |
|
||||
| [src/main/java/frc4388/utility/LEDPatterns.java](/src/main/java/frc4388/utility/LEDPatterns.java) | Java | 30 | 10 | 6 | 46 |
|
||||
| [src/main/java/frc4388/utility/ShooterTables.java](/src/main/java/frc4388/utility/ShooterTables.java) | Java | 125 | 15 | 31 | 171 |
|
||||
| [src/main/java/frc4388/utility/Trims.java](/src/main/java/frc4388/utility/Trims.java) | Java | 9 | 6 | 3 | 18 |
|
||||
| [src/main/java/frc4388/utility/controller/ButtonFox.java](/src/main/java/frc4388/utility/controller/ButtonFox.java) | Java | 8 | 10 | 3 | 21 |
|
||||
| [src/main/java/frc4388/utility/controller/IHandController.java](/src/main/java/frc4388/utility/controller/IHandController.java) | Java | 10 | 3 | 9 | 22 |
|
||||
| [src/main/java/frc4388/utility/controller/JoystickManualButton.java](/src/main/java/frc4388/utility/controller/JoystickManualButton.java) | Java | 24 | 22 | 8 | 54 |
|
||||
| [src/main/java/frc4388/utility/controller/XboxController.java](/src/main/java/frc4388/utility/controller/XboxController.java) | Java | 151 | 26 | 46 | 223 |
|
||||
| [src/main/java/frc4388/utility/controller/XboxTriggerButton.java](/src/main/java/frc4388/utility/controller/XboxTriggerButton.java) | Java | 55 | 8 | 6 | 69 |
|
||||
|
||||
[summary](results.md)
|
||||
@@ -0,0 +1,85 @@
|
||||
filename, language, JSON, Java, CSS, comment, blank, total
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\DriveOffLineBackward.wpilib.json, JSON, 1, 0, 0, 0, 0, 1
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\DriveOffLineForward.wpilib.json, JSON, 1, 0, 0, 0, 0, 1
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\EightBallMid0.wpilib.json, JSON, 1, 0, 0, 0, 0, 1
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\EightBallMid1.wpilib.json, JSON, 1, 0, 0, 0, 0, 1
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\EightBallMid2.wpilib.json, JSON, 1, 0, 0, 0, 0, 1
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\EightBallMidComplete.wpilib.json, JSON, 1, 0, 0, 0, 0, 1
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\FiveBallMidComplete.wpilib.json, JSON, 1, 0, 0, 0, 0, 1
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\SixBallMid0.wpilib.json, JSON, 1, 0, 0, 0, 0, 1
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\SixBallMid1.wpilib.json, JSON, 1, 0, 0, 0, 0, 1
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\SixBallMidComplete.wpilib.json, JSON, 1, 0, 0, 0, 0, 1
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\TenBallMidComplete.wpilib.json, JSON, 1, 0, 0, 0, 0, 1
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\driverStation\GOAT DRIVERSTATION.json, JSON, 1014, 0, 0, 0, 0, 1014
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\driverStation\themes\Ridgbotics\ridgeboticstheme.css, CSS, 0, 0, 8, 0, 1, 9
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\Constants.java, Java, 0, 157, 0, 32, 41, 230
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\Main.java, Java, 0, 9, 0, 16, 5, 30
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\Robot.java, Java, 0, 59, 0, 63, 24, 146
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\RobotContainer.java, Java, 0, 312, 0, 145, 96, 553
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\InterruptSubystem.java, Java, 0, 21, 0, 14, 8, 43
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\AutoPath1FromCenter.java, Java, 0, 22, 0, 19, 6, 47
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\AutoPath2FromRight.java, Java, 0, 26, 0, 23, 6, 55
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\DriveOffLineBackward.java, Java, 0, 13, 0, 14, 5, 32
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\DriveOffLineForward.java, Java, 0, 11, 0, 14, 5, 30
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\EightBallAutoMiddle.java, Java, 0, 11, 0, 14, 5, 30
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\FiveBallAutoMiddle.java, Java, 0, 12, 0, 13, 4, 29
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\SixBallAutoMiddle.java, Java, 0, 16, 0, 14, 6, 36
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\TankDriveVelocity.java, Java, 0, 42, 0, 14, 12, 68
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\TenBallAutoMiddle.java, Java, 0, 40, 0, 16, 4, 60
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\Wait.java, Java, 0, 40, 0, 16, 16, 72
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\climber\DisengageRachet.java, Java, 0, 26, 0, 14, 9, 49
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\climber\RunClimberWithTriggers.java, Java, 0, 42, 0, 15, 9, 66
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\climber\RunLevelerWithJoystick.java, Java, 0, 28, 0, 17, 9, 54
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DrivePositionMPAux.java, Java, 0, 60, 0, 25, 9, 94
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveStraightAtVelocityPID.java, Java, 0, 29, 0, 17, 7, 53
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveStraightToPositionMM.java, Java, 0, 56, 0, 22, 9, 87
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveStraightToPositionPID.java, Java, 0, 49, 0, 22, 9, 80
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveWithJoystick.java, Java, 0, 54, 0, 43, 14, 111
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveWithJoystickAuxPID.java, Java, 0, 48, 0, 17, 13, 78
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveWithJoystickDriveStraight.java, Java, 0, 93, 0, 31, 19, 143
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveWithJoystickUsingDeadAssistPID.java, Java, 0, 132, 0, 41, 22, 195
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\GotoCoordinatesFieldRelative.java, Java, 0, 10, 0, 14, 5, 29
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\GotoCoordinatesRobotRelative.java, Java, 0, 54, 0, 14, 20, 88
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\PlaySongDrive.java, Java, 0, 28, 0, 16, 9, 53
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\SkipSong.java, Java, 0, 32, 0, 14, 11, 57
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\TurnDegrees.java, Java, 0, 41, 0, 16, 17, 74
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\intake\RunExtenderOutIn.java, Java, 0, 46, 0, 16, 16, 78
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\intake\RunIntake.java, Java, 0, 25, 0, 14, 8, 47
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\intake\RunIntakeWithTriggers.java, Java, 0, 36, 0, 19, 9, 64
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\CalibrateShooter.java, Java, 0, 44, 0, 15, 11, 70
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\HoodPositionPID.java, Java, 0, 33, 0, 18, 9, 60
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\PrepChecker.java, Java, 0, 28, 0, 14, 11, 53
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\RunHoodWithJoystick.java, Java, 0, 29, 0, 17, 9, 55
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\ShootPrepGroup.java, Java, 0, 16, 0, 15, 4, 35
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\ShooterGoalPosition.java, Java, 0, 32, 0, 13, 8, 53
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\ShooterManual.java, Java, 0, 25, 0, 13, 8, 46
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\ShooterTrenchPosition.java, Java, 0, 32, 0, 13, 8, 53
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\ShooterVelocityControlPID.java, Java, 0, 37, 0, 15, 10, 62
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\TrackTarget.java, Java, 0, 84, 0, 30, 22, 136
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\TrimShooter.java, Java, 0, 41, 0, 14, 11, 66
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\storage\ManageStorage.java, Java, 0, 90, 0, 35, 23, 148
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\storage\ManageStoragePID.java, Java, 0, 86, 0, 33, 24, 143
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\storage\RunStorage.java, Java, 0, 25, 0, 14, 8, 47
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\storage\StoragePrep.java, Java, 0, 33, 0, 14, 8, 55
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Camera.java, Java, 0, 24, 0, 15, 6, 45
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Climber.java, Java, 0, 58, 0, 20, 16, 94
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Drive.java, Java, 0, 506, 0, 275, 148, 929
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Intake.java, Java, 0, 36, 0, 36, 14, 86
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\LED.java, Java, 0, 44, 0, 32, 12, 88
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Leveler.java, Java, 0, 29, 0, 18, 11, 58
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\LimeLight.java, Java, 0, 18, 0, 10, 8, 36
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Pneumatics.java, Java, 0, 50, 0, 27, 14, 91
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Shooter.java, Java, 0, 73, 0, 38, 32, 143
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\ShooterAim.java, Java, 0, 108, 0, 31, 39, 178
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\ShooterHood.java, Java, 0, 65, 0, 20, 23, 108
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Storage.java, Java, 0, 84, 0, 33, 28, 145
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\Gains.java, Java, 0, 33, 0, 28, 5, 66
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\LEDPatterns.java, Java, 0, 30, 0, 10, 6, 46
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\ShooterTables.java, Java, 0, 125, 0, 15, 31, 171
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\Trims.java, Java, 0, 9, 0, 6, 3, 18
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\controller\ButtonFox.java, Java, 0, 8, 0, 10, 3, 21
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\controller\IHandController.java, Java, 0, 10, 0, 3, 9, 22
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\controller\JoystickManualButton.java, Java, 0, 24, 0, 22, 8, 54
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\controller\XboxController.java, Java, 0, 151, 0, 26, 46, 223
|
||||
c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\controller\XboxTriggerButton.java, Java, 0, 55, 0, 8, 6, 69
|
||||
Total, -, 1025, 3855, 8, 1770, 1110, 7768
|
||||
|
@@ -0,0 +1,41 @@
|
||||
# Summary
|
||||
|
||||
Date : 2020-03-13 19:46:18
|
||||
|
||||
Directory c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main
|
||||
|
||||
Total : 83 files, 4888 codes, 1770 comments, 1110 blanks, all 7768 lines
|
||||
|
||||
[details](details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| Java | 70 | 3,855 | 1,770 | 1,109 | 6,734 |
|
||||
| JSON | 12 | 1,025 | 0 | 0 | 1,025 |
|
||||
| CSS | 1 | 8 | 0 | 1 | 9 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 83 | 4,888 | 1,770 | 1,110 | 7,768 |
|
||||
| deploy | 11 | 11 | 0 | 0 | 11 |
|
||||
| deploy\paths | 11 | 11 | 0 | 0 | 11 |
|
||||
| driverStation | 2 | 1,022 | 0 | 1 | 1,023 |
|
||||
| driverStation\themes | 1 | 8 | 0 | 1 | 9 |
|
||||
| driverStation\themes\Ridgbotics | 1 | 8 | 0 | 1 | 9 |
|
||||
| java | 70 | 3,855 | 1,770 | 1,109 | 6,734 |
|
||||
| java\frc4388 | 70 | 3,855 | 1,770 | 1,109 | 6,734 |
|
||||
| java\frc4388\robot | 61 | 3,410 | 1,642 | 992 | 6,044 |
|
||||
| java\frc4388\robot\commands | 45 | 1,778 | 831 | 475 | 3,084 |
|
||||
| java\frc4388\robot\commands\auto | 10 | 233 | 157 | 69 | 459 |
|
||||
| java\frc4388\robot\commands\climber | 3 | 96 | 46 | 27 | 169 |
|
||||
| java\frc4388\robot\commands\drive | 13 | 686 | 292 | 164 | 1,142 |
|
||||
| java\frc4388\robot\commands\intake | 3 | 107 | 49 | 33 | 189 |
|
||||
| java\frc4388\robot\commands\shooter | 11 | 401 | 177 | 111 | 689 |
|
||||
| java\frc4388\robot\commands\storage | 4 | 234 | 96 | 63 | 393 |
|
||||
| java\frc4388\robot\subsystems | 12 | 1,095 | 555 | 351 | 2,001 |
|
||||
| java\frc4388\utility | 9 | 445 | 128 | 117 | 690 |
|
||||
| java\frc4388\utility\controller | 5 | 248 | 69 | 72 | 389 |
|
||||
|
||||
[details](details.md)
|
||||
@@ -0,0 +1,127 @@
|
||||
Date : 2020-03-13 19:46:18
|
||||
Directory : c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main
|
||||
Total : 83 files, 4888 codes, 1770 comments, 1110 blanks, all 7768 lines
|
||||
|
||||
Languages
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
| Java | 70 | 3,855 | 1,770 | 1,109 | 6,734 |
|
||||
| JSON | 12 | 1,025 | 0 | 0 | 1,025 |
|
||||
| CSS | 1 | 8 | 0 | 1 | 9 |
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+-------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+-------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 83 | 4,888 | 1,770 | 1,110 | 7,768 |
|
||||
| deploy | 11 | 11 | 0 | 0 | 11 |
|
||||
| deploy\paths | 11 | 11 | 0 | 0 | 11 |
|
||||
| driverStation | 2 | 1,022 | 0 | 1 | 1,023 |
|
||||
| driverStation\themes | 1 | 8 | 0 | 1 | 9 |
|
||||
| driverStation\themes\Ridgbotics | 1 | 8 | 0 | 1 | 9 |
|
||||
| java | 70 | 3,855 | 1,770 | 1,109 | 6,734 |
|
||||
| java\frc4388 | 70 | 3,855 | 1,770 | 1,109 | 6,734 |
|
||||
| java\frc4388\robot | 61 | 3,410 | 1,642 | 992 | 6,044 |
|
||||
| java\frc4388\robot\commands | 45 | 1,778 | 831 | 475 | 3,084 |
|
||||
| java\frc4388\robot\commands\auto | 10 | 233 | 157 | 69 | 459 |
|
||||
| java\frc4388\robot\commands\climber | 3 | 96 | 46 | 27 | 169 |
|
||||
| java\frc4388\robot\commands\drive | 13 | 686 | 292 | 164 | 1,142 |
|
||||
| java\frc4388\robot\commands\intake | 3 | 107 | 49 | 33 | 189 |
|
||||
| java\frc4388\robot\commands\shooter | 11 | 401 | 177 | 111 | 689 |
|
||||
| java\frc4388\robot\commands\storage | 4 | 234 | 96 | 63 | 393 |
|
||||
| java\frc4388\robot\subsystems | 12 | 1,095 | 555 | 351 | 2,001 |
|
||||
| java\frc4388\utility | 9 | 445 | 128 | 117 | 690 |
|
||||
| java\frc4388\utility\controller | 5 | 248 | 69 | 72 | 389 |
|
||||
+-------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+-------------------------------------------------------------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+-------------------------------------------------------------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\DriveOffLineBackward.wpilib.json | JSON | 1 | 0 | 0 | 1 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\DriveOffLineForward.wpilib.json | JSON | 1 | 0 | 0 | 1 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\EightBallMid0.wpilib.json | JSON | 1 | 0 | 0 | 1 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\EightBallMid1.wpilib.json | JSON | 1 | 0 | 0 | 1 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\EightBallMid2.wpilib.json | JSON | 1 | 0 | 0 | 1 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\EightBallMidComplete.wpilib.json | JSON | 1 | 0 | 0 | 1 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\FiveBallMidComplete.wpilib.json | JSON | 1 | 0 | 0 | 1 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\SixBallMid0.wpilib.json | JSON | 1 | 0 | 0 | 1 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\SixBallMid1.wpilib.json | JSON | 1 | 0 | 0 | 1 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\SixBallMidComplete.wpilib.json | JSON | 1 | 0 | 0 | 1 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\deploy\paths\TenBallMidComplete.wpilib.json | JSON | 1 | 0 | 0 | 1 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\driverStation\GOAT DRIVERSTATION.json | JSON | 1,014 | 0 | 0 | 1,014 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\driverStation\themes\Ridgbotics\ridgeboticstheme.css | CSS | 8 | 0 | 1 | 9 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\Constants.java | Java | 157 | 32 | 41 | 230 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\Main.java | Java | 9 | 16 | 5 | 30 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\Robot.java | Java | 59 | 63 | 24 | 146 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\RobotContainer.java | Java | 312 | 145 | 96 | 553 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\InterruptSubystem.java | Java | 21 | 14 | 8 | 43 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\AutoPath1FromCenter.java | Java | 22 | 19 | 6 | 47 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\AutoPath2FromRight.java | Java | 26 | 23 | 6 | 55 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\DriveOffLineBackward.java | Java | 13 | 14 | 5 | 32 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\DriveOffLineForward.java | Java | 11 | 14 | 5 | 30 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\EightBallAutoMiddle.java | Java | 11 | 14 | 5 | 30 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\FiveBallAutoMiddle.java | Java | 12 | 13 | 4 | 29 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\SixBallAutoMiddle.java | Java | 16 | 14 | 6 | 36 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\TankDriveVelocity.java | Java | 42 | 14 | 12 | 68 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\TenBallAutoMiddle.java | Java | 40 | 16 | 4 | 60 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\auto\Wait.java | Java | 40 | 16 | 16 | 72 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\climber\DisengageRachet.java | Java | 26 | 14 | 9 | 49 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\climber\RunClimberWithTriggers.java | Java | 42 | 15 | 9 | 66 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\climber\RunLevelerWithJoystick.java | Java | 28 | 17 | 9 | 54 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DrivePositionMPAux.java | Java | 60 | 25 | 9 | 94 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveStraightAtVelocityPID.java | Java | 29 | 17 | 7 | 53 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveStraightToPositionMM.java | Java | 56 | 22 | 9 | 87 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveStraightToPositionPID.java | Java | 49 | 22 | 9 | 80 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveWithJoystick.java | Java | 54 | 43 | 14 | 111 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveWithJoystickAuxPID.java | Java | 48 | 17 | 13 | 78 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveWithJoystickDriveStraight.java | Java | 93 | 31 | 19 | 143 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\DriveWithJoystickUsingDeadAssistPID.java | Java | 132 | 41 | 22 | 195 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\GotoCoordinatesFieldRelative.java | Java | 10 | 14 | 5 | 29 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\GotoCoordinatesRobotRelative.java | Java | 54 | 14 | 20 | 88 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\PlaySongDrive.java | Java | 28 | 16 | 9 | 53 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\SkipSong.java | Java | 32 | 14 | 11 | 57 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\drive\TurnDegrees.java | Java | 41 | 16 | 17 | 74 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\intake\RunExtenderOutIn.java | Java | 46 | 16 | 16 | 78 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\intake\RunIntake.java | Java | 25 | 14 | 8 | 47 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\intake\RunIntakeWithTriggers.java | Java | 36 | 19 | 9 | 64 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\CalibrateShooter.java | Java | 44 | 15 | 11 | 70 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\HoodPositionPID.java | Java | 33 | 18 | 9 | 60 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\PrepChecker.java | Java | 28 | 14 | 11 | 53 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\RunHoodWithJoystick.java | Java | 29 | 17 | 9 | 55 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\ShootPrepGroup.java | Java | 16 | 15 | 4 | 35 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\ShooterGoalPosition.java | Java | 32 | 13 | 8 | 53 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\ShooterManual.java | Java | 25 | 13 | 8 | 46 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\ShooterTrenchPosition.java | Java | 32 | 13 | 8 | 53 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\ShooterVelocityControlPID.java | Java | 37 | 15 | 10 | 62 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\TrackTarget.java | Java | 84 | 30 | 22 | 136 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\shooter\TrimShooter.java | Java | 41 | 14 | 11 | 66 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\storage\ManageStorage.java | Java | 90 | 35 | 23 | 148 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\storage\ManageStoragePID.java | Java | 86 | 33 | 24 | 143 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\storage\RunStorage.java | Java | 25 | 14 | 8 | 47 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\commands\storage\StoragePrep.java | Java | 33 | 14 | 8 | 55 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Camera.java | Java | 24 | 15 | 6 | 45 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Climber.java | Java | 58 | 20 | 16 | 94 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Drive.java | Java | 506 | 275 | 148 | 929 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Intake.java | Java | 36 | 36 | 14 | 86 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\LED.java | Java | 44 | 32 | 12 | 88 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Leveler.java | Java | 29 | 18 | 11 | 58 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\LimeLight.java | Java | 18 | 10 | 8 | 36 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Pneumatics.java | Java | 50 | 27 | 14 | 91 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Shooter.java | Java | 73 | 38 | 32 | 143 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\ShooterAim.java | Java | 108 | 31 | 39 | 178 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\ShooterHood.java | Java | 65 | 20 | 23 | 108 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\robot\subsystems\Storage.java | Java | 84 | 33 | 28 | 145 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\Gains.java | Java | 33 | 28 | 5 | 66 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\LEDPatterns.java | Java | 30 | 10 | 6 | 46 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\ShooterTables.java | Java | 125 | 15 | 31 | 171 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\Trims.java | Java | 9 | 6 | 3 | 18 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\controller\ButtonFox.java | Java | 8 | 10 | 3 | 21 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\controller\IHandController.java | Java | 10 | 3 | 9 | 22 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\controller\JoystickManualButton.java | Java | 24 | 22 | 8 | 54 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\controller\XboxController.java | Java | 151 | 26 | 46 | 223 |
|
||||
| c:\Users\Ridgebotics\Documents\GitHub\RiseOfRidgebotics2020\src\main\java\frc4388\utility\controller\XboxTriggerButton.java | Java | 55 | 8 | 6 | 69 |
|
||||
| Total | | 4,888 | 1,770 | 1,110 | 7,768 |
|
||||
+-------------------------------------------------------------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
@@ -0,0 +1,3 @@
|
||||
EightBallMid0
|
||||
EightBallMid1
|
||||
EightBallMid2
|
||||
@@ -0,0 +1,2 @@
|
||||
SixBallMid0
|
||||
SixBallMid1
|
||||
@@ -0,0 +1,2 @@
|
||||
SixBallMidComplete
|
||||
TenBallMidComplete
|
||||
@@ -0,0 +1,3 @@
|
||||
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
|
||||
3.2,-2.3,0.5,0.0,true,
|
||||
3.7,-2.3,0.5,0.0,true,
|
||||
@@ -0,0 +1,3 @@
|
||||
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
|
||||
3.2,-2.3,0.5,0.0,true,
|
||||
3.7,-2.3,0.5,0.0,true,
|
||||
@@ -0,0 +1,3 @@
|
||||
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
|
||||
3.2,-2.4,0.2,2.5,true,
|
||||
5.006107200045366,-0.7154598441848491,2.0,0.0,true,
|
||||
@@ -0,0 +1,3 @@
|
||||
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
|
||||
5.006,-0.715,3.048,0.0,true,
|
||||
7.2,-0.7154598441848491,1.0,0.0,true,
|
||||
@@ -0,0 +1,3 @@
|
||||
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
|
||||
7.2,-0.715,1.5,0.0,true,
|
||||
6.612,-2.7,-0.6,-0.3,true,
|
||||
@@ -0,0 +1,6 @@
|
||||
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
|
||||
3.2,-2.4,0.2,2.5,true,
|
||||
5.0,-1.1,3.0,0.0,true,
|
||||
7.2,-1.1,1.5,0.0,true,
|
||||
6.6123135559006245,-2.7023965955020937,-0.39262822032017564,-0.17846737287280634,true,
|
||||
6.279174459871384,-2.2621770757491713,0.13087607344005825,0.40452604517836144,true,
|
||||
@@ -0,0 +1,5 @@
|
||||
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
|
||||
3.2,-2.3,0.5,0.0,true,
|
||||
5.910341889267586,-1.8695488554289974,0.2974456214546777,-0.16656954801461854,true,
|
||||
6.398152708453256,-2.178892301741862,-0.09518259886549707,-0.16656954801461987,true,
|
||||
5.886546239551211,-2.3573596746146683,-0.22605867230555443,-0.11897824858187134,true,
|
||||
@@ -0,0 +1,3 @@
|
||||
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
|
||||
3.2,-2.4,0.2,2.5,true,
|
||||
5.006107200045366,-1.3,2.0,0.0,true,
|
||||
@@ -0,0 +1,3 @@
|
||||
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
|
||||
5.006,-1.3,3.048,0.0,true,
|
||||
7.2,-1.3,1.0,0.0,true,
|
||||
@@ -0,0 +1,4 @@
|
||||
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
|
||||
3.2,-2.4,0.2,2.5,true,
|
||||
5.0,-1.1,3.0,0.0,true,
|
||||
7.2,-1.1,1.5,0.0,true,
|
||||
@@ -0,0 +1,8 @@
|
||||
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
|
||||
7.2,-1.1,1.5,0.0,true,
|
||||
6.981146126504424,-1.7267749571307522,-0.16656954801462032,-0.6424825423421034,true,
|
||||
6.766985279057057,-2.6072139966365975,-0.1189782485818709,-0.2974456214546768,true,
|
||||
6.564722256467875,-3.1783095898295777,-0.2022630225891815,-0.44021951975292284,true,
|
||||
6.267276635013197,-3.880281256462616,-0.206563341919694,-0.4559320155220153,false,
|
||||
5.946035363842147,-4.546559448521093,-0.14277389829824472,-0.2974456214546777,true,
|
||||
5.660487567245656,-5.046268092564953,0.13087607344005825,-0.42832169489473504,true,
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"lengthUnit": "Meter",
|
||||
"exportUnit": "Always Meters",
|
||||
"maxVelocity": 1.7,
|
||||
"maxAcceleration": 2.7,
|
||||
"wheelBase": 0.648,
|
||||
"gameName": "Infinite Recharge",
|
||||
"outputDir": ".."
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
[{"time":0.0,"velocity":0.0,"acceleration":2.7,"pose":{"translation":{"x":3.2,"y":-2.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.3042903097250923,"velocity":0.8215838362577492,"acceleration":2.7,"pose":{"translation":{"x":3.325,"y":-2.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.43033148291193524,"velocity":1.161895003862225,"acceleration":-2.7,"pose":{"translation":{"x":3.45,"y":-2.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.5563726560987782,"velocity":0.8215838362577492,"acceleration":-2.7,"pose":{"translation":{"x":3.575,"y":-2.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.8606629658238705,"velocity":0.0,"acceleration":-2.7,"pose":{"translation":{"x":3.7,"y":-2.3},"rotation":{"radians":0.0}},"curvature":0.0}]
|
||||
@@ -0,0 +1 @@
|
||||
[{"time":0.0,"velocity":0.0,"acceleration":2.7,"pose":{"translation":{"x":3.2,"y":-2.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.3042903097250923,"velocity":0.8215838362577492,"acceleration":2.7,"pose":{"translation":{"x":3.325,"y":-2.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.43033148291193524,"velocity":1.161895003862225,"acceleration":-2.7,"pose":{"translation":{"x":3.45,"y":-2.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.5563726560987782,"velocity":0.8215838362577492,"acceleration":-2.7,"pose":{"translation":{"x":3.575,"y":-2.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.8606629658238705,"velocity":0.0,"acceleration":-2.7,"pose":{"translation":{"x":3.7,"y":-2.3},"rotation":{"radians":0.0}},"curvature":0.0}]
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
[{"time":0.0,"velocity":0.0,"acceleration":2.7,"pose":{"translation":{"x":5.006,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.2656061620411004,"velocity":0.717136637510971,"acceleration":2.6999999999999997,"pose":{"translation":{"x":5.101237954974175,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.3755418079977478,"velocity":1.013962881593919,"acceleration":2.699999999999999,"pose":{"translation":{"x":5.1963927268981935,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.45975256128584724,"velocity":1.2413319154717875,"acceleration":2.6999999999999997,"pose":{"translation":{"x":5.291352763772011,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.5305335412553954,"velocity":1.4324405613895677,"acceleration":2.7000000000000006,"pose":{"translation":{"x":5.385978881835937,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.5926137417782101,"velocity":1.6000571028011674,"acceleration":1.7647018169830884,"pose":{"translation":{"x":5.480107913374901,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.6492481806601815,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":5.573556354522705,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.7036997445093501,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":5.666124013066292,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.7575077699115317,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":5.757597656250001,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.810541300693782,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":5.847754658579826,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.8626660013101702,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":5.936366649627686,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.9137463026089846,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":6.023203161835671,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":0.9636475475999504,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":6.108035278320313,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.0122381372214386,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":6.190639280676843,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.0593916761076771,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":6.270800296783448,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.1049891183559657,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":6.3483159486055385,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.1489209132938847,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":6.423000000000001,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.1910891512465098,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":6.494686004519464,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.2314097093036216,"velocity":1.7,"acceleration":0.0,"pose":{"translation":{"x":6.563230953216554,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.2698143970869191,"velocity":1.7,"acceleration":-1.1179894261480032,"pose":{"translation":{"x":6.628518922448159,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.3067004902763237,"velocity":1.6587617378423356,"acceleration":-2.700000000000003,"pose":{"translation":{"x":6.690464721679689,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.3795667014519033,"velocity":1.4620229676682703,"acceleration":-2.700000000000001,"pose":{"translation":{"x":6.804164600372316,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.4531237596123885,"velocity":1.26341891063496,"acceleration":-2.7000000000000015,"pose":{"translation":{"x":6.904402343750003,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.528510297293001,"velocity":1.0598752588973066,"acceleration":-2.7,"pose":{"translation":{"x":6.9919748954772984,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.6089801534753305,"velocity":0.8426066472050169,"acceleration":-2.6999999999999997,"pose":{"translation":{"x":7.0685211181640675,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.7044131404571534,"velocity":0.5849375823540952,"acceleration":-2.7000000000000006,"pose":{"translation":{"x":7.136638523101813,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0},{"time":1.9210566894771886,"velocity":0.0,"acceleration":-2.7000000000000006,"pose":{"translation":{"x":7.200000000000008,"y":-1.3},"rotation":{"radians":0.0}},"curvature":0.0}]
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -335,6 +335,155 @@
|
||||
"Colors/Color when true": "#7CFC00FF",
|
||||
"Colors/Color when false": "#8B0000FF"
|
||||
}
|
||||
},
|
||||
"8,3": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Text View",
|
||||
"_source0": "network_table:///SmartDashboard/Distance to Target",
|
||||
"_title": "Distance to Target"
|
||||
}
|
||||
},
|
||||
"9,3": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Boolean Box",
|
||||
"_source0": "network_table:///SmartDashboard/!Ball in Intake!",
|
||||
"_title": "!Ball in Intake!",
|
||||
"Colors/Color when true": "#7CFC00FF",
|
||||
"Colors/Color when false": "#8B0000FF"
|
||||
}
|
||||
},
|
||||
"0,4": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Boolean Box",
|
||||
"_source0": "network_table:///SmartDashboard/!Ball Storage!",
|
||||
"_title": "!Ball Storage!",
|
||||
"Colors/Color when true": "#7CFC00FF",
|
||||
"Colors/Color when false": "#8B0000FF"
|
||||
}
|
||||
},
|
||||
"1,4": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Boolean Box",
|
||||
"_source0": "network_table:///SmartDashboard/!Ball Shooter!",
|
||||
"_title": "!Ball Shooter!",
|
||||
"Colors/Color when true": "#7CFC00FF",
|
||||
"Colors/Color when false": "#8B0000FF"
|
||||
}
|
||||
},
|
||||
"2,4": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Text View",
|
||||
"_source0": "network_table:///SmartDashboard/Center Displacement",
|
||||
"_title": "Center Displacement"
|
||||
}
|
||||
},
|
||||
"3,4": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Text View",
|
||||
"_source0": "network_table:///SmartDashboard/Is Auto Start?",
|
||||
"_title": "Is Auto Start?"
|
||||
}
|
||||
},
|
||||
"4,4": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Text View",
|
||||
"_source0": "network_table:///SmartDashboard/trajectoryPath Initial",
|
||||
"_title": "trajectoryPath Initial"
|
||||
}
|
||||
},
|
||||
"5,4": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Text View",
|
||||
"_source0": "network_table:///SmartDashboard/Left Motor Pos Inches",
|
||||
"_title": "Left Motor Pos Inches"
|
||||
}
|
||||
},
|
||||
"6,4": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Text View",
|
||||
"_source0": "network_table:///SmartDashboard/Right Motor Pos Inches",
|
||||
"_title": "Right Motor Pos Inches"
|
||||
}
|
||||
},
|
||||
"7,4": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Text View",
|
||||
"_source0": "network_table:///SmartDashboard/Left Motor Pos Meters",
|
||||
"_title": "Left Motor Pos Meters"
|
||||
}
|
||||
},
|
||||
"8,4": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Text View",
|
||||
"_source0": "network_table:///SmartDashboard/Right Motor Pos Meters",
|
||||
"_title": "Right Motor Pos Meters"
|
||||
}
|
||||
},
|
||||
"9,4": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Text View",
|
||||
"_source0": "network_table:///SmartDashboard/Odometry Values Meters",
|
||||
"_title": "Odometry Values Meters"
|
||||
}
|
||||
},
|
||||
"0,5": {
|
||||
"size": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"content": {
|
||||
"_type": "Text View",
|
||||
"_source0": "network_table:///SmartDashboard/Trajectory Total Time",
|
||||
"_title": "Trajectory Total Time"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -645,8 +794,8 @@
|
||||
"Controls/Rotation": "NONE",
|
||||
"compression": -1.0,
|
||||
"fps": -1,
|
||||
"imageWidth": -1,
|
||||
"imageHeight": -1
|
||||
"imageWidth": 0,
|
||||
"imageHeight": 0
|
||||
}
|
||||
},
|
||||
"8,4": {
|
||||
@@ -857,9 +1006,9 @@
|
||||
}
|
||||
],
|
||||
"windowGeometry": {
|
||||
"x": 40.0,
|
||||
"y": 142.39999389648438,
|
||||
"x": -6.400000095367432,
|
||||
"y": 1.600000023841858,
|
||||
"width": 1547.199951171875,
|
||||
"height": 1481.5999755859375
|
||||
"height": 828.7999877929688
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,8 @@ import frc4388.utility.LEDPatterns;
|
||||
* constants are needed, to reduce verbosity.
|
||||
*/
|
||||
public final class Constants {
|
||||
public static final int SELECTED_AUTO = 0;
|
||||
|
||||
public static final class DriveConstants {
|
||||
/* Drive Train IDs */
|
||||
public static final int DRIVE_LEFT_FRONT_CAN_ID = 2;
|
||||
@@ -47,7 +49,7 @@ public final class Constants {
|
||||
public static final double COS_MULTIPLIER_HIGH = 0.8;
|
||||
|
||||
/* Drive Train Characteristics */
|
||||
public static final double MOTOR_ROT_PER_WHEEL_ROT_HIGH = 5.13;
|
||||
public static final double MOTOR_ROT_PER_WHEEL_ROT_HIGH = 7.29;
|
||||
public static final double MOTOR_ROT_PER_WHEEL_ROT_LOW = 15;
|
||||
public static final double WHEEL_DIAMETER_INCHES = 6;
|
||||
public static final double TICKS_PER_GYRO_REV = 8192;
|
||||
@@ -68,9 +70,11 @@ public final class Constants {
|
||||
public static final int DRIVE_CRUISE_VELOCITY_HIGH = 20000;
|
||||
public static final int DRIVE_ACCELERATION_HIGH = 7000;
|
||||
|
||||
public static final Gains DRIVE_VELOCITY_GAINS_BACK = new Gains(0.0, 0.0, 0.0, 0.05, 0, 1.0);
|
||||
|
||||
/* Trajectory Constants */
|
||||
public static final double MAX_SPEED_METERS_PER_SECOND = 3;
|
||||
public static final double MAX_ACCELERATION_METERS_PER_SECOND_SQUARED = 3;
|
||||
public static final double MAX_SPEED_METERS_PER_SECOND = 1.0;
|
||||
public static final double MAX_ACCELERATION_METERS_PER_SECOND_SQUARED = 1.0;
|
||||
public static final double TRACK_WIDTH_METERS = 0.648;
|
||||
public static final DifferentialDriveKinematics kDriveKinematics = new DifferentialDriveKinematics(TRACK_WIDTH_METERS);
|
||||
|
||||
@@ -167,7 +171,7 @@ public final class Constants {
|
||||
public static final int STORAGE_CAN_ID = 11;
|
||||
public static final double STORAGE_PARTIAL_BALL = 2;
|
||||
public static final double STORAGE_FULL_BALL = 7;
|
||||
public static final double STORAGE_SPEED = 1.0;
|
||||
public static final double STORAGE_SPEED = 0.5;
|
||||
public static final double STORAGE_TIMEOUT = 3000;
|
||||
|
||||
/* Storage Characteristics */
|
||||
@@ -220,5 +224,6 @@ public final class Constants {
|
||||
public static final class OIConstants {
|
||||
public static final int XBOX_DRIVER_ID = 0;
|
||||
public static final int XBOX_OPERATOR_ID = 1;
|
||||
public static final int BUTTON_FOX_ID = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ package frc4388.robot;
|
||||
import com.ctre.phoenix.motorcontrol.NeutralMode;
|
||||
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.geometry.Pose2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.CommandScheduler;
|
||||
@@ -35,7 +36,7 @@ public class Robot extends TimedRobot {
|
||||
// Instantiate our RobotContainer. This will perform all our button bindings, and put our
|
||||
// autonomous chooser on the dashboard.
|
||||
m_robotContainer = new RobotContainer();
|
||||
SmartDashboard.putString("Auto?", "NAH");
|
||||
SmartDashboard.putString("Is Auto Start?", "NAH");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,6 +64,9 @@ public class Robot extends TimedRobot {
|
||||
@Override
|
||||
public void disabledInit() {
|
||||
m_robotContainer.setDriveNeutralMode(NeutralMode.Coast);
|
||||
/* Builds Autos */
|
||||
m_robotContainer.buildAutos();
|
||||
SmartDashboard.putString("Is Auto Start?", "NAH");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,11 +78,15 @@ public class Robot extends TimedRobot {
|
||||
*/
|
||||
@Override
|
||||
public void autonomousInit() {
|
||||
|
||||
m_autonomousCommand = m_robotContainer.getAutonomousCommand();
|
||||
|
||||
m_robotContainer.setDriveNeutralMode(NeutralMode.Brake);
|
||||
m_robotContainer.setDriveGearState(false);
|
||||
m_robotContainer.resetOdometry();
|
||||
m_robotContainer.setDriveGearState(true);
|
||||
m_robotContainer.resetOdometry(new Pose2d());
|
||||
|
||||
//m_robotContainer.resetGyroYawRobotContainer(0);
|
||||
|
||||
//m_robotContainer.configDriveTrainSensors(FeedbackDevice.IntegratedSensor);
|
||||
|
||||
/*
|
||||
@@ -91,7 +99,7 @@ public class Robot extends TimedRobot {
|
||||
// schedule the autonomous command (example)
|
||||
if (m_autonomousCommand != null) {
|
||||
m_autonomousCommand.schedule();
|
||||
System.err.println("Auto Start");
|
||||
SmartDashboard.putString("Is Auto Start?", "YEA");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +113,7 @@ public class Robot extends TimedRobot {
|
||||
@Override
|
||||
public void teleopInit() {
|
||||
m_robotContainer.setDriveNeutralMode(NeutralMode.Brake);
|
||||
m_robotContainer.setDriveGearState(false);
|
||||
m_robotContainer.setDriveGearState(true);
|
||||
|
||||
m_robotContainer.shiftClimberRachet(false);
|
||||
//m_robotContainer.configDriveTrainSensors(FeedbackDevice.IntegratedSensor);
|
||||
|
||||
@@ -7,26 +7,39 @@
|
||||
|
||||
package frc4388.robot;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
|
||||
import com.ctre.phoenix.motorcontrol.NeutralMode;
|
||||
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
import edu.wpi.first.wpilibj.Filesystem;
|
||||
import edu.wpi.first.wpilibj.GenericHID;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.controller.RamseteController;
|
||||
import edu.wpi.first.wpilibj.geometry.Pose2d;
|
||||
import edu.wpi.first.wpilibj.geometry.Rotation2d;
|
||||
import edu.wpi.first.wpilibj.geometry.Transform2d;
|
||||
import edu.wpi.first.wpilibj.geometry.Translation2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj.trajectory.Trajectory;
|
||||
import edu.wpi.first.wpilibj.trajectory.TrajectoryConfig;
|
||||
import edu.wpi.first.wpilibj.trajectory.TrajectoryGenerator;
|
||||
import edu.wpi.first.wpilibj.trajectory.TrajectoryUtil;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.InstantCommand;
|
||||
import edu.wpi.first.wpilibj2.command.RamseteCommand;
|
||||
import edu.wpi.first.wpilibj2.command.RunCommand;
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
|
||||
import frc4388.robot.Constants.DriveConstants;
|
||||
import frc4388.robot.Constants.OIConstants;
|
||||
import frc4388.robot.commands.auto.DriveOffLineBackward;
|
||||
import frc4388.robot.commands.auto.DriveOffLineForward;
|
||||
import frc4388.robot.commands.auto.EightBallAutoMiddle;
|
||||
import frc4388.robot.commands.auto.FiveBallAutoMiddle;
|
||||
import frc4388.robot.commands.auto.SixBallAutoMiddle;
|
||||
import frc4388.robot.commands.auto.TenBallAutoMiddle;
|
||||
import frc4388.robot.commands.InterruptSubystem;
|
||||
import frc4388.robot.commands.auto.AutoPath1FromCenter;
|
||||
import frc4388.robot.commands.auto.Wait;
|
||||
@@ -35,15 +48,23 @@ import frc4388.robot.commands.climber.RunClimberWithTriggers;
|
||||
import frc4388.robot.commands.climber.RunLevelerWithJoystick;
|
||||
import frc4388.robot.commands.drive.DriveStraightToPositionMM;
|
||||
import frc4388.robot.commands.drive.DriveWithJoystick;
|
||||
import frc4388.robot.commands.drive.PlaySongDrive;
|
||||
import frc4388.robot.commands.drive.SkipSong;
|
||||
import frc4388.robot.commands.drive.TurnDegrees;
|
||||
import frc4388.robot.commands.intake.RunIntakeWithTriggers;
|
||||
import frc4388.robot.commands.shooter.CalibrateShooter;
|
||||
import frc4388.robot.commands.shooter.TrackTarget;
|
||||
import frc4388.robot.commands.shooter.TrimShooter;
|
||||
import frc4388.robot.commands.shooter.RunHoodWithJoystick;
|
||||
import frc4388.robot.commands.shooter.ShootPrepGroup;
|
||||
import frc4388.robot.commands.shooter.ShooterGoalPosition;
|
||||
import frc4388.robot.commands.shooter.ShooterManual;
|
||||
import frc4388.robot.commands.shooter.ShooterTrenchPosition;
|
||||
import frc4388.robot.commands.shooter.ShooterVelocityControlPID;
|
||||
import frc4388.robot.commands.shooter.TrackTarget;
|
||||
import frc4388.robot.commands.shooter.TrimShooter;
|
||||
import frc4388.robot.commands.storage.ManageStorage;
|
||||
import frc4388.robot.commands.storage.StoragePrep;
|
||||
import frc4388.robot.commands.storage.ManageStorage.StorageMode;
|
||||
import frc4388.robot.subsystems.Camera;
|
||||
import frc4388.robot.subsystems.Climber;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
@@ -56,9 +77,11 @@ import frc4388.robot.subsystems.Shooter;
|
||||
import frc4388.robot.subsystems.ShooterAim;
|
||||
import frc4388.robot.subsystems.ShooterHood;
|
||||
import frc4388.robot.subsystems.Storage;
|
||||
import frc4388.robot.subsystems.Storage.StorageMode;
|
||||
import frc4388.utility.controller.ButtonFox;
|
||||
import frc4388.utility.controller.IHandController;
|
||||
import frc4388.utility.controller.JoystickManualButton;
|
||||
import frc4388.utility.controller.XboxController;
|
||||
import frc4388.utility.controller.XboxTriggerButton;
|
||||
|
||||
/**
|
||||
* This class is where the bulk of the robot should be declared. Since
|
||||
@@ -86,9 +109,27 @@ public class RobotContainer {
|
||||
private final LimeLight m_robotLime = new LimeLight();
|
||||
|
||||
/* Controllers */
|
||||
private final XboxController m_driverXbox = new XboxController(OIConstants.XBOX_DRIVER_ID);
|
||||
private final XboxController m_operatorXbox = new XboxController(OIConstants.XBOX_OPERATOR_ID);
|
||||
private static XboxController m_driverXbox = new XboxController(OIConstants.XBOX_DRIVER_ID);
|
||||
private static XboxController m_operatorXbox = new XboxController(OIConstants.XBOX_OPERATOR_ID);
|
||||
private static XboxController m_buttonFox = new XboxController(OIConstants. BUTTON_FOX_ID);
|
||||
private static XboxController m_manualXbox = new XboxController(3);
|
||||
|
||||
/* Autos */
|
||||
double m_totalTimeAuto;
|
||||
|
||||
SixBallAutoMiddle m_sixBallAutoMiddle;
|
||||
|
||||
EightBallAutoMiddle m_eightBallAutoMiddle;
|
||||
|
||||
DriveOffLineForward m_driveOffLineForward;
|
||||
|
||||
DriveOffLineBackward m_driveOffLineBackward;
|
||||
|
||||
FiveBallAutoMiddle m_fiveBallAutoMiddle;
|
||||
|
||||
TenBallAutoMiddle m_tenBallAutoMiddle;
|
||||
|
||||
public static boolean m_isShooterManual = false;
|
||||
|
||||
/**
|
||||
* The container for the robot. Contains subsystems, OI devices, and commands.
|
||||
@@ -96,7 +137,7 @@ public class RobotContainer {
|
||||
public RobotContainer() {
|
||||
/* Passing Drive and Pneumatics Subsystems */
|
||||
m_robotPneumatics.passRequiredSubsystem(m_robotDrive);
|
||||
m_robotDrive.passRequiredSubsystem(m_robotPneumatics);
|
||||
m_robotDrive.passRequiredSubsystem(m_robotPneumatics, m_robotShooter);
|
||||
|
||||
m_robotShooter.passRequiredSubsystem(m_robotShooterHood, m_robotShooterAim);
|
||||
m_robotShooterHood.passRequiredSubsystem(m_robotShooter);
|
||||
@@ -106,6 +147,9 @@ public class RobotContainer {
|
||||
|
||||
configureButtonBindings();
|
||||
|
||||
/* Builds Autos */
|
||||
//buildAutos();
|
||||
|
||||
/* Default Commands */
|
||||
// drives the robot with a two-axis input from the driver controller
|
||||
|
||||
@@ -116,6 +160,8 @@ public class RobotContainer {
|
||||
m_robotIntake.setDefaultCommand(new RunIntakeWithTriggers(m_robotIntake, getOperatorController()));
|
||||
// runs the turret with joystick
|
||||
m_robotShooterAim.setDefaultCommand(new RunCommand(() -> m_robotShooterAim.runShooterWithInput(-m_operatorXbox.getLeftXAxis()), m_robotShooterAim));
|
||||
// runs the hood with joystick
|
||||
m_robotShooterHood.setDefaultCommand(new RunHoodWithJoystick(m_robotShooterHood, getOperatorController()));
|
||||
// moves the drum not
|
||||
m_robotShooter.setDefaultCommand(new RunCommand(() -> m_robotShooter.runDrumShooterVelocityPID(1500), m_robotShooter));
|
||||
// drives climber with input from triggers on the opperator controller
|
||||
@@ -126,7 +172,7 @@ public class RobotContainer {
|
||||
m_robotLED.setDefaultCommand(new RunCommand(() -> m_robotLED.updateLED(), m_robotLED));
|
||||
// runs the storage not
|
||||
//m_robotStorage.setDefaultCommand(new RunCommand(() -> m_robotStorage.runStorage(0), m_robotStorage));
|
||||
m_robotStorage.setDefaultCommand(new ManageStorage(m_robotStorage, StorageMode.IDLE));
|
||||
m_robotStorage.setDefaultCommand(new ManageStorage(m_robotStorage));
|
||||
//m_robotLime.setDefaultCommand(new RunCommand(() -> m_robotLime.limeOff(), m_robotLime));
|
||||
}
|
||||
|
||||
@@ -139,8 +185,8 @@ public class RobotContainer {
|
||||
private void configureButtonBindings() {
|
||||
/* Test Buttons */
|
||||
// A driver test button
|
||||
new JoystickButton(getDriverJoystick(), XboxController.A_BUTTON)
|
||||
.whenPressed(new DriveStraightToPositionMM(m_robotDrive, m_robotPneumatics, 24.0));
|
||||
/*new JoystickButton(getDriverJoystick(), XboxController.A_BUTTON)
|
||||
.whileHeld(new InstantCommand(() -> m_robotDrive.tankDriveVelocity(1, -1), m_robotDrive));*/
|
||||
|
||||
// B driver test button
|
||||
new JoystickButton(getDriverJoystick(), XboxController.B_BUTTON)
|
||||
@@ -168,6 +214,9 @@ public class RobotContainer {
|
||||
new JoystickButton(getDriverJoystick(), XboxController.BACK_BUTTON)
|
||||
.whileHeld(new DisengageRachet(m_robotClimber));
|
||||
|
||||
|
||||
|
||||
|
||||
/* Operator Buttons */
|
||||
// shoots until released
|
||||
new JoystickButton(getOperatorJoystick(), XboxController.RIGHT_BUMPER_BUTTON)
|
||||
@@ -218,22 +267,91 @@ public class RobotContainer {
|
||||
new JoystickButton(getOperatorJoystick(), XboxController.START_BUTTON)
|
||||
.whileHeld(new CalibrateShooter(m_robotShooter, m_robotShooterAim, m_robotShooterHood));
|
||||
|
||||
//Prepares storage for intaking
|
||||
//new XboxTriggerButton(m_operatorXbox, XboxTriggerButton.LEFT_TRIGGER)
|
||||
//.whileHeld(new RunCommand(() -> m_robotStorage.runStorage(0.8)))
|
||||
//.whenReleased(new RunCommand(() -> m_robotStorage.runStorage(0.0)));
|
||||
//.whileHeld(new StorageIntake(m_robotIntake, m_robotStorage));
|
||||
|
||||
//Runs storage to outtake
|
||||
//new XboxTriggerButton(m_operatorXbox, XboxTriggerButton.RIGHT_TRIGGER)
|
||||
//.whileHeld(new RunCommand(() -> m_robotStorage.runStorage(-0.8)))
|
||||
//.whenReleased(new RunCommand(() -> m_robotStorage.runStorage(0.0)));
|
||||
|
||||
//Run drum
|
||||
new JoystickButton(getOperatorJoystick(), XboxController.B_BUTTON)
|
||||
new JoystickManualButton(getOperatorJoystick(), XboxController.B_BUTTON, false)
|
||||
.whileHeld(new ShootPrepGroup(m_robotShooter, m_robotShooterAim, m_robotShooterHood, m_robotStorage), false)
|
||||
//.whenReleased(new ManageStorage(m_robotStorage, StorageMode.RESET))
|
||||
.whenReleased(new InstantCommand(() -> m_robotLime.limeOff()));
|
||||
|
||||
//Run drum manual
|
||||
new JoystickManualButton(getOperatorJoystick(), XboxController.B_BUTTON, true)
|
||||
.whileHeld(new RunCommand(() -> m_robotShooter.runDrumShooterVelocityPID(10000)))
|
||||
.whenReleased(new RunCommand(() -> m_robotShooter.runDrumShooterVelocityPID(0)));
|
||||
|
||||
|
||||
|
||||
|
||||
/* Button Fox */
|
||||
// Storage Manual
|
||||
new JoystickButton(getButtonFox(), ButtonFox.LEFT_SWITCH)
|
||||
.whenPressed(new InstantCommand(() -> m_robotStorage.changeStorageMode(StorageMode.MANUAL)))
|
||||
.whenReleased(new InstantCommand(() -> m_robotStorage.changeStorageMode(StorageMode.RESET)));
|
||||
|
||||
// Meg
|
||||
new JoystickButton(getButtonFox(), ButtonFox.MIDDLE_SWITCH)
|
||||
.whileHeld(new PlaySongDrive(m_robotDrive, m_robotShooter))
|
||||
.whenReleased(new InterruptSubystem(m_robotDrive));
|
||||
|
||||
// Shooter Manual
|
||||
new JoystickButton(getButtonFox(), ButtonFox.RIGHT_SWITCH)
|
||||
.whileHeld(new ShooterManual(true))
|
||||
.whenReleased(new ShooterManual(false));
|
||||
|
||||
// Goal Shooter Position
|
||||
new JoystickButton(getButtonFox(), ButtonFox.RIGHT_BUTTON)
|
||||
.whileHeld(new PlaySongDrive(m_robotDrive, m_robotShooter))
|
||||
.whenReleased(new InterruptSubystem(m_robotDrive));
|
||||
|
||||
// Trench Shooter Position
|
||||
new JoystickButton(getButtonFox(), ButtonFox.LEFT_BUTTON)
|
||||
.whileHeld(new ShooterTrenchPosition(m_robotShooter, m_robotShooterHood, m_robotShooterAim))
|
||||
.whenReleased(new InterruptSubystem(m_robotShooter))
|
||||
.whenReleased(new InterruptSubystem(m_robotShooterHood))
|
||||
.whenReleased(new InterruptSubystem(m_robotShooterAim));
|
||||
//.whenPressed(new SkipSong(m_robotDrive, 1));
|
||||
}
|
||||
|
||||
public void buildAutos() {
|
||||
//resetOdometry(new Pose2d(0, 0, new Rotation2d(180)));
|
||||
|
||||
String[] sixBallAutoMiddlePaths = new String[]{
|
||||
"SixBallMidComplete"
|
||||
};
|
||||
|
||||
m_sixBallAutoMiddle = new SixBallAutoMiddle(m_robotDrive, buildPaths(sixBallAutoMiddlePaths));
|
||||
|
||||
String[] eightBallAutoMiddlePaths = new String[]{
|
||||
"EightBallMidComplete"
|
||||
};
|
||||
|
||||
m_eightBallAutoMiddle = new EightBallAutoMiddle(m_robotDrive, buildPaths(eightBallAutoMiddlePaths));
|
||||
|
||||
String[] driveOffLineForwardPaths = new String[]{
|
||||
"DriveOffLineForward"
|
||||
};
|
||||
|
||||
m_driveOffLineForward = new DriveOffLineForward(m_robotDrive, buildPaths(driveOffLineForwardPaths));
|
||||
|
||||
String[] driveOffLineBackwardPaths = new String[]{
|
||||
"DriveOffLineBackward"
|
||||
};
|
||||
|
||||
m_driveOffLineBackward = new DriveOffLineBackward(m_robotDrive, buildPaths(driveOffLineBackwardPaths));
|
||||
|
||||
String[] fiveBallAutoMiddlePaths = new String[]{
|
||||
"FiveBallMidComplete"
|
||||
};
|
||||
|
||||
m_fiveBallAutoMiddle = new FiveBallAutoMiddle(m_robotDrive, buildPaths(fiveBallAutoMiddlePaths));
|
||||
|
||||
String[] tenBallAutoMiddlePaths = new String[]{
|
||||
"SixBallMidComplete",
|
||||
"TenBallMidComplete"
|
||||
};
|
||||
|
||||
m_tenBallAutoMiddle = new TenBallAutoMiddle(m_robotShooterHood, m_robotStorage, m_robotIntake, m_robotShooter,
|
||||
m_robotShooterAim, m_robotDrive,buildPaths(tenBallAutoMiddlePaths));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -242,15 +360,27 @@ public class RobotContainer {
|
||||
* @return the command to run in autonomous
|
||||
*/
|
||||
public Command getAutonomousCommand() {
|
||||
// Create config for trajectory
|
||||
TrajectoryConfig config = getTrajectoryConfig();
|
||||
Trajectory trajectory = getTrajectory(config);
|
||||
RamseteCommand ramseteCommand = getRamseteCommand(trajectory);
|
||||
// Run path following command, then stop at the end.
|
||||
//return ramseteCommand.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
return new AutoPath1FromCenter(m_robotDrive, m_robotPneumatics);
|
||||
//return new AutoPath2FromRight(m_robotDrive, m_robotPneumatics);
|
||||
// Create custom trajectories
|
||||
//TrajectoryConfig config = getTrajectoryConfig();
|
||||
//Trajectory trajectory = getTrajectory(config);
|
||||
//RamseteCommand ramseteCommand = getRamseteCommand(trajectory);
|
||||
|
||||
// Run path following command, then stop at the end.
|
||||
try {
|
||||
SmartDashboard.putNumber("Trajectory Total Time", m_totalTimeAuto);
|
||||
|
||||
//return m_sixBallAutoMiddle.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
//return m_eightBallAutoMiddle.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
//return m_driveOffLineForward.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
//return m_driveOffLinfeBackward.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
//return m_fiveBallAutoMiddle.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
return m_tenBallAutoMiddle.andThen(()-> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("ERROR");
|
||||
}
|
||||
|
||||
return new InstantCommand();
|
||||
}
|
||||
TrajectoryConfig getTrajectoryConfig() {
|
||||
return new TrajectoryConfig(
|
||||
@@ -263,22 +393,19 @@ public class RobotContainer {
|
||||
Trajectory getTrajectory(TrajectoryConfig config) {
|
||||
Trajectory exampleTrajectory = TrajectoryGenerator.generateTrajectory(
|
||||
// Start at the origin facing the +X direction
|
||||
new Pose2d(0, 0, new Rotation2d(0)),
|
||||
new Pose2d(2.9, -2.4, new Rotation2d(0)),
|
||||
// Pass through these two interior waypoints, making an 's' curve path
|
||||
List.of(
|
||||
new Translation2d(10, 0)
|
||||
new Translation2d(4.1, -1.7)
|
||||
),
|
||||
// End 3 meters straight ahead of where we started, facing forward
|
||||
new Pose2d(20, 20, new Rotation2d(0)),
|
||||
new Pose2d(5.1, -0.7, new Rotation2d(0)),
|
||||
// Pass config
|
||||
config);
|
||||
// 10 = 20, 20 = 35, 30 = 53.5
|
||||
// (0,10) = (8,22)
|
||||
|
||||
return exampleTrajectory;
|
||||
}
|
||||
|
||||
RamseteCommand getRamseteCommand(Trajectory trajectory) {
|
||||
public RamseteCommand getRamseteCommand(Trajectory trajectory) {
|
||||
RamseteCommand ramseteCommand = new RamseteCommand(
|
||||
trajectory,
|
||||
m_robotDrive::getPose,
|
||||
@@ -290,6 +417,48 @@ public class RobotContainer {
|
||||
return ramseteCommand;
|
||||
}
|
||||
|
||||
public RamseteCommand[] buildPaths(String[] paths) {
|
||||
RamseteCommand[] ramseteCommands = new RamseteCommand[paths.length];
|
||||
double[] times = new double[paths.length];
|
||||
Trajectory initialTrajectory;
|
||||
m_totalTimeAuto = 0;
|
||||
|
||||
try {
|
||||
if (true) {
|
||||
String path = paths[0];
|
||||
String trajectoryJSON = "paths/" + path + ".wpilib.json";
|
||||
Path trajectoryPath = Filesystem.getDeployDirectory().toPath().resolve(trajectoryJSON);
|
||||
|
||||
SmartDashboard.putString("trajectoryPath Initial", trajectoryPath.toString());
|
||||
|
||||
Trajectory trajectory = TrajectoryUtil.fromPathweaverJson(trajectoryPath);
|
||||
initialTrajectory = trajectory;
|
||||
|
||||
RamseteCommand ramseteCommand = getRamseteCommand(trajectory.relativeTo(initialTrajectory.getInitialPose()));
|
||||
ramseteCommands[0] = ramseteCommand;
|
||||
times[0] = initialTrajectory.getTotalTimeSeconds();
|
||||
}
|
||||
|
||||
for(int i = 1; i < paths.length; i++) {
|
||||
String path = paths[i];
|
||||
String trajectoryJSON = "paths/" + path + ".wpilib.json";
|
||||
Path trajectoryPath = Filesystem.getDeployDirectory().toPath().resolve(trajectoryJSON);
|
||||
Trajectory trajectory = TrajectoryUtil.fromPathweaverJson(trajectoryPath);
|
||||
RamseteCommand ramseteCommand = getRamseteCommand(trajectory.relativeTo(initialTrajectory.getInitialPose()));
|
||||
ramseteCommands[i] = ramseteCommand;
|
||||
times[i] = trajectory.getTotalTimeSeconds();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
DriverStation.reportError("Unable to open trajectory", e.getStackTrace());
|
||||
}
|
||||
|
||||
for (int i = 0; i < times.length; i++) {
|
||||
m_totalTimeAuto += times[i];
|
||||
}
|
||||
|
||||
return ramseteCommands;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Motors to a NeutralMode.
|
||||
* @param mode NeutralMode to set motors to
|
||||
@@ -316,9 +485,12 @@ public class RobotContainer {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void resetOdometry() {
|
||||
m_robotDrive.resetGyroAngles();
|
||||
m_robotDrive.setOdometry(new Pose2d());
|
||||
public void resetOdometry(Pose2d pose) {
|
||||
m_robotDrive.setOdometry(pose);
|
||||
}
|
||||
|
||||
public void resetGyroYawRobotContainer(double angle) {
|
||||
m_robotDrive.resetGyroYaw(angle);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -338,6 +510,12 @@ public class RobotContainer {
|
||||
return m_operatorXbox;
|
||||
}
|
||||
|
||||
public IHandController getButtonFoxObject()
|
||||
{
|
||||
return m_buttonFox;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the {@link edu.wpi.first.wpilibj.GenericHID#GenericHID(int) Generic HID} for the Operator Xbox Controller.
|
||||
* Generic HIDs/Joysticks can be used to set up JoystickButtons.
|
||||
@@ -357,4 +535,15 @@ public class RobotContainer {
|
||||
{
|
||||
return m_driverXbox.getJoyStick();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the {@link edu.wpi.first.wpilibj.GenericHID#GenericHID(int) Generic HID} for the Button Fox.
|
||||
* Generic HIDs/Joysticks can be used to set up JoystickButtons.
|
||||
* @return The IHandController interface for the Button Fox.
|
||||
*/
|
||||
public Joystick getButtonFox()
|
||||
{
|
||||
return m_buttonFox.getJoyStick();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
package frc4388.robot.commands.auto;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import frc4388.robot.commands.drive.GotoCoordinates;
|
||||
import frc4388.robot.commands.drive.GotoCoordinatesRobotRelative;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
import frc4388.robot.subsystems.Pneumatics;
|
||||
|
||||
@@ -30,15 +30,15 @@ public class AutoPath1FromCenter extends SequentialCommandGroup {
|
||||
|
||||
addCommands( new Wait(m_drive, 0, 1),
|
||||
//shoot pre-loaded 3 balls
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 75, 44, -90),
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 75, 44, -90),
|
||||
//Start Intake Ball 1
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 0, 12),
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 0, 28),
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 0, 12),
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 0, 28),
|
||||
//Start Intake Ball 2
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 0, 8),
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 0, 28),
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 0, 8),
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 0, 28),
|
||||
//Start Intake Ball 3
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 0, 8),
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 0, 8),
|
||||
new Wait(m_drive, 0, 2)
|
||||
//Shoot 3 Balls
|
||||
);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
package frc4388.robot.commands.auto;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import frc4388.robot.commands.drive.GotoCoordinates;
|
||||
import frc4388.robot.commands.drive.GotoCoordinatesRobotRelative;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
import frc4388.robot.subsystems.Pneumatics;
|
||||
|
||||
@@ -29,18 +29,25 @@ public class AutoPath2FromRight extends SequentialCommandGroup {
|
||||
m_pneumatics = subsystem2;
|
||||
|
||||
addCommands( new Wait(m_drive, 0, 1),
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 0, 77),
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 0, 77),
|
||||
//Start Intake Ball 1
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 0, 8),
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 0, 28),
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 0, 8),
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 0, 28),
|
||||
//Start Intake Ball 2
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 0, 8),
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 0, 8),
|
||||
//Shoot 5 Balls
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 0, 28),
|
||||
//Start Intake Ball 1 (second round)
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 0, 8),
|
||||
//Start Moving to 4th Ball
|
||||
new GotoCoordinates(m_drive, m_pneumatics, 60, -50),
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 0, 28),
|
||||
//Start Intake Ball 6 (Ball 1 second round)
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 0, 8),
|
||||
//Move to 7th Ball
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 86.7, -64.11, -180),
|
||||
//Move to 8th Ball
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, -6.34, 15.31, 90),
|
||||
//Move to 9th Ball
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, 7.11, 24.41, 0),
|
||||
//Move to 10th Ball
|
||||
new GotoCoordinatesRobotRelative(m_drive, m_pneumatics, -6.34, 13.30),
|
||||
//Shoot 5 more Balls (Total 10 Ball Autonomous Path)
|
||||
new Wait(m_drive, 0, 2)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.auto;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.RamseteCommand;
|
||||
import edu.wpi.first.wpilibj2.command.RunCommand;
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import frc4388.robot.commands.drive.TurnDegrees;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
// https://docs.wpilib.org/en/latest/docs/software/commandbased/convenience-features.html
|
||||
public class DriveOffLineBackward extends SequentialCommandGroup {
|
||||
/**
|
||||
* Creates a new DriveOffLineBackward.
|
||||
*/
|
||||
public DriveOffLineBackward(Drive drive, RamseteCommand[] paths) {
|
||||
// Add your commands in the super() call, e.g.
|
||||
// super(new FooCommand(), new BarCommand());
|
||||
|
||||
addCommands(
|
||||
new TankDriveVelocity(drive, -1, -1, 2)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.auto;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.RamseteCommand;
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
// https://docs.wpilib.org/en/latest/docs/software/commandbased/convenience-features.html
|
||||
public class DriveOffLineForward extends SequentialCommandGroup {
|
||||
/**
|
||||
* Creates a new DriveOffLineForward.
|
||||
*/
|
||||
public DriveOffLineForward(Drive drive, RamseteCommand[] paths) {
|
||||
// Add your commands in the super() call, e.g.
|
||||
// super(new FooCommand(), new BarCommand());
|
||||
|
||||
addCommands(
|
||||
paths[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.auto;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.RamseteCommand;
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
// https://docs.wpilib.org/en/latest/docs/software/commandbased/convenience-features.html
|
||||
public class EightBallAutoMiddle extends SequentialCommandGroup {
|
||||
/**
|
||||
* Creates a new EightBallAutoMiddle.
|
||||
*/
|
||||
public EightBallAutoMiddle(Drive drive, RamseteCommand[] paths) {
|
||||
// Add your commands in the super() call, e.g.
|
||||
// super(new FooCommand(), new BarCommand());
|
||||
|
||||
addCommands(
|
||||
paths[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.auto;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.RamseteCommand;
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
// https://docs.wpilib.org/en/latest/docs/software/commandbased/convenience-features.html
|
||||
public class FiveBallAutoMiddle extends SequentialCommandGroup {
|
||||
/**
|
||||
* Creates a new FiveBallAutoMiddle.
|
||||
*/
|
||||
public FiveBallAutoMiddle(Drive drive, RamseteCommand[] paths) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
addCommands(
|
||||
paths[0],
|
||||
new TankDriveVelocity(drive, -3.2, -0.2, 0.8)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.auto;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
import edu.wpi.first.wpilibj.Filesystem;
|
||||
import edu.wpi.first.wpilibj.trajectory.Trajectory;
|
||||
import edu.wpi.first.wpilibj.trajectory.TrajectoryUtil;
|
||||
import edu.wpi.first.wpilibj2.command.RamseteCommand;
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import frc4388.robot.RobotContainer;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
// https://docs.wpilib.org/en/latest/docs/software/commandbased/convenience-features.html
|
||||
public class SixBallAutoMiddle extends SequentialCommandGroup {
|
||||
/**
|
||||
* Creates a new SixBallAutoMiddle.
|
||||
*/
|
||||
public SixBallAutoMiddle(Drive drive, RamseteCommand[] paths) {
|
||||
// Add your commands in the super() call, e.g.
|
||||
// super(new FooCommand(), new BarCommand());
|
||||
|
||||
addCommands(
|
||||
paths[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.auto;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
|
||||
public class TankDriveVelocity extends CommandBase {
|
||||
Drive m_drive;
|
||||
double m_leftTargetVel;
|
||||
double m_rightTargetVel;
|
||||
|
||||
double m_targetTime;
|
||||
double m_firstTimeSec;
|
||||
double m_currentTimeSec;
|
||||
double m_diffSec;
|
||||
|
||||
/**
|
||||
* Creates a new TankDriveVelocity.
|
||||
*/
|
||||
public TankDriveVelocity(Drive subsystem, double leftTargetVel, double rightTargetVel, double targetTime) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
m_drive = subsystem;
|
||||
m_leftTargetVel = leftTargetVel;
|
||||
m_rightTargetVel = rightTargetVel;
|
||||
m_targetTime = targetTime;
|
||||
addRequirements(subsystem);
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {
|
||||
m_firstTimeSec = (System.currentTimeMillis() / 1000);
|
||||
m_diffSec = 0;
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
m_currentTimeSec = (System.currentTimeMillis() / 1000);
|
||||
m_diffSec = m_currentTimeSec - m_firstTimeSec;
|
||||
|
||||
if (m_diffSec < m_targetTime) {
|
||||
m_drive.tankDriveVelocity(m_leftTargetVel, m_rightTargetVel);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
if (m_diffSec >= m_targetTime) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.auto;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.ParallelDeadlineGroup;
|
||||
import edu.wpi.first.wpilibj2.command.RamseteCommand;
|
||||
import edu.wpi.first.wpilibj2.command.RunCommand;
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import frc4388.robot.Constants.IntakeConstants;
|
||||
import frc4388.robot.commands.shooter.CalibrateShooter;
|
||||
import frc4388.robot.commands.shooter.PrepChecker;
|
||||
import frc4388.robot.commands.shooter.ShootPrepGroup;
|
||||
import frc4388.robot.commands.storage.RunStorage;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
import frc4388.robot.subsystems.Intake;
|
||||
import frc4388.robot.subsystems.Shooter;
|
||||
import frc4388.robot.subsystems.ShooterAim;
|
||||
import frc4388.robot.subsystems.ShooterHood;
|
||||
import frc4388.robot.subsystems.Storage;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
// https://docs.wpilib.org/en/latest/docs/software/commandbased/convenience-features.html
|
||||
public class TenBallAutoMiddle extends SequentialCommandGroup {
|
||||
/**
|
||||
* Creates a new TenBallAutoMiddle.
|
||||
*/
|
||||
public TenBallAutoMiddle(ShooterHood shooterHood, Storage storage, Intake intake, Shooter shooter, ShooterAim shooterAim, Drive drive, RamseteCommand[] paths) {
|
||||
// Add your commands in the super() call, e.g.
|
||||
// super(new FooCommand(), new BarCommand());
|
||||
addCommands(
|
||||
new ParallelDeadlineGroup(
|
||||
new Wait(drive, 0.1, 0),
|
||||
new CalibrateShooter(shooter, shooterAim, shooterHood)
|
||||
),
|
||||
new ParallelDeadlineGroup(
|
||||
new Wait(drive, 1, 0),
|
||||
new RunCommand(() -> shooterAim.runShooterWithInput(-0.75), shooterAim)
|
||||
),
|
||||
new ParallelDeadlineGroup(
|
||||
new Wait(drive, 4, 0),
|
||||
new PrepChecker(shooter, shooterAim),
|
||||
new RunCommand(() -> intake.runExtender(IntakeConstants.EXTENDER_SPEED), intake),
|
||||
new ShootPrepGroup(shooter, shooterAim, shooterHood, storage)
|
||||
),
|
||||
new ParallelDeadlineGroup(
|
||||
new ShootPrepGroup(shooter, shooterAim, shooterHood, storage),
|
||||
new RunStorage(storage)
|
||||
)
|
||||
//paths[0],
|
||||
//paths[1]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public class DriveWithJoystick extends CommandBase {
|
||||
}
|
||||
*/
|
||||
|
||||
m_drive.driveWithInput(moveOutput, steerOutput);
|
||||
m_drive.driveWithInput(-moveOutput, steerOutput);
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.drive;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
import frc4388.robot.subsystems.Pneumatics;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
// https://docs.wpilib.org/en/latest/docs/software/commandbased/convenience-features.html
|
||||
public class GotoCoordinatesFieldRelative extends SequentialCommandGroup {
|
||||
/**
|
||||
* Creates a new GotoCoordinatesFieldRelative.
|
||||
*/
|
||||
public GotoCoordinatesFieldRelative(Drive susbsytem, Pneumatics subsystem2, double xTarget, double yTarget) {
|
||||
// Add your commands in the super() call, e.g.
|
||||
// super(new FooCommand(), new BarCommand());
|
||||
addCommands(
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -15,7 +15,7 @@ import frc4388.robot.subsystems.Pneumatics;
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
// https://docs.wpilib.org/en/latest/docs/software/commandbased/convenience-features.html
|
||||
public class GotoCoordinates extends SequentialCommandGroup {
|
||||
public class GotoCoordinatesRobotRelative extends SequentialCommandGroup {
|
||||
Drive m_drive;
|
||||
Pneumatics m_pneumatics;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class GotoCoordinates extends SequentialCommandGroup {
|
||||
/**
|
||||
* Creates a new GotoPosition.
|
||||
*/
|
||||
public GotoCoordinates(Drive subsystem, Pneumatics subsystem2, double xTarget, double yTarget, double endAngle) {
|
||||
public GotoCoordinatesRobotRelative(Drive subsystem, Pneumatics subsystem2, double xTarget, double yTarget, double endAngle) {
|
||||
// Add your commands in the super() call, e.g.
|
||||
// super(new FooCommand(), new BarCommand());
|
||||
m_drive = subsystem;
|
||||
@@ -49,7 +49,7 @@ public class GotoCoordinates extends SequentialCommandGroup {
|
||||
new TurnDegrees(m_drive, m_endAngle - m_currentAngle));
|
||||
}
|
||||
|
||||
public GotoCoordinates(Drive subsystem, Pneumatics subsystem2, double xTarget, double yTarget) {
|
||||
public GotoCoordinatesRobotRelative(Drive subsystem, Pneumatics subsystem2, double xTarget, double yTarget) {
|
||||
m_drive = subsystem;
|
||||
m_pneumatics = subsystem2;
|
||||
|
||||
@@ -9,6 +9,7 @@ package frc4388.robot.commands.drive;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
import frc4388.robot.subsystems.Shooter;
|
||||
|
||||
public class PlaySongDrive extends CommandBase {
|
||||
private Drive m_drive;
|
||||
@@ -16,10 +17,10 @@ public class PlaySongDrive extends CommandBase {
|
||||
/**
|
||||
* Creates a new PlaySongDrive.
|
||||
*/
|
||||
public PlaySongDrive(Drive subsystem) {
|
||||
public PlaySongDrive(Drive subsystem, Shooter shooter) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
m_drive = subsystem;
|
||||
addRequirements(m_drive);
|
||||
addRequirements(m_drive, shooter);
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.drive;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.subsystems.Drive;
|
||||
|
||||
public class SkipSong extends CommandBase {
|
||||
Drive m_drive;
|
||||
int m_index;
|
||||
|
||||
/**
|
||||
* Creates a new SkipSong.
|
||||
*/
|
||||
public SkipSong(Drive m_robotDrive, int index) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
m_drive = m_robotDrive;
|
||||
m_index = index;
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {
|
||||
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
String[] songs = m_drive.songsStrings;
|
||||
String song = m_drive.m_currentSong;
|
||||
|
||||
for (int i = 0; i < songs.length; i++) {
|
||||
if (songs[i] == song) {
|
||||
m_drive.selectSong(songs[i + m_index]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.intake;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.Constants.IntakeConstants;
|
||||
import frc4388.robot.subsystems.Intake;
|
||||
|
||||
public class RunIntake extends CommandBase {
|
||||
Intake m_intake;
|
||||
/**
|
||||
* Creates a new RunIntake.
|
||||
*/
|
||||
public RunIntake(Intake subsystem) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
m_intake = subsystem;
|
||||
addRequirements(m_intake);
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
m_intake.runIntake(IntakeConstants.INTAKE_SPEED);
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
package frc4388.robot.commands.shooter;
|
||||
|
||||
import com.revrobotics.CANDigitalInput.LimitSwitchPolarity;
|
||||
import com.revrobotics.CANSparkMax.SoftLimitDirection;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
@@ -59,6 +60,10 @@ public class CalibrateShooter extends CommandBase {
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
if (m_shooterAim.m_shooterRotateMotor.getReverseLimitSwitch(LimitSwitchPolarity.kNormallyOpen).get() &&
|
||||
m_shooterHood.m_angleAdjustMotor.getReverseLimitSwitch(LimitSwitchPolarity.kNormallyOpen).get()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.shooter;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.subsystems.Shooter;
|
||||
import frc4388.robot.subsystems.ShooterAim;
|
||||
|
||||
public class PrepChecker extends CommandBase {
|
||||
Shooter m_shooter;
|
||||
ShooterAim m_shooterAim;
|
||||
|
||||
/**
|
||||
* Creates a new PrepChecker.
|
||||
*/
|
||||
public PrepChecker(Shooter shooter, ShooterAim shooterAim) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
m_shooter = shooter;
|
||||
m_shooterAim = shooterAim;
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
if (m_shooterAim.m_isAimReady && m_shooter.m_isDrumReady) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.shooter;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.subsystems.Leveler;
|
||||
import frc4388.robot.subsystems.ShooterHood;
|
||||
import frc4388.utility.controller.IHandController;
|
||||
|
||||
public class RunHoodWithJoystick extends CommandBase {
|
||||
private ShooterHood m_hood;
|
||||
private IHandController m_controller;
|
||||
|
||||
/**
|
||||
* Creates a new RunLevelerWithJoystick to control the leveler with an Xbox controller.
|
||||
* @param subsystem pass the Hood subsystem from {@link frc4388.robot.RobotContainer#RobotContainer() RobotContainer}
|
||||
* @param controller pass the Operator {@link frc4388.utility.controller.IHandController#getClass() IHandController} using the
|
||||
* {@link frc4388.robot.RobotContainer#getOperatorJoystick() getOperatorJoystick()} method in
|
||||
* {@link frc4388.robot.RobotContainer#RobotContainer() RobotContainer}
|
||||
*/
|
||||
public RunHoodWithJoystick(ShooterHood subsystem, IHandController controller) {
|
||||
m_hood = subsystem;
|
||||
m_controller = controller;
|
||||
addRequirements(m_hood);
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
double input = m_controller.getRightYAxis();
|
||||
m_hood.runHood(input);
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.shooter;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.subsystems.Shooter;
|
||||
import frc4388.robot.subsystems.ShooterAim;
|
||||
import frc4388.robot.subsystems.ShooterHood;
|
||||
|
||||
public class ShooterGoalPosition extends CommandBase {
|
||||
Shooter m_shooter;
|
||||
ShooterHood m_hood;
|
||||
ShooterAim m_aim;
|
||||
/**
|
||||
* Creates a new ShooterGoalPosition.
|
||||
*/
|
||||
public ShooterGoalPosition(Shooter shooterSub, ShooterHood hoodSub, ShooterAim aimSub) {
|
||||
m_shooter = shooterSub;
|
||||
m_hood = hoodSub;
|
||||
m_aim = aimSub;
|
||||
addRequirements(m_shooter,m_hood,m_aim);
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
m_shooter.runDrumShooterVelocityPID(5000);
|
||||
m_hood.runAngleAdjustPID(3);
|
||||
m_aim.runshooterRotatePID(-26.5);
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.shooter;
|
||||
|
||||
import edu.wpi.first.wpilibj.XboxController;
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.RobotContainer;
|
||||
|
||||
public class ShooterManual extends CommandBase {
|
||||
public boolean isManual = false;
|
||||
/**
|
||||
* Creates a new ShooterManual.
|
||||
*/
|
||||
public ShooterManual(boolean man) {
|
||||
isManual = man;
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
RobotContainer.m_isShooterManual = isManual;
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
RobotContainer.m_isShooterManual = isManual;
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.shooter;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.subsystems.Shooter;
|
||||
import frc4388.robot.subsystems.ShooterAim;
|
||||
import frc4388.robot.subsystems.ShooterHood;
|
||||
|
||||
public class ShooterTrenchPosition extends CommandBase {
|
||||
Shooter m_shooter;
|
||||
ShooterHood m_hood;
|
||||
ShooterAim m_aim;
|
||||
/**
|
||||
* Creates a new ShooterTrenchPosition.
|
||||
*/
|
||||
public ShooterTrenchPosition(Shooter shooterSub, ShooterHood hoodSub, ShooterAim aimSub) {
|
||||
m_shooter = shooterSub;
|
||||
m_hood = hoodSub;
|
||||
m_aim = aimSub;
|
||||
addRequirements(m_shooter,m_hood,m_aim);
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
m_shooter.runDrumShooterVelocityPID(5000);
|
||||
m_hood.runAngleAdjustPID(3);
|
||||
m_aim.runshooterRotatePID(-26.5);
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.Constants.StorageConstants;
|
||||
import frc4388.robot.subsystems.Storage;
|
||||
import frc4388.robot.subsystems.Storage.StorageMode;
|
||||
|
||||
public class ManageStorage extends CommandBase {
|
||||
Storage m_storage;
|
||||
@@ -26,17 +27,13 @@ public class ManageStorage extends CommandBase {
|
||||
|
||||
/* Used for intaking a ball. Keeps track off when the 2nd ball in storage has moved */
|
||||
boolean m_isStorageEmpty = true;
|
||||
|
||||
public enum StorageMode{IDLE, INTAKE, RESET};
|
||||
StorageMode m_storageMode = StorageMode.IDLE;
|
||||
|
||||
/**
|
||||
* Creates a new ManageStorage.
|
||||
*/
|
||||
public ManageStorage(Storage m_robotStorage, StorageMode storageMode) {
|
||||
public ManageStorage(Storage m_robotStorage) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
m_storage = m_robotStorage;
|
||||
m_storageMode = storageMode;
|
||||
addRequirements(m_storage);
|
||||
}
|
||||
|
||||
@@ -50,7 +47,7 @@ public class ManageStorage extends CommandBase {
|
||||
|
||||
m_isStorageEmpty = !m_isBallInStorage;
|
||||
|
||||
if (m_storageMode == StorageMode.RESET) {
|
||||
if (m_storage.m_storageMode == StorageMode.RESET) {
|
||||
m_resetStartTime = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
@@ -68,12 +65,14 @@ public class ManageStorage extends CommandBase {
|
||||
SmartDashboard.putBoolean("!Ball Storage!", m_isBallInStorage);
|
||||
SmartDashboard.putBoolean("!Ball Shooter!", m_isBallInShooter);
|
||||
|
||||
if (m_storageMode == StorageMode.IDLE) {
|
||||
if (m_storage.m_storageMode == StorageMode.IDLE) {
|
||||
runIdle();
|
||||
} else if (m_storageMode == StorageMode.INTAKE) {
|
||||
} else if (m_storage.m_storageMode == StorageMode.INTAKE) {
|
||||
runIntake();
|
||||
} else if (m_storageMode == StorageMode.RESET) {
|
||||
} else if (m_storage.m_storageMode == StorageMode.RESET) {
|
||||
runReset();
|
||||
} else if (m_storage.m_storageMode == StorageMode.MANUAL) {
|
||||
runManual();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,10 +90,10 @@ public class ManageStorage extends CommandBase {
|
||||
}
|
||||
if (m_isStorageEmpty && m_isBallInStorage) { // If Ball moves into storage, set storage to full and swtich to idle mode
|
||||
m_isStorageEmpty = false;
|
||||
m_storageMode = StorageMode.IDLE;
|
||||
m_storage.changeStorageMode(StorageMode.IDLE);
|
||||
}
|
||||
} else {
|
||||
m_storageMode = StorageMode.IDLE;
|
||||
m_storage.changeStorageMode(StorageMode.IDLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +105,7 @@ public class ManageStorage extends CommandBase {
|
||||
m_storage.runStorage(0);
|
||||
|
||||
if (m_isBallInIntake) {
|
||||
m_storageMode = StorageMode.INTAKE;
|
||||
m_storage.changeStorageMode(StorageMode.INTAKE);
|
||||
}
|
||||
m_isStorageEmpty = !m_isBallInStorage;
|
||||
}
|
||||
@@ -120,17 +119,24 @@ public class ManageStorage extends CommandBase {
|
||||
m_storage.runStorage(-StorageConstants.STORAGE_SPEED);
|
||||
|
||||
if (m_isBallInIntake) {
|
||||
m_storageMode = StorageMode.INTAKE;
|
||||
m_storage.changeStorageMode(StorageMode.INTAKE);
|
||||
} else if (m_resetStartTime + StorageConstants.STORAGE_TIMEOUT < System.currentTimeMillis()) {
|
||||
m_storageMode = StorageMode.IDLE;
|
||||
m_storage.changeStorageMode(StorageMode.IDLE);
|
||||
}
|
||||
m_isStorageEmpty = !m_isBallInStorage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Switches Storage to Manual only
|
||||
*/
|
||||
private void runManual() {
|
||||
m_storage.runStorage(0);
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
m_storageMode = StorageMode.RESET;
|
||||
m_storage.changeStorageMode(StorageMode.RESET);
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
|
||||
@@ -11,6 +11,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.Constants.StorageConstants;
|
||||
import frc4388.robot.subsystems.Storage;
|
||||
import frc4388.robot.subsystems.Storage.StorageMode;
|
||||
|
||||
public class ManageStoragePID extends CommandBase {
|
||||
Storage m_storage;
|
||||
@@ -30,16 +31,13 @@ public class ManageStoragePID extends CommandBase {
|
||||
/* Used for intaking a ball. Keeps track off when the 2nd ball in storage has moved */
|
||||
boolean m_isStorageEmpty = true;
|
||||
|
||||
public enum StorageMode{IDLE, INTAKE, RESET};
|
||||
StorageMode m_storageMode = StorageMode.IDLE;
|
||||
|
||||
/**
|
||||
* Creates a new ManageStorage.
|
||||
*/
|
||||
public ManageStoragePID(Storage m_robotStorage, StorageMode storageMode) {
|
||||
public ManageStoragePID(Storage m_robotStorage) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
m_storage = m_robotStorage;
|
||||
m_storageMode = storageMode;
|
||||
addRequirements(m_storage);
|
||||
}
|
||||
|
||||
@@ -55,7 +53,7 @@ public class ManageStoragePID extends CommandBase {
|
||||
|
||||
m_intakeStartPos = m_storage.getEncoderPosInches();
|
||||
|
||||
if (m_storageMode == StorageMode.RESET) {
|
||||
if (m_storage.m_storageMode == StorageMode.RESET) {
|
||||
m_resetStartTime = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
@@ -73,11 +71,11 @@ public class ManageStoragePID extends CommandBase {
|
||||
SmartDashboard.putBoolean("!Ball Storage!", m_isBallInStorage);
|
||||
SmartDashboard.putBoolean("!Ball Shooter!", m_isBallInShooter);
|
||||
|
||||
if (m_storageMode == StorageMode.IDLE) {
|
||||
if (m_storage.m_storageMode == StorageMode.IDLE) {
|
||||
runIdle();
|
||||
} else if (m_storageMode == StorageMode.INTAKE) {
|
||||
} else if (m_storage.m_storageMode == StorageMode.INTAKE) {
|
||||
runIntake();
|
||||
} else if (m_storageMode == StorageMode.RESET) {
|
||||
} else if (m_storage.m_storageMode == StorageMode.RESET) {
|
||||
runReset();
|
||||
}
|
||||
}
|
||||
@@ -93,10 +91,10 @@ public class ManageStoragePID extends CommandBase {
|
||||
|
||||
double error = (m_intakeStartPos + StorageConstants.STORAGE_FULL_BALL) - m_storage.getEncoderPosInches();
|
||||
if (m_storage.getEncoderVel() == 0 && Math.abs(error) < 0.5) {
|
||||
m_storageMode = StorageMode.IDLE;
|
||||
m_storage.changeStorageMode(StorageMode.IDLE);
|
||||
}
|
||||
} else {
|
||||
m_storageMode = StorageMode.IDLE;
|
||||
m_storage.changeStorageMode(StorageMode.IDLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +106,7 @@ public class ManageStoragePID extends CommandBase {
|
||||
m_storage.runStorage(0);
|
||||
|
||||
if (m_isBallInIntake) {
|
||||
m_storageMode = StorageMode.INTAKE;
|
||||
m_storage.changeStorageMode(StorageMode.INTAKE);
|
||||
m_intakeStartPos = m_storage.getEncoderPosInches();
|
||||
}
|
||||
m_isStorageEmpty = !m_isBallInStorage;
|
||||
@@ -123,10 +121,10 @@ public class ManageStoragePID extends CommandBase {
|
||||
m_storage.runStorage(-StorageConstants.STORAGE_SPEED);
|
||||
|
||||
if (m_isBallInIntake) {
|
||||
m_storageMode = StorageMode.INTAKE;
|
||||
m_storage.changeStorageMode(StorageMode.INTAKE);
|
||||
m_intakeStartPos = m_storage.getEncoderPosInches();
|
||||
} else if (m_resetStartTime + StorageConstants.STORAGE_TIMEOUT < System.currentTimeMillis()) {
|
||||
m_storageMode = StorageMode.IDLE;
|
||||
m_storage.changeStorageMode(StorageMode.IDLE);
|
||||
}
|
||||
m_isStorageEmpty = !m_isBallInStorage;
|
||||
}
|
||||
@@ -134,7 +132,7 @@ public class ManageStoragePID extends CommandBase {
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
m_storageMode = StorageMode.RESET;
|
||||
m_storage.changeStorageMode(StorageMode.RESET);
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot.commands.storage;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.Constants.StorageConstants;
|
||||
import frc4388.robot.subsystems.Storage;
|
||||
|
||||
public class RunStorage extends CommandBase {
|
||||
Storage m_storage;
|
||||
/**
|
||||
* Creates a new RunStorage.
|
||||
*/
|
||||
public RunStorage(Storage subsystem) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
m_storage = subsystem;
|
||||
addRequirements(m_storage);
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
m_storage.runStorage(StorageConstants.STORAGE_SPEED);
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,7 @@ public class Drive extends SubsystemBase {
|
||||
|
||||
/* Pneumatics Subsystem */
|
||||
public Pneumatics m_pneumaticsSubsystem;
|
||||
Shooter m_shooter;
|
||||
|
||||
/* Low Gear Gains */
|
||||
public static Gains m_gainsDistanceLow = DriveConstants.DRIVE_DISTANCE_GAINS_LOW;
|
||||
@@ -67,6 +68,9 @@ public class Drive extends SubsystemBase {
|
||||
public static Gains m_gainsTurningHigh = DriveConstants.DRIVE_TURNING_GAINS_HIGH;
|
||||
public static Gains m_gainsMotionMagicHigh = DriveConstants.DRIVE_MOTION_MAGIC_GAINS_HIGH;
|
||||
|
||||
/* Back Motor Gains */
|
||||
public static Gains m_gainsVelocityBack = DriveConstants.DRIVE_VELOCITY_GAINS_BACK;
|
||||
|
||||
/* Timey Whimey */
|
||||
public long m_currentTimeMs = System.currentTimeMillis();
|
||||
public long m_lastTimeMs = m_currentTimeMs;
|
||||
@@ -93,7 +97,8 @@ public class Drive extends SubsystemBase {
|
||||
SendableChooser<String> m_songChooser = new SendableChooser<String>();
|
||||
|
||||
/* Misc */
|
||||
String m_currentSong = "";
|
||||
public String m_currentSong = "";
|
||||
public String[] songsStrings;
|
||||
|
||||
/**
|
||||
* Add your docs here.
|
||||
@@ -105,7 +110,7 @@ public class Drive extends SubsystemBase {
|
||||
m_leftBackMotor.configFactoryDefault();
|
||||
m_rightBackMotor.configFactoryDefault();
|
||||
m_pigeon.configFactoryDefault();
|
||||
resetGyroYaw();
|
||||
resetGyroYaw(0);
|
||||
|
||||
m_pigeonGyro = getGyroInterface();
|
||||
|
||||
@@ -145,20 +150,18 @@ public class Drive extends SubsystemBase {
|
||||
|
||||
/* PID for Back Motor Control in Tank Drive Vel */
|
||||
m_rightBackMotor.selectProfileSlot(DriveConstants.SLOT_VELOCITY, DriveConstants.PID_PRIMARY);
|
||||
m_rightBackMotor.config_kF(DriveConstants.SLOT_VELOCITY, m_gainsVelocityLow.m_kF, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_rightBackMotor.config_kP(DriveConstants.SLOT_VELOCITY, m_gainsVelocityLow.m_kP, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_rightBackMotor.config_kI(DriveConstants.SLOT_VELOCITY, m_gainsVelocityLow.m_kI, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_rightBackMotor.config_kD(DriveConstants.SLOT_VELOCITY, m_gainsVelocityLow.m_kD, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_rightBackMotor.configClosedLoopPeakOutput(DriveConstants.SLOT_VELOCITY, m_gainsVelocityLow.m_kPeakOutput,
|
||||
DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_rightBackMotor.config_kF(DriveConstants.SLOT_VELOCITY, m_gainsVelocityBack.m_kF, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_rightBackMotor.config_kP(DriveConstants.SLOT_VELOCITY, m_gainsVelocityBack.m_kP, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_rightBackMotor.config_kI(DriveConstants.SLOT_VELOCITY, m_gainsVelocityBack.m_kI, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_rightBackMotor.config_kD(DriveConstants.SLOT_VELOCITY, m_gainsVelocityBack.m_kD, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_rightBackMotor.configClosedLoopPeakOutput(DriveConstants.SLOT_VELOCITY, m_gainsVelocityBack.m_kPeakOutput, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
|
||||
m_leftBackMotor.selectProfileSlot(DriveConstants.SLOT_VELOCITY, DriveConstants.PID_PRIMARY);
|
||||
m_leftBackMotor.config_kF(DriveConstants.SLOT_VELOCITY, m_gainsVelocityLow.m_kF, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_leftBackMotor.config_kP(DriveConstants.SLOT_VELOCITY, m_gainsVelocityLow.m_kP, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_leftBackMotor.config_kI(DriveConstants.SLOT_VELOCITY, m_gainsVelocityLow.m_kI, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_leftBackMotor.config_kD(DriveConstants.SLOT_VELOCITY, m_gainsVelocityLow.m_kD, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_leftBackMotor.configClosedLoopPeakOutput(DriveConstants.SLOT_VELOCITY, m_gainsVelocityLow.m_kPeakOutput,
|
||||
DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_leftBackMotor.config_kF(DriveConstants.SLOT_VELOCITY, m_gainsVelocityBack.m_kF, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_leftBackMotor.config_kP(DriveConstants.SLOT_VELOCITY, m_gainsVelocityBack.m_kP, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_leftBackMotor.config_kI(DriveConstants.SLOT_VELOCITY, m_gainsVelocityBack.m_kI, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_leftBackMotor.config_kD(DriveConstants.SLOT_VELOCITY, m_gainsVelocityBack.m_kD, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
m_leftBackMotor.configClosedLoopPeakOutput(DriveConstants.SLOT_VELOCITY, m_gainsVelocityBack.m_kPeakOutput, DriveConstants.DRIVE_TIMEOUT_MS);
|
||||
|
||||
/* Reset Sensors for WPI_TalonFXs */
|
||||
resetEncoders();
|
||||
@@ -282,11 +285,12 @@ public class Drive extends SubsystemBase {
|
||||
/* Create chooser to choose song to play */
|
||||
File songsDir = new File(Filesystem.getDeployDirectory().getAbsolutePath() + "/songs");
|
||||
System.err.println(songsDir.getPath());
|
||||
String[] songsStrings = songsDir.list();
|
||||
songsStrings = songsDir.list();
|
||||
for (String songString : songsStrings) {
|
||||
m_songChooser.addOption(songString, songsDir.getAbsolutePath() + "/" + songString);
|
||||
}
|
||||
Shuffleboard.getTab("Songs").add(m_songChooser);
|
||||
selectSong(songsStrings[0]);
|
||||
|
||||
/* Start counting time */
|
||||
m_lastTimeMs = System.currentTimeMillis();
|
||||
@@ -305,8 +309,10 @@ public class Drive extends SubsystemBase {
|
||||
*
|
||||
* @param subsystem Subsystem needed.
|
||||
*/
|
||||
public void passRequiredSubsystem(Pneumatics subsystem) {
|
||||
public void passRequiredSubsystem(Pneumatics subsystem, Shooter shooter) {
|
||||
m_pneumaticsSubsystem = subsystem;
|
||||
m_shooter = shooter;
|
||||
m_orchestra.addInstrument(m_shooter.m_shooterFalcon);
|
||||
}
|
||||
|
||||
public void updateTime() {
|
||||
@@ -333,8 +339,9 @@ public class Drive extends SubsystemBase {
|
||||
m_totalRightDistanceInches += ticksToInches(m_currentRightPosTicks - m_lastRightPosTicks);
|
||||
m_totalLeftDistanceInches += ticksToInches(m_currentLeftPosTicks - m_lastLeftPosTicks);
|
||||
|
||||
m_odometry.update(Rotation2d.fromDegrees(getHeading()), getDistanceInches(m_leftFrontMotor),
|
||||
-getDistanceInches(m_rightFrontMotor));
|
||||
m_odometry.update(Rotation2d.fromDegrees( getHeading()),
|
||||
inchesToMeters(getDistanceInches(m_leftFrontMotor)),
|
||||
-inchesToMeters(getDistanceInches(m_rightFrontMotor)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -342,7 +349,7 @@ public class Drive extends SubsystemBase {
|
||||
* using the Differential Drive class to manage the two inputs
|
||||
*/
|
||||
public void driveWithInput(double move, double steer) {
|
||||
m_driveTrain.arcadeDrive(move, steer);
|
||||
m_driveTrain.arcadeDrive(-move, steer);
|
||||
m_leftBackMotor.follow(m_leftFrontMotor);
|
||||
m_rightBackMotor.follow(m_rightFrontMotor);
|
||||
}
|
||||
@@ -465,8 +472,6 @@ public class Drive extends SubsystemBase {
|
||||
m_rightBackMotor.selectProfileSlot(DriveConstants.SLOT_VELOCITY, DriveConstants.PID_PRIMARY);
|
||||
m_leftBackMotor.selectProfileSlot(DriveConstants.SLOT_VELOCITY, DriveConstants.PID_PRIMARY);
|
||||
|
||||
System.err.println(moveVelLeft);
|
||||
|
||||
m_rightBackMotor.set(TalonFXControlMode.Velocity, moveVelRight);
|
||||
m_leftBackMotor.set(TalonFXControlMode.Velocity, moveVelLeft);
|
||||
m_leftFrontMotor.follow(m_leftBackMotor);
|
||||
@@ -512,24 +517,25 @@ public class Drive extends SubsystemBase {
|
||||
*/
|
||||
public void setOdometry(Pose2d pose) {
|
||||
resetEncoders();
|
||||
resetGyroYaw(pose.getRotation().getDegrees());
|
||||
m_odometry.resetPosition(pose, Rotation2d.fromDegrees(getHeading()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the yaw of the pigeon
|
||||
*/
|
||||
public void resetGyroYaw() {
|
||||
m_pigeon.setYaw(0);
|
||||
m_pigeon.setAccumZAngle(0);
|
||||
resetGyroAngles();
|
||||
public void resetGyroYaw(double angle) {
|
||||
m_pigeon.setYaw(angle);
|
||||
m_pigeon.setAccumZAngle(angle);
|
||||
resetGyroAngles(angle);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add docs here
|
||||
*/
|
||||
public void resetGyroAngles() {
|
||||
m_lastAngleYaw = 0;
|
||||
m_currentAngleYaw = 0;
|
||||
public void resetGyroAngles(double angle) {
|
||||
m_lastAngleYaw = angle;
|
||||
m_currentAngleYaw = angle;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -574,7 +580,7 @@ public class Drive extends SubsystemBase {
|
||||
@Override
|
||||
public void reset() {
|
||||
// TODO Auto-generated method stub
|
||||
resetGyroYaw();
|
||||
resetGyroYaw(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -871,8 +877,11 @@ public class Drive extends SubsystemBase {
|
||||
|
||||
//SmartDashboard.putNumber("Right Motor Velocity Int Sensor", m_rightFrontMotor.getSensorCollection().getIntegratedSensorVelocity());
|
||||
//SmartDashboard.putNumber("Left Motor Velocity Int Sensor", m_leftFrontMotor.getSensorCollection().getIntegratedSensorVelocity());
|
||||
//SmartDashboard.putNumber("Left Motor Pos Inches", getDistanceInches(m_rightFrontMotor));
|
||||
//SmartDashboard.putNumber("Right Motor Pos Inches", getDistanceInches(m_leftFrontMotor));
|
||||
SmartDashboard.putNumber("Left Motor Pos Inches", getDistanceInches(m_rightFrontMotor));
|
||||
SmartDashboard.putNumber("Right Motor Pos Inches", getDistanceInches(m_leftFrontMotor));
|
||||
|
||||
SmartDashboard.putNumber("Left Motor Pos Meters", inchesToMeters(getDistanceInches(m_rightFrontMotor)));
|
||||
SmartDashboard.putNumber("Right Motor Pos Meters", inchesToMeters(getDistanceInches(m_leftFrontMotor)));
|
||||
|
||||
/*SmartDashboard.putNumber("Right Front Velocity", m_rightFrontMotor.getSensorCollection().getIntegratedSensorVelocity());
|
||||
SmartDashboard.putNumber("Left Front Velocity", m_leftFrontMotor.getSensorCollection().getIntegratedSensorVelocity());
|
||||
@@ -900,7 +909,7 @@ public class Drive extends SubsystemBase {
|
||||
//SmartDashboard.putNumber("PID 0 Pos", m_rightFrontMotor.getSelectedSensorPosition(DriveConstants.PID_PRIMARY));
|
||||
//SmartDashboard.putNumber("PID 1 Pos", m_rightFrontMotor.getSelectedSensorPosition(DriveConstants.PID_TURN));
|
||||
|
||||
//SmartDashboard.putString("Odometry Values Meters", getPose().toString());
|
||||
SmartDashboard.putString("Odometry Values Meters", getPose().toString());
|
||||
//SmartDashboard.putNumber("Odometry Heading", getHeading());
|
||||
|
||||
//SmartDashboard.putNumber("Time Seconds", m_currentTimeSec);
|
||||
@@ -909,6 +918,7 @@ public class Drive extends SubsystemBase {
|
||||
if (m_currentSong != m_songChooser.getSelected()){
|
||||
m_currentSong = m_songChooser.getSelected();
|
||||
selectSong(m_currentSong);
|
||||
|
||||
//System.err.println(m_currentSong);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -916,4 +926,6 @@ public class Drive extends SubsystemBase {
|
||||
// e.printStackTrace(System.err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -88,6 +88,11 @@ public class ShooterHood extends SubsystemBase {
|
||||
m_angleAdjustPIDController.setReference(targetAngle, ControlType.kPosition);
|
||||
}
|
||||
|
||||
public void runHood(double input)
|
||||
{
|
||||
m_angleAdjustMotor.set(input);
|
||||
}
|
||||
|
||||
public void resetGyroAngleAdj(){
|
||||
m_angleEncoder.setPosition(0);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,9 @@ public class Storage extends SubsystemBase {
|
||||
|
||||
public boolean m_isStorageReadyToFire = false;
|
||||
|
||||
public enum StorageMode{IDLE, INTAKE, RESET, MANUAL};
|
||||
public StorageMode m_storageMode = StorageMode.IDLE;
|
||||
|
||||
/**
|
||||
* Creates a new Storage.
|
||||
*/
|
||||
@@ -134,4 +137,8 @@ public class Storage extends SubsystemBase {
|
||||
public boolean getBeamIntake(){
|
||||
return m_beamIntake.get();
|
||||
}
|
||||
|
||||
public void changeStorageMode(StorageMode storageMode){
|
||||
m_storageMode = storageMode;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.utility.controller;
|
||||
|
||||
/**
|
||||
* button fox
|
||||
* @author Ryan Manley
|
||||
*/
|
||||
public class ButtonFox {
|
||||
public static final int RIGHT_SWITCH = 1;
|
||||
public static final int MIDDLE_SWITCH = 2;
|
||||
public static final int LEFT_SWITCH = 3;
|
||||
public static final int RIGHT_BUTTON = 4;
|
||||
public static final int LEFT_BUTTON = 5;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.utility.controller;
|
||||
|
||||
import edu.wpi.first.wpilibj.GenericHID;
|
||||
import edu.wpi.first.wpilibj2.command.button.Button;
|
||||
import frc4388.robot.RobotContainer;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
/**
|
||||
* A {@link Button} that gets its state from a {@link GenericHID}.
|
||||
*/
|
||||
public class JoystickManualButton extends Button {
|
||||
private final GenericHID m_joystick;
|
||||
private final int m_buttonNumber;
|
||||
private boolean m_buttonType;
|
||||
|
||||
/**
|
||||
* Creates a joystick button for triggering commands.
|
||||
*
|
||||
* @param joystick The GenericHID object that has the button (e.g. Joystick,
|
||||
* KinectStick, etc)
|
||||
* @param buttonNumber The button number (see
|
||||
* {@link GenericHID#getRawButton(int) }
|
||||
*/
|
||||
public JoystickManualButton(GenericHID joystick, int buttonNumber, boolean buttonType) {
|
||||
requireNonNullParam(joystick, "joystick", "JoystickButton");
|
||||
|
||||
m_joystick = joystick;
|
||||
m_buttonNumber = buttonNumber;
|
||||
m_buttonType = buttonType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the joystick button.
|
||||
*
|
||||
* @return The value of the joystick button
|
||||
*/
|
||||
@Override
|
||||
public boolean get() {
|
||||
boolean m = RobotContainer.m_isShooterManual;
|
||||
if (m_buttonType == m) {
|
||||
return m_joystick.getRawButton(m_buttonNumber);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,10 @@ public class XboxController implements IHandController
|
||||
m_stick = new Joystick(portNumber);
|
||||
}
|
||||
|
||||
public void setJoystick(Joystick joy) {
|
||||
m_stick = joy;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Joystick for Xbox Controller
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user