auto getting there everything else gucci
This commit is contained in:
@@ -84,7 +84,7 @@ public class RobotContainer {
|
||||
|
||||
resetOdometryToVisualPose = false;
|
||||
|
||||
//vision.addPoseEstimateConsumer(drivetrain::consumeVisualPose);
|
||||
vision.addPoseEstimateConsumer(drivetrain::consumeVisualPose);
|
||||
vision.addPoseEstimateConsumer((vp) -> {
|
||||
Logger.recordOutput(
|
||||
"Vision/" + vp.cameraName() + "/Pose",
|
||||
@@ -243,7 +243,7 @@ public class RobotContainer {
|
||||
|
||||
// Useful for testing PID and FF responses of the shooter
|
||||
// You need to have graphs up of the logged data to make sure the response is correct
|
||||
secondary.a().whileTrue(shooter.maintainSpeed(ShooterSpeeds.kHubSpeed));
|
||||
//secondary.a().whileTrue(shooter.maintainSpeed(ShooterSpeeds.kHubSpeed));
|
||||
secondary.b().whileTrue(shooter.maintainSpeed(ShooterSpeeds.kFeedSpeed));
|
||||
|
||||
// Useful for testing PID and FF responses of the intake pivot
|
||||
@@ -276,6 +276,7 @@ public class RobotContainer {
|
||||
|
||||
driver.a().onTrue(new InstantCommand(() -> resetOdometryToVisualPose = true));
|
||||
driver.y().whileTrue(drivetrain.zeroHeading());
|
||||
driver.x().whileTrue(drivetrain.setX());
|
||||
|
||||
driver.leftTrigger().whileTrue(
|
||||
drivetrain.lockRotationToHub(
|
||||
@@ -320,10 +321,12 @@ public class RobotContainer {
|
||||
//40 good for feeding
|
||||
//secondary.b().onTrue(hood.trackToAngle(() -> Units.degreesToRadians(30)));
|
||||
//30 degrees good for shooter far near outpost
|
||||
secondary.rightBumper().onTrue(hood.trackToAngle(() -> Units.degreesToRadians(10)));
|
||||
secondary.rightBumper().whileTrue(hood.trackToAngle(() -> Units.degreesToRadians(10)));
|
||||
//10 degrees good for shooting ~33in away from hub
|
||||
|
||||
hood.setDefaultCommand(hood.trackToAnglePoseBased(drivetrain, shooter));
|
||||
|
||||
hood.setDefaultCommand(hood.trackToAngle(() -> {
|
||||
/*hood.setDefaultCommand(hood.trackToAngle(() -> {
|
||||
Pose2d drivetrainPose = drivetrain.getPose();
|
||||
Pose2d hubPose = Utilities.getHubPose();
|
||||
|
||||
@@ -345,7 +348,7 @@ public class RobotContainer {
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}));
|
||||
}));*/
|
||||
|
||||
new Trigger(() -> MathUtil.isNear(
|
||||
shooter.getTargetSpeeds().isEmpty() ? 0 : shooter.getTargetSpeeds().get().getSpeedRPM(),
|
||||
@@ -399,7 +402,8 @@ public class RobotContainer {
|
||||
// NamedCommands.registerCommand("Intake Start", intakeRoller.runIn());
|
||||
|
||||
new EventTrigger("Intake Start")
|
||||
.onTrue(intakeRoller.runIn());
|
||||
.onTrue(
|
||||
intakeRoller.runIn());
|
||||
|
||||
NamedCommands.registerCommand("stop spindexer", spindexer.instantaneousStop());
|
||||
|
||||
@@ -415,6 +419,8 @@ public class RobotContainer {
|
||||
hood.trackToAngle(() -> Units.degreesToRadians(10)))
|
||||
|
||||
).withTimeout(3).andThen(spindexer.instantaneousStop()));
|
||||
|
||||
NamedCommands.registerCommand("auto shoot", hood.trackToAnglePoseBased(drivetrain, shooter));
|
||||
}
|
||||
|
||||
public Command getAutonomousCommand() {
|
||||
|
||||
Reference in New Issue
Block a user