Definitions for some of the Open Interface stuff used by the lobot low-level controller. More...
Go to the source code of this file.
Enumerations | |
enum | { LOBOT_OI_CMD_START = 128, LOBOT_OI_CMD_BAUD = 129, LOBOT_OI_CMD_PASSIVE = LOBOT_OI_CMD_START, LOBOT_OI_CMD_SAFE = 131, LOBOT_OI_CMD_FULL = 132, LOBOT_OI_CMD_DEMO = 136, LOBOT_OI_CMD_DEMO_SPOT = 134, LOBOT_OI_CMD_DEMO_COVER = 135, LOBOT_OI_CMD_DEMO_COVER_AND_DOCK = 143, LOBOT_OI_CMD_DRIVE = 137, LOBOT_OI_CMD_DRIVE_DIRECT = 145, LOBOT_OI_CMD_LEDS = 139, LOBOT_OI_CMD_DEFINE_SONG = 140, LOBOT_OI_CMD_PLAY_SONG = 141, LOBOT_OI_CMD_SENSORS = 142, LOBOT_OI_CMD_QUERY_LIST = 149 } |
enum | { LOBOT_OI_BAUD_300, LOBOT_OI_BAUD_600, LOBOT_OI_BAUD_1200, LOBOT_OI_BAUD_2400, LOBOT_OI_BAUD_4800, LOBOT_OI_BAUD_9600, LOBOT_OI_BAUD_14400, LOBOT_OI_BAUD_19200, LOBOT_OI_BAUD_28800, LOBOT_OI_BAUD_38400, LOBOT_OI_BAUD_57600, LOBOT_OI_BAUD_115200 } |
enum | { LOBOT_OI_UBRR_300 = 3839, LOBOT_OI_UBRR_600 = 1919, LOBOT_OI_UBRR_1200 = 959, LOBOT_OI_UBRR_2400 = 479, LOBOT_OI_UBRR_4800 = 239, LOBOT_OI_UBRR_9600 = 119, LOBOT_OI_UBRR_14400 = 79, LOBOT_OI_UBRR_19200 = 59, LOBOT_OI_UBRR_28800 = 39, LOBOT_OI_UBRR_38400 = 29, LOBOT_OI_UBRR_57600 = 19, LOBOT_OI_UBRR_115200 = 9 } |
enum | { LOBOT_OI_DEMO_ABORT = 255, LOBOT_OI_DEMO_COVER = 0, LOBOT_OI_DEMO_COVER_AND_DOCK, LOBOT_OI_DEMO_SPOT, LOBOT_OI_DEMO_MOUSE, LOBOT_OI_DEMO_FIGURE_EIGHT, LOBOT_OI_DEMO_WIMP, LOBOT_OI_DEMO_HOME, LOBOT_OI_DEMO_TAG, LOBOT_OI_DEMO_PACHELBEL, LOBOT_OI_DEMO_BANJO } |
enum | { LOBOT_OI_DRIVE_STRAIGHT = 0x8000, LOBOT_OI_DRIVE_STRAIGHT2 = 0x7FFF, LOBOT_OI_TURN_INPLACE_CW = 0xFFFF, LOBOT_OI_TURN_INPLACE_CCW = 0x0001 } |
Turn radius special cases. More... | |
enum | { LOBOT_OI_LED_ADVANCE = 0x08, LOBOT_OI_LED_PLAY = 0x02, LOBOT_OI_LED_BOTH = 0x0A } |
LED bit masks. More... | |
enum | { LOBOT_OI_SENSOR_GROUP_0, LOBOT_OI_SENSOR_GROUP_1, LOBOT_OI_SENSOR_GROUP_2, LOBOT_OI_SENSOR_GROUP_3, LOBOT_OI_SENSOR_GROUP_4, LOBOT_OI_SENSOR_GROUP_5, LOBOT_OI_SENSOR_GROUP_6, LOBOT_OI_SENSOR_BUMP_DROP, LOBOT_OI_SENSOR_WALL, LOBOT_OI_SENSOR_CLIFF_LEFT, LOBOT_OI_SENSOR_CLIFF_FRONT_LEFT, LOBOT_OI_SENSOR_CLIFF_FRONT_RIGHT, LOBOT_OI_SENSOR_CLIFF_RIGHT, LOBOT_OI_SENSOR_VIRTUAL_WALL, LOBOT_OI_SENSOR_INFRARED_BYTE = 17, LOBOT_OI_SENSOR_BUTTONS, LOBOT_OI_SENSOR_DISTANCE, LOBOT_OI_SENSOR_ANGLE, LOBOT_OI_SENSOR_CHARGING_STATE, LOBOT_OI_SENSOR_VOLTAGE, LOBOT_OI_SENSOR_CURRENT, LOBOT_OI_SENSOR_BATTERY_TEMP, LOBOT_OI_SENSOR_BATTERY_CHARGE, LOBOT_OI_SENSOR_BATTERY_CAPACITY, LOBOT_OI_SENSOR_WALL_SIGNAL, LOBOT_OI_SENSOR_CLIFF_LEFT_SIGNAL, LOBOT_OI_SENSOR_CLIFF_FRONT_LEFT_SIGNAL, LOBOT_OI_SENSOR_CLIFF_FRONT_RIGHT_SIGNAL, LOBOT_OI_SENSOR_CLIFF_RIGHT_SIGNAL, LOBOT_OI_SENSOR_CHARGING_SOURCES = 34, LOBOT_OI_SENSOR_MODE, LOBOT_OI_SENSOR_SONG_NUMBER, LOBOT_OI_SENSOR_SONG_PLAYING, LOBOT_OI_SENSOR_REQUESTED_SPEED, LOBOT_OI_SENSOR_REQUESTED_RADIUS, LOBOT_OI_SENSOR_REQUESTED_SPEED_RIGHT, LOBOT_OI_SENSOR_REQUESTED_SPEED_LEFT } |
Enumerations for the different sensor packet IDs. More... | |
enum | { LOBOT_OI_BUMP_LEFT = 0x02, LOBOT_OI_BUMP_RIGHT = 0x01, LOBOT_OI_BUMP_BOTH = 0x03, LOBOT_OI_BUMP_EITHER = 0x03, LOBOT_OI_WHEEL_DROP_CASTER = 0x10, LOBOT_OI_WHEEL_DROP_LEFT = 0x08, LOBOT_OI_WHEEL_DROP_RIGHT = 0x04, LOBOT_OI_WHEEL_DROP_ALL = 0x1C, LOBOT_OI_WHEEL_DROP_ANY = 0x1C, LOBOT_OI_BUTTON_ADVANCE = 0x04, LOBOT_OI_BUTTON_PLAY = 0x01 } |
Sensor bit masks. More... | |
enum | { LOBOT_OI_REMOTE_LEFT = 129, LOBOT_OI_REMOTE_FORWARD, LOBOT_OI_REMOTE_RIGHT, LOBOT_OI_REMOTE_SPOT, LOBOT_OI_REMOTE_MAX, LOBOT_OI_REMOTE_SMALL, LOBOT_OI_REMOTE_MEDIUM, LOBOT_OI_REMOTE_LARGE, LOBOT_OI_REMOTE_CLEAN = LOBOT_OI_REMOTE_LARGE, LOBOT_OI_REMOTE_PAUSE, LOBOT_OI_REMOTE_POWER, LOBOT_OI_REMOTE_ARC_FORWARD_LEFT, LOBOT_OI_REMOTE_ARC_FORWARD_RIGHT, LOBOT_OI_REMOTE_DRIVE_STOP, LOBOT_OI_HOME_BASE_FORCE_FIELD = 242, LOBOT_OI_HOME_BASE_GREEN_BUOY = 244, LOBOT_OI_HOME_BASE_GBFF = 246, LOBOT_OI_HOME_BASE_RED_BUOY = 248, LOBOT_OI_HOME_BASE_RBFF = 250, LOBOT_OI_HOME_BASE_RG_BUOY = 252, LOBOT_OI_HOME_BASE_RGBFF = 254 } |
enum | { LOBOT_OI_CHARGING_NOT, LOBOT_OI_CHARGING_RECONDITIONING, LOBOT_OI_CHARGING_FULL, LOBOT_OI_CHARGING_TRICKLE, LOBOT_OI_CHARGING_WAITING, LOBOT_OI_CHARGING_FAULT } |
Enumerations for the current charging state. More... | |
enum | { LOBOT_OI_CHSRC_HOME_BASE = 0x02, LOBOT_OI_CHSRC_INTERNAL = 0x01 } |
Enumerations for the charging sources. More... | |
enum | { LOBOT_OI_MODE_OFF, LOBOT_OI_MODE_PASSIVE, LOBOT_OI_MODE_SAFE, LOBOT_OI_MODE_FULL } |
Enumerations for the robot's operational mode. More... | |
enum | { LOBOT_OI_SENSOR_SIZE_GROUP_0 = 26, LOBOT_OI_SENSOR_SIZE_GROUP_1 = 10, LOBOT_OI_SENSOR_SIZE_GROUP_2 = 6, LOBOT_OI_SENSOR_SIZE_GROUP_3 = 10, LOBOT_OI_SENSOR_SIZE_GROUP_4 = 14, LOBOT_OI_SENSOR_SIZE_GROUP_5 = 12, LOBOT_OI_SENSOR_SIZE_GROUP_6 = 52 } |
Definitions for some of the Open Interface stuff used by the lobot low-level controller.
Definition in file LoOpenInterface.h.
anonymous enum |
These enumerations are for the different Open Interface commands that the iRobot Create understands.
Definition at line 56 of file LoOpenInterface.h.
anonymous enum |
Enumerations for the supported baud rates. When the BAUD command is issued, the following data byte should be one of these values.
Definition at line 234 of file LoOpenInterface.h.
anonymous enum |
Enumerations for the baud rate register values. When setting up the Open Interface baud rate, the UBRR0 register will have to take on one of these values.
Definition at line 252 of file LoOpenInterface.h.
anonymous enum |
These enumerations specify the demo program to be run when the DEMO command is issued.
Definition at line 269 of file LoOpenInterface.h.
anonymous enum |
Turn radius special cases.
Definition at line 319 of file LoOpenInterface.h.
anonymous enum |
LED bit masks.
Definition at line 327 of file LoOpenInterface.h.
anonymous enum |
Enumerations for the different sensor packet IDs.
LOBOT_OI_SENSOR_GROUP_0 |
Sensor group zero returns packets 7 through 26. |
LOBOT_OI_SENSOR_GROUP_1 |
Sensor group one returns packets 7 through 16. |
LOBOT_OI_SENSOR_GROUP_2 |
Sensor group two returns packets 17 through 20. |
LOBOT_OI_SENSOR_GROUP_3 |
Sensor group three returns packets 21 through 26. |
LOBOT_OI_SENSOR_GROUP_4 |
Sensor group four returns packets 27 through 34. |
LOBOT_OI_SENSOR_GROUP_5 |
Sensor group five returns packets 35 through 42. |
LOBOT_OI_SENSOR_GROUP_6 |
Sensor group six returns all sensor packets, i.e., 7 through 42. |
LOBOT_OI_SENSOR_BUMP_DROP |
Packet 7 is for the state of the bump and wheel drop sensors. A single byte is returned for these sensors. Bits 0 and 1 are for the right and left bump sensors respectively; bits 2, 3 and 4 are for the right, left and caster wheel drops respectively. A value of 1 for a bit means that that particular sensor is on; zero means the sensor is off. DEVNOTE: This file defines constants for the bit masks that can be used to examine this sensor packet's data/value byte. |
LOBOT_OI_SENSOR_WALL |
This packet returns a single byte specifying the state of the wall sensor. A value of 1 means that a wall has been detected; zero means no wall. |
LOBOT_OI_SENSOR_CLIFF_LEFT |
These packets return single bytes for the states of the cliff sensors. One implies a cliff; zero means no cliff. |
LOBOT_OI_SENSOR_VIRTUAL_WALL |
This packet returns a single byte specifying the state of the virtual wall sensor. A value of 1 means that a virtual wall has been detected; zero means no virtual wall. NOTE: The force field around the IR emitter atop the Home Base also trips this sensor. |
LOBOT_OI_SENSOR_INFRARED_BYTE |
This packet returns a single data byte specifying the value of the IR byte currently being received by the Create. These bytes can be sent by the Roomba Remote, the Home Base or by other Create robots and/or user-created devices. The value of this sensor is an unsigned byte in the range [0, 255]. DEVNOTE: This file defines symbolic constants for the byte values that can be sent by the Roomba Remote and the Home Base. |
LOBOT_OI_SENSOR_BUTTONS |
This packet returns an unsigned byte indicating the state of the Create's Play and Advance buttons. Bit #0 specifies the state of the Play button and bit #2 is for the Advance button. When these bits are 1, the buttons are being pressed; zero means the buttons are not being pressed. DEVNOTE: This file defines symbolic constants that can be used as bit masks to ascertain the states of these two buttons using the data byte returned by this sensor packet. |
LOBOT_OI_SENSOR_DISTANCE |
This packet returns the distance (in mm) the robot has travelled since the previous query of this sensor. The value is returned as a signed 16-bit integer (high byte first). NOTE: If this value is not polled often enough, it will be capped at its minimum or maximum. Also, if the wheels slip, the actual distance may be different from the one measured by the robot. |
LOBOT_OI_SENSOR_ANGLE |
This packet returns the angle (in degrees) that the robot has turned since the previous query of this sensor. The value is returned as a signed 16-bit integer (high byte first). NOTE: If this value is not polled often enough, it will be capped at its minimum or maximum. Also, if the wheels slip, the actual angle may be different from the one measured by the robot. |
LOBOT_OI_SENSOR_CHARGING_STATE |
This packet returns the robot's current charging state. The return value is a single unsigned byte containing a code indicating the state. DEVNOTE: This file defines symbolic constants for the charging state. |
LOBOT_OI_SENSOR_VOLTAGE |
This packet indicates the voltage (in mV) of the robot's battery. It is returned as an unsigned 16-bit number (high byte first). |
LOBOT_OI_SENSOR_CURRENT |
This packet indicates the current (in mA) flowing into or out of the robot's battery. It is returned as a signed 16-bit number (high byte first). Negative values indicate current flowing out of the battery (as during normal operation) and positive values indicate current flowing into the battery (as during charging). |
LOBOT_OI_SENSOR_BATTERY_TEMP |
This packet returns a single signed data byte indicating the battery temperature (in degrees Celcius). |
LOBOT_OI_SENSOR_BATTERY_CHARGE |
This packet returns an unsigned 16-bit integer (high byte first) indicating the current charge in the robot's battery (in mAh). The charge value will decrease as the battery is depleted during normal operation and increase when it is being recharged. |
LOBOT_OI_SENSOR_BATTERY_CAPACITY |
This packet returns an unsigned 16-bit integer (high byte first) indicating the estimated charge capacity in the robot's battery (in mAh). |
LOBOT_OI_SENSOR_WALL_SIGNAL |
This packet returns the strength of the wall sensor's signal in an unsigned 16-bit integer (high byte first) whose value can range from 0 to 4095. |
LOBOT_OI_SENSOR_CLIFF_LEFT_SIGNAL |
These packets return the strength of the cliff sensors' signals in unsigned 16-bit integers (high bytes first) whose values are in the range [0, 4095]. |
LOBOT_OI_SENSOR_CHARGING_SOURCES |
This packet returns via an unsigned byte the availability of charging sources. If bit #0 is set, it means that the robot's internal charger is connected to a power supply; zero means this charging source is absent. If bit #1 is on, then the robot is connected to its Home Base; zero means not on the Home Base. DEVNOTE: This file defines appropriate bit mask constants to test this sensor packet's return value. |
LOBOT_OI_SENSOR_MODE |
This packet returns the current mode (Off, Passive, Safe or Full). The return value is a single unsigned byte. DEVNOTE: This file defines symbolic constants for the above-mentioned states. |
LOBOT_OI_SENSOR_SONG_NUMBER |
This packet returns the currently selected song via a single unsigned data byte. |
LOBOT_OI_SENSOR_SONG_PLAYING |
This packet returns one unsigned data byte, a flag indicating whether the robot is currently playing a song or not. |
LOBOT_OI_SENSOR_REQUESTED_SPEED |
This packet returns the most recently requested drive command speed parameter via a signed 16-bit integer (high byte first). The return value will lie in the range [-500, 500]. |
LOBOT_OI_SENSOR_REQUESTED_RADIUS |
This packet returns the most recently requested drive command turn radius parameter via a signed 16-bit integer (high byte first). The return value will lie in the range [-2000, 2000]. |
LOBOT_OI_SENSOR_REQUESTED_SPEED_RIGHT |
These packets return the most recently requested drive direct command speed parameters via a signed 16-bit integer (high byte first). The return value will lie in the range [-500, 500]. |
Definition at line 334 of file LoOpenInterface.h.
anonymous enum |
Sensor bit masks.
Definition at line 524 of file LoOpenInterface.h.
anonymous enum |
Enumerations for the infrared bytes sent by the Roomba remote and the Home base.
Definition at line 551 of file LoOpenInterface.h.
anonymous enum |
Enumerations for the current charging state.
Definition at line 577 of file LoOpenInterface.h.
anonymous enum |
Enumerations for the charging sources.
Definition at line 587 of file LoOpenInterface.h.
anonymous enum |
Enumerations for the robot's operational mode.
Definition at line 593 of file LoOpenInterface.h.
anonymous enum |
Enumerations for the number of bytes of sensor data returned for the predefined sensor groups.
Definition at line 602 of file LoOpenInterface.h.