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:
11:775ebb69d5e1
Parent:
8:696c2f9dfc62
Child:
12:235e318a414f
--- a/RobotControl/RobotControl.cpp	Thu Apr 04 06:43:43 2013 +0000
+++ b/RobotControl/RobotControl.cpp	Fri Apr 05 10:58:42 2013 +0000
@@ -4,13 +4,11 @@
 
 RobotControl::RobotControl(MaxonESCON* motorControllerLeft,
                            MaxonESCON* motorControllerRight,
-                           /*HMC6352* compass,*/
                            float period) : Task(period)
 {
     /* get peripherals */
     this->motorControllerLeft = motorControllerLeft;
     this->motorControllerRight = motorControllerRight;
-    //  this->compass = compass;
     this->period = period;
 
     /* initialize peripherals */
@@ -26,9 +24,6 @@
 
     motorControllerLeft->setVelocity(0.0f);
     motorControllerRight->setVelocity(0.0f);
-
-    Desired.setAcceleration(ACCELERATION);
-    Desired.setThetaAcceleration(THETA_ACCELERATION);
 }
 
 RobotControl::~RobotControl()
@@ -47,16 +42,6 @@
     return (motorControllerLeft->isEnabled() && motorControllerRight->isEnabled());
 }
 
-void RobotControl::setAcceleration(float acceleration)
-{
-    Desired.setAcceleration(acceleration);
-}
-
-void RobotControl::setThetaAcceleration(float acceleration)
-{
-    Desired.setThetaAcceleration(acceleration);
-}
-
 void RobotControl::setDesiredSpeed(float speed)
 {
     this->speed = speed;
@@ -190,20 +175,14 @@
 
 void RobotControl::run()
 {
-    ///// DAs kan glaub raus ab hier
-/////////////////////////////////////////////////////////7
-    /* motion planning */
+// kann glaub wegggggg
     if (isEnabled()) {
-        ///// DAs kan glaub raus bis hier
-        Desired.increment(speed, omega, period);
-
-        ///// DAs kan glaub raus bis hier
-
     } else {
         speed = 0.0f;
         omega = 0.0f;
         Desired.setState(&Actual);
     }
+    ////bis hieerrrrr
 
     /* position calculation */
 
@@ -227,11 +206,6 @@
     Actual.xposition += (Actual.speed * period * cos(Actual.theta));
     Actual.yposition += (Actual.speed * period * sin(Actual.theta));
 
-    //  Actual.thetaCompass = compass->getFilteredAngle();
-    /* translational X and Y Position. integrate the speed with the time theta from compass */
-    //  Actual.xposition += - (Actual.speed * period * cos(Actual.thetaCompass));
-    //  Actual.yposition += (Actual.speed * period * sin(Actual.thetaCompass));
-
     /* motor control */
     if ( isEnabled() &&  ( getDistanceError() >= MIN_DISTANCE_ERROR ) )  {