def create(self): hello = "Hello World" # x:212 y:273, x:130 y:322 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:93 y:66 OperatableStateMachine.add('Initial_Wait', WaitState(wait_time=self.waiting_time), transitions={'done': 'Print_Greeting'}, autonomy={'done': Autonomy.Off}) # x:145 y:159 OperatableStateMachine.add('Print_Greeting', LogState(text=hello, severity=Logger.REPORT_HINT), transitions={'done': 'finished'}, autonomy={'done': Autonomy.High}) return _state_machine
def create(self): # x:30 y:365, x:213 y:312 _state_machine = OperatableStateMachine( outcomes=['finished', 'failed'], input_keys=['goal_brick']) _state_machine.userdata.goal_brick = 1 # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:30 y:40 OperatableStateMachine.add('grasp', BrickGraspingActionState(), transitions={ 'grasped': 'finished', 'grasping_error': 'failed' }, autonomy={ 'grasped': Autonomy.Off, 'grasping_error': Autonomy.Off }, remapping={ 'goal_brick': 'goal_brick', 'success': 'success' }) return _state_machine
def create(self): # x:679 y:52, x:130 y:406 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.config_name_left = 'Left_Home_S' _state_machine.userdata.config_name_right = 'Right_Home_S' _state_machine.userdata.config_name_gantry = 'Gantry_Home_Pick' _state_machine.userdata.move_group_g = 'Gantry' _state_machine.userdata.move_group_prefix_g = '/ariac/gantry' _state_machine.userdata.action_topic = '/move_group' _state_machine.userdata.robot_name = 'gantry' _state_machine.userdata.joint_values = [] _state_machine.userdata.joint_names = [] _state_machine.userdata.move_group_l = 'Left_Arm' _state_machine.userdata.move_group_r = 'Right_Arm' # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:51 y:36 OperatableStateMachine.add('MoveGantryHome', SrdfStateToMoveitAriac(), transitions={'reached': 'finished', 'planning_failed': 'failed', 'control_failed': 'failed', 'param_error': 'failed'}, autonomy={'reached': Autonomy.Off, 'planning_failed': Autonomy.Off, 'control_failed': Autonomy.Off, 'param_error': Autonomy.Off}, remapping={'config_name': 'config_name_gantry', 'move_group': 'move_group_g', 'move_group_prefix': 'move_group_prefix_g', 'action_topic': 'action_topic', 'robot_name': 'robot_name', 'config_name_out': 'config_name_out', 'move_group_out': 'move_group_out', 'robot_name_out': 'robot_name_out', 'action_topic_out': 'action_topic_out', 'joint_values': 'joint_values', 'joint_names': 'joint_names'}) return _state_machine
def create(self): # x:83 y:340, x:283 y:190 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:60 y:78 OperatableStateMachine.add('Log_Sweep', LogState(text='Now performing a short sweep...', severity=Logger.REPORT_INFO), transitions={'done': 'Perform_Sweep'}, autonomy={'done': Autonomy.Off}) # x:47 y:178 OperatableStateMachine.add('Perform_Sweep', MetricSweepState(sweep_type='short'), transitions={'sweeped': 'finished', 'failed': 'failed'}, autonomy={'sweeped': Autonomy.Off, 'failed': Autonomy.Off}) return _state_machine
def create(self): # x:30 y:365 _state_machine = OperatableStateMachine(outcomes=['finished']) _state_machine.userdata.GetalA = 10 _state_machine.userdata.GetalB = 5 _state_machine.userdata.GetalC = 0 # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:30 y:40 OperatableStateMachine.add('Add', AddNumericState(), transitions={'done': 'Result'}, autonomy={'done': Autonomy.Off}, remapping={ 'value_a': 'GetalA', 'value_b': 'GetalB', 'result': 'GetalC' }) # x:211 y:41 OperatableStateMachine.add('Result', MessageState(), transitions={'continue': 'finished'}, autonomy={'continue': Autonomy.Off}, remapping={'message': 'GetalC'}) return _state_machine
def create(self): # x:30 y:322, x:130 y:322 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:78 y:62 OperatableStateMachine.add('behavior_exploration', self.use_behavior(behavior_explorationSM, 'behavior_exploration'), transitions={'finished': 'GetCloserToVictim'}, autonomy={'finished': Autonomy.Inherit}) # x:89 y:195 OperatableStateMachine.add('GetCloserToVictim', self.use_behavior(GetCloserToVictimSM, 'GetCloserToVictim'), transitions={'done': 'behavior_exploration'}, autonomy={'done': Autonomy.Inherit}) return _state_machine
def create(self): # x:740 y:75, x:421 y:456 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.waypoint1 = [0.7081,-2.5405, 0.0] _state_machine.userdata.incremental1 = [0, 0, 0] # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:206 y:190 OperatableStateMachine.add('battery_check', self.use_behavior(battery_checkSM, 'battery_check'), transitions={'LOW_B': 'go_to_battery_charging_station', 'failed': 'failed'}, autonomy={'LOW_B': Autonomy.Inherit, 'failed': Autonomy.Inherit}) # x:488 y:226 OperatableStateMachine.add('go_to_battery_charging_station', self.use_behavior(go_to_battery_charging_stationSM, 'go_to_battery_charging_station'), transitions={'finished': 'finished', 'failed': 'failed'}, autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit}) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine( outcomes=['finished', 'failed']) _state_machine.userdata.waypoint = self.waypoint # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:130 y:106 OperatableStateMachine.add('to move base', ToMoveBase(x=self.x, y=self.y, th=self.th), transitions={ 'failed': 'failed', 'done': 'finished' }, autonomy={ 'failed': Autonomy.Off, 'done': Autonomy.Off }, remapping={'waypoint': 'waypoint'}) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.startCheckPosition = PoseStamped() _state_machine.userdata.startCheckID = '' _state_machine.userdata.objectType = 'start_check_pipe' _state_machine.userdata.objectState = 0 _state_machine.userdata.joint_config = [0,0,0,0] _state_machine.userdata.group_name = 'arm_group' _state_machine.userdata.armType = 'pipes' # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:30 y:40 OperatableStateMachine.add('DetectObject', DetectObjectNew(), transitions={'found': 'MoveArmPipe'}, autonomy={'found': Autonomy.Off}, remapping={'type': 'objectType', 'state': 'objectState', 'pose': 'startCheckPosition', 'object_id': 'startCheckID'}) # x:326 y:64 OperatableStateMachine.add('MoveArmPipe', MoveArmDynState(), transitions={'reached': 'finished', 'sampling_failed': 'MoveArmPipe', 'planning_failed': 'MoveArmPipe', 'control_failed': 'MoveArmPipe'}, autonomy={'reached': Autonomy.Off, 'sampling_failed': Autonomy.Off, 'planning_failed': Autonomy.Off, 'control_failed': Autonomy.Off}, remapping={'object_pose': 'startCheckPosition', 'object_type': 'armType', 'object_id': 'startCheckID'}) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine( outcomes=['finished', 'failed'], input_keys=['pose']) _state_machine.userdata.pose = PoseStamped() # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:104 y:61 OperatableStateMachine.add('Move_To', MoveToWaypointState(), transitions={ 'reached': 'finished', 'failed': 'failed' }, autonomy={ 'reached': Autonomy.Off, 'failed': Autonomy.Off }, remapping={'waypoint': 'pose'}) 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] with _state_machine: # x:175 y:158 OperatableStateMachine.add('Detect', Object_Detection(), transitions={ 'continue': 'Detect', 'found': 'finished' }, autonomy={ 'continue': Autonomy.Off, 'found': Autonomy.Off }, remapping={'pose': 'pose'}) return _state_machine
def create(self): # x:845 y:121, x:342 y:314, x:139 y:350 _state_machine = OperatableStateMachine( outcomes=['continue', 'failed', 'trials_complete'], input_keys=['number_of_trials'], output_keys=['rotation']) _state_machine.userdata.number_of_trials = 0 _state_machine.userdata.rotation = 0 # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:174 y:110 OperatableStateMachine.add( 'trial_control_GR', Trial_Control_State_GR(direction=1, rotation=self.rotation), transitions={ 'continue': 'continue', 'failed': 'failed', 'complete': 'trials_complete' }, autonomy={ 'continue': Autonomy.Off, 'failed': Autonomy.Off, 'complete': Autonomy.Off }, remapping={ 'number_of_trials': 'number_of_trials', 'rotation': 'rotation' }) 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] with _state_machine: # x:77 y:81 OperatableStateMachine.add( 'hsr_BooleanDummy', hsr_BooleanDummy(text=""), transitions={'continue': 'hsr_FollowMe'}, autonomy={'continue': Autonomy.Off}, remapping={'follow_me': 'follow_me'}) # x:252 y:83 OperatableStateMachine.add('hsr_FollowMe', hsr_FollowMe(), transitions={'continue': 'finished'}, autonomy={'continue': Autonomy.Off}, remapping={'request': 'follow_me'}) 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] with _state_machine: # x:143 y:127 OperatableStateMachine.add('wait', WaitState(wait_time=self.waiting_time), transitions={'done': 'initialize'}, autonomy={'done': Autonomy.Low}) # x:280 y:162 OperatableStateMachine.add('initialize', InitializeRobotState(=1), transitions={'done': 'finished', 'failed': 'failed'}, autonomy={'done': Autonomy.Off, 'failed': Autonomy.Off}) return _state_machine
def create(self): # x:30 y:463, x:130 y:463 _state_machine = OperatableStateMachine( outcomes=['finished', 'failed']) _state_machine.userdata.Distance = 4.5 # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:164 y:98 OperatableStateMachine.add('Get_Current_Pose', SubscriberState(topic='/pose', blocking=True, clear=False), transitions={ 'received': 'finished', 'unavailable': 'failed' }, autonomy={ 'received': Autonomy.Off, 'unavailable': Autonomy.Off }, remapping={'message': 'curr_pose'}) return _state_machine
def create(self): hello = "Hello World!" # 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] with _state_machine: # x:129 y:81 OperatableStateMachine.add('Initial_Wait', WaitState(wait_time=self.waiting_time), transitions={'done': 'Hello_Greeting'}, autonomy={'done': Autonomy.Off}) # x:130 y:215 OperatableStateMachine.add('Hello_Greeting', LogState(text=hello, severity=Logger.REPORT_HINT), transitions={'done': 'finished'}, autonomy={'done': Autonomy.High}) return _state_machine
def create(self): # x:27 y:362, x:435 y:185 _state_machine = OperatableStateMachine( outcomes=['finished', 'failed']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:239 y:71 OperatableStateMachine.add('ReturnToNormal', CompoundAction( t1=[0, 0.0], type1='eyes/emotion', cmd1='normal', t2=[0, 0.0], type2='motion/joint_trajectory', cmd2='head_node', t3=[0, 0.0], type3=None, cmd3='', t4=[0, 0.0], type4=None, cmd4=''), transitions={ 'success': 'Goodbye', 'failure': 'failed' }, autonomy={ 'success': Autonomy.Off, 'failure': Autonomy.Off }) # x:234 y:264 OperatableStateMachine.add('Goodbye', CompoundAction( t1=[0, 0.0], type1='voice/play_wav', cmd1='spasibo_za_vnimanie', t2=[0, 0.0], type2='motion/joint_trajectory', cmd2='introduce_herself_slow', t3=[0, 8.0], type3='motion/joint_trajectory', cmd3='bow_begin', t4=[3, 4.0], type4='motion/joint_trajectory', cmd4='bow_end'), transitions={ 'success': 'finished', 'failure': 'failed' }, autonomy={ 'success': Autonomy.Off, 'failure': Autonomy.Off }) return _state_machine
def create(self): log_msg = "Hello World!" # x:83 y:390 _state_machine = OperatableStateMachine(outcomes=['finished']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:52 y:78 OperatableStateMachine.add('Print_Message', LogState(text=log_msg, severity=Logger.REPORT_HINT), transitions={'done': 'Wait_After_Logging'}, autonomy={'done': Autonomy.Low}) # x:40 y:228 OperatableStateMachine.add('Wait_After_Logging', WaitState(wait_time=self.waiting_time), transitions={'done': 'finished'}, autonomy={'done': Autonomy.Off}) return _state_machine
def create(self): # x:30 y:322, x:130 y:322 _state_machine = OperatableStateMachine( outcomes=['finished', 'failed']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:78 y:62 OperatableStateMachine.add( 'behavior_exploration', self.use_behavior(behavior_explorationSM, 'behavior_exploration'), transitions={'finished': 'GetCloserToVictim'}, autonomy={'finished': Autonomy.Inherit}) # x:89 y:195 OperatableStateMachine.add( 'GetCloserToVictim', self.use_behavior(GetCloserToVictimSM, 'GetCloserToVictim'), transitions={'done': 'behavior_exploration'}, autonomy={'done': Autonomy.Inherit}) return _state_machine
def create(self): # x:572 y:333, x:130 y:365 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.unused = None # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:170 y:138 OperatableStateMachine.add('SelectAction', CalculationState(calculation=lambda x: random.choice(['brohoof', 'menace'])), transitions={'done': 'ExecuteCompoundAction'}, autonomy={'done': Autonomy.Off}, remapping={'input_value': 'unused', 'output_value': 'action_param'}) # x:330 y:170 OperatableStateMachine.add('ExecuteCompoundAction', CompoundActionParamKey(action_ns='saved_msgs/compound_action'), transitions={'success': 'finished', 'invalid_pose': 'failed', 'failure': 'failed'}, autonomy={'success': Autonomy.Off, 'invalid_pose': Autonomy.Off, 'failure': Autonomy.Off}, remapping={'action_param': 'action_param'}) return _state_machine
def create(self): # x:43 y:392, x:240 y:396, x:477 y:395 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed', 'invalid_pose']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:161 y:101 OperatableStateMachine.add('StepSequence', ExecuteStepSequence(controller='motion/controller/step_sequence', trajectory_param=self.action_name, trajectory_ns='saved_msgs/step_sequence'), transitions={'success': 'finished', 'partial_movement': 'invalid_pose', 'invalid_pose': 'Crouch', 'failure': 'failed'}, autonomy={'success': Autonomy.Off, 'partial_movement': Autonomy.Off, 'invalid_pose': Autonomy.Off, 'failure': Autonomy.Off}) # x:413 y:104 OperatableStateMachine.add('Crouch', ExecuteJointTrajectory(action_topic='motion/controller/joint_trajectory', trajectory_param='crouch_begin', trajectory_ns='saved_msgs/joint_trajectory'), transitions={'success': 'StepSequence', 'partial_movement': 'invalid_pose', 'invalid_pose': 'invalid_pose', 'failure': 'failed'}, autonomy={'success': Autonomy.Off, 'partial_movement': Autonomy.Off, 'invalid_pose': Autonomy.Off, 'failure': Autonomy.Off}) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine( outcomes=['finished', 'failed']) _state_machine.userdata.jn = [-0.034, -24.0] # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:382 y:109 OperatableStateMachine.add('iiii', MoveitToJointsState( move_group="robot", joint_names=["Joint1", "Joint2"], action_topic='/move_group'), transitions={ 'reached': 'failed', 'planning_failed': 'failed', 'control_failed': 'failed' }, autonomy={ 'reached': Autonomy.Off, 'planning_failed': Autonomy.Low, 'control_failed': Autonomy.Low }, remapping={'joint_config': 'jn'}) 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] with _state_machine: # x:146 y:49 OperatableStateMachine.add( 'dold', WaitForDoldButton(dold_button_topic='/dold_driver/state'), transitions={ 'done': 'torsoToPerson', 'failure': 'failed' }, autonomy={ 'done': Autonomy.Off, 'failure': Autonomy.Off }) # x:371 y:51 OperatableStateMachine.add( 'torsoToPerson', AdjustTorso(person_stop_dist=self.person_stop_dist, with_j1=True, rate=10), transitions={'done': 'dold'}, autonomy={'done': Autonomy.Off}) return _state_machine
def create(self): # x:30 y:322, x:130 y:322 _state_machine = OperatableStateMachine( outcomes=['finished', 'failed']) _state_machine.userdata.goalId = 'abcd' # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:30 y:40 OperatableStateMachine.add('wait', Wait_DriveTo(useMoveBase=True), transitions={ 'succeeded': 'finished', 'aborted': 'failed', 'waiting': 'wait' }, autonomy={ 'succeeded': Autonomy.Off, 'aborted': Autonomy.Off, 'waiting': Autonomy.Off }, remapping={'goalId': 'goalId'}) 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] with _state_machine: # x:170 y:158 OperatableStateMachine.add( 'Drive Forward State', GoFowardState(speed=self.my_speed, travel_dist=self.my_travel_dist, obstacle_dist=self.my_obstacle_dist), transitions={ 'failed': 'failed', 'done': 'finished' }, autonomy={ 'failed': Autonomy.Off, 'done': 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] with _state_machine: # x:30 y:40 OperatableStateMachine.add( 'TTS', TTSBulgarian( ttsbg_text="Ехоо, това е български език. Иван е готин пич!" ), transitions={ 'failed': 'failed', 'done': 'finished' }, autonomy={ 'failed': Autonomy.Low, 'done': Autonomy.Low }) 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] with _state_machine: # x:210 y:118 OperatableStateMachine.add('Change Yaw', BigYawParameterState(topic=self.topic, angle=self.angle), transitions={ 'Success': 'finished', 'Failure': 'failed' }, autonomy={ 'Success': Autonomy.Off, 'Failure': Autonomy.Off }) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine( outcomes=['finished', 'failed']) _state_machine.userdata.carrying = True # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:52 y:142 OperatableStateMachine.add('init', InitHandTracking(), transitions={'done': 'check_near'}, autonomy={'done': Autonomy.Off}, remapping={'carrying': 'carrying'}) # x:314 y:170 OperatableStateMachine.add( 'check_near', CheckHandNearness(dist_threshold=0.12, n_steps=10, target_frame='handover_frame_right'), transitions={'near': 'finished'}, autonomy={'near': Autonomy.Off}) return _state_machine
def create(self): log_msg = "Hello World!" # x:83 y:390 _state_machine = OperatableStateMachine(outcomes=['finished']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:52 y:78 OperatableStateMachine.add( 'Print_Message', LogState(text=log_msg, severity=Logger.REPORT_HINT), transitions={'done': 'Wait_After_Logging'}, autonomy={'done': Autonomy.Low}) # x:40 y:228 OperatableStateMachine.add('Wait_After_Logging', WaitState(wait_time=self.waiting_time), transitions={'done': 'finished'}, autonomy={'done': Autonomy.Off}) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.pose = PoseStamped() _state_machine.userdata.goalId = 'abc' # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:30 y:40 OperatableStateMachine.add('Drive', Drive_to_new(), transitions={'succeeded': 'Wait'}, autonomy={'succeeded': Autonomy.Off}, remapping={'pose': 'pose'}) # x:191 y:77 OperatableStateMachine.add('Wait', Wait_DriveTo_new(useMoveBase=True), transitions={'succeeded': 'finished', 'aborted': 'failed', 'waiting': 'Wait'}, autonomy={'succeeded': Autonomy.Off, 'aborted': Autonomy.Off, 'waiting': Autonomy.Off}, remapping={'goalId': 'goalId'}) return _state_machine
def create(self): # x:83 y:340, x:283 y:190 _state_machine = OperatableStateMachine( outcomes=['finished', 'failed']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:60 y:78 OperatableStateMachine.add( 'Log_Sweep', LogState(text='Now performing a short sweep...', severity=Logger.REPORT_INFO), transitions={'done': 'Perform_Sweep'}, autonomy={'done': Autonomy.Off}) # x:47 y:178 OperatableStateMachine.add('Perform_Sweep', MetricSweepState(sweep_type='short'), transitions={ 'sweeped': 'finished', 'failed': 'failed' }, autonomy={ 'sweeped': Autonomy.Off, 'failed': Autonomy.Off }) return _state_machine
def create(self): motion_key_1 = stand_up_front_100 motion_key_2 = stand_up_front_200 # x:533 y:194, x:130 y:322 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:30 y:40 OperatableStateMachine.add('Execute_First_Part', MotionServiceState(motion_key=motion_key_1, time_factor=1), transitions={'done': 'Execute_Second_Part', 'failed': 'failed'}, autonomy={'done': Autonomy.High, 'failed': Autonomy.Low}) # x:203 y:125 OperatableStateMachine.add('Execute_Second_Part', MotionServiceState(motion_key=motion_key_2, time_factor=1), transitions={'done': 'finished', 'failed': 'failed'}, autonomy={'done': Autonomy.High, 'failed': Autonomy.Low}) 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] with _state_machine: # x:287 y:79 OperatableStateMachine.add('test', TestActionState(), transitions={ 'communicated_with_server': 'finished', 'no_communication_with_server': 'failed' }, autonomy={ 'communicated_with_server': Autonomy.Off, 'no_communication_with_server': Autonomy.Off }) return _state_machine
def create(self): # x:322 y:361, x:960 y:237, x:804 y:397, x:817 y:95 _state_machine = OperatableStateMachine(outcomes=['added', 'updated', 'error', 'bad_object'], input_keys=['entity']) _state_machine.userdata.entity = None # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:216 y:230 OperatableStateMachine.add('AddPerson', WonderlandAddPerson(), transitions={'done': 'added', 'already_exit': 'PatchPerson', 'bad_request': 'bad_object', 'error': 'error'}, autonomy={'done': Autonomy.Off, 'already_exit': Autonomy.Off, 'bad_request': Autonomy.Off, 'error': Autonomy.Off}, remapping={'entity': 'entity'}) # x:586 y:231 OperatableStateMachine.add('PatchPerson', WonderlandPatchPerson(), transitions={'done': 'updated', 'dont_exist': 'bad_object', 'bad_request': 'bad_object', 'error': 'error'}, autonomy={'done': Autonomy.Off, 'dont_exist': Autonomy.Off, 'bad_request': Autonomy.Off, 'error': Autonomy.Off}, remapping={'entity': 'entity'}) return _state_machine
def create(self): # x:30 y:322, x:130 y:322 _state_machine = OperatableStateMachine(outcomes=['succeeded', 'aborted'], input_keys=['pose', 'params_distance']) _state_machine.userdata.goalId = '' _state_machine.userdata.params_distance = 0 _state_machine.userdata.pose = PoseStamped() # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:30 y:40 OperatableStateMachine.add('send_request', Send_Request_new(useMoveBase=True), transitions={'succeeded': 'wait'}, autonomy={'succeeded': Autonomy.Off}, remapping={'goalId': 'goalId', 'params_distance': 'params_distance', 'pose': 'pose'}) # x:223 y:96 OperatableStateMachine.add('wait', Wait_DriveTo_new(useMoveBase=True), transitions={'succeeded': 'succeeded', 'aborted': 'aborted', 'waiting': 'wait'}, autonomy={'succeeded': Autonomy.Off, 'aborted': Autonomy.Off, 'waiting': Autonomy.Off}, remapping={'goalId': 'goalId'}) return _state_machine
def create(self): # x:836 y:130, x:639 y:366, x:855 y:267 _state_machine = OperatableStateMachine( outcomes=['continue', 'failed', 'tests_completed'], output_keys=['number_of_trials']) _state_machine.userdata.number_of_trials = 0 # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:262 y:106 OperatableStateMachine.add( 'Test_control_GR', Test_Control_State_GR(direction=self.direction, num_trials=self.num_trials, num_tests=self.num_tests), transitions={ 'continue': 'continue', 'failed': 'failed', 'completed': 'tests_completed' }, autonomy={ 'continue': Autonomy.Off, 'failed': Autonomy.Off, 'completed': Autonomy.Off }, remapping={'number_of_trials': 'number_of_trials'}) return _state_machine
def create(self): # x:947 y:100, x:618 y:382 _state_machine = OperatableStateMachine( outcomes=['finished', 'failed']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:212 y:48 OperatableStateMachine.add( 'multiple cups pour behavior using containers', self.use_behavior( multiplecupspourbehaviorusingcontainersSM, 'multiple cups pour behavior using containers'), transitions={ 'finished': 'finished', 'failed': 'failed' }, autonomy={ 'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit }) return _state_machine
def create(self): # x:52 y:481, x:134 y:482 _state_machine = OperatableStateMachine(outcomes=["finished", "failed"]) _state_machine.userdata.pose = PoseStamped() _state_machine.userdata.startPoint = PoseStamped() _state_machine.userdata.endPoint = PoseStamped() _state_machine.userdata.switchFalse = False # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:31 y:51 OperatableStateMachine.add( "SimpleMissionInitialize", self.use_behavior(SimpleMissionInitializeSM, "SimpleMissionInitialize"), transitions={"finished": "SimpleMissionDoAction"}, autonomy={"finished": Autonomy.Inherit}, remapping={"startPoint": "startPoint", "endPoint": "endPoint"}, ) # x:515 y:72 OperatableStateMachine.add( "SimpleMissionDoAction", self.use_behavior(SimpleMissionDoActionSM, "SimpleMissionDoAction"), transitions={"finished": "DriveToStart", "failed": "SimpleMissionError"}, autonomy={"finished": Autonomy.Inherit, "failed": Autonomy.Inherit}, ) # x:818 y:222 OperatableStateMachine.add( "DriveToEnd", self.use_behavior(SimpleMissionDriveToSM, "DriveToEnd"), transitions={"finished": "SimpleMissionDoAction", "failed": "SimpleMissionError"}, autonomy={"finished": Autonomy.Inherit, "failed": Autonomy.Inherit}, remapping={"pose": "endPoint"}, ) # x:218 y:222 OperatableStateMachine.add( "DriveToStart", self.use_behavior(SimpleMissionDriveToSM, "DriveToStart"), transitions={"finished": "DriveToEnd", "failed": "SimpleMissionError"}, autonomy={"finished": Autonomy.Inherit, "failed": Autonomy.Inherit}, remapping={"pose": "startPoint"}, ) # x:524 y:372 OperatableStateMachine.add( "SimpleMissionError", self.use_behavior(SimpleMissionErrorSM, "SimpleMissionError"), transitions={"failed": "failed", "toStart": "DriveToStart", "toEnd": "DriveToEnd"}, autonomy={"failed": Autonomy.Inherit, "toStart": Autonomy.Inherit, "toEnd": Autonomy.Inherit}, remapping={"startPoint": "startPoint", "endPoint": "endPoint"}, ) return _state_machine
def create(self): pcl_topic = '/local_metric_map/metaroom' object_name = 'teabox' # x:183 y:440, x:383 y:190 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.text_found = 'I found %s' % object_name _state_machine.userdata.text_not_found = 'I will continue my search' # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:47 y:28 OperatableStateMachine.add('Perform_Sweep', MetricSweepState(sweep_type=MetricSweepState.SHORT), transitions={'sweeped': 'Store_Pointcloud', 'failed': 'failed'}, autonomy={'sweeped': Autonomy.Off, 'failed': Autonomy.Off}) # x:38 y:228 OperatableStateMachine.add('Recognize_Object', RecognizeObjectState(object_name=object_name), transitions={'detected': 'Say_Found', 'not_detected': 'Say_Not_Found', 'failed': 'failed'}, autonomy={'detected': Autonomy.Low, 'not_detected': Autonomy.Low, 'failed': Autonomy.Full}, remapping={'pointcloud': 'pointcloud'}) # x:44 y:328 OperatableStateMachine.add('Say_Found', SpeechOutputState(), transitions={'done': 'finished', 'failed': 'failed'}, autonomy={'done': Autonomy.Off, 'failed': Autonomy.Full}, remapping={'text': 'text_found'}) # x:244 y:278 OperatableStateMachine.add('Say_Not_Found', SpeechOutputState(), transitions={'done': 'finished', 'failed': 'failed'}, autonomy={'done': Autonomy.Off, 'failed': Autonomy.Full}, remapping={'text': 'text_not_found'}) # x:41 y:128 OperatableStateMachine.add('Store_Pointcloud', StorePointcloudState(topic=pcl_topic), transitions={'done': 'Recognize_Object'}, autonomy={'done': Autonomy.Off}, remapping={'pointcloud': 'pointcloud'}) return _state_machine
def create(self): # x:52 y:481, x:134 y:482 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.pose = PoseStamped() _state_machine.userdata.startPoint = PoseStamped() _state_machine.userdata.endPoint = PoseStamped() _state_machine.userdata.switchFalse = False # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:31 y:51 OperatableStateMachine.add('SimpleMissionInitialize', self.use_behavior(SimpleMissionInitializeSM, 'SimpleMissionInitialize'), transitions={'finished': 'SimpleMissionDoAction'}, autonomy={'finished': Autonomy.Inherit}, remapping={'startPoint': 'startPoint', 'endPoint': 'endPoint'}) # x:515 y:72 OperatableStateMachine.add('SimpleMissionDoAction', self.use_behavior(SimpleMissionDoActionSM, 'SimpleMissionDoAction'), transitions={'finished': 'DriveToStart', 'failed': 'SimpleMissionError'}, autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit}) # x:818 y:222 OperatableStateMachine.add('DriveToEnd', self.use_behavior(SimpleMissionDriveToSM, 'DriveToEnd'), transitions={'finished': 'SimpleMissionDoAction', 'failed': 'SimpleMissionError'}, autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit}, remapping={'pose': 'endPoint'}) # x:218 y:222 OperatableStateMachine.add('DriveToStart', self.use_behavior(SimpleMissionDriveToSM, 'DriveToStart'), transitions={'finished': 'DriveToEnd', 'failed': 'SimpleMissionError'}, autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit}, remapping={'pose': 'startPoint'}) # x:524 y:372 OperatableStateMachine.add('SimpleMissionError', self.use_behavior(SimpleMissionErrorSM, 'SimpleMissionError'), transitions={'failed': 'failed', 'toStart': 'DriveToStart', 'toEnd': 'DriveToEnd'}, autonomy={'failed': Autonomy.Inherit, 'toStart': Autonomy.Inherit, 'toEnd': Autonomy.Inherit}, remapping={'startPoint': 'startPoint', 'endPoint': 'endPoint'}) return _state_machine
def create(self): # x:833 y:90, x:583 y:490 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:37 y:78 OperatableStateMachine.add('Ask_If_Wide_Stance', OperatorDecisionState(outcomes=['wide_stance', 'just_stand'], hint="Do you want to go to wide stance?", suggestion='wide_stance'), transitions={'wide_stance': 'Plan_To_Wide_Stance', 'just_stand': 'Set_Manipulate'}, autonomy={'wide_stance': Autonomy.Low, 'just_stand': Autonomy.Full}) # x:274 y:278 OperatableStateMachine.add('Go_To_Wide_Stance', ExecuteStepPlanActionState(), transitions={'finished': 'Wait_For_Stand', 'failed': 'failed'}, autonomy={'finished': Autonomy.Low, 'failed': Autonomy.Low}, remapping={'footstep_plan': 'plan_wide_stance'}) # x:19 y:278 OperatableStateMachine.add('Plan_To_Wide_Stance', FootstepPlanWideStanceState(), transitions={'planned': 'Go_To_Wide_Stance', 'failed': 'failed'}, autonomy={'planned': Autonomy.Low, 'failed': Autonomy.Low}, remapping={'footstep_plan': 'plan_wide_stance'}) # x:566 y:78 OperatableStateMachine.add('Set_Manipulate', ChangeControlModeActionState(target_mode=ChangeControlModeActionState.MANIPULATE), transitions={'changed': 'finished', 'failed': 'failed'}, autonomy={'changed': Autonomy.Low, 'failed': Autonomy.Low}) # x:266 y:178 OperatableStateMachine.add('Wait_For_Stand', CheckCurrentControlModeState(target_mode=CheckCurrentControlModeState.STAND, wait=True), transitions={'correct': 'Set_Manipulate', 'incorrect': 'failed'}, autonomy={'correct': Autonomy.Low, 'incorrect': Autonomy.Full}, remapping={'control_mode': 'control_mode'}) 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] with _state_machine: # x:30 y:40 OperatableStateMachine.add('abc', ExampleState(target_time=1), transitions={'continue': 'finished', '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] with _state_machine: # x:30 y:40 OperatableStateMachine.add('Test', DrivepathTest(), transitions={'reached': 'finished', 'failed': 'failed'}, autonomy={'reached': 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] with _state_machine: # x:30 y:40 OperatableStateMachine.add('OperatorDrive', WaitState(wait_time=5), transitions={'done': 'finished'}, autonomy={'done': Autonomy.High}) return _state_machine
def create(self): # x:185 y:376, x:483 y:51 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:113 y:43 OperatableStateMachine.add('Change_to_MANIPULATE', ChangeControlModeActionState(target_mode=ChangeControlModeActionState.MANIPULATE), transitions={'changed': 'finished', 'failed': 'failed'}, autonomy={'changed': Autonomy.High, 'failed': Autonomy.Low}) return _state_machine
def create(self): # x:30 y:365 _state_machine = OperatableStateMachine(outcomes=['finished']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:66 y:154 OperatableStateMachine.add('Print_Msg', LogState(text="My param is: " + self.msg, severity=Logger.REPORT_HINT), transitions={'done': 'finished'}, autonomy={'done': 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] with _state_machine: # x:175 y:158 OperatableStateMachine.add('Detect', Object_Detection(), transitions={'continue': 'Detect', 'found': 'finished'}, autonomy={'continue': Autonomy.Off, 'found': Autonomy.Off}, remapping={'pose': 'pose'}) return _state_machine
def create(self): # x:30 y:365, x:129 y:365 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.pose = PoseStamped() # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] # x:30 y:365, x:130 y:365, x:230 y:365, x:330 y:365, x:430 y:365, x:530 y:365 _sm_container_0 = ConcurrencyContainer(outcomes=['finished', 'failed'], output_keys=['pose'], conditions=[ ('finished', [('NewExp', 'finished')]), ('failed', [('NewExp', 'failed')]), ('finished', [('Detect', 'continue')]), ('failed', [('Detect', 'found')]) ]) with _sm_container_0: # x:30 y:40 OperatableStateMachine.add('NewExp', self.use_behavior(NewExpSM, 'Container/NewExp'), transitions={'finished': 'finished', 'failed': 'failed'}, autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit}) # x:210 y:40 OperatableStateMachine.add('Detect', Object_Detection(), transitions={'continue': 'finished', 'found': 'failed'}, autonomy={'continue': Autonomy.Off, 'found': Autonomy.Off}, remapping={'pose': 'pose'}) with _state_machine: # x:30 y:40 OperatableStateMachine.add('Container', _sm_container_0, transitions={'finished': 'finished', 'failed': 'DriveTo'}, autonomy={'finished': Autonomy.Inherit, 'failed': Autonomy.Inherit}, remapping={'pose': 'pose'}) # x:310 y:186 OperatableStateMachine.add('DriveTo', Drive_to_new(), transitions={'succeeded': 'failed'}, autonomy={'succeeded': Autonomy.Off}, remapping={'pose': 'pose'}) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.pose = PoseStamped() # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:435 y:160 OperatableStateMachine.add('Drive_To', Drive_to_new(), transitions={'succeeded': 'finished'}, autonomy={'succeeded': Autonomy.Off}, remapping={'pose': 'pose'}) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed'], input_keys=['pose']) _state_machine.userdata.pose = PoseStamped() # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:104 y:61 OperatableStateMachine.add('Move_To', MoveToWaypointState(), transitions={'reached': 'finished', 'failed': 'failed'}, autonomy={'reached': Autonomy.Off, 'failed': Autonomy.Off}, remapping={'waypoint': 'pose'}) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.goalId = ' ' # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:30 y:40 OperatableStateMachine.add('wait', Wait_Exploration(), transitions={'aborted': 'wait', 'succeeded': 'wait', 'waiting': 'wait', 'getVictim': 'wait'}, autonomy={'aborted': Autonomy.Off, 'succeeded': Autonomy.Off, 'waiting': Autonomy.Off, 'getVictim': Autonomy.Off}, remapping={'goalId': 'goalId'}) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed'], output_keys=['startPoint']) _state_machine.userdata.startPoint = PoseStamped() _state_machine.userdata.switchTrue = True # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:30 y:95 OperatableStateMachine.add('StartCheck', StartCheck(), transitions={'succeeded': 'ActivateMapping'}, autonomy={'succeeded': Autonomy.Off}) # x:198 y:97 OperatableStateMachine.add('ActivateMapping', Mapping(), transitions={'succeeded': 'Startpoint'}, autonomy={'succeeded': Autonomy.Off}, remapping={'switch': 'switchTrue'}) # x:404 y:99 OperatableStateMachine.add('Startpoint', MarkPoint(), transitions={'succeeded': 'finished'}, autonomy={'succeeded': Autonomy.Off}, remapping={'pose': 'startPoint'}) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.poses = [] # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:30 y:40 OperatableStateMachine.add('Get Pose', GetRobotPose(), transitions={'succeeded': 'Build Path'}, autonomy={'succeeded': Autonomy.Off}, remapping={'pose': 'pose'}) # x:256 y:42 OperatableStateMachine.add('Build Path', BuildPath(), transitions={'succeeded': 'Test', 'next': 'Get Pose'}, autonomy={'succeeded': Autonomy.High, 'next': Autonomy.High}, remapping={'pose': 'pose', 'poses': 'poses'}) # x:408 y:44 OperatableStateMachine.add('Test', DrivepathTest(), transitions={'reached': 'finished', 'failed': 'failed'}, autonomy={'reached': Autonomy.Off, 'failed': Autonomy.Off}, remapping={'poses': 'poses'}) return _state_machine
def create(self): # x:916 y:133 _state_machine = OperatableStateMachine(outcomes=['finished']) _state_machine.userdata.goalId = 'abcd' # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:50 y:39 OperatableStateMachine.add('StartExploration', START_Exploration_Transform(), transitions={'succeeded': 'Wait'}, autonomy={'succeeded': Autonomy.Off}, remapping={'goalId': 'goalId'}) # x:280 y:158 OperatableStateMachine.add('Error', Error_Exploration(), transitions={'restart': 'StartExploration'}, autonomy={'restart': Autonomy.Off}) # x:491 y:39 OperatableStateMachine.add('Wait', Wait_Exploration(), transitions={'aborted': 'Error', 'succeeded': 'Error', 'waiting': 'Wait', 'getVictim': 'finished'}, autonomy={'aborted': Autonomy.Off, 'succeeded': Autonomy.Off, 'waiting': Autonomy.Off, 'getVictim': Autonomy.Off}, remapping={'goalId': 'goalId'}) return _state_machine
def create(self): # x:48 y:364 _state_machine = OperatableStateMachine(outcomes=['finished']) _state_machine.userdata.lookAround = 'look_around' _state_machine.userdata.speed = self.speed # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:33 y:51 OperatableStateMachine.add('Look_Around', LookAtPattern(), transitions={'succeeded': 'Explore', 'failed': 'Error'}, autonomy={'succeeded': Autonomy.Off, 'failed': Autonomy.Off}, remapping={'pattern': 'lookAround'}) # x:252 y:133 OperatableStateMachine.add('Error', ErrorExploration(), transitions={'restart': 'Look_Around'}, autonomy={'restart': Autonomy.Off}) # x:471 y:49 OperatableStateMachine.add('Explore', Explore(), transitions={'succeeded': 'Error', 'failed': 'Error'}, autonomy={'succeeded': Autonomy.Off, 'failed': Autonomy.Off}, remapping={'speed': 'speed'}) return _state_machine
def create(self): # x:30 y:322, x:130 y:322 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:143 y:40 OperatableStateMachine.add('START', START_Exploration_Transform(target_time=3), transitions={'succeeded': 'Wait'}, autonomy={'succeeded': Autonomy.Off}) # x:506 y:47 OperatableStateMachine.add('Wait', Wait_Exploration(target_time=3), transitions={'waiting': 'Wait', 'succeeded': 'Error', 'aborted': 'Error'}, autonomy={'waiting': Autonomy.Off, 'succeeded': Autonomy.Off, 'aborted': Autonomy.Off}) # x:200 y:200 OperatableStateMachine.add('Error', Error_Exploration(), transitions={'restart': 'START'}, autonomy={'restart': Autonomy.Off}) return _state_machine
def create(self): # x:59 y:401 _state_machine = OperatableStateMachine(outcomes=['finished'], output_keys=['startPoint', 'endPoint']) _state_machine.userdata.startPoint = PoseStamped() _state_machine.userdata.endPoint = PoseStamped() # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:34 y:51 OperatableStateMachine.add('Get_Start_Point', GetRobotPose(), transitions={'succeeded': 'Operator_Drive'}, autonomy={'succeeded': Autonomy.Off}, remapping={'pose': 'startPoint'}) # x:35 y:294 OperatableStateMachine.add('Get_End_Point', GetRobotPose(), transitions={'succeeded': 'finished'}, autonomy={'succeeded': Autonomy.Off}, remapping={'pose': 'endPoint'}) # x:27 y:178 OperatableStateMachine.add('Operator_Drive', OperatorDecisionState(outcomes=['done'], hint="Drive robot to end pose", suggestion=None), transitions={'done': 'Get_End_Point'}, autonomy={'done': Autonomy.Full}) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine(outcomes=["finished", "failed"], input_keys=["pose"]) _state_machine.userdata.pose = PoseStamped() _state_machine.userdata.speed = self.speed # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:213 y:74 OperatableStateMachine.add( "Move_To", MoveToFixedWaypoint(allow_backwards=self.allow_backwards), transitions={"reached": "finished", "failed": "failed"}, autonomy={"reached": Autonomy.Off, "failed": Autonomy.Off}, remapping={"waypoint": "pose", "speed": "speed"}, ) return _state_machine
def create(self): # x:30 y:365, x:130 y:365 _state_machine = OperatableStateMachine(outcomes=['finished', 'failed']) _state_machine.userdata.startCheckPosition = PoseStamped() _state_machine.userdata.startCheckID = '' # Additional creation code can be added inside the following tags # [MANUAL_CREATE] # [/MANUAL_CREATE] with _state_machine: # x:148 y:62 OperatableStateMachine.add('DetectStartCheck', DetectObject(), transitions={'found': 'finished'}, autonomy={'found': Autonomy.Off}, remapping={'pose': 'startCheckPosition', 'victim': 'startCheckID'}) return _state_machine