From 011fd3e4e4d252d02df156a7679c6156cdc72c6a Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Mon, 14 Apr 2008 12:04:01 +0200 Subject: * digital/io/src * asserv - add an goto_angle (not implemented yet). * get sample FSM - the get sample FSM will not call any other FSM (like the move). Instead, it assumes we are already at the right place, we just ensure the angle is correct ; - update the first state in consequences ; - add an angle as parameters (maybe we can remove the X/Y). * general defines - add define to ease the opening of the input hole. --- digital/io/src/getsamples.fsm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'digital/io/src/getsamples.fsm') diff --git a/digital/io/src/getsamples.fsm b/digital/io/src/getsamples.fsm index 4c833bc0..1fdfaa98 100644 --- a/digital/io/src/getsamples.fsm +++ b/digital/io/src/getsamples.fsm @@ -1,12 +1,18 @@ # Get samples FSM +# A general remark on this FSM: it is not its responsibility to put the bot in +# front of the distributor, it the responsibility of the top FSM using the +# move FSM. +# For example, the top FSM will order the bot to move in front of the +# distributor using the move FSM. Then, when it is arrived, it will the get +# sample FSM that will ensure we well placed (in term of angle for example). get_samples Get samples from the distributor States: IDLE waiting for the beginning of the get samples FSM - GO_IN_FRONT_OF_DISTRIBUTOR - move the bot in front of a distributor (not in contact with the distributor) + FACE_DISTRIBUTOR + face the distributor OPEN_INPUT_HOLE move the arm to let the samples enter into the bot by the input hole APPROACH_DISTRIBUTOR @@ -21,6 +27,8 @@ States: Events: start initialize the FSM +# For the moment, this event is currently not managed. +# TODO: manage it bot_move_failed the bot movement failed (blocked by something for example) bot_move_succeed @@ -31,10 +39,10 @@ Events: the arm has just passed the 'noted' position IDLE: - start -> GO_IN_FRONT_OF_DISTRIBUTOR - start going in front of the desired distributor + start -> FACE_DISTRIBUTOR + do a goto angle to make the bot facing the distributor -GO_IN_FRONT_OF_DISTRIBUTOR: +FACE_DISTRIBUTOR: bot_move_succeed -> OPEN_INPUT_HOLE move the arm to open the input hole @@ -57,7 +65,6 @@ MOVE_AWAY_FROM_DISTRIBUTOR: bot_move_succeed -> CLOSE_INPUT_HOLE close input hole - CLOSE_INPUT_HOLE: arm_move_succeed -> IDLE tell the top FSM we have finished -- cgit v1.2.3