# Top FSM. top Main FSM calling other FSM. States: *IDLE waiting for the beginning of the top FSM. WAIT_INIT_TO_FINISH waiting for the end of init. GO_FAR testing move fsm, going to a far point. GO_NEAR testing move fsm, going to a near point. Events: start initialize the FSM. move_fsm_succeed when the move FSM returns with success. move_fsm_failed when the move FSM returns with an error. bot_move_succeed when the bot has succeed its asserv movement. bot_move_failed when the bot has failed its asserv movement. init_match_is_started when the init FSM has finished and the match start. state_timeout timeout in cycle count. asserv_last_cmd_ack last command sent to the asserv board has been acquitted. import init.fsm import move.fsm IDLE: start -> WAIT_INIT_TO_FINISH nothing to do. WAIT_INIT_TO_FINISH: init_match_is_started -> GO_FAR the match start go to a far point GO_FAR: move_fsm_succeed -> GO_NEAR go to a near point move_fsm_failed -> GO_NEAR go to a near point GO_NEAR: move_fsm_succeed -> GO_FAR restart move_fsm_failed -> GO_FAR restart