def run(self,ang,gait): if self.s_run == 0: espeak.synth("I'm off for a run") self.s_run = 1 serial_out.setgait(gait) serial_out.state(0,1,1) nav.odo(1.5,ang) print ('run') serial_out.travel(ang,100,0)
def walk(self,ang,gait): serial_out.setgait(gait) serial_out.state(0,0,1) serial_out.travel(ang,100,0) nav.odo(1,ang) print ('walk ', ang)
GPIO.output(resetpin, GPIO.HIGH) time.sleep(2) """ Startup """ startup() connected = lidar.connect(1) coords['i_CurPos'] = [10,1] nav.offset() susptime = time.time() haz = 0 temp = 0 espeak.synth("Hello, Jim Bob ready to go") c = 0 serial_out.setgait(0) serial_out.wait(25) serial_out.state(0,0,1) priorread = time.time()+2 lxpos = [2015,1915,1815,1715,1615,1515,1415,1315,1215] lypos = [[1578,2067],[1613,2070],[1648,2090],[1683,2101],[1718,2113]] espeak.synth("Clear the area") lc = 0 ld = 0 nav.offset() coords['i_CurPos'][0] = 10 coords['i_CurPos'][1] = 0 while(1): for x in xrange(0, 5):