particles.applyMove(event);
}
public Pose getPose() {
if (readingsRequired) {
RangeReadings rr = scanner.getRangeValues();
readingsRequired = false;
if (!rr.incomplete()) {
particles.calculateWeights(rr, map);
particles.resample(); // Cannot indicate robot is lost
}
}
return particles.getEstimatedPose();