From 3966014502a626b938c473535935748793c3f904 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 14 May 2010 00:52:44 +0200 Subject: digital/io/src: control rotation in move FSM --- digital/io/src/move.fsm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'digital/io/src/move.fsm') diff --git a/digital/io/src/move.fsm b/digital/io/src/move.fsm index d96cb349..20334686 100644 --- a/digital/io/src/move.fsm +++ b/digital/io/src/move.fsm @@ -8,6 +8,8 @@ move States: *MOVE_IDLE waiting for the beginning of the move FSM. + MOVE_ROTATING + rotating towards next point. MOVE_MOVING moving to a position (intermediate or final). MOVE_MOVING_BACKWARD_TO_TURN_FREELY @@ -22,15 +24,23 @@ Events: the bot has seen something (front is the same when going backward). MOVE_IDLE: + move_start: path_found_rotate -> MOVE_ROTATING + rotate towards next position. move_start: path_found -> MOVE_MOVING move to next position. move_start: no_path_found -> MOVE_IDLE post failure event. +MOVE_ROTATING: + bot_move_succeed -> MOVE_MOVING + move to next position. + MOVE_MOVING: bot_move_succeed: done -> MOVE_IDLE post success event. - bot_move_succeed: path_found -> . + bot_move_succeed: path_found_rotate -> MOVE_ROTATING + rotate towards next position. + bot_move_succeed: path_found -> MOVE_MOVING move to next position. bot_move_succeed: no_path_found -> MOVE_IDLE post failure event. @@ -42,16 +52,22 @@ MOVE_MOVING: stop the bot. MOVE_MOVING_BACKWARD_TO_TURN_FREELY: + bot_move_succeed: path_found_rotate -> MOVE_ROTATING + rotate towards next position. bot_move_succeed: path_found -> MOVE_MOVING move to next position. bot_move_succeed: no_path_found -> MOVE_IDLE post failure event. + bot_move_failed: path_found_rotate -> MOVE_ROTATING + rotate towards next position. bot_move_failed: path_found -> MOVE_MOVING move to next position. bot_move_failed: no_path_found -> MOVE_WAIT_FOR_CLEAR_PATH nothing to do. MOVE_WAIT_FOR_CLEAR_PATH: + state_timeout: path_found_rotate -> MOVE_ROTATING + rotate towards next position. state_timeout: path_found -> MOVE_MOVING move to next position. state_timeout: no_path_found_and_try_again -> . -- cgit v1.2.3