Co-Authored-By: Nirvan Bhalala <78400306+nbhalala27@users.noreply.github.com>
This commit is contained in:
Aarav Shah
2021-03-25 16:33:12 -06:00
parent 3ccf20afc6
commit ab1a8a7564
15 changed files with 54 additions and 23 deletions
+10 -10
View File
@@ -1,14 +1,14 @@
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
1.1943219738452617,-2.286,1.0,0.0,true,
3.396233460027056,-2.2025005475745667,1.6761741931327716,0.12370289248212352,true,
4.602336661727758,-2.9818287702119433,0.15462861560265395,-1.1071408877150035,true,
3.656009534239515,-3.810638149842169,-1.2555843586935511,0.21029491721960936,true,
3.3714928815306315,-2.5241280680280873,1.2184734909489143,0.8226242350061197,true,
4.961075049925916,-2.9447179024673065,0.15462861560265395,-1.1071408877150035,true,
3.4147888938993747,-3.754971848225213,-0.8597351027507569,0.8226242350061197,true,
3.3405671584101007,-2.4251657540423888,1.2184734909489143,0.8226242350061197,true,
6.105326805385555,-2.208685692198673,1.5215455775301168,0.4824412806802809,true,
7.144431102235392,-1.4231723249371897,0.08040688011338037,0.6679956194034656,true,
6.17954854087483,-0.6376589576757069,-0.7793282226373774,-0.17318404947497257,true,
5.295072859627648,-1.6829483991496488,0.42058983443921694,-0.9030311151194992,true,
6.575397796817625,-3.4766403401404364,1.7689513624943638,-0.7174767763963148,true,
8.22683141145397,-3.557047220253817,0.6061441731624058,0.4824412806802809,true,
8.301053146943245,-2.2396114153192035,-0.5999590285382981,0.3587383881981576,true,
5.598144946208851,-2.190130258326354,-5.115114604135798,0.06803659086516767,true,
7.286689428589834,-1.287099143206854,-0.3216275204535206,1.7070999162533012,true,
6.154807962378405,-0.6933252592926624,-0.7793282226373774,-0.17318404947497257,true,
5.523923210719577,-1.4602831926818267,0.42058983443921694,-0.9030311151194992,true,
6.612508664562261,-3.303456290665464,1.7689513624943638,-0.7174767763963148,true,
8.239201700702182,-3.4766403401404364,0.9648825613605609,0.8968459704953937,true,
8.381460027056624,-2.2334262706950976,-0.5442927269213422,0.2474057849642466,true,
5.598144946208851,-2.12,-5.115114604135798,0.06803659086516767,true,
+3
View File
@@ -0,0 +1,3 @@
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
1.2190625523416865,-2.295277716936159,2.158615473813051,-0.2968869419570952,true,
2.295277716936159,-0.6685846807962377,-0.061851446241061314,0.5442927269213425,true,
+5
View File
@@ -0,0 +1,5 @@
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
2.295,-0.7613618501578302,-0.2474057849642466,-2.133874895316627,true,
3.804453005218064,-3.7920827159698507,1.6328781807640258,0.25359092958835294,true,
4.521929781614379,-2.9447179024673065,-0.04948115699285083,0.7422173548927398,true,
4.521929781614379,-0.68095497004445,-0.04329601236874314,0.377293822070476,true,
+5
View File
@@ -0,0 +1,5 @@
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
4.589966372479545,-0.68095497004445,0.03711086774463812,-0.8349945242543321,true,
5.622885524705275,-3.68075011273594,2.770944791599561,0.15462861560265395,true,
6.692915544675642,-2.882866456226244,0.12988803710623031,0.9339568382400305,true,
6.8537293049024015,-0.6933252592926624,-0.06803659086516767,0.5937738839141918,true,
+3
View File
@@ -0,0 +1,3 @@
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
6.884655028022934,-0.8912498872640597,0.2721463634606698,-2.752389357727243,true,
8.344349159311989,-2.369499452425433,0.7236619210204207,-0.18555433872318483,true,
+3
View File
@@ -0,0 +1,3 @@
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
0.0,0.0,10.0,0.0,true,
10.0,-10.0,0.0,-10.0,true,
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
@@ -182,7 +182,7 @@ public class RobotContainer {
// 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_robotLime.setDefaultCommand(new RunCommand(() -> m_robotLime.limeOff(), m_robotLime));
m_robotLime.setDefaultCommand(new RunCommand(() -> m_robotLime.limeOff(), m_robotLime));
}
/**
@@ -329,7 +329,10 @@ public class RobotContainer {
m_barrelStart = new BarrelStart(m_robotDrive, buildPaths(barrelStart));
String[] bounce = new String[]{
"Bounce"
"Bounce1",
"Bounce2",
"Bounce3",
"Bounce4"
};
m_bounce = new Bounce(m_robotDrive, this, buildPaths(bounce));
@@ -401,14 +404,7 @@ public class RobotContainer {
//return m_fiveBallAutoMiddle.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
//return m_tenBallAutoMiddle.andThen(()-> m_robotDrive.tankDriveVelocity(0, 0));
//return m_slalom.andThen(()-> m_robotDrive.tankDriveVelocity(0, 0));
//return new SequentialCommandGroup(m_driveOffLineForward,
// new InstantCommand(() -> resetOdometry(new Pose2d())),
// new TankDriveVelocity(m_robotDrive, 1000, 1000, 1));
//return m_barrel.andThen(()-> m_robotDrive.tankDriveVelocity(0, 0));
return m_barrelStart.andThen(()-> m_robotDrive.tankDriveVelocity(1, 1));
//return new SequentialCommandGroup(new TankDriveVelocity(m_robotDrive, 1000, 1000, 3), new TankDriveVelocity(m_robotDrive, 3000, 3000, 1));
//return m_sequentialTest.andThen(() -> m_robotDrive.tankDriveVelocity(0,0));
return m_barrelStart.andThen(()-> m_robotDrive.tankDriveVelocity(0, 0));
} catch (Exception e) {
System.err.println("ERROR");
@@ -10,6 +10,7 @@ package frc4388.robot.commands.auto;
import edu.wpi.first.wpilibj2.command.InstantCommand;
import edu.wpi.first.wpilibj2.command.RamseteCommand;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import edu.wpi.first.wpilibj2.command.CommandBase;
import frc4388.robot.RobotContainer;
import frc4388.robot.subsystems.Drive;
@@ -25,7 +26,9 @@ public class BarrelStart extends SequentialCommandGroup {
// super(new FooCommand(), new BarCommand());
addCommands(
paths[0],
new InstantCommand(() -> drive.tankDriveVelocity(1, 1))
new Wait(drive, 0.01, 1),
new TankDriveVelocity(drive, 3, 3, 1)
//new InstantCommand(() -> drive.tankDriveVelocity(7, 7)).withTimeout(7) //my life be like oooooo aaaaaa ooooo aaaa
);
}
@@ -29,7 +29,15 @@ public class Bounce extends SequentialCommandGroup {
paths[0],
new InstantCommand(() -> drive.switchReversed(true)),
new InstantCommand(() -> robotContainer.resetOdometry(new Pose2d())),
paths[1]
paths[1],
new InstantCommand(() -> drive.switchReversed(false)),
new InstantCommand(() -> robotContainer.resetOdometry(new Pose2d())),
paths[2],
new InstantCommand(() -> drive.switchReversed(true)),
new InstantCommand(() -> robotContainer.resetOdometry(new Pose2d())),
paths[3],
new InstantCommand(() -> drive.switchReversed(false)),
new InstantCommand(() -> robotContainer.resetOdometry(new Pose2d()))
);
}
}