This program is for an autonomous robot for the competition at the Hochschule Luzern. http://cruisingcrepe.wordpress.com/ We are one of the 32 teams. http://cruisingcrepe.wordpress.com/ The postition control is based on this Documentation: Control of Wheeled Mobile Robots: An Experimental Overview from Alessandro De Luca, Giuseppe Oriolo, Marilena Vendittelli. For more information see here: http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf
Fork of autonomous Robot Android by
Diff: main.cpp
- Revision:
- 36:4226e50a0bcd
- Parent:
- 34:62996eed658a
- Child:
- 38:d76e488e725f
--- a/main.cpp Sat May 25 05:44:14 2013 +0000 +++ b/main.cpp Sat May 25 15:42:24 2013 +0000 @@ -144,10 +144,10 @@ state.initPlotFile(); state.startTimerFromZero(); robotControl.start(); -/* - /** - * Clear all Errors of the ESCON Module, with a disabled to enable event. - */ + /* + /** + * Clear all Errors of the ESCON Module, with a disabled to enable event. + */ robotControl.setEnable(false); wait(0.01); robotControl.setEnable(true); @@ -162,15 +162,15 @@ setDesiredTheta(400.0f); while(getDesiredTheta() < (4 * PI)) { - ADB::poll(); + if (getDesiredTheta() > (2 * PI)) { /** * Runs at first till the Startbutton has pressed. */ + state.startTimerFromZero(); robotControl.setAllToZero(START_X_OFFSET, START_Y_OFFSET, PI/2 ); robotControl.setDesiredPositionAndAngle(START_X_OFFSET, START_Y_OFFSET, PI/2); - robotControl.setEnable(false); wait(PERIOD_ANDROID/2); } else { robotControl.setEnable(true); @@ -187,7 +187,8 @@ s.state&STATE_RIGHT, s.voltageBattery); wait(PERIOD_ANDROID/2); - + + ADB::poll(); } /** @@ -202,14 +203,12 @@ rightMotor.setVelocity(0.0f); wait(2); - /** * Close the File PLOTS.txt to read the file with the computer afterwards and draw a diagramm. */ state.closePlotFile(); state.stop(); robotControl.setEnable(false); - robotControl.stop(); /** * Fast PWM sample for the end.