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

Commit

Permalink
Merge pull request #20 from junkjunk123/master
Browse files Browse the repository at this point in the history
Patches to the PinpointLocalizer
  • Loading branch information
Logan-Nash authored Dec 6, 2024
2 parents bdc0de4 + 9330c22 commit d34d56d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ public DashboardPoseTracker getDashboardPoseTracker() {
/**
* This resets the IMU, if applicable.
*/
public void resetIMU() {
private void resetIMU() throws InterruptedException {
poseUpdater.resetIMU();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public abstract class Localizer {
/**
* This resets the IMU of the localizer, if applicable.
*/
public abstract void resetIMU();
public abstract void resetIMU() throws InterruptedException;

/**
* This is overridden to return the IMU, if there is one.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public Localizer getLocalizer() {
/**
*
*/
public void resetIMU() {
public void resetIMU() throws InterruptedException {
localizer.resetIMU();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,11 @@
// //TODO: Set encoder directions
// odo.setEncoderDirections(GoBildaPinpointDriver.EncoderDirection.FORWARD, GoBildaPinpointDriver.EncoderDirection.FORWARD);
//
// odo.resetPosAndIMU();
//
// resetPinpoint();;

// setStartPose(setStartPose);
// totalHeading = 0;
// previousHeading = setStartPose.getHeading();
//
// resetPinpoint();
// }
//
// /**
Expand All @@ -107,7 +105,7 @@
// @Override
// public Pose getVelocity() {
// Pose2D pose = odo.getVelocity();
// return new Pose(pose.getX(DistanceUnit.INCH), pose.getY(DistanceUnit.INCH), pose.getHeading(AngleUnit.RADIANS));
// return new Pose(pose.getX(DistanceUnit.INCH), pose.getY(DistanceUnit.INCH), odo.getHeadingVelocity());
// }
//
// /**
Expand Down Expand Up @@ -142,7 +140,6 @@
// */
// @Override
// public void setPose(Pose setPose) {
// resetPinpoint();
// odo.setPosition(new Pose2D(DistanceUnit.INCH, setPose.getX(), setPose.getY(), AngleUnit.RADIANS, setPose.getHeading()));
// }
//
Expand Down Expand Up @@ -195,17 +192,29 @@
// }
//
// /**
// * This resets the IMU.
// * This resets the IMU. Note: This does not change the estimated heading orientation.
// */
// @Override
// public void resetIMU() {
// odo.recalibrateIMU();
// public void resetIMU() throws InterruptedException {
// odo.recalibrateIMU();
//
// try {
// Thread.sleep(300);
// } catch (InterruptedException e) {
// throw new RuntimeException(e);
// }
// }
//
// /**
// * This resets the OTOS.
// * This resets the pinpoint.
// */
// public void resetPinpoint(){
// private void resetPinpoint() {
// odo.resetPosAndIMU();
//
// try {
// Thread.sleep(300);
// } catch (InterruptedException e) {
// throw new RuntimeException(e);
// }
// }
//}

0 comments on commit d34d56d

Please sign in to comment.