diff --git a/state_machine.m b/state_machine.m index adac7e76bc3a690f06638e4220d99a591677ebc6..60da0b3212a9a6e74f3f4dbaf0347eaf4728fa67 100644 --- a/state_machine.m +++ b/state_machine.m @@ -2,7 +2,7 @@ d2r = 180/pi; th_az = 5; % Degrees step_distance = 0.1; % meters % sendPosition.moveRelativePosition('map', moveFront, moveLeft, rotateClockwise); - +th_dist = 0.78; while(true) @@ -18,8 +18,9 @@ while(true) end % The angle to the source is small enough, take a step forward + [there, ic] = get_distance(audio, th_dist); - if ~there() + if ~there sendPosition.moveRelativePosition('map', step_distance, 0, 0); continue end