summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/move.fsm
diff options
context:
space:
mode:
authorNicolas Schodet2010-05-14 00:52:44 +0200
committerNicolas Schodet2010-05-14 00:52:44 +0200
commit3966014502a626b938c473535935748793c3f904 (patch)
tree99c04cdcf7c34bc56e041bbae883e455c543b19b /digital/io/src/move.fsm
parent1b290a3f5f6f084d5e2f142d6cea4d47fc36cf75 (diff)
digital/io/src: control rotation in move FSM
Diffstat (limited to 'digital/io/src/move.fsm')
-rw-r--r--digital/io/src/move.fsm18
1 files changed, 17 insertions, 1 deletions
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 -> .