Esempio n. 1
0
    def create(self):
        # x:30 y:365, x:416 y:272
        _state_machine = OperatableStateMachine(
            outcomes=['finished', 'failed'])

        # Additional creation code can be added inside the following tags
        # [MANUAL_CREATE]

        # [/MANUAL_CREATE]

        with _state_machine:
            # x:117 y:105
            OperatableStateMachine.add('launch vid',
                                       LaunchVideoStream(vid_input_num=0),
                                       transitions={
                                           'continue': 'facesrv',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:595 y:89
            OperatableStateMachine.add('onjtrk',
                                       LaunchObjDetectAndTrack(),
                                       transitions={
                                           'continue': 'facial_gestures',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:378 y:33
            OperatableStateMachine.add('facesrv',
                                       LaunchFaceServer(),
                                       transitions={
                                           'continue': 'onjtrk',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:746 y:432
            OperatableStateMachine.add('w1',
                                       WaitState(wait_time=20),
                                       transitions={'done': 'kill faces'},
                                       autonomy={'done': Autonomy.Off})

            # x:717 y:230
            OperatableStateMachine.add('facial_gestures',
                                       FacialGesturesState(),
                                       transitions={
                                           'continue': 'w1',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:503 y:479
            OperatableStateMachine.add('kill faces',
                                       KillFacialGesturesState(),
                                       transitions={
                                           'continue': 'stop face serv',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:300 y:445
            OperatableStateMachine.add('stop face serv',
                                       StopFaceServer(),
                                       transitions={
                                           'continue': 'finished',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

        return _state_machine
Esempio n. 2
0
    def create(self):
        # x:949 y:748, x:437 y:452
        _state_machine = OperatableStateMachine(
            outcomes=['finished', 'failed'])

        # Additional creation code can be added inside the following tags
        # [MANUAL_CREATE]

        # [/MANUAL_CREATE]

        with _state_machine:
            # x:192 y:105
            OperatableStateMachine.add(
                'wait a sec',
                WaitState(wait_time=3),
                transitions={'done': 'start_video_stream_State'},
                autonomy={'done': Autonomy.Off})

            # x:835 y:33
            OperatableStateMachine.add(
                'wait number TWO',
                WaitState(wait_time=10),
                transitions={'done': 'stop detect and track'},
                autonomy={'done': Autonomy.Off})

            # x:633 y:37
            OperatableStateMachine.add('start detect and track',
                                       LaunchObjDetectAndTrack(),
                                       transitions={
                                           'continue': 'wait number TWO',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:821 y:142
            OperatableStateMachine.add(
                'stop detect and track',
                robot_brain_flexbe_states__StopObjectDetectAndTrack(),
                transitions={
                    'continue': 'stop video stream',
                    'failed': 'failed'
                },
                autonomy={
                    'continue': Autonomy.Off,
                    'failed': Autonomy.Off
                })

            # x:415 y:39
            OperatableStateMachine.add('start_video_stream_State',
                                       LaunchVideoStream(),
                                       transitions={
                                           'continue':
                                           'start detect and track',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:822 y:253
            OperatableStateMachine.add('stop video stream',
                                       StopCameraStream(),
                                       transitions={
                                           'continue': 'finished',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

        return _state_machine
Esempio n. 3
0
    def create(self):
        # x:30 y:365, x:526 y:310
        _state_machine = OperatableStateMachine(
            outcomes=['finished', 'failed'])

        # Additional creation code can be added inside the following tags
        # [MANUAL_CREATE]

        # [/MANUAL_CREATE]

        with _state_machine:
            # x:80 y:113
            OperatableStateMachine.add('video',
                                       LaunchVideoStream(vid_input_num=0),
                                       transitions={
                                           'continue': 'w',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:423 y:65
            OperatableStateMachine.add('motor_face server',
                                       LaunchFaceServer(),
                                       transitions={
                                           'continue': 'w2',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:286 y:75
            OperatableStateMachine.add(
                'w',
                WaitState(wait_time=5),
                transitions={'done': 'motor_face server'},
                autonomy={'done': Autonomy.Off})

            # x:590 y:183
            OperatableStateMachine.add('w2',
                                       WaitState(wait_time=5),
                                       transitions={'done': 'objtrk'},
                                       autonomy={'done': Autonomy.Off})

            # x:767 y:180
            OperatableStateMachine.add('objtrk',
                                       LaunchObjDetectAndTrack(),
                                       transitions={
                                           'continue': 'w4',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:805 y:282
            OperatableStateMachine.add('w4',
                                       WaitState(wait_time=20),
                                       transitions={'done': 'stop objtrk'},
                                       autonomy={'done': Autonomy.Off})

            # x:753 y:378
            OperatableStateMachine.add('stop objtrk',
                                       StopObjectDetectAndTrack(),
                                       transitions={
                                           'continue': 'start face trk',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:527 y:396
            OperatableStateMachine.add('start face trk',
                                       FaceDetTrack(),
                                       transitions={
                                           'continue': 'w6',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:215 y:426
            OperatableStateMachine.add('stop face',
                                       StopFaceDetectAndTrack(),
                                       transitions={
                                           'continue': 'stop face server',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:418 y:496
            OperatableStateMachine.add('w6',
                                       WaitState(wait_time=20),
                                       transitions={'done': 'stop face'},
                                       autonomy={'done': Autonomy.Off})

            # x:173 y:264
            OperatableStateMachine.add('stop face server',
                                       StopFaceServer(),
                                       transitions={
                                           'continue': 'w',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

        return _state_machine
    def create(self):
        # x:30 y:365, x:130 y:365
        _state_machine = OperatableStateMachine(
            outcomes=['finished', 'failed'])

        # Additional creation code can be added inside the following tags
        # [MANUAL_CREATE]

        # [/MANUAL_CREATE]

        # x:370 y:484, x:130 y:365
        _sm_container_0 = OperatableStateMachine(
            outcomes=['finished', 'failed'])

        with _sm_container_0:
            # x:112 y:64
            OperatableStateMachine.add('video stream',
                                       LaunchVideoStream(vid_input_num=1),
                                       transitions={
                                           'continue': 'face motor server',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:337 y:45
            OperatableStateMachine.add('face motor server',
                                       LaunchFaceServer(),
                                       transitions={
                                           'continue': 'sound calib',
                                           'failed': 'finished'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:602 y:77
            OperatableStateMachine.add(
                'sound calib',
                SoundCalibState(length_of_calibration=70),
                transitions={
                    'continue': 'finished',
                    'failed': 'failed'
                },
                autonomy={
                    'continue': Autonomy.Off,
                    'failed': Autonomy.Off
                })

        with _state_machine:
            # x:216 y:48
            OperatableStateMachine.add('Container',
                                       _sm_container_0,
                                       transitions={
                                           'finished': 'finished',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'finished': Autonomy.Inherit,
                                           'failed': Autonomy.Inherit
                                       })

        return _state_machine
Esempio n. 5
0
	def create(self):
		# x:456 y:478, x:347 y:237
		_state_machine = OperatableStateMachine(outcomes=['finished', 'failed'])

		# Additional creation code can be added inside the following tags
		# [MANUAL_CREATE]
		
		# [/MANUAL_CREATE]

		# x:30 y:365, x:487 y:245
		_sm_guess_age_interaction_0 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_guess_age_interaction_0:
			# x:153 y:68
			OperatableStateMachine.add('smile',
										FacialExpressionState(expression_num=1),
										transitions={'continue': 'wait 1', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:378 y:48
			OperatableStateMachine.add('wait 1',
										WaitState(wait_time=1),
										transitions={'done': 'blink'},
										autonomy={'done': Autonomy.Off})

			# x:605 y:69
			OperatableStateMachine.add('blink',
										FacialExpressionState(expression_num=2),
										transitions={'continue': 'introduction', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:817 y:120
			OperatableStateMachine.add('introduction',
										TalkState(sentence_number=1),
										transitions={'continue': 'listen for name', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:919 y:202
			OperatableStateMachine.add('listen for name',
										ListeningState(),
										transitions={'continue': 'welcome to', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1004 y:291
			OperatableStateMachine.add('welcome to',
										TalkState(sentence_number=2),
										transitions={'continue': 'sub please take my photo', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1027 y:401
			OperatableStateMachine.add('sub please take my photo',
										SubscriberState(topic='/stt_topic', blocking=True, clear=False),
										transitions={'received': 'cond please take my photo', 'unavailable': 'failed'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'message'})

			# x:1025 y:515
			OperatableStateMachine.add('cond please take my photo',
										CheckConditionState(predicate=lambda message:message.data =="please take my photo"),
										transitions={'true': 'cool go ahead', 'false': 'not heard take photo'},
										autonomy={'true': Autonomy.Off, 'false': Autonomy.Off},
										remapping={'input_value': 'message'})

			# x:823 y:458
			OperatableStateMachine.add('not heard take photo',
										LogState(text=not yet heard "please take my photo", severity=Logger.REPORT_HINT),
										transitions={'done': 'sub please take my photo'},
										autonomy={'done': Autonomy.Off})

			# x:938 y:641
			OperatableStateMachine.add('cool go ahead',
										TalkState(sentence_number=3),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:161 y:371, x:268 y:170
		_sm_start_face_det_and_trk_1 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_start_face_det_and_trk_1:
			# x:149 y:36
			OperatableStateMachine.add('say face found',
										TalkState(sentence_number=100),
										transitions={'continue': 'face det trk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:519 y:73
			OperatableStateMachine.add('face det trk',
										FaceDetTrack(),
										transitions={'continue': 'say start face det trk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:563 y:328
			OperatableStateMachine.add('say start face det trk',
										TalkState(sentence_number=101),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:128 y:223, x:130 y:365
		_sm_stop_video_detects_and_tracks_2 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_stop_video_detects_and_tracks_2:
			# x:135 y:64
			OperatableStateMachine.add('stop obj det trk',
										StopFaceDetectAndTrack(),
										transitions={'continue': 'stop face det  trk', 'failed': 'stop face det  trk'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:410 y:78
			OperatableStateMachine.add('stop face det  trk',
										StopFaceDetectAndTrack(),
										transitions={'continue': 'stop video stream', 'failed': 'stop video stream'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:466 y:250
			OperatableStateMachine.add('stop video stream',
										StopCameraStream(),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:438 y:355, x:121 y:296
		_sm_check_face_nearby_3 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_check_face_nearby_3:
			# x:237 y:77
			OperatableStateMachine.add('subscr face found topic',
										SubscriberState(topic='/is_person_nearby', blocking=True, clear=False),
										transitions={'received': 'face condition', 'unavailable': 'failed'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'message'})

			# x:521 y:63
			OperatableStateMachine.add('face condition',
										CheckConditionState(predicate=lambda message:message.data == "yes"),
										transitions={'true': 'finished', 'false': 'no face found yet'},
										autonomy={'true': Autonomy.Off, 'false': Autonomy.Off},
										remapping={'input_value': 'message'})

			# x:297 y:218
			OperatableStateMachine.add('no face found yet',
										LogState(text="no face found yet", severity=Logger.REPORT_HINT),
										transitions={'done': 'subscr face found topic'},
										autonomy={'done': Autonomy.Off})


		# x:30 y:365, x:132 y:205
		_sm_launch_stream_and_object_detector_4 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_launch_stream_and_object_detector_4:
			# x:126 y:42
			OperatableStateMachine.add('launch video stream',
										LaunchVideoStream(),
										transitions={'continue': 'say launching video', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:389 y:56
			OperatableStateMachine.add('say launching video',
										TalkState(sentence_number=99),
										transitions={'continue': 'launch obj det trk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:483 y:152
			OperatableStateMachine.add('launch obj det trk',
										LaunchObjDetectAndTrack(),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})



		with _state_machine:
			# x:135 y:38
			OperatableStateMachine.add('launch stream and object detector',
										_sm_launch_stream_and_object_detector_4,
										transitions={'finished': 'check face nearby', 'failed': 'stop video detects and tracks'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:469 y:33
			OperatableStateMachine.add('check face nearby',
										_sm_check_face_nearby_3,
										transitions={'finished': 'stop obj det trk', 'failed': 'stop video detects and tracks'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:546 y:220
			OperatableStateMachine.add('stop video detects and tracks',
										_sm_stop_video_detects_and_tracks_2,
										transitions={'finished': 'finished', 'failed': 'failed'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:701 y:69
			OperatableStateMachine.add('stop obj det trk',
										StopObjectDetectAndTrack(),
										transitions={'continue': 'start face det and trk', 'failed': 'stop video detects and tracks'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:892 y:135
			OperatableStateMachine.add('start face det and trk',
										_sm_start_face_det_and_trk_1,
										transitions={'finished': 'guess age interaction', 'failed': 'stop video detects and tracks'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:887 y:356
			OperatableStateMachine.add('guess age interaction',
										_sm_guess_age_interaction_0,
										transitions={'finished': 'finished', 'failed': 'stop video detects and tracks'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})


		return _state_machine
Esempio n. 6
0
	def create(self):
		# x:284 y:484, x:47 y:223
		_state_machine = OperatableStateMachine(outcomes=['finished', 'failed'])

		# Additional creation code can be added inside the following tags
		# [MANUAL_CREATE]
		
		# [/MANUAL_CREATE]

		# x:30 y:454, x:130 y:454
		_sm_take_photo_container_(guess_age)_0 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_take_photo_container_(guess_age)_0:
			# x:124 y:43
			OperatableStateMachine.add('ok if you are ready show me a big smile',
										TalkState(sentence_number=3),
										transitions={'continue': 'smile', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:699 y:57
			OperatableStateMachine.add('wait as if take photo',
										WaitState(wait_time=3),
										transitions={'done': 'finished'},
										autonomy={'done': Autonomy.Off})

			# x:481 y:41
			OperatableStateMachine.add('smile',
										FacialExpressionState(expression_num=1),
										transitions={'continue': 'wait as if take photo', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})



		with _state_machine:
			# x:109 y:52
			OperatableStateMachine.add('launch video',
										LaunchVideoStream(),
										transitions={'continue': 'starting object track talk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:514 y:19
			OperatableStateMachine.add('detect and track',
										LaunchObjDetectAndTrack(),
										transitions={'continue': 'subscriber_is_nearby_face_State', 'failed': 'stop face detect'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:734 y:20
			OperatableStateMachine.add('subscriber_is_nearby_face_State',
										SubscriberState(topic='/is_person_nearby', blocking=True, clear=False),
										transitions={'received': 'check_if_nearby', 'unavailable': 'stop obj detect state'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'message'})

			# x:732 y:157
			OperatableStateMachine.add('check_if_nearby',
										CheckConditionState(predicate=lambda message:message.data == "yes"),
										transitions={'true': 'stop obj detect state', 'false': 'logger'},
										autonomy={'true': Autonomy.Off, 'false': Autonomy.Off},
										remapping={'input_value': 'message'})

			# x:588 y:115
			OperatableStateMachine.add('logger',
										LogState(text="false", severity=Logger.REPORT_HINT),
										transitions={'done': 'subscriber_is_nearby_face_State'},
										autonomy={'done': Autonomy.Off})

			# x:935 y:201
			OperatableStateMachine.add('stop obj detect state',
										StopObjectDetectAndTrack(),
										transitions={'continue': 'face identified', 'failed': 'stop face detect'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:960 y:281
			OperatableStateMachine.add('launch face detect and track',
										FaceDetTrack(),
										transitions={'continue': 'wait to show face trk', 'failed': 'stop face detect'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1178 y:285
			OperatableStateMachine.add('wait to show face trk',
										WaitState(wait_time=5),
										transitions={'done': 'talk hello'},
										autonomy={'done': Autonomy.Off})

			# x:1165 y:361
			OperatableStateMachine.add('talk hello',
										TalkState(sentence_number=2),
										transitions={'continue': 'listen_for_input_state', 'failed': 'stop face detect'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:342 y:308
			OperatableStateMachine.add('stop face detect',
										StopFaceDetectAndTrack(),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:967 y:38
			OperatableStateMachine.add('face identified',
										TalkState(sentence_number=100),
										transitions={'continue': 'start face track', 'failed': 'stop obj detect state'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1171 y:33
			OperatableStateMachine.add('start face track',
										TalkState(sentence_number=101),
										transitions={'continue': 'launch face detect and track', 'failed': 'stop obj detect state'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:273 y:126
			OperatableStateMachine.add('starting object track talk',
										TalkState(sentence_number=99),
										transitions={'continue': 'detect and track', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1164 y:441
			OperatableStateMachine.add('listen_for_input_state',
										ListeningState(),
										transitions={'continue': 'subscribe to user input1', 'failed': 'stop face detect'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1160 y:516
			OperatableStateMachine.add('subscribe to user input1',
										SubscriberState(topic='/stt_topic', blocking=True, clear=False),
										transitions={'received': 'check user input1', 'unavailable': 'stop face detect'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'message_stt'})

			# x:1180 y:590
			OperatableStateMachine.add('check user input1',
										CheckConditionState(predicate=lambda message: message.query =="please take my photo"),
										transitions={'true': 'yes take photo', 'false': 'no take photo not received'},
										autonomy={'true': Autonomy.Off, 'false': Autonomy.Off},
										remapping={'input_value': 'message_stt'})

			# x:1005 y:585
			OperatableStateMachine.add('yes take photo',
										LogState(text="yes take photo recieved", severity=Logger.REPORT_HINT),
										transitions={'done': 'take photo container (guess age)'},
										autonomy={'done': Autonomy.Off})

			# x:1367 y:517
			OperatableStateMachine.add('no take photo not received',
										LogState(text="no not recieved take photo", severity=Logger.REPORT_HINT),
										transitions={'done': 'listen_for_input_state'},
										autonomy={'done': Autonomy.Off})

			# x:727 y:532
			OperatableStateMachine.add('take photo container (guess age)',
										_sm_take_photo_container_(guess_age)_0,
										transitions={'finished': 'left container', 'failed': 'stop face detect'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:585 y:606
			OperatableStateMachine.add('left container',
										LogState(text="left container - now back on main", severity=Logger.REPORT_HINT),
										transitions={'done': 'finished'},
										autonomy={'done': Autonomy.Off})


		return _state_machine
Esempio n. 7
0
    def create(self):
        # x:30 y:344, x:202 y:205
        _state_machine = OperatableStateMachine(
            outcomes=['finished', 'failed'])

        # Additional creation code can be added inside the following tags
        # [MANUAL_CREATE]

        # [/MANUAL_CREATE]

        with _state_machine:
            # x:53 y:52
            OperatableStateMachine.add('launch vid',
                                       LaunchVideoStream(vid_input_num=0),
                                       transitions={
                                           'continue': 'launch faceserv',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:305 y:35
            OperatableStateMachine.add('launch faceserv',
                                       LaunchFaceServer(),
                                       transitions={
                                           'continue': 'facetrk',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:508 y:38
            OperatableStateMachine.add('facetrk',
                                       FaceDetTrack(),
                                       transitions={
                                           'continue': 'commence',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:1085 y:460
            OperatableStateMachine.add('8',
                                       WaitState(wait_time=6),
                                       transitions={'done': 'subnamestring'},
                                       autonomy={'done': Autonomy.Off})

            # x:124 y:526
            OperatableStateMachine.add('stopfacetrk',
                                       StopFaceDetectAndTrack(),
                                       transitions={
                                           'continue': 'stopfacesrv',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:125 y:422
            OperatableStateMachine.add('stopfacesrv',
                                       StopFaceServer(),
                                       transitions={
                                           'continue': 'stopvid',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:134 y:283
            OperatableStateMachine.add('stopvid',
                                       StopCameraStream(),
                                       transitions={
                                           'continue': 'finished',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:1041 y:215
            OperatableStateMachine.add('identify',
                                       IdentifyState(),
                                       transitions={
                                           'continue': 'hat',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:837 y:91
            OperatableStateMachine.add('commence',
                                       TalkState(sentence_number=17),
                                       transitions={
                                           'continue': 'identify',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:916 y:471
            OperatableStateMachine.add(
                'subnamestring',
                SubscriberState(topic='/identified_people_string_name',
                                blocking=True,
                                clear=False),
                transitions={
                    'received': 'one',
                    'unavailable': 'failed'
                },
                autonomy={
                    'received': Autonomy.Off,
                    'unavailable': Autonomy.Off
                },
                remapping={'message': 'message_name'})

            # x:766 y:474
            OperatableStateMachine.add('one',
                                       WaitState(wait_time=1),
                                       transitions={'done': 'chkstrng'},
                                       autonomy={'done': Autonomy.Off})

            # x:577 y:490
            OperatableStateMachine.add(
                'chkstrng',
                WordCheckingStringState(key_word="Gal Moore"),
                transitions={
                    'found': 'yes',
                    'not_found': 'no'
                },
                autonomy={
                    'found': Autonomy.Off,
                    'not_found': Autonomy.Off
                },
                remapping={'input_value': 'message_name'})

            # x:381 y:586
            OperatableStateMachine.add('yes',
                                       TalkState(sentence_number=18),
                                       transitions={
                                           'continue': 'stopfacetrk',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:404 y:396
            OperatableStateMachine.add('no',
                                       TalkState(sentence_number=19),
                                       transitions={
                                           'continue': 'stopfacetrk',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:1055 y:323
            OperatableStateMachine.add('hat',
                                       TalkState(sentence_number=20),
                                       transitions={
                                           'continue': '8',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

        return _state_machine
	def create(self):
		# x:154 y:236, x:130 y:410
		_state_machine = OperatableStateMachine(outcomes=['finished', 'failed'])

		# Additional creation code can be added inside the following tags
		# [MANUAL_CREATE]
		
		# [/MANUAL_CREATE]

		# x:77 y:297, x:130 y:392
		_sm_got_permission_0 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_got_permission_0:
			# x:100 y:65
			OperatableStateMachine.add('go ahead',
										TalkState(sentence_number=3),
										transitions={'continue': 'wait till robot  finish talking', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:519 y:139
			OperatableStateMachine.add('smile',
										FacialExpressionState(expression_num=1),
										transitions={'continue': 'sub', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:368 y:43
			OperatableStateMachine.add('wait till robot  finish talking',
										WaitState(wait_time=5),
										transitions={'done': 'smile'},
										autonomy={'done': Autonomy.Off})

			# x:819 y:114
			OperatableStateMachine.add('sub',
										SubscriberState(topic='/ros_openvino_toolkit/age_genders_Recognition', blocking=True, clear=False),
										transitions={'received': 'check age gender', 'unavailable': 'failed'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'message'})

			# x:901 y:198
			OperatableStateMachine.add('check age gender',
										AgeGenderCheckingState(),
										transitions={'found': 'check what to say', 'not_found': 'check what to say'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'input_value': 'message', 'age': 'age', 'gender': 'gender'})

			# x:853 y:391
			OperatableStateMachine.add('check what to say',
										AgeGenderCheckSpeechState(),
										transitions={'found': 'wait', 'not_found': 'wait'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'age': 'age', 'gender': 'gender'})

			# x:904 y:506
			OperatableStateMachine.add('wait',
										WaitState(wait_time=2),
										transitions={'done': 'was I right or'},
										autonomy={'done': Autonomy.Off})

			# x:715 y:514
			OperatableStateMachine.add('was I right or',
										TalkState(sentence_number=14),
										transitions={'continue': 'graucho', 'failed': 'graucho'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:518 y:611
			OperatableStateMachine.add('graucho',
										FacialExpressionState(expression_num=3),
										transitions={'continue': 'good bye', 'failed': 'good bye'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:475 y:465
			OperatableStateMachine.add('good bye',
										TalkState(sentence_number=12),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:343 y:584, x:501 y:192
		_sm_guess_age_interaction_1 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_guess_age_interaction_1:
			# x:27 y:84
			OperatableStateMachine.add('smile',
										FacialExpressionState(expression_num=1),
										transitions={'continue': 'wait2', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:210 y:70
			OperatableStateMachine.add('wait2',
										WaitState(wait_time=2),
										transitions={'done': 'blink'},
										autonomy={'done': Autonomy.Off})

			# x:329 y:43
			OperatableStateMachine.add('blink',
										FacialExpressionState(expression_num=2),
										transitions={'continue': 'welcome whats your name', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:498 y:19
			OperatableStateMachine.add('welcome whats your name',
										TalkState(sentence_number=1),
										transitions={'continue': 'calib1', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1089 y:151
			OperatableStateMachine.add('welcome',
										TalkState(sentence_number=2),
										transitions={'continue': 'wait till finished talking', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1035 y:254
			OperatableStateMachine.add('user input please take photo',
										ListeningState(),
										transitions={'continue': 'wait 1 second', 'failed': 'wait 1 second'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off},
										remapping={'input_value': 'message'})

			# x:1286 y:154
			OperatableStateMachine.add('wait till finished talking',
										WaitState(wait_time=1),
										transitions={'done': 'user input please take photo'},
										autonomy={'done': Autonomy.Off})

			# x:958 y:424
			OperatableStateMachine.add('wait 1 second',
										WaitState(wait_time=1),
										transitions={'done': 'SUBTORESPONSE'},
										autonomy={'done': Autonomy.Off})

			# x:1053 y:586
			OperatableStateMachine.add('got permission',
										_sm_got_permission_0,
										transitions={'finished': 'finished', 'failed': 'failed'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:1153 y:431
			OperatableStateMachine.add('SUBTORESPONSE',
										SubscriberState(topic='/is_robot_listening', blocking=True, clear=False),
										transitions={'received': 'CHKCOND', 'unavailable': 'CHKCOND'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'message'})

			# x:1365 y:430
			OperatableStateMachine.add('CHKCOND',
										CheckConditionState(predicate=lambda message: message.data == "not listening"),
										transitions={'true': 'log', 'false': 'SUBTORESPONSE'},
										autonomy={'true': Autonomy.Off, 'false': Autonomy.Off},
										remapping={'input_value': 'message'})

			# x:1351 y:558
			OperatableStateMachine.add('log',
										LogState(text="got input from user", severity=Logger.REPORT_HINT),
										transitions={'done': 'got permission'},
										autonomy={'done': Autonomy.Off})

			# x:1095 y:14
			OperatableStateMachine.add('listenuserinput',
										ListeningState(),
										transitions={'continue': 'waitwait', 'failed': 'waitwait'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off},
										remapping={'input_value': 'message'})

			# x:1296 y:12
			OperatableStateMachine.add('waitwait',
										WaitState(wait_time=1),
										transitions={'done': 'substate'},
										autonomy={'done': Autonomy.Off})

			# x:1401 y:16
			OperatableStateMachine.add('substate',
										SubscriberState(topic='/is_robot_listening', blocking=True, clear=False),
										transitions={'received': 'chekcont', 'unavailable': 'chekcont'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'message_listen'})

			# x:839 y:94
			OperatableStateMachine.add('chekcont',
										CheckConditionState(predicate=lambda message: message.data == "not listening"),
										transitions={'true': 'welcome', 'false': 'substate'},
										autonomy={'true': Autonomy.Off, 'false': Autonomy.Off},
										remapping={'input_value': 'message_listen'})

			# x:716 y:13
			OperatableStateMachine.add('calib1',
										SoundCalibState(length_of_calibration=60),
										transitions={'continue': 'sub5', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:921 y:13
			OperatableStateMachine.add('sub5',
										SubscriberState(topic='/avg_ambience_vol', blocking=True, clear=False),
										transitions={'received': 'listenuserinput', 'unavailable': 'failed'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'message'})


		# x:555 y:314, x:343 y:251
		_sm_start_face__2 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_start_face__2:
			# x:90 y:59
			OperatableStateMachine.add('say face found',
										TalkState(sentence_number=100),
										transitions={'continue': 'start face', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:391 y:73
			OperatableStateMachine.add('start face',
										FaceDetTrack(),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:582 y:410, x:130 y:365
		_sm_check_face_nearby_3 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_check_face_nearby_3:
			# x:335 y:73
			OperatableStateMachine.add('sub face nearby',
										SubscriberState(topic='/is_person_nearby', blocking=True, clear=False),
										transitions={'received': 'face condition', 'unavailable': 'failed'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'message'})

			# x:517 y:113
			OperatableStateMachine.add('face condition',
										CheckConditionState(predicate=lambda message: message.data == "yes"),
										transitions={'true': 'finished', 'false': 'log'},
										autonomy={'true': Autonomy.Off, 'false': Autonomy.Off},
										remapping={'input_value': 'message'})

			# x:367 y:223
			OperatableStateMachine.add('log',
										LogState(text="no face yet", severity=Logger.REPORT_HINT),
										transitions={'done': 'sub face nearby'},
										autonomy={'done': Autonomy.Off})


		# x:159 y:294, x:262 y:532
		_sm_stop_video_detects_and_tracks_4 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_stop_video_detects_and_tracks_4:
			# x:347 y:146
			OperatableStateMachine.add('stop obj',
										StopObjectDetectAndTrack(),
										transitions={'continue': 'stop face', 'failed': 'stop face'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:621 y:167
			OperatableStateMachine.add('stop face',
										StopFaceDetectAndTrack(),
										transitions={'continue': 'stop video', 'failed': 'stop video'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:439 y:323
			OperatableStateMachine.add('stop video',
										StopCameraStream(),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:375 y:332, x:227 y:202
		_sm_launch_video_stream_and_object_detector_5 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_launch_video_stream_and_object_detector_5:
			# x:120 y:76
			OperatableStateMachine.add('video stream',
										LaunchVideoStream(vid_input_num=1),
										transitions={'continue': 'say launch obj', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:405 y:63
			OperatableStateMachine.add('say launch obj',
										TalkState(sentence_number=99),
										transitions={'continue': 'launch obj', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:647 y:168
			OperatableStateMachine.add('launch obj',
										LaunchObjDetectAndTrack(),
										transitions={'continue': 'launch face server', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:649 y:298
			OperatableStateMachine.add('launch face server',
										LaunchFaceServer(),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})



		with _state_machine:
			# x:46 y:63
			OperatableStateMachine.add('launch video stream and object detector',
										_sm_launch_video_stream_and_object_detector_5,
										transitions={'finished': 'wait5', 'failed': 'stop video detects and tracks'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:372 y:534
			OperatableStateMachine.add('stop video detects and tracks',
										_sm_stop_video_detects_and_tracks_4,
										transitions={'finished': 'launch video stream and object detector', 'failed': 'failed'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:540 y:64
			OperatableStateMachine.add('check face nearby',
										_sm_check_face_nearby_3,
										transitions={'finished': 'stop obj', 'failed': 'stop video detects and tracks'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:815 y:53
			OperatableStateMachine.add('stop obj',
										StopObjectDetectAndTrack(),
										transitions={'continue': 'start face ', 'failed': 'stop video detects and tracks'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:906 y:199
			OperatableStateMachine.add('start face ',
										_sm_start_face__2,
										transitions={'finished': 'wait3', 'failed': 'stop video detects and tracks'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:390 y:36
			OperatableStateMachine.add('wait5',
										WaitState(wait_time=5),
										transitions={'done': 'check face nearby'},
										autonomy={'done': Autonomy.Off})

			# x:954 y:322
			OperatableStateMachine.add('wait3',
										WaitState(wait_time=2),
										transitions={'done': 'guess age interaction'},
										autonomy={'done': Autonomy.Off})

			# x:878 y:457
			OperatableStateMachine.add('guess age interaction',
										_sm_guess_age_interaction_1,
										transitions={'finished': 'stop video detects and tracks', 'failed': 'stop video detects and tracks'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})


		return _state_machine
    def create(self):
        # x:518 y:618, x:130 y:365
        _state_machine = OperatableStateMachine(
            outcomes=['finished', 'failed'])

        # Additional creation code can be added inside the following tags
        # [MANUAL_CREATE]

        # [/MANUAL_CREATE]

        with _state_machine:
            # x:77 y:44
            OperatableStateMachine.add('1',
                                       LaunchVideoStream(),
                                       transitions={
                                           'continue': '2',
                                           'failed': '5'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:280 y:40
            OperatableStateMachine.add('2',
                                       FaceDetTrack(),
                                       transitions={
                                           'continue': '3',
                                           'failed': '6'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:482 y:25
            OperatableStateMachine.add(
                '3',
                WaitState(wait_time=5),
                transitions={'done': 'sub to age and gendre'},
                autonomy={'done': Autonomy.Off})

            # x:647 y:100
            OperatableStateMachine.add(
                'sub to age and gendre',
                SubscriberState(
                    topic='/ros_openvino_toolkit/age_genders_Recognition',
                    blocking=True,
                    clear=False),
                transitions={
                    'received': '7',
                    'unavailable': '6'
                },
                autonomy={
                    'received': Autonomy.Off,
                    'unavailable': Autonomy.Off
                },
                remapping={'message': 'message'})

            # x:283 y:347
            OperatableStateMachine.add('5',
                                       StopCameraStream(),
                                       transitions={
                                           'continue': 'finished',
                                           'failed': 'failed'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:493 y:401
            OperatableStateMachine.add('6',
                                       StopFaceDetectAndTrack(),
                                       transitions={
                                           'continue': '5',
                                           'failed': '5'
                                       },
                                       autonomy={
                                           'continue': Autonomy.Off,
                                           'failed': Autonomy.Off
                                       })

            # x:820 y:229
            OperatableStateMachine.add('7',
                                       AgeGenderCheckingState(),
                                       transitions={
                                           'found': 'what to say',
                                           'not_found': 'what to say'
                                       },
                                       autonomy={
                                           'found': Autonomy.Off,
                                           'not_found': Autonomy.Off
                                       },
                                       remapping={
                                           'input_value': 'message',
                                           'age': 'age',
                                           'gender': 'gender'
                                       })

            # x:780 y:427
            OperatableStateMachine.add('what to say',
                                       AgeGenderCheckSpeechState(),
                                       transitions={
                                           'found': '6',
                                           'not_found': '6'
                                       },
                                       autonomy={
                                           'found': Autonomy.Off,
                                           'not_found': Autonomy.Off
                                       },
                                       remapping={
                                           'age': 'age',
                                           'gender': 'gender'
                                       })

        return _state_machine
Esempio n. 10
0
	def create(self):
		# x:174 y:518, x:535 y:33
		_state_machine = OperatableStateMachine(outcomes=['finished', 'failed'])

		# Additional creation code can be added inside the following tags
		# [MANUAL_CREATE]
		
		# [/MANUAL_CREATE]

		# x:30 y:372, x:130 y:372
		_sm_joke_0 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_joke_0:
			# x:83 y:58
			OperatableStateMachine.add('startfacedettrk2',
										FaceDetTrack(),
										transitions={'continue': 'great', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:465 y:94
			OperatableStateMachine.add('44',
										TalkState(sentence_number=44),
										transitions={'continue': 'readcalib', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:696 y:130
			OperatableStateMachine.add('listenn',
										ListeningState(),
										transitions={'continue': 'readquery', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off},
										remapping={'input_value': 'calib_vol'})

			# x:695 y:30
			OperatableStateMachine.add('readcalib',
										ReadTxtState(txt_path="/home/intel/catkin_ws/src/robot_ears/text_files/volume_calib.txt"),
										transitions={'unavailable': 'failed', 'got_message': 'listenn'},
										autonomy={'unavailable': Autonomy.Off, 'got_message': Autonomy.Off},
										remapping={'message': 'calib_vol'})

			# x:708 y:235
			OperatableStateMachine.add('readquery',
										ReadTxtState(txt_path="/home/intel/catkin_ws/src/robot_ears/text_files/query.txt"),
										transitions={'unavailable': 'failed', 'got_message': '43'},
										autonomy={'unavailable': Autonomy.Off, 'got_message': Autonomy.Off},
										remapping={'message': 'message'})

			# x:712 y:329
			OperatableStateMachine.add('43',
										TalkState(sentence_number=43),
										transitions={'continue': 'lllisten', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:713 y:433
			OperatableStateMachine.add('lllisten',
										ListeningState(),
										transitions={'continue': 'ttlk45', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off},
										remapping={'input_value': 'calib_vol'})

			# x:487 y:468
			OperatableStateMachine.add('ttlk45',
										TalkState(sentence_number=45),
										transitions={'continue': '46', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:275 y:461
			OperatableStateMachine.add('46',
										TalkState(sentence_number=46),
										transitions={'continue': 'stopffcedettrk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:83 y:558
			OperatableStateMachine.add('stopffcedettrk',
										StopFaceDetectAndTrack(),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:270 y:113
			OperatableStateMachine.add('great',
										TalkState(sentence_number=42),
										transitions={'continue': '44', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:372 y:465, x:183 y:214
		_sm_waking_up_1 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_waking_up_1:
			# x:181 y:75
			OperatableStateMachine.add('facial gestures eyes mouth only',
										FacialGesturesState(),
										transitions={'continue': 'decide_talk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:612 y:466
			OperatableStateMachine.add('3',
										WaitState(wait_time=2),
										transitions={'done': 'finished'},
										autonomy={'done': Autonomy.Off})

			# x:719 y:238
			OperatableStateMachine.add('40',
										TalkState(sentence_number=40),
										transitions={'continue': '41', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:712 y:335
			OperatableStateMachine.add('41',
										TalkState(sentence_number=41),
										transitions={'continue': '3', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:527 y:239
			OperatableStateMachine.add('51',
										TalkState(sentence_number=51),
										transitions={'continue': '52', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:528 y:333
			OperatableStateMachine.add('52',
										TalkState(sentence_number=52),
										transitions={'continue': '3', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:556 y:35
			OperatableStateMachine.add('decide_talk',
										DecideTalkState(),
										transitions={'continue1': '51', 'continue2': '40', 'continue3': '53'},
										autonomy={'continue1': Autonomy.Off, 'continue2': Autonomy.Off, 'continue3': Autonomy.Off})

			# x:371 y:153
			OperatableStateMachine.add('53',
										TalkState(sentence_number=53),
										transitions={'continue': '54', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:376 y:338
			OperatableStateMachine.add('54',
										TalkState(sentence_number=54),
										transitions={'continue': '3', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:30 y:338, x:364 y:249
		_sm_object_detection_till_face_nearby_2 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_object_detection_till_face_nearby_2:
			# x:47 y:244
			OperatableStateMachine.add('killfacegesture1',
										KillFacialGesturesState(),
										transitions={'continue': 'obj det trk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:798 y:215
			OperatableStateMachine.add('chk person',
										CheckConditionState(predicate=lambda person_message: person_message.data == "yes"),
										transitions={'true': 'decidetalk56', 'false': 'sub person'},
										autonomy={'true': Autonomy.Off, 'false': Autonomy.Off},
										remapping={'input_value': 'person_message'})

			# x:308 y:364
			OperatableStateMachine.add('stop obj trk',
										StopObjectDetectAndTrack(),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:503 y:74
			OperatableStateMachine.add('strtdobj',
										TalkState(sentence_number=25),
										transitions={'continue': 'sub person', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:592 y:305
			OperatableStateMachine.add('found face ',
										TalkState(sentence_number=24),
										transitions={'continue': 'stop obj trk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:908 y:45
			OperatableStateMachine.add('sub person',
										SubscriberState(topic='/is_person_nearby', blocking=True, clear=False),
										transitions={'received': 'chk person', 'unavailable': 'chk person'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'person_message'})

			# x:288 y:30
			OperatableStateMachine.add('decidetalk5',
										DecideTalkState(),
										transitions={'continue1': 'strtdobj', 'continue2': '61', 'continue3': '62'},
										autonomy={'continue1': Autonomy.Off, 'continue2': Autonomy.Off, 'continue3': Autonomy.Off})

			# x:503 y:148
			OperatableStateMachine.add('61',
										TalkState(sentence_number=61),
										transitions={'continue': 'sub person', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:506 y:213
			OperatableStateMachine.add('62',
										TalkState(sentence_number=62),
										transitions={'continue': 'sub person', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:792 y:381
			OperatableStateMachine.add('decidetalk56',
										DecideTalkState(),
										transitions={'continue1': 'found face ', 'continue2': '63t', 'continue3': '64t'},
										autonomy={'continue1': Autonomy.Off, 'continue2': Autonomy.Off, 'continue3': Autonomy.Off})

			# x:593 y:371
			OperatableStateMachine.add('63t',
										TalkState(sentence_number=63),
										transitions={'continue': 'stop obj trk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:585 y:442
			OperatableStateMachine.add('64t',
										TalkState(sentence_number=64),
										transitions={'continue': 'stop obj trk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:102 y:77
			OperatableStateMachine.add('startfacialgestures',
										FacialGesturesState(),
										transitions={'continue': 'decidetalk5', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:95 y:156
			OperatableStateMachine.add('obj det trk',
										LaunchObjDetectAndTrack(),
										transitions={'continue': 'startfacialgestures', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:30 y:408, x:370 y:201
		_sm_what_do_next_3 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_what_do_next_3:
			# x:322 y:25
			OperatableStateMachine.add('decidetllk2',
										DecideTalkState(),
										transitions={'continue1': 't29', 'continue2': '57', 'continue3': '60'},
										autonomy={'continue1': Autonomy.Off, 'continue2': Autonomy.Off, 'continue3': Autonomy.Off})

			# x:30 y:132
			OperatableStateMachine.add('t30',
										TalkState(sentence_number=30),
										transitions={'continue': '31', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:30 y:224
			OperatableStateMachine.add('31',
										TalkState(sentence_number=31),
										transitions={'continue': '32', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:30 y:316
			OperatableStateMachine.add('32',
										TalkState(sentence_number=32),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:582 y:225
			OperatableStateMachine.add('57',
										TalkState(sentence_number=57),
										transitions={'continue': '59', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:99 y:34
			OperatableStateMachine.add('59',
										TalkState(sentence_number=59),
										transitions={'continue': 't30', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:554 y:324
			OperatableStateMachine.add('60',
										TalkState(sentence_number=60),
										transitions={'continue': '59', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:584 y:151
			OperatableStateMachine.add('t29',
										TalkState(sentence_number=29),
										transitions={'continue': '59', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:256 y:317, x:458 y:279
		_sm_identify_4 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_identify_4:
			# x:166 y:76
			OperatableStateMachine.add('start face det trk',
										FaceDetTrack(),
										transitions={'continue': 't17', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:382 y:59
			OperatableStateMachine.add('t17',
										TalkState(sentence_number=17),
										transitions={'continue': 'identify', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:587 y:33
			OperatableStateMachine.add('identify',
										IdentifyState(),
										transitions={'continue': 't20', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:807 y:28
			OperatableStateMachine.add('t20',
										TalkState(sentence_number=20),
										transitions={'continue': 'w6', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1045 y:34
			OperatableStateMachine.add('w6',
										WaitState(wait_time=6),
										transitions={'done': 'subbb'},
										autonomy={'done': Autonomy.Off})

			# x:606 y:165
			OperatableStateMachine.add('subbb',
										SubscriberState(topic='/identified_people_string_name', blocking=True, clear=False),
										transitions={'received': 'w1', 'unavailable': 'log no sub'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'message_name'})

			# x:832 y:144
			OperatableStateMachine.add('w1',
										WaitState(wait_time=1),
										transitions={'done': 'cchker gal'},
										autonomy={'done': Autonomy.Off})

			# x:1050 y:142
			OperatableStateMachine.add('cchker gal',
										WordCheckingStringState(key_word="Gal Moore"),
										transitions={'found': 'f18', 'not_found': 'chk2 coral'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'input_value': 'message_name'})

			# x:842 y:225
			OperatableStateMachine.add('f18',
										TalkState(sentence_number=18),
										transitions={'continue': '50 auth coplete', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1042 y:737
			OperatableStateMachine.add('19',
										TalkState(sentence_number=19),
										transitions={'continue': 'stpfacetrk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:509 y:504
			OperatableStateMachine.add('stpfacetrk',
										StopFaceDetectAndTrack(),
										transitions={'continue': 'stop identify', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:608 y:272
			OperatableStateMachine.add('log no sub',
										LogState(text="no available lkog log", severity=Logger.REPORT_HINT),
										transitions={'done': 'subbb'},
										autonomy={'done': Autonomy.Off})

			# x:270 y:471
			OperatableStateMachine.add('stop identify',
										StopIdentifyState(),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1051 y:236
			OperatableStateMachine.add('chk2 coral',
										WordCheckingStringState(key_word="coral"),
										transitions={'found': '47 coral', 'not_found': 'chek3 yona'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'input_value': 'message_name'})

			# x:1049 y:338
			OperatableStateMachine.add('chek3 yona',
										WordCheckingStringState(key_word="yona"),
										transitions={'found': '48 yona', 'not_found': 'check4 yaeli'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'input_value': 'message_name'})

			# x:1061 y:445
			OperatableStateMachine.add('check4 yaeli',
										WordCheckingStringState(key_word="yaeli"),
										transitions={'found': '49', 'not_found': 'chk zeev'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'input_value': 'message_name'})

			# x:645 y:373
			OperatableStateMachine.add('50 auth coplete',
										TalkState(sentence_number=50),
										transitions={'continue': 'stpfacetrk', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:843 y:283
			OperatableStateMachine.add('47 coral',
										TalkState(sentence_number=47),
										transitions={'continue': '50 auth coplete', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:841 y:356
			OperatableStateMachine.add('48 yona',
										TalkState(sentence_number=48),
										transitions={'continue': '50 auth coplete', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:837 y:430
			OperatableStateMachine.add('49',
										TalkState(sentence_number=49),
										transitions={'continue': '50 auth coplete', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:1047 y:555
			OperatableStateMachine.add('chk zeev',
										WordCheckingStringState(key_word="zeev"),
										transitions={'found': 'zeev65', 'not_found': '19'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'input_value': 'message_name'})

			# x:841 y:519
			OperatableStateMachine.add('zeev65',
										TalkState(sentence_number=65),
										transitions={'continue': '50 auth coplete', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:30 y:365, x:172 y:294
		_sm_game_5 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_game_5:
			# x:40 y:41
			OperatableStateMachine.add('face trk',
										FaceDetTrack(),
										transitions={'continue': 't36', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:240 y:43
			OperatableStateMachine.add('t37',
										TalkState(sentence_number=37),
										transitions={'continue': 't38', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:460 y:41
			OperatableStateMachine.add('t38',
										TalkState(sentence_number=38),
										transitions={'continue': 'sub vino age gendre', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:699 y:70
			OperatableStateMachine.add('sub vino age gendre',
										SubscriberState(topic='/ros_openvino_toolkit/age_genders_Recognition', blocking=True, clear=False),
										transitions={'received': 'agegendchek', 'unavailable': 'log'},
										autonomy={'received': Autonomy.Off, 'unavailable': Autonomy.Off},
										remapping={'message': 'message'})

			# x:626 y:228
			OperatableStateMachine.add('agegendchek',
										AgeGenderCheckingState(),
										transitions={'found': 'chkspch', 'not_found': 'chkspch'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'input_value': 'message', 'age': 'age', 'gender': 'gender'})

			# x:672 y:384
			OperatableStateMachine.add('chkspch',
										AgeGenderCheckSpeechState(),
										transitions={'found': 'stopface trk', 'not_found': 'stopface trk'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'age': 'age', 'gender': 'gender'})

			# x:58 y:174
			OperatableStateMachine.add('t36',
										TalkState(sentence_number=36),
										transitions={'continue': 't37', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:392 y:462
			OperatableStateMachine.add('stopface trk',
										StopFaceDetectAndTrack(),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:874 y:21
			OperatableStateMachine.add('log',
										LogState(text="log", severity=Logger.REPORT_HINT),
										transitions={'done': 'sub vino age gendre'},
										autonomy={'done': Autonomy.Off})


		# x:202 y:510, x:130 y:365
		_sm_tracking_6 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_tracking_6:
			# x:118 y:83
			OperatableStateMachine.add('stopdettrkface',
										StopFaceDetectAndTrack(),
										transitions={'continue': 'decide_what_sy', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:439 y:266
			OperatableStateMachine.add('35',
										TalkState(sentence_number=35),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:475 y:80
			OperatableStateMachine.add('decide_what_sy',
										DecideTalkState(),
										transitions={'continue1': '35', 'continue2': 'talk55', 'continue3': 'talk56'},
										autonomy={'continue1': Autonomy.Off, 'continue2': Autonomy.Off, 'continue3': Autonomy.Off})

			# x:651 y:272
			OperatableStateMachine.add('talk55',
										TalkState(sentence_number=55),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:260 y:221
			OperatableStateMachine.add('talk56',
										TalkState(sentence_number=56),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:1214 y:584, x:130 y:368, x:849 y:566, x:938 y:579, x:793 y:382, x:1024 y:542
		_sm_user_input_speech_7 = OperatableStateMachine(outcomes=['finished', 'failed', 'identification', 'game', 'tracking', 'joke'])

		with _sm_user_input_speech_7:
			# x:105 y:65
			OperatableStateMachine.add('calib',
										SoundCalibState(length_of_calibration=5),
										transitions={'continue': 'read1', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:477 y:315
			OperatableStateMachine.add('word chk "tracking"',
										WordCheckingState(key_word="tracking"),
										transitions={'found': 'tracking', 'not_found': 'wrd chk "identification"'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'input_value': 'message'})

			# x:701 y:294
			OperatableStateMachine.add('wrd chk "identification"',
										WordCheckingState(key_word="identification"),
										transitions={'found': 'identification', 'not_found': 'wrd chk "game"'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'input_value': 'message'})

			# x:873 y:293
			OperatableStateMachine.add('wrd chk "game"',
										WordCheckingState(key_word="game"),
										transitions={'found': 'game', 'not_found': 'wrd chek "joke"'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'input_value': 'message'})

			# x:1209 y:475
			OperatableStateMachine.add('39',
										TalkState(sentence_number=39),
										transitions={'continue': 'tracking', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:417 y:112
			OperatableStateMachine.add('read1',
										ReadTxtState(txt_path="/home/intel/catkin_ws/src/robot_ears/text_files/volume_calib.txt"),
										transitions={'unavailable': 'failed', 'got_message': 'listen1'},
										autonomy={'unavailable': Autonomy.Off, 'got_message': Autonomy.Off},
										remapping={'message': 'calib1'})

			# x:818 y:68
			OperatableStateMachine.add('read2',
										ReadTxtState(txt_path="/home/intel/catkin_ws/src/robot_ears/text_files/query.txt"),
										transitions={'unavailable': 'failed', 'got_message': 'stopfacedettrk22'},
										autonomy={'unavailable': Autonomy.Off, 'got_message': Autonomy.Off},
										remapping={'message': 'message'})

			# x:637 y:209
			OperatableStateMachine.add('stopfacedettrk22',
										StopFaceDetectAndTrack(),
										transitions={'continue': 'word chk "tracking"', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:607 y:31
			OperatableStateMachine.add('listen1',
										ListeningState(),
										transitions={'continue': 'read2', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off},
										remapping={'input_value': 'calib1'})

			# x:1132 y:279
			OperatableStateMachine.add('wrd chek "joke"',
										WordCheckingState(key_word="joke"),
										transitions={'found': 'joke', 'not_found': '39'},
										autonomy={'found': Autonomy.Off, 'not_found': Autonomy.Off},
										remapping={'input_value': 'message'})


		# x:195 y:308, x:402 y:431
		_sm_face_det_and_start_interaction_ask_user_what_next_8 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_face_det_and_start_interaction_ask_user_what_next_8:
			# x:52 y:220
			OperatableStateMachine.add('face det trk',
										FaceDetTrack(),
										transitions={'continue': 'killfacialgestures', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:814 y:163
			OperatableStateMachine.add('tlk2',
										TalkState(sentence_number=2),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:326 y:31
			OperatableStateMachine.add('tlk3',
										TalkState(sentence_number=27),
										transitions={'continue': 'talk4', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:543 y:43
			OperatableStateMachine.add('talk4',
										TalkState(sentence_number=28),
										transitions={'continue': 'graucho', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:797 y:64
			OperatableStateMachine.add('graucho',
										FacialExpressionState(expression_num=3),
										transitions={'continue': 'welcome', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:555 y:165
			OperatableStateMachine.add('welcome',
										TalkState(sentence_number=1),
										transitions={'continue': 'tlk2', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:58 y:112
			OperatableStateMachine.add('killfacialgestures',
										KillFacialGesturesState(),
										transitions={'continue': 'gesturesfacedet', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:145 y:36
			OperatableStateMachine.add('gesturesfacedet',
										FacialGesturesFaceDetState(),
										transitions={'continue': 'tlk3', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})


		# x:30 y:365, x:237 y:222
		_sm_face_server_video_and_arduino_init_9 = OperatableStateMachine(outcomes=['finished', 'failed'])

		with _sm_face_server_video_and_arduino_init_9:
			# x:54 y:82
			OperatableStateMachine.add('launch video',
										LaunchVideoStream(vid_input_num=0),
										transitions={'continue': 'init face server', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:308 y:86
			OperatableStateMachine.add('init face server',
										LaunchFaceServer(),
										transitions={'continue': 'init arduino', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:493 y:204
			OperatableStateMachine.add('init arduino',
										LaunchArduinoLed(),
										transitions={'continue': '23', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})

			# x:466 y:484
			OperatableStateMachine.add('23',
										TalkState(sentence_number=23),
										transitions={'continue': 'finished', 'failed': 'failed'},
										autonomy={'continue': Autonomy.Off, 'failed': Autonomy.Off})



		with _state_machine:
			# x:30 y:40
			OperatableStateMachine.add('face server video and arduino init',
										_sm_face_server_video_and_arduino_init_9,
										transitions={'finished': 'waking up', 'failed': 'failed'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:796 y:38
			OperatableStateMachine.add('face det and start interaction ask user what next',
										_sm_face_det_and_start_interaction_ask_user_what_next_8,
										transitions={'finished': 'what do next', 'failed': 'failed'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:454 y:512
			OperatableStateMachine.add('user input speech',
										_sm_user_input_speech_7,
										transitions={'finished': 'finished', 'failed': 'failed', 'identification': 'identify', 'game': 'game', 'tracking': 'tracking', 'joke': 'joke'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit, 'identification': Autonomy.Inherit, 'game': Autonomy.Inherit, 'tracking': Autonomy.Inherit, 'joke': Autonomy.Inherit})

			# x:721 y:192
			OperatableStateMachine.add('tracking',
										_sm_tracking_6,
										transitions={'finished': 'object detection till face nearby', 'failed': 'failed'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:727 y:275
			OperatableStateMachine.add('game',
										_sm_game_5,
										transitions={'finished': 'object detection till face nearby', 'failed': 'failed'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:738 y:361
			OperatableStateMachine.add('identify',
										_sm_identify_4,
										transitions={'finished': 'object detection till face nearby', 'failed': 'failed'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:288 y:423
			OperatableStateMachine.add('what do next',
										_sm_what_do_next_3,
										transitions={'finished': 'user input speech', 'failed': 'failed'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:1001 y:181
			OperatableStateMachine.add('object detection till face nearby',
										_sm_object_detection_till_face_nearby_2,
										transitions={'finished': 'face det and start interaction ask user what next', 'failed': 'failed'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:286 y:202
			OperatableStateMachine.add('waking up',
										_sm_waking_up_1,
										transitions={'finished': 'tracking', 'failed': 'finished'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})

			# x:739 y:488
			OperatableStateMachine.add('joke',
										_sm_joke_0,
										transitions={'finished': 'object detection till face nearby', 'failed': 'failed'},
										autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit})


		return _state_machine