This commit is contained in:
Ryan Manley
2022-03-24 19:47:12 -06:00
parent 7e45b507ed
commit 5e399a060a
3 changed files with 10 additions and 8 deletions
+1
View File
@@ -2,6 +2,7 @@ Distance (in) ,Hood Ext. (u) ,Drum Velocity (u/ds)
0 ,-29.5 ,8000 0 ,-29.5 ,8000
78.5 ,-29.5 ,8000 78.5 ,-29.5 ,8000
99 ,-39.62 ,8500 99 ,-39.62 ,8500
111 ,-42 ,9000
127.25 ,-49.12 ,9500 127.25 ,-49.12 ,9500
150 ,-66.22 ,10000 150 ,-66.22 ,10000
164.5 ,-75.52 ,10000 164.5 ,-75.52 ,10000
1 Distance (in) Hood Ext. (u) Drum Velocity (u/ds)
2 0 -29.5 8000
3 78.5 -29.5 8000
4 99 -39.62 8500
5 111 -42 9000
6 127.25 -49.12 9500
7 150 -66.22 10000
8 164.5 -75.52 10000
@@ -519,16 +519,17 @@ public class RobotContainer {
new TrackTarget(m_robotTurret, m_robotBoomBoom, m_robotHood, m_robotVisionOdometry, true), new TrackTarget(m_robotTurret, m_robotBoomBoom, m_robotHood, m_robotVisionOdometry, true),
new RunCommandForTime(new RunCommand(() -> m_robotStorage.runStorage(StorageConstants.STORAGE_SPEED), m_robotStorage), 2.0) new RunCommandForTime(new RunCommand(() -> m_robotStorage.runStorage(StorageConstants.STORAGE_SPEED), m_robotStorage), 2.0)
)); // * weird way of shooting, i think we should make a new TrackTarget with built-in Storage control instead. )); // * weird way of shooting, i think we should make a new TrackTarget with built-in Storage control instead.
// ! POSITIVE Y IS LEFT, POSITIVE X IS BACKWARDS
// ! DRIVE OFF LINE, THEN SHOOT BALL (HOPEFULLY) // ! DRIVE OFF LINE, THEN SHOOT BALL (HOPEFULLY)
return new SequentialCommandGroup( new InstantCommand(() -> m_robotSwerveDrive.resetGyro(), m_robotSwerveDrive), // * reset gyro before moving return new SequentialCommandGroup( new InstantCommand(() -> m_robotSwerveDrive.resetGyro(), m_robotSwerveDrive), // * reset gyro before moving
new DriveWithInputForTime(m_robotSwerveDrive, new double[] {0.0, 0.5, 0.0, 0.0}, 0.5), // * drive out of tarmac new DriveWithInputForTime(m_robotSwerveDrive, new double[] {0.6, 0, 0.0, 0.0}, 0.5), // * drive out of tarmac
new InstantCommand(() -> m_robotSwerveDrive.stopModules(), m_robotSwerveDrive), // * brake new InstantCommand(() -> m_robotSwerveDrive.stopModules(), m_robotSwerveDrive)); // * brake
new RunCommandForTime(new RunCommand(() -> m_robotTurret.runShooterRotatePID((180.0 / Math.PI) * Math.atan2(-(82.83 / 2.00) + 15.56, -(219.25 / 2.00) - 40.44 + 10.00)), m_robotTurret), 1.0, true), // * aim with turret to target // new RunCommandForTime(new RunCommand(() -> m_robotTurret.runShooterRotatePID((180.0 / Math.PI) * Math.atan2(-(82.83 / 2.00) + 15.56, -(219.25 / 2.00) - 40.44 + 10.00)), m_robotTurret), 1.0, true), // * aim with turret to target
weirdAutoShootingGroup, // * shoot // weirdAutoShootingGroup, // * shoot
new InstantCommand(() -> m_robotStorage.runStorage(0.0), m_robotStorage) // * stop running storage // new InstantCommand(() -> m_robotStorage.runStorage(0.0), m_robotStorage) // * stop running storage
); // );
// ! TWO BALL AUTO (HOPEFULLY) // ! TWO BALL AUTO (HOPEFULLY)
// return new SequentialCommandGroup( new ExtenderIntakeGroup(m_robotIntake, m_robotExtender), // * extend out, in preparation of running intake // return new SequentialCommandGroup( new ExtenderIntakeGroup(m_robotIntake, m_robotExtender), // * extend out, in preparation of running intake
@@ -49,7 +49,7 @@ public class DriveWithInputForTime extends CommandBase {
public void execute() { public void execute() {
System.out.println("RUNNING"); System.out.println("RUNNING");
elapsed = System.currentTimeMillis() - start; elapsed = System.currentTimeMillis() - start;
this.swerve.driveWithInput(inputs[0], inputs[1], inputs[2], inputs[3], true); this.swerve.driveWithInput(inputs[0], inputs[1], inputs[2], inputs[3], false);
} }
// Called once the command ends or is interrupted. // Called once the command ends or is interrupted.