예제 #1
0
 def on_run(self, time, task, *args, **kwargs):
     task()
     self.timer()
     if task.finished:
       self.finish()
     elif self.timer.finished:
       self.logw('Task timed out in {} seconds!'.format(time))
       self.finish()
예제 #2
0
 def on_run(self, time, task, *args, **kwargs):
     task()
     self.timer()
     if task.finished:
       self.finish()
     elif self.timer.finished:
       self.logw('Task timed out in {} seconds!'.format(time))
       self.finish()
예제 #3
0
파일: loki.py 프로젝트: jheidel/software
 def on_run(self):
   theta = (self.this_run_time - self.first_run_time) * 20 # 10 degrees per second
   ratio = 1 + round(math.floor(theta / 360))
   theta /= ratio
   theta = theta % 360
   task = Heading(theta, deadband = 15.)
   task()
   if abs(heading_sub_degrees(shm.kalman.heading.get(), shm.desires.heading.get())) < 10.0:
     VelocityX(1.0)()
   else:
     VelocityX(0.0)()
예제 #4
0
 def on_run(self):
     theta = (self.this_run_time -
              self.first_run_time) * 20  # 10 degrees per second
     ratio = 1 + round(math.floor(theta / 360))
     theta /= ratio
     theta = theta % 360
     task = Heading(theta, deadband=15.)
     task()
     if abs(
             heading_sub_degrees(shm.kalman.heading.get(),
                                 shm.desires.heading.get())) < 10.0:
         VelocityX(1.0)()
     else:
         VelocityX(0.0)()
예제 #5
0
 def on_run(self):
   task = Heading(self.saved)
   task()
   if task.finished:
     self.finish()
예제 #6
0
 def on_run(self):
   task = GoToPosition(self.saved[0], self.saved[1], depth = self.saved[2])
   task()
   if task.finished:
     self.finish()
예제 #7
0
 def on_run(self):
   task = Heading(self.saved)
   task()
   if task.finished:
     self.finish()
예제 #8
0
 def on_run(self):
   task = GoToPosition(self.saved[0], self.saved[1], depth = self.saved[2])
   task()
   if task.finished:
     self.finish()