barrelStart works

This commit is contained in:
Aarav Shah
2021-03-12 14:51:05 -07:00
parent fd6ea36e7e
commit 33f96aa252
4 changed files with 59 additions and 5 deletions
+13 -2
View File
@@ -1,3 +1,14 @@
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,
1.1943219738452617,-2.286,1.0,0.0,true,
3.396233460027056,-2.2025005475745667,1.6761741931327716,0.12370289248212352,true,
4.466263479997423,-3.0436802164530046,0.15462861560265395,-1.1071408877150035,true,
3.618898666494878,-3.6374541003671967,-1.2555843586935511,0.21029491721960936,true,
3.4951957740127546,-2.530313212652193,1.2184734909489143,0.8226242350061197,true,
6.105326805385555,-2.208685692198673,1.5215455775301168,0.4824412806802809,true,
6.847544160278296,-1.5035792050505696,0.08040688011338037,0.6679956194034656,true,
6.1362525285060885,-0.8788795980158475,-1.261769503317658,0.012370289248212263,true,
5.4868123429749405,-1.7757255685112412,0.42058983443921694,-0.9030311151194992,true,
6.760952135540809,-3.3405671584101007,1.7689513624943638,-0.7174767763963148,true,
8.096943374347742,-3.3900483154029506,0.6061441731624058,0.4824412806802809,true,
8.053647361978998,-2.4375360432906006,-0.7360322102686343,0.5690333054177668,true,
5.598144946208851,-2.190130258326354,-5.115114604135798,0.06803659086516767,true,
File diff suppressed because one or more lines are too long
@@ -41,11 +41,13 @@ import frc4388.robot.commands.auto.FiveBallAutoMiddle;
import frc4388.robot.commands.auto.SequentialTest;
import frc4388.robot.commands.auto.SixBallAutoMiddle;
import frc4388.robot.commands.auto.Slalom;
import frc4388.robot.commands.auto.TankDriveVelocity;
import frc4388.robot.commands.auto.TenBallAutoMiddle;
import frc4388.robot.commands.InterruptSubystem;
import frc4388.robot.commands.auto.AutoPath1FromCenter;
import frc4388.robot.commands.auto.Barrel;
import frc4388.robot.commands.auto.BarrelMany;
import frc4388.robot.commands.auto.BarrelStart;
import frc4388.robot.commands.auto.Bounce;
import frc4388.robot.commands.auto.Wait;
import frc4388.robot.commands.climber.DisengageRachet;
@@ -132,6 +134,8 @@ public class RobotContainer {
Barrel m_barrel;
BarrelStart m_barrelStart;
BarrelMany m_barrelMany;
Bounce m_bounce;
@@ -317,6 +321,12 @@ public class RobotContainer {
};
m_barrel = new Barrel(m_robotDrive, buildPaths(barrel));
String[] barrelStart = new String[]{
"BarrelStart"
};
m_barrelStart = new BarrelStart(m_robotDrive, buildPaths(barrelStart));
String[] bounce = new String[]{
"Bounce"
@@ -391,8 +401,12 @@ 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 m_barrel.andThen(()-> m_robotDrive.tankDriveVelocity(0, 0));
//return m_barrelStart.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(0, 0));
//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));
@@ -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.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 BarrelStart extends SequentialCommandGroup {
/**
* Creates a new BarrelStart.
*/
public BarrelStart(Drive drive, RamseteCommand[] paths) {
// Add your commands in the super() call, e.g.
// super(new FooCommand(), new BarCommand());
addCommands(
paths[0]
);
}
}