def drive(self, meters, avoid=0): param = [] param.append(meters) if avoid: param.append(1) command = call() command.call = "forwardByMeters" command.param = param return self.job(command.call, command.param)
def turn(self, angle): param = [] command = call() if angle > 0: command.call = "turnRigthByAngle" else: command.call = "turnLeftByAngle" angle = 0 - angle param.append(angle) command.param = param return self.job(command.call, command.param)
def cancel(self): self.stop = True self.coord = [0, 0] self.orientation = [1, 0] if self.enable_dock: self.dock_client.cancel_all_goals() param = [] command = call() command.call = "stopp" command.param = param self.stopper(command.call, command.param)
def push(self): param = [] command = call() command.call = "push" command.param = param return self.job(command.call, command.param)
def home(self): param = [] command = call() command.call = "home" command.param = param return self.job(command.call, command.param)