Skip to content

Commit

Permalink
Reset drive pose at start
Browse files Browse the repository at this point in the history
  • Loading branch information
manthan-acharya committed Dec 8, 2023
1 parent 41219df commit 242ef4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public RobotContainer() {
(Double voltage) -> drive.runCharacterizationVolts(voltage),
drive::getCharacterizationVelocity));
// only add to auto map if there
Optional<File> trajectoryFile = ChoreoTrajectoryFactory.getTrajectoryFile("OnePieceBalance");
Optional<File> trajectoryFile = ChoreoTrajectoryFactory.getTrajectoryFile("NewPath");
trajectoryFile.ifPresent(
file ->
autoChooser.addOption(
Expand Down Expand Up @@ -280,6 +280,6 @@ public void bindControls() {
}

public Command getAutonomousCommand() {
return Commands.none();
return autoChooser.get();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public void initialize() {
Logger.getInstance().recordOutput("Odometry/Trajectory", trajectory.getTrajectoryPoses());

// Reset all controllers
drive.setPose(trajectory.getTrajectoryPoses()[0]);
timer.reset();
timer.start();
xController.reset();
Expand Down

0 comments on commit 242ef4f

Please sign in to comment.