current limit on shovel
[aversive.git] / projects / microb2010 / mainboard / robotsim.c
index 7c52835..42a33d9 100644 (file)
@@ -227,8 +227,8 @@ void robotsim_update(void)
                ((local_r_pwm * 1000 * FILTER2)/1000);
 
        /* basic collision detection */
-       a2 = atan2(ROBOT_WIDTH/2, ROBOT_HALF_LENGTH_FRONT);
-       d = norm(ROBOT_WIDTH/2, ROBOT_HALF_LENGTH_FRONT);
+       a2 = atan2(ROBOT_WIDTH/2, ROBOT_HALF_LENGTH_REAR);
+       d = norm(ROBOT_WIDTH/2, ROBOT_HALF_LENGTH_REAR);
 
        xfl = x + cos(a+a2) * d;
        yfl = y + sin(a+a2) * d;