]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robofsm: Allow path planing during rotation.
authorMichal Vokac <vokac.m@gmail.com>
Fri, 9 Dec 2011 10:00:41 +0000 (11:00 +0100)
committerMichal Vokac <vokac.m@gmail.com>
Fri, 9 Dec 2011 16:31:02 +0000 (17:31 +0100)
Using go_to instead of move_by path planing is used.
Path planer clears the map from unnecessary margins and so.

src/robofsm/common-states.cc

index a3c48c3acddec80096aefd8bb104bbf8745fab43..efbf7db1bbfcf82d5c31702086065a68d7d2aaea 100644 (file)
@@ -126,7 +126,7 @@ FSM_STATE(survey)
                                 // no target detected in this heading, turn 120°
                                 robot.target_detected = false;
                                 robot_get_est_pos(&x, &y, &phi);
-                                robot_move_by(0, TURN(DEG2RAD(120)+phi), &tcSlow);
+                                robot_goto_notrans(x, y, TURN(DEG2RAD(120)+phi), &tcSlow);
                                 turn_cntr++;
                         }
                         break;