Esempio 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()
Esempio 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()
Esempio n. 3
0
 def disable(self):
     if self.enabled:
         control.send_command("SetMotor LWheelDisable RWheelDisable")
         self.enabled = False
         robot_status.is_not_driving()
Esempio n. 4
0
 def enable(self):
     if not self.enabled:
         control.send_command("SetMotor LWheelEnable RWheelEnable")
         self.enabled = True
Esempio 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())
Esempio n. 6
0
 def __del__(self):
     control.send_command("SetLDSRotation off")
Esempio n. 7
0
    def __init__(self):
        self.ready = False

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

    control.send_command("SetLDSRotation on")
Esempio n. 10
0
 def disable(self):
   if self.enabled:
     control.send_command("SetMotor LWheelDisable RWheelDisable")
     self.enabled = False
     robot_status.is_not_driving()
Esempio n. 11
0
 def enable(self):
   if not self.enabled:
     control.send_command("SetMotor LWheelEnable RWheelEnable")
     self.enabled = True
Esempio 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())
Esempio n. 13
0
def hibernate():
  serial_api.send_command("SetSystemMode Hibernate")
Esempio n. 14
0
def shutdown():
  serial_api.send_command("SetSystemMode Shutdown")