Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix swapping of left and right paths #139

Merged
merged 2 commits into from
Jan 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/java/edu/wpi/first/pathweaver/MainController.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,11 @@ private void buildPaths() {
TankModifier tank = path.getTankModifier();
Pathfinder.writeToCSV(new File(output, path.getPathNameNoExtension() + ".pf1.csv"),
tank.getSourceTrajectory());
Pathfinder.writeToCSV(new File(output, path.getPathNameNoExtension() + ".left.pf1.csv"),
tank.getLeftTrajectory());
// Note: the left and the right are swapped. This is due to our orientation of the
// coordinate system. This is a hack to fix path output for the 2019 season.
Pathfinder.writeToCSV(new File(output, path.getPathNameNoExtension() + ".right.pf1.csv"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should leave a comment here to explain the hack and why the left path goes to the right-side file and vice-versa.

tank.getLeftTrajectory());
Pathfinder.writeToCSV(new File(output, path.getPathNameNoExtension() + ".left.pf1.csv"),
tank.getRightTrajectory());
}
Alert alert = new Alert(Alert.AlertType.INFORMATION);
Expand Down