Almost finished 6 ball auto, just a little too wide

This commit is contained in:
Aarav Shah
2020-03-07 18:24:58 -07:00
parent 08bc9f3e45
commit afff5226c1
10 changed files with 18 additions and 15 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
2.923987849862624,-2.381155324331042,3.134,0.0,true,
3.2,-2.4,0.2,2.5,true,
5.006107200045366,-0.7154598441848491,2.0,0.0,true,
+1 -1
View File
@@ -1,3 +1,3 @@
X,Y,Tangent X,Tangent Y,Fixed Theta,Name
5.006,-0.715,3.048,0.0,true,
7.635526493704714,-0.7154598441848491,1.0,0.0,true,
7.2,-0.7154598441848491,1.0,0.0,true,
+2 -2
View File
@@ -1,8 +1,8 @@
{
"lengthUnit": "Meter",
"exportUnit": "Always Meters",
"maxVelocity": 1.0,
"maxAcceleration": 1.0,
"maxVelocity": 1.7,
"maxAcceleration": 2.7,
"wheelBase": 0.648,
"gameName": "Infinite Recharge",
"outputDir": ".."
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -70,7 +70,7 @@ 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.16, 0.0, 0.0, 0.058, 0, 1.0);
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 = 1.0;
+3 -3
View File
@@ -80,7 +80,7 @@ public class Robot extends TimedRobot {
m_autonomousCommand = m_robotContainer.getAutonomousCommand();
m_robotContainer.setDriveNeutralMode(NeutralMode.Brake);
m_robotContainer.setDriveGearState(false);
m_robotContainer.setDriveGearState(true);
m_robotContainer.resetOdometry(new Pose2d());
//m_robotContainer.configDriveTrainSensors(FeedbackDevice.IntegratedSensor);
@@ -93,7 +93,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
//m_autonomousCommand.schedule();
m_autonomousCommand.schedule();
SmartDashboard.putString("Is Auto Start?", "YEA");
}
}
@@ -108,7 +108,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);
@@ -259,9 +259,13 @@ public class RobotContainer {
//RamseteCommand ramseteCommand = getRamseteCommand(trajectory);
// Run path following command, then stop at the end.
return m_sixBallAutoMiddle.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
try {
return m_sixBallAutoMiddle.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
} catch (Exception e) {
System.err.println("ERROR");
}
//return new InstantCommand();
return new InstantCommand();
}
TrajectoryConfig getTrajectoryConfig() {
return new TrajectoryConfig(
@@ -29,7 +29,6 @@ public class SixBallAutoMiddle extends SequentialCommandGroup {
// super(new FooCommand(), new BarCommand());
addCommands(
new Wait(drive, 0, 1),
paths[0],
paths[1]
);
@@ -342,7 +342,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);
}
@@ -573,7 +573,7 @@ public class Drive extends SubsystemBase {
@Override
public void reset() {
// TODO Auto-generated method stub
resetGyroYaw();
resetGyroYaw(0);
}
@Override