mirror of
https://github.com/Team4388/RiseOfRidgebotics2020.git
synced 2026-06-08 16:28:01 -06:00
added BarrelStart, WORKING
This commit is contained in:
@@ -0,0 +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.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
@@ -45,6 +45,7 @@ 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;
|
||||
@@ -131,6 +132,8 @@ public class RobotContainer {
|
||||
|
||||
Barrel m_barrel;
|
||||
|
||||
BarrelStart m_barrelStart;
|
||||
|
||||
BarrelMany m_barrelMany;
|
||||
|
||||
Bounce m_bounce;
|
||||
@@ -315,6 +318,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"
|
||||
};
|
||||
@@ -374,16 +383,11 @@ public class RobotContainer {
|
||||
SmartDashboard.putNumber("Trajectory Total Time", m_totalTimeAuto);
|
||||
|
||||
//return m_sixBallAutoMiddle.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
//return m_sixBallAutoMiddle1.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_driveOffLineBackward.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
//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_barrelMany.andThen(()-> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
return m_barrel.andThen(()-> m_robotDrive.tankDriveVelocity(0,0));
|
||||
return m_barrelStart.andThen(()-> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("ERROR");
|
||||
|
||||
@@ -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 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]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user