]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
Odometry autocalibration
authorpetr <silhavik.p@gmail.com>
Mon, 7 May 2012 21:29:17 +0000 (23:29 +0200)
committerpetr <silhavik.p@gmail.com>
Mon, 7 May 2012 21:29:17 +0000 (23:29 +0200)
Correction of mean calculation and shorten time for testing traversed distance.

src/robofsm/common-states.cc
src/robofsm/robot.c

index d4a0c7b899851412ded400d6336984bb53f3ea79..8914ecfeaf2d2704f20438ff7216939f76da966e 100644 (file)
@@ -435,7 +435,7 @@ FSM_STATE(go_back_for_cal)
                                                PLAYGROUND_HEIGHT_M - (ROBOT_WIDTH_M/2.0),
                                                0);
                        robot_move_by(-1.1, NO_TURN(), &tcVerySlow);
-                       FSM_TIMER(150);
+                       FSM_TIMER(200);
                        break;
                case EV_MOTION_DONE:
                        ROBOT_LOCK(est_pos_odo);
index 5aeb5dd432bea727b7432757c731d90291a54d9d..c4fc03463f5da4b07f3b3b1ef2aaf712dd15bad0 100644 (file)
@@ -305,9 +305,9 @@ void robot_calibrate_odometry()
        float b = 0;
        int num = 0;
        while (fgets (line, 10 , file)) {
-               a = atof(line);
+               a += atof(line);
                fgets (line, 10 , file);
-               b = atof(line);
+               b += atof(line);
                num ++;
        }
        fclose (file);