src/conntact/assembly_algorithm_blocks.py
def run_loop(self):
        """Runs the method with name matching the state name. Superceded by AssemblyStep class type if one exists.
        """
        state_name=str(self.state)
        if("state_") in state_name:
            if(state_name in self.steps):
                #This step has been realized as a Step class
                if(not self.step):
                    #Set step to an instance of the referred class and pass in the parameters.
                    self.step = self.steps[state_name][0](self, *self.steps[state_name][1])
                    rospy.loginfo( Fore.GREEN + "Created step object " + str(type(self.step)) + Style.RESET_ALL )
                else:
                    self.step.execute()
                if (self.step.checkCompletion()):
                    self.next_trigger, self.switch_state = self.step.onExit()

            else:
                # This step has been realized as a looping method.
                method_name = "self."+state_name[state_name.find('state_')+6:]+'()'
                try:
                    rospy.loginfo_throttle(2, Fore.WHITE + "In state "+state_name + Style.RESET_ALL + ", now executing " + method_name)
                    exec(method_name)
                except (NameError, AttributeError):
                    rospy.logerr_throttle(2, "State name " + method_name + " does not match 'state_'+(state loop method name) in algorithm!")
                    pass    
                except:
                    print("Unexpected error when trying to locate state loop name:", sys.exc_info()[0])
                    raise
        else:
            rospy.logerr("Invalid state name! Terminating.")
            quit()
Runs the method with name matching the state name. Superceded by AssemblyStep class type if one exists.
        
Runs the method with name matching the state name. Superceded by AssemblyStep class type if one exists.
Runs the method with name matching the state name . Superceded by AssemblyStep class type if one exists .
def run_loop(self):
        state_name=str(self.state)
        if("state_") in state_name:
            if(state_name in self.steps):
                if(not self.step):
                    self.step = self.steps[state_name][0](self, *self.steps[state_name][1])
                    rospy.loginfo( Fore.GREEN + "Created step object " + str(type(self.step)) + Style.RESET_ALL )
                else:
                    self.step.execute()
                if (self.step.checkCompletion()):
                    self.next_trigger, self.switch_state = self.step.onExit()
            else:
                method_name = "self."+state_name[state_name.find('state_')+6:]+'()'
                try:
                    rospy.loginfo_throttle(2, Fore.WHITE + "In state "+state_name + Style.RESET_ALL + ", now executing " + method_name)
                    exec(method_name)
                except (NameError, AttributeError):
                    rospy.logerr_throttle(2, "State name " + method_name + " does not match 'state_'+(state loop method name) in algorithm!")
                    pass    
                except:
                    print("Unexpected error when trying to locate state loop name:", sys.exc_info()[0])
                    raise
        else:
            rospy.logerr("Invalid state name! Terminating.")
            quit()
def run_loop ( self ) : state_name = str ( self . state ) if ( "state_" ) in state_name : if ( state_name in self . steps ) : if ( not self . step ) : self . step = self . steps [ state_name ] [ 0 ] ( self , * self . steps [ state_name ] [ 1 ] ) rospy . loginfo ( Fore . GREEN + "Created step object " + str ( type ( self . step ) ) + Style . RESET_ALL ) else : self . step . execute ( ) if ( self . step . checkCompletion ( ) ) : self . next_trigger , self . switch_state = self . step . onExit ( ) else : method_name = "self." + state_name [ state_name . find ( 'state_' ) + 6 : ] + '()' try : rospy . loginfo_throttle ( 2 , Fore . WHITE + "In state " + state_name + Style . RESET_ALL + ", now executing " + method_name ) exec ( method_name ) except ( NameError , AttributeError ) : rospy . logerr_throttle ( 2 , "State name " + method_name + " does not match 'state_'+(state loop method name) in algorithm!" ) pass except : print ( "Unexpected error when trying to locate state loop name:" , sys . exc_info ( ) [ 0 ] ) raise else : rospy . logerr ( "Invalid state name! Terminating." ) quit ( )
Runs the method with name matching the state name.
Runs the method with name matching the state name .
"""Runs the method with name matching the state name. Superceded by AssemblyStep class type if one exists.
        """ #This step has been realized as a Step class #Set step to an instance of the referred class and pass in the parameters. # This step has been realized as a looping method.
self