src/conntact/assembly_algorithm_blocks.py
def checkCompletion(self):
        """Check if the step is complete. Default behavior is to check the exit conditions and gain/lose confidence between 0 and 1. ExitConditions returning True adds a step toward 1; False steps down toward 0. Once confidence is above exitThreshold, a timer begins for duration exitPeriod.
        """

        if(self.exitConditions()):
            if(self.completion_confidence < 1):
                self.completion_confidence += 1/(self.assembly._rate_selected)

            if(self.completion_confidence > self.exitThreshold):
                if(self.holdStartTime == 0):
                    #Start counting down to completion as long as we don't drop below threshold again:
                    self.holdStartTime = rospy.get_time()
                    rospy.logerr("Countdown beginning at time " + str(self.holdStartTime))

                elif(self.holdStartTime < rospy.get_time() - self.exitPeriod ):
                    #it's been long enough, exit loop
                    rospy.logerr("Countdown ending at time " + str(rospy.get_time()))
                    return True 
            else:
                # Confidence has dropped below the threshold, cancel the countdown.
                self.holdStartTime = 0
        else:
            #Exit conditions not true
            if(self.completion_confidence>0.0):
                self.completion_confidence -= 1/(self.assembly._rate_selected)

        return False
Check if the step is complete. Default behavior is to check the exit conditions and gain/lose confidence between 0 and 1. ExitConditions returning True adds a step toward 1; False steps down toward 0. Once confidence is above exitThreshold, a timer begins for duration exitPeriod.
        
Check if the step is complete. Default behavior is to check the exit conditions and gain/lose confidence between 0 and 1. ExitConditions returning True adds a step toward 1; False steps down toward 0. Once confidence is above exitThreshold, a timer begins for duration exitPeriod.
Check if the step is complete . Default behavior is to check the exit conditions and gain / lose confidence between 0 and 1 . ExitConditions returning True adds a step toward 1 ; False steps down toward 0 . Once confidence is above exitThreshold a timer begins for duration exitPeriod .
def checkCompletion(self):
        if(self.exitConditions()):
            if(self.completion_confidence < 1):
                self.completion_confidence += 1/(self.assembly._rate_selected)
            if(self.completion_confidence > self.exitThreshold):
                if(self.holdStartTime == 0):
                    self.holdStartTime = rospy.get_time()
                    rospy.logerr("Countdown beginning at time " + str(self.holdStartTime))
                elif(self.holdStartTime < rospy.get_time() - self.exitPeriod ):
                    rospy.logerr("Countdown ending at time " + str(rospy.get_time()))
                    return True 
            else:
                self.holdStartTime = 0
        else:
            if(self.completion_confidence>0.0):
                self.completion_confidence -= 1/(self.assembly._rate_selected)
        return False
def checkCompletion ( self ) : if ( self . exitConditions ( ) ) : if ( self . completion_confidence < 1 ) : self . completion_confidence += 1 / ( self . assembly . _rate_selected ) if ( self . completion_confidence > self . exitThreshold ) : if ( self . holdStartTime == 0 ) : self . holdStartTime = rospy . get_time ( ) rospy . logerr ( "Countdown beginning at time " + str ( self . holdStartTime ) ) elif ( self . holdStartTime < rospy . get_time ( ) - self . exitPeriod ) : rospy . logerr ( "Countdown ending at time " + str ( rospy . get_time ( ) ) ) return True else : self . holdStartTime = 0 else : if ( self . completion_confidence > 0.0 ) : self . completion_confidence -= 1 / ( self . assembly . _rate_selected ) return False
Check if the step is complete.
Check if the step is complete .
"""Check if the step is complete. Default behavior is to check the exit conditions and gain/lose confidence between 0 and 1. ExitConditions returning True adds a step toward 1; False steps down toward 0. Once confidence is above exitThreshold, a timer begins for duration exitPeriod.
        """ #Start counting down to completion as long as we don't drop below threshold again: #it's been long enough, exit loop # Confidence has dropped below the threshold, cancel the countdown. #Exit conditions not true
self