Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #33 from RealAllenDa/main
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanLuo42 authored Feb 3, 2024
2 parents 72fd7aa + 2b60cd7 commit c366fac
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/net/ironpulse/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,13 @@ public Command getAutonomousCommand() {
}

private void resetOdometryWithAutoName(String autoName) {
var startPose = PathPlannerAuto
.getPathGroupFromAutoFile(autoName)
var pathGroup = PathPlannerAuto
.getPathGroupFromAutoFile(autoName);
if (pathGroup.isEmpty()) {
// no path in auto
return;
}
var startPose = pathGroup
.get(0)
.getPreviewStartingHolonomicPose();
swerveSubsystem.seedFieldRelative(flip() ?
Expand Down

0 comments on commit c366fac

Please sign in to comment.