Exemplo n.º 1
0
 def run(self):
     global NUMTARGS
     NUMTARGS = 2
     global T1
     T1 = util.getConfig(self,'Target 1', 'Swordfish')#naturally swordfish is not an actual color, but irregardless
     global T2
     T2 = util.getConfig(self,'Target 2', 'Swordfish')#naturally swordfish is not an actual color, but irregardless
Exemplo n.º 2
0
 def run(self):
     #define variables for counting how many windows have been seen
     #the default is 1 window(which is just seeing the window)
     global WindowSeenCount
     global totalWindowSeen
     totalWindowSeen = 0
     WindowSeenCount = util.getConfig(self,'WindowSeenCount',1)
Exemplo n.º 3
0
    def enter(self):
        self.visionSystem.buoyDetectorOn()#change to torpedo once ready
        #initialize global variables for this set of states
        #set the two window target events(may require some additional work)
        #this is an appropriate use of global variables, these will only ever be read
        global WindowTarget1
        WindowTarget1 = util.getConfig(self,'Target1',-1)
        global WindowTarget2
        WindowTarget2 = util.getConfig(self,'Target2',-1)

        #some additional parsing likely required
        

        windowDepth = util.getConfig(self,'windowDepth', -1)

        if windowDepth == -1:
            raise LookupError, "windowDepth not specified"

        #dive to depth for this task
        util.dive(self,windowDepth,self._diveRate)
Exemplo n.º 4
0
 def exit(self):
     util.freeze(self)
     self.motionManager.stopCurrentMotion()
Exemplo n.º 5
0
 def stop(self):
     self.motionManager._controller.moveVel(0,0,0)
     util.freeze(self)
Exemplo n.º 6
0
 def DONE(self,event):
     util.freeze(self)
Exemplo n.º 7
0
 def exit(self):
     utility.freeze(self)
     self.motionManager.stopCurrent()