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

Dependencies:   mbed

Fork of autonomous Robot Android by Christian Burri

Revision:
37:fd68b9e0be08
Parent:
14:6a45a9f940a8
--- a/RobotControl/RobotControl.cpp	Sat May 25 15:42:24 2013 +0000
+++ b/RobotControl/RobotControl.cpp	Sun Jun 09 17:37:20 2013 +0000
@@ -216,8 +216,10 @@
     Actual.yposition += (Actual.speed * period * sin(Actual.theta));
 
     //motor control
-    if ( isEnabled() &&  ( getDistanceError() >= MIN_DISTANCE_ERROR ) )  {
-
+    if ( /*isEnabled() && */ ( getDistanceError() >= MIN_DISTANCE_ERROR ) )  {
+        
+        motorControllerLeft->enable(true);
+        motorControllerRight->enable(true);
         //postition control
         speed = K1 * getDistanceError() * cos( getThetaErrorToGoal() );
         omega = K2 * getThetaErrorToGoal() +
@@ -240,6 +242,9 @@
         );
 
     } else {
+        
+        motorControllerLeft->enable(false);
+        motorControllerRight->enable(false);
         motorControllerLeft->setVelocity(0.0f);
         motorControllerRight->setVelocity(0.0f);
     }