예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
    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)
예제 #4
0
 def push(self):
     param = []
     command = call()
     command.call = "push"
     command.param = param
     return self.job(command.call, command.param)
예제 #5
0
 def home(self):
     param = []
     command = call()
     command.call = "home"
     command.param = param
     return self.job(command.call, command.param)