Skip to content

Commit

Permalink
remove align state manual in driveToPose / driveToPath
Browse files Browse the repository at this point in the history
  • Loading branch information
linglejack06 committed Apr 22, 2024
1 parent 2a13c41 commit b4fd04a
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,6 @@ public boolean atPathfindPose() {
}

public void driveToPose(Pose2d targetPose) {
this.setAlignState(AlignState.MANUAL);

pathfindCommand = getPathfindCommand(targetPose);
pathfindCommand.schedule();
}
Expand All @@ -562,26 +560,16 @@ public void driveToPath(String pathName) {
} else {
lastCommandedPath = pathName;
}
this.setAlignState(AlignState.MANUAL);

PathPlannerPath path = PathPlannerPath.fromPathFile(pathName);

// if(DriverStation.getAlliance() === Alliance.Blue) {
// path.flipPath();
// }

PathConstraints constraints =
new PathConstraints(
3.0,
4.0,
Constants.ConversionConstants.kDegreesToRadians * 540,
Constants.ConversionConstants.kDegreesToRadians * 720);

PathPlannerLogging.setLogTargetPoseCallback(
(target) -> {
Logger.recordOutput("targetPose", target);
});

pathfindCommand = AutoBuilder.pathfindThenFollowPath(path, constraints, 0.0);
pathfindCommand.schedule();
}
Expand Down

0 comments on commit b4fd04a

Please sign in to comment.