Skip to content

Commit 4ad5cd0

Browse files
committed
IT WORKS YES F YES
1 parent b87825f commit 4ad5cd0

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/main/java/frc/robot/RobotContainer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ public RobotContainer() {
5959

6060
var mRushPivot = RushinatorPivot.getInstance();
6161

62+
var mPoseEstimator = PoseEstimatorSubsystem.getInstance();
63+
6264
// ShuffleboardTab visionTab = Shuffleboard.getTab("Vision Pose Estimator");
6365
// PoseEstimatorSubsystem.getInstance().addDashboardWidgets(visionTab);
6466
}

src/main/java/frc/robot/driver/DriverXbox.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
import frc.robot.drivetrain.CommandSwerveDrivetrain;
1414
import frc.robot.rushinator.RushinatorPivot;
1515
import frc.robot.rushinator.RushinatorWrist;
16-
import frc.robot.rushinator.commands.SetArmState;
17-
import frc.robot.rushinator.commands.SetWristState;
1816

1917

2018
public class DriverXbox extends XboxGamepad {
@@ -59,11 +57,11 @@ public void setupTeleopButtons() {
5957
controller.rightBumper().whileTrue(new InstantCommand(() -> RobotContainer.modeFast = false));
6058
controller.rightBumper().whileFalse(new InstantCommand(() -> RobotContainer.modeFast = true));
6159

62-
controller.x().onTrue(new SetWristState(RushinatorWrist.State.kScoreLeftWrist));
60+
// controller.x().onTrue(new SetWristState(RushinatorWrist.State.kScoreLeftWrist));
6361

64-
controller.y().onTrue(new SetWristState(RushinatorWrist.State.kHumanPlayer));
65-
controller.b().onTrue(new SetWristState(RushinatorWrist.State.kScoreRightWrist));
66-
controller.a().onTrue(new SetWristState(RushinatorWrist.State.kGroundWrist));
62+
// controller.y().onTrue(new SetWristState(RushinatorWrist.State.kHumanPlayer));
63+
// controller.b().onTrue(new SetWristState(RushinatorWrist.State.kScoreRightWrist));
64+
// controller.a().onTrue(new SetWristState(RushinatorWrist.State.kGroundWrist));
6765

6866
// controller.a().onTrue(new SetArmState(RushinatorPivot.State.kTestPos));
6967

src/main/java/frc/robot/vision/PoseEstimatorSubsystem.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import edu.wpi.first.wpilibj.Notifier;
2323
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
2424
import edu.wpi.first.wpilibj.smartdashboard.Field2d;
25+
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
2526
import edu.wpi.first.wpilibj2.command.SubsystemBase;
2627
import frc.robot.drivetrain.CommandSwerveDrivetrain;
2728

@@ -81,6 +82,7 @@ public PoseEstimatorSubsystem(Supplier<Rotation2d> rotationSupplier,
8182
allNotifier.setName("runAll");
8283
allNotifier.startPeriodic(0.02);
8384

85+
SmartDashboard.putData("Field Pose Estimation", field2d);
8486
// backNotifier.setName("backRunnable");
8587
// backNotifier.startPeriodic(0.02);
8688

@@ -149,6 +151,8 @@ public void periodic() {
149151
dashboardPose = flipAlliance(dashboardPose);
150152
}
151153
field2d.setRobotPose(dashboardPose);
154+
SmartDashboard.putString("Pose Formatted", getFomattedPose());
155+
152156
}
153157

154158
private String getFomattedPose() {

0 commit comments

Comments
 (0)