robot code for summer school

Dependencies:   PM2_Libary Eigen

Fork of PM2_Example_Summer_School by Alex Hawkins

Revision:
68:61aad0993a29
Parent:
67:90f378806cbe
Child:
70:0e9e3c6223d1
--- a/Robot_Library/robot.cpp	Mon May 30 10:29:41 2022 +0200
+++ b/Robot_Library/robot.cpp	Mon May 30 11:13:44 2022 +0200
@@ -179,12 +179,10 @@
 
   integral_error += dt * errval;
 
-  float proportional_term = k_prop * errval;
   float integral_term = integral_error / t_int;
   float derivative_term = t_deriv * (errval - previous_error_value) / dt;
 
-  float control_input =
-    (proportional_term + integral_term + derivative_term) / error_scale;
+  float control_input = k_prop * (errval + integral_term + derivative_term);
 
   robot_speed_desired(0) = TRANSLATIONAL_VELOCITY;
   robot_speed_desired(1) = ROTATIONAL_VELOCITY * control_input;