Merge pull request #20 from junkjunk123/master
Patches to the PinpointLocalizer
This commit is contained in:
@ -1019,7 +1019,7 @@ public class Follower {
|
|||||||
/**
|
/**
|
||||||
* This resets the IMU, if applicable.
|
* This resets the IMU, if applicable.
|
||||||
*/
|
*/
|
||||||
public void resetIMU() {
|
private void resetIMU() throws InterruptedException {
|
||||||
poseUpdater.resetIMU();
|
poseUpdater.resetIMU();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ public abstract class Localizer {
|
|||||||
/**
|
/**
|
||||||
* This resets the IMU of the localizer, if applicable.
|
* 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.
|
* This is overridden to return the IMU, if there is one.
|
||||||
|
@ -351,7 +351,7 @@ public class PoseUpdater {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void resetIMU() {
|
public void resetIMU() throws InterruptedException {
|
||||||
localizer.resetIMU();
|
localizer.resetIMU();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,13 +79,11 @@
|
|||||||
// //TODO: Set encoder directions
|
// //TODO: Set encoder directions
|
||||||
// odo.setEncoderDirections(GoBildaPinpointDriver.EncoderDirection.FORWARD, GoBildaPinpointDriver.EncoderDirection.FORWARD);
|
// odo.setEncoderDirections(GoBildaPinpointDriver.EncoderDirection.FORWARD, GoBildaPinpointDriver.EncoderDirection.FORWARD);
|
||||||
//
|
//
|
||||||
// odo.resetPosAndIMU();
|
// resetPinpoint();;
|
||||||
//
|
|
||||||
// setStartPose(setStartPose);
|
// setStartPose(setStartPose);
|
||||||
// totalHeading = 0;
|
// totalHeading = 0;
|
||||||
// previousHeading = setStartPose.getHeading();
|
// previousHeading = setStartPose.getHeading();
|
||||||
//
|
|
||||||
// resetPinpoint();
|
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
@ -107,7 +105,7 @@
|
|||||||
// @Override
|
// @Override
|
||||||
// public Pose getVelocity() {
|
// public Pose getVelocity() {
|
||||||
// Pose2D pose = odo.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());
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
@ -142,7 +140,6 @@
|
|||||||
// */
|
// */
|
||||||
// @Override
|
// @Override
|
||||||
// public void setPose(Pose setPose) {
|
// public void setPose(Pose setPose) {
|
||||||
// resetPinpoint();
|
|
||||||
// odo.setPosition(new Pose2D(DistanceUnit.INCH, setPose.getX(), setPose.getY(), AngleUnit.RADIANS, setPose.getHeading()));
|
// odo.setPosition(new Pose2D(DistanceUnit.INCH, setPose.getX(), setPose.getY(), AngleUnit.RADIANS, setPose.getHeading()));
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
@ -195,17 +192,29 @@
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * This resets the IMU.
|
// * This resets the IMU. Note: This does not change the estimated heading orientation.
|
||||||
// */
|
// */
|
||||||
// @Override
|
// @Override
|
||||||
// public void resetIMU() {
|
// public void resetIMU() throws InterruptedException {
|
||||||
// odo.recalibrateIMU();
|
// 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();
|
// odo.resetPosAndIMU();
|
||||||
|
//
|
||||||
|
// try {
|
||||||
|
// Thread.sleep(300);
|
||||||
|
// } catch (InterruptedException e) {
|
||||||
|
// throw new RuntimeException(e);
|
||||||
|
// }
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
Reference in New Issue
Block a user