/** Make the Robot navigate to the closest node to the basket, then process to defend. */ public void start() { navigator.defineRestrictions(true); // node 69 should be the tile just in front of basket navigator.travelPath(navigator.searchNode(69)); robotCtrl.turnTo(90); robotCtrl.goToIntersect(); robotCtrl.turn(180); deployMechanism(); robotCtrl.goBackward(25); }
// constructors public OdometerCorrection_v1( RobotCtrl robotCtrl, LineSensor lineSensorL, LineSensor lineSensorR, int odoCorrectionRefresh) { this.robotCtrl = robotCtrl; this.odometer = robotCtrl.getOdometer(); this.lineSensorL = lineSensorL; this.lineSensorR = lineSensorR; this.odoCorrectionTimer = new Timer(odoCorrectionRefresh, this); }