Module create_driver
[frames] | no frames]

Module create_driver

source code


Author: damonkohler@gmail.com (Damon Kohler)

Classes
  DriverError
  SerialCommandInterface
A higher-level wrapper around PySerial specifically designed for use with iRobot's SCI.
  Roomba
Represents a Roomba robot.
  Turtlebot
Represents a Turtlebot robot.
Variables
  ROOMBA_OPCODES = dict(start= 128, baud= 129, control= 130, saf...
  CREATE_OPCODES = dict(soft_reset= 7, low_side_drivers= 138, so...
  REMOTE_OPCODES = {129: 'left', 130: 'forward', 131: 'right', 1...
  BAUD_RATES = 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 2...
  CHARGING_STATES = 'not-charging', 'charging-recovery', 'chargi...
  OI_MODES = 'off', 'passive', 'safe', 'full'
  WHEEL_DROP_CASTER = 0x10
  WHEEL_DROP_LEFT = 0x08
  WHEEL_DROP_RIGHT = 0x04
  BUMP_LEFT = 0x02
  BUMP_RIGHT = 0x01
  OVERCURRENTS_DRIVE_LEFT = 0x10
  OVERCURRENTS_DRIVE_RIGHT = 0x08
  OVERCURRENTS_MAIN_BRUSH = 0x04
  OVERCURRENTS_VACUUM = 0x02
  OVERCURRENTS_SIDE_BRUSH = 0x01
  BUTTON_POWER = 0x08
  BUTTON_SPOT = 0x04
  BUTTON_CLEAN = 0x02
  BUTTON_MAX = 0x01
  SENSOR_GROUP_PACKET_LENGTHS = {0: 26, 1: 10, 2: 6, 3: 10, 4: 1...
  RADIUS_TURN_IN_PLACE_CW = -1
  RADIUS_TURN_IN_PLACE_CCW = 1
  RADIUS_STRAIGHT = 32768
  RADIUS_MAX = 2000
  VELOCITY_MAX = 500
  VELOCITY_SLOW = int(VELOCITY_MAX* 0.33)
  VELOCITY_FAST = int(VELOCITY_MAX* 0.66)
  MAX_WHEEL_SPEED = 500
  WHEEL_SEPARATION = 260
  SERIAL_TIMEOUT = 2
  START_DELAY = 5
Variables Details

ROOMBA_OPCODES

Value:
dict(start= 128, baud= 129, control= 130, safe= 131, full= 132, power=\
 133, spot= 134, clean= 135, max= 136, drive= 137, motors= 138, leds= \
139, song= 140, play= 141, sensors= 142, force_seeking_dock= 143,)

CREATE_OPCODES

Value:
dict(soft_reset= 7, low_side_drivers= 138, song= 140, play_song= 141, \
pwm_low_side_drivers= 144, direct_drive= 145, digital_outputs= 147, st\
ream= 148, query_list= 149, pause_resume_stream= 150, send_ir= 151, sc\
ript= 152, play_script= 153, show_script= 154, wait_time= 155, wait_di\
stance= 156, wait_angle= 157, wait_event= 158,)

REMOTE_OPCODES

Value:
{129: 'left', 130: 'forward', 131: 'right', 132: 'spot', 133: 'max', 1\
34: 'small', 135: 'medium', 136: 'large', 136: 'clean', 137: 'pause', \
138: 'power', 139: 'arc-left', 140: 'arc-right', 141: 'drive-stop', 14\
2: 'send-all', 143: 'seek-dock', 240: 'reserved', 242: 'force-field', \
244: 'green-buoy', 246: 'green-buoy-and-force-field', 248: 'red-buoy',\
 250: 'red-buoy-and-force-field', 252: 'red-buoy-and-green-buoy', 254:\
 'red-buoy-and-green-buoy-and-force-field', 255: 'none',}

BAUD_RATES

Value:
300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 1\
15200

CHARGING_STATES

Value:
'not-charging', 'charging-recovery', 'charging', 'trickle-charging', '\
waiting', 'charging-error'

SENSOR_GROUP_PACKET_LENGTHS

Value:
{0: 26, 1: 10, 2: 6, 3: 10, 4: 14, 5: 12, 6: 52, 100: 80}