def __init__(self, *args, css=False, **kwargs): self.eventQueue = queue.Queue() if css: res_path = sea.getRobotPath('res') super(Dashboard, self).__init__(*args, static_file_path={'res': res_path}, **kwargs) else: super(Dashboard, self).__init__(*args, **kwargs)
def saveRecording(robot, filename): # Saves the file as an: # Autonomous Numeric Kinematic Library file (.ankl) with open( os.path.join(sea.getRobotPath('autoPresets'), filename + ".ankl"), "wb") as outFile: pickle.dump(robot.recordedData, outFile)
def driveRecordedPathGenerator(self, filename): data = None with open( os.path.join(sea.getRobotPath('autoPresets'), filename + ".ankl"), "rb") as inFile: data = pickle.load(inFile) for mag, turn in zip(*data): self.updateRobotPosition() self.drive.drive(mag, math.pi / 2, turn) yield False yield True
def presetPath(self): return sea.getRobotPath('auto_sequence_presets')
def presetPath(self): return sea.getRobotPath('autoPresets')