This is some awesome robot code

Dependencies:   mbed-rtos mbed QEI

Fork of ICRSEurobot13 by Thomas Branch

Revision:
67:be3ea5450cc7
Parent:
66:f1d75e51398d
Parent:
65:4709ff6c753c
Child:
69:4b7bb92916da
--- a/Processes/Motion/motion.cpp	Sun Apr 14 17:22:20 2013 +0000
+++ b/Processes/Motion/motion.cpp	Sun Apr 14 18:47:17 2013 +0000
@@ -107,9 +107,7 @@
             wp_a_reached = true;
         }
     } 
-    waypoint_flag_mutex.unlock();
-        
-    waypoint_flag_mutex.lock(); // proper way would be to construct a function to evaluate the condition and pass the function pointer to a conditional setter function for reached flag
+     // proper way would be to construct a function to evaluate the condition and pass the function pointer to a conditional setter function for reached flag
     if (wp_d_reached && wp_a_reached)
     {
         setWaypointReached();
@@ -117,7 +115,7 @@
     waypoint_flag_mutex.unlock();
     
     // angular velocity controller
-    const float p_gain_av = 0.5; //TODO: tune
+    const float p_gain_av = 0.7; //TODO: tune
     
     const float max_av = 0.5; // radians per sec //TODO: tune
     
@@ -132,11 +130,11 @@
     
     
     // forward velocity controller
-    const float p_gain_fv = 0.5; //TODO: tune
+    const float p_gain_fv = 0.7; //TODO: tune
     
-    float max_fv = 0.3; // meters per sec //TODO: tune
+    float max_fv = 0.2; // meters per sec //TODO: tune
     float max_fv_reverse = 0.05; //TODO: tune
-    const float angle_envelope_exponent = 32.0;//512; //8.0; //TODO: tune
+    const float angle_envelope_exponent = 32;//512; //8.0; //TODO: tune
     
     // control, distance_err in meters
     float forward_v = p_gain_fv * distance_err;