Exemplo n.º 1
0
  def drive(self, left_dist, right_dist, speed, block = True):
    robot_status.is_driving()
    slam_controller.wheels_started(self.get_distance())
    control.send_command("SetMotor %d %d %d" % (left_dist, right_dist, speed))

    if block:
      self.__wait_for_stop()
Exemplo n.º 2
0
    def drive(self, left_dist, right_dist, speed, block=True):
        robot_status.is_driving()
        slam_controller.wheels_started(self.get_distance())
        control.send_command("SetMotor %d %d %d" %
                             (left_dist, right_dist, speed))

        if block:
            self.__wait_for_stop()
Exemplo n.º 3
0
 def disable(self):
     if self.enabled:
         control.send_command("SetMotor LWheelDisable RWheelDisable")
         self.enabled = False
         robot_status.is_not_driving()
Exemplo n.º 4
0
 def enable(self):
     if not self.enabled:
         control.send_command("SetMotor LWheelEnable RWheelEnable")
         self.enabled = True
Exemplo n.º 5
0
 def stop(self):
     control.send_command("SetMotor -1 -1 300")
     robot_status.is_not_driving()
     slam_controller.wheels_stopped(self.get_distance())
Exemplo n.º 6
0
 def __del__(self):
     control.send_command("SetLDSRotation off")
Exemplo n.º 7
0
    def __init__(self):
        self.ready = False

        control.send_command("SetLDSRotation on")
Exemplo n.º 8
0
 def __del__(self):
   control.send_command("SetLDSRotation off")
Exemplo n.º 9
0
  def __init__(self):
    self.ready = False

    control.send_command("SetLDSRotation on")
Exemplo n.º 10
0
 def disable(self):
   if self.enabled:
     control.send_command("SetMotor LWheelDisable RWheelDisable")
     self.enabled = False
     robot_status.is_not_driving()
Exemplo n.º 11
0
 def enable(self):
   if not self.enabled:
     control.send_command("SetMotor LWheelEnable RWheelEnable")
     self.enabled = True
Exemplo n.º 12
0
 def stop(self):
   control.send_command("SetMotor -1 -1 300")
   robot_status.is_not_driving()
   slam_controller.wheels_stopped(self.get_distance())
Exemplo n.º 13
0
def hibernate():
  serial_api.send_command("SetSystemMode Hibernate")
Exemplo n.º 14
0
def shutdown():
  serial_api.send_command("SetSystemMode Shutdown")