Fawkes API
Fawkes Development Version
|
Roomba 500 series communication class. More...
#include "roomba_500.h"
Classes | |
struct | SensorPacketGroupAll |
Struct for packet group with everything (SENSPACK_GROUP_ALL). More... | |
Public Types | |
enum | ConnectionType { CONNTYPE_SERIAL, CONNTYPE_ROOTOOTH } |
Connection type. More... | |
enum | ConnectionFlags { FLAG_FIREFLY_FASTMODE = 1 } |
Connection flags. More... | |
enum | OpCode { OPCODE_START = 128, OPCODE_BAUD = 129, OPCODE_CONTROL = 130, OPCODE_SAFE = 131, OPCODE_FULL = 132, OPCODE_POWER = 133, OPCODE_SPOT = 134, OPCODE_CLEAN = 135, OPCODE_MAX = 136, OPCODE_DRIVE = 137, OPCODE_MOTORS = 138, OPCODE_LEDS = 139, OPCODE_SONG = 140, OPCODE_PLAY = 141, OPCODE_QUERY = 142, OPCODE_SEEK_DOCK = 143, OPCODE_PWM_MOTORS = 144, OPCODE_DRIVE_WHEELS = 145, OPCODE_DRIVE_PWM = 146, OPCODE_STREAM = 148, OPCODE_QUERY_LIST = 149, OPCODE_PAUSE_RESUME_STREAM = 150, OPCODE_SCHEDULE_LEDS = 162, OPCODE_DIGIT_LEDS_RAW = 163, OPCODE_DIGIT_LEDS_ASCII = 164, OPCODE_BUTTONS = 165, OPCODE_SCHEDULE = 167, OPCODE_SET_DAY_TIME = 168 } |
Roomba 500 Command op codes. More... | |
enum | SensorPacketID { SENSPACK_BUMPS_DROPS = 7, SENSPACK_WALL = 8, SENSPACK_CLIFF_LEFT = 9, SENSPACK_CLIFF_FRONT_LEFT = 10, SENSPACK_CLIFF_FRONT_RIGHT = 11, SENSPACK_CLIFF_RIGHT = 12, SENSPACK_VIRTUAL_WALL = 13, SENSPACK_WHEEL_OVERCURRENTS = 14, SENSPACK_DIRT_DETECT = 15, SENSPACK_IR_CHAR_OMNI = 17, SENSPACK_BUTTONS = 18, SENSPACK_DISTANCE = 19, SENSPACK_ANGLE = 20, SENSPACK_CHARGING_STATE = 21, SENSPACK_VOLTAGE = 22, SENSPACK_CURRENT = 23, SENSPACK_TEMPERATURE = 24, SENSPACK_BATTERY_CHARGE = 25, SENSPACK_BATTERY_CAPACITY = 26, SENSPACK_WALL_SIGNAL = 27, SENSPACK_CLIFF_LEFT_SIGNAL = 28, SENSPACK_CLIFF_FRONT_LEFT_SIGNAL = 29, SENSPACK_CLIFF_FRONT_RIGHT_SIGNAL = 30, SENSPACK_CLIFF_RIGHT_SIGNAL = 31, SENSPACK_CHARGE_SOURCES = 34, SENSPACK_OI_MODE = 35, SENSPACK_SONG_NUMBER = 36, SENSPACK_SONG_PLAYING = 37, SENSPACK_STREAM_PACKETS = 38, SENSPACK_REQ_VELOCITY = 39, SENSPACK_REQ_RADIUS = 40, SENSPACK_REQ_RIGHT_VELOCITY = 41, SENSPACK_REQ_LEFT_VELOCITY = 42, SENSPACK_RIGHT_ENCODER = 43, SENSPACK_LEFT_ENCODER = 44, SENSPACK_LIGHT_BUMPER = 45, SENSPACK_LIGHT_BUMPER_LEFT = 46, SENSPACK_LIGHT_BUMPER_FRONT_LEFT = 47, SENSPACK_LIGHT_BUMPER_CENTER_LEFT = 48, SENSPACK_LIGHT_BUMPER_CENTER_RIGHT = 49, SENSPACK_LIGHT_BUMPER_FRONT_RIGHT = 50, SENSPACK_LIGHT_BUMPER_RIGHT = 51, SENSPACK_IR_CHAR_LEFT = 52, SENSPACK_IR_CHAR_RIGHT = 53, SENSPACK_LEFT_MOTOR_CURRENT = 54, SENSPACK_RIGHT_MOTOR_CURRENT = 55, SENSPACK_BRUSH_MOTOR_CURRENT = 56, SENSPACK_SIDE_BRUSH_MOTOR_CURRENT = 57, SENSPACK_STASIS = 58, SENSPACK_GROUP_0 = 0, SENSPACK_GROUP_1 = 1, SENSPACK_GROUP_2 = 2, SENSPACK_GROUP_3 = 3, SENSPACK_GROUP_4 = 4, SENSPACK_GROUP_5 = 5, SENSPACK_GROUP_6 = 6, SENSPACK_GROUP_ALL = 100, SENSPACK_GROUP_101 = 101, SENSPACK_GROUP_106 = 106, SENSPACK_GROUP_107 = 107 } |
Roomba 500 sensor package IDs. More... | |
enum | Mode { MODE_OFF = 0, MODE_PASSIVE = 1, MODE_SAFE = 2, MODE_FULL = 3 } |
Roomba 500 operation mode. More... | |
enum | StreamState { STREAM_ENABLE = 1, STREAM_DISABLE = 0 } |
Sensor stream state. More... | |
enum | ChargingState { CHARGING_NO = 0, CHARGING_RECONDITIONING = 1, CHARGING_FULL = 2, CHARGING_TRICKLE = 3, CHARGING_WAITING = 4, CHARGING_ERROR = 5 } |
Charging state. More... | |
enum | InfraredCharacter { IR_REMOTE_LEFT = 129, IR_REMOTE_FORWARD = 130, IR_REMOTE_RIGHT = 131, IR_REMOTE_SPOT = 132, IR_REMOTE_MAX = 133, IR_REMOTE_SMALL = 134, IR_REMOTE_MEDIUM = 135, IR_REMOTE_LARGE_CLEAN = 136, IR_REMOTE_STOP = 137, IR_REMOTE_POWER = 138, IR_REMOTE_ARC_LEFT = 139, IR_REMOTE_ARC_RIGHT = 140, IR_REMOTE_STOP2 = 141, IR_SCHED_REMOTE_DOWNLOAD = 142, IR_SCHED_REMOTE_SEEK_DOCK = 143, IR_DISC_DOCK_RESERVED = 240, IR_DISC_DOCK_RED_BUOY = 248, IR_DISC_DOCK_GREEN_BUOY = 244, IR_DISC_DOCK_FORCE_FIELD = 242, IR_DISC_DOCK_RED_GREEN_BUOY = 252, IR_DISC_DOCK_RED_BUOY_FORCE_FIELD = 250, IR_DISC_DOCK_GREEN_BUOY_FORCE_FIELD = 246, IR_DISC_DOCK_RED_GREEN_BUOY_FORCE_FIELD = 254, IR_DOCK_RESERVED = 160, IR_DOCK_RED_BUOY = 168, IR_DOCK_GREEN_BUOY = 164, IR_DOCK_FORCE_FIELD = 161, IR_DOCK_RED_GREEN_BUOY = 172, IR_DOCK_RED_BUOY_FORCE_FIELD = 169, IR_DOCK_GREEN_BUOY_FORCE_FIELD = 165, IR_DOCK_RED_GREEN_BUOY_FORCE_FIELD = 173, IR_VIRTUAL_WALL = 162 } |
Infrared character values. More... | |
enum | ScheduleDay { DAY_SUNDAY = 0, DAY_MONDAY = 1, DAY_TUESDAY = 2, DAY_WEDNESDAY = 3, DAY_THURSDAY = 4, DAY_FRIDAY = 5, DAY_SATURDAY = 6 } |
Days for scheduler. More... | |
enum | TurnDirection { TURN_CLOCKWISE, TURN_COUNTER_CLOCKWISE } |
Turning direction. More... | |
Public Member Functions | |
Roomba500 (ConnectionType conntype, const char *device, unsigned int flags=0) | |
Constructor. | |
~Roomba500 () | |
Destructor. | |
void | open () |
Open serial port. | |
void | close () |
Close serial connection. | |
bool | is_connected () const |
Check if connection has been established. | |
ConnectionType | get_connection_type () const |
Get connection type. | |
const char * | get_device () const |
Get device string. | |
Mode | get_mode () const |
Get current mode. | |
bool | is_controlled () const |
Check if robot is being controlled. | |
void | set_mode (Mode mode) |
Set control mode. | |
void | clean () |
Start normal cleaning operation. | |
void | clean_spot () |
Start spot cleaning operation. | |
void | seek_dock () |
Seek for the home base and dock. | |
void | power_down () |
Powers down the Roomba. | |
void | stop () |
Stop moption of the Roomba. | |
void | drive_straight (short int velo_mm_per_sec) |
Drive Roomba straight. | |
void | drive_turn (TurnDirection direction) |
Turn robot on the spot. | |
void | drive_arc (short int velo_mm_per_sec, short int radius_mm) |
Drive Roomba on an arc. | |
void | drive (short int velocity_mm_per_sec, short int radius_mm) |
Drive Roomba. | |
void | drive_direct (short int left_mm_per_sec, short int right_mm_per_sec) |
Directly control wheel velocities. | |
void | drive_pwm (short int left_wheel_pwm, short int right_wheel_pwm) |
Directly control wheel velocities via PWM. | |
void | set_motors (bool main=true, bool side=true, bool vacuum=true, bool main_backward=false, bool side_backward=false) |
Set motor states (brushes and vacuum). | |
void | set_leds (bool debris, bool spot, bool dock, bool check_robot, unsigned char clean_color, unsigned char clean_intensity) |
Set LED status of main LEDs. | |
void | set_digit_leds (const char digits[4]) |
Set digit LEDs. | |
void | enable_sensors () |
Enable sensor data stream. | |
void | disable_sensors () |
Disable sensor data stream. | |
bool | is_data_available () |
Check if data is available. | |
void | read_sensors () |
Read sensor values. | |
void | query_sensors () |
Query sensor once. | |
bool | has_sensor_packet () const |
Check if sensor packet is availabe. | |
const SensorPacketGroupAll | get_sensor_packet () const |
Get latest sensor packet. | |
void | play_fanfare () |
Play a simple fanfare. | |
Static Public Member Functions | |
static unsigned short int | get_packet_size (SensorPacketID packet) |
Get size of packet. | |
Static Public Attributes | |
static const unsigned char | BUTTON_CLEAN |
Cleaning button. | |
static const unsigned char | BUTTON_SPOT |
Spot cleaning button. | |
static const unsigned char | BUTTON_DOCK |
Dock button. | |
static const unsigned char | BUTTON_MINUTE |
Minute button. | |
static const unsigned char | BUTTON_HOUR |
Hour button. | |
static const unsigned char | BUTTON_DAY |
Day button. | |
static const unsigned char | BUTTON_SCHEDULE |
Schedule button. | |
static const unsigned char | BUTTON_CLOCK |
Clock button. | |
static const unsigned char | WHEEL_DROP_LEFT |
Left wheel drop bit. | |
static const unsigned char | WHEEL_DROP_RIGHT |
Right wheel drop bit. | |
static const unsigned char | BUMP_LEFT |
Left bumper bit. | |
static const unsigned char | BUMP_RIGHT |
Right bumper bit. | |
static const unsigned char | OVERCURRENT_WHEEL_LEFT |
Left wheel bit. | |
static const unsigned char | OVERCURRENT_WHEEL_RIGHT |
Right wheel bit. | |
static const unsigned char | OVERCURRENT_MAIN_BRUSH |
Main brush bit. | |
static const unsigned char | OVERCURRENT_SIDE_BRUSH |
Side brush bit. | |
static const unsigned char | CHARGING_SOURCE_HOME_BASE |
Docking station. | |
static const unsigned char | CHARGING_SOURCE_INTERNAL |
Internal socket. | |
static const unsigned char | BUMPER_LEFT |
Left bumper. | |
static const unsigned char | BUMPER_FRONT_LEFT |
Front left bumper. | |
static const unsigned char | BUMPER_CENTER_LEFT |
Center left bumper. | |
static const unsigned char | BUMPER_CENTER_RIGHT |
Center right bumper. | |
static const unsigned char | BUMPER_FRONT_RIGHT |
Front right bumper. | |
static const unsigned char | BUMPER_RIGHT |
Right bumper. | |
static const unsigned char | LED_DEBRIS |
Debris LED bit. | |
static const unsigned char | LED_SPOT |
Spot LED bit. | |
static const unsigned char | LED_DOCK |
Dock LED bit. | |
static const unsigned char | LED_CHECK_ROBOT |
Check robot LED bit. | |
static const unsigned char | WEEKDAY_LED_SUN |
Sunday. | |
static const unsigned char | WEEKDAY_LED_MON |
Monday. | |
static const unsigned char | WEEKDAY_LED_TUE |
Tuesday. | |
static const unsigned char | WEEKDAY_LED_WED |
Wednesday. | |
static const unsigned char | WEEKDAY_LED_THU |
Thursday. | |
static const unsigned char | WEEKDAY_LED_FRI |
Friday. | |
static const unsigned char | WEEKDAY_LED_SAT |
Saturday. | |
static const unsigned char | SCHEDULING_LED_COLON |
Colon LED bit. | |
static const unsigned char | SCHEDULING_LED_PM |
PM LED bit. | |
static const unsigned char | SCHEDULING_LED_AM |
AM LED bit. | |
static const unsigned char | SCHEDULING_LED_CLOCK |
Clock LED bit. | |
static const unsigned char | SCHEDULING_LED_SCHEDULE |
Schedule LED bit. | |
static const unsigned char | DIGIT_LED_NORTH |
Top segment LED. | |
static const unsigned char | DIGIT_LED_NORTH_WEST |
Top left segment LED. | |
static const unsigned char | DIGIT_LED_NORTH_EAST |
Top right segment LED. | |
static const unsigned char | DIGIT_LED_CENTER |
Center segment LED. | |
static const unsigned char | DIGIT_LED_SOUTH_WEST |
Bottom left segment. | |
static const unsigned char | DIGIT_LED_SOUTH_EAST |
Bottom right segment. | |
static const unsigned char | DIGIT_LED_SOUTH |
Bottom segment LED. | |
static const unsigned char | MOTOR_SIDE_BRUSH |
Side brush motor bit. | |
static const unsigned char | MOTOR_VACUUM |
Vacuum motor bit. | |
static const unsigned char | MOTOR_MAIN_BRUSHES |
Main brush motor bit. | |
static const unsigned char | MOTOR_SIDE_BRUSH_BACKWARD |
Side backward bit. | |
static const unsigned char | MOTOR_MAIN_BRUSHES_BACKWARD |
Main backward bit. | |
static const unsigned char | CHARGER_HOME_BASE |
Home base charger bit. | |
static const unsigned char | CHARGER_INTERNAL |
Internal charger bit. | |
static const float | DIAMETER |
static const float | BUMPER_X_OFFSET |
X Offset of bumper. | |
static const float | AXLE_LENGTH |
Axle length. | |
static const short int | MAX_LIN_VEL_MM_S |
Maximum linear velocity. | |
static const short int | MAX_RADIUS_MM |
Maximum drive radius. | |
static const short int | MAX_PWM |
Maximum PWM value for wheels. | |
static const unsigned short int | MAX_ENCODER_COUNT |
Maximum encoder count. | |
static const unsigned short int | STREAM_INTERVAL_MS |
Time in ms between. | |
static const unsigned short int | MODE_CHANGE_WAIT_MS |
Time in ms to wait after mode changes. | |
static const unsigned char | CHECKSUM_SIZE |
Checksum byte size. |
Roomba 500 series communication class.
This class implements the serial communication with Roomba robots of the 500 series.
RFCOMM by reading http://people.csail.mit.edu/albert/bluez-intro/.
Charging state.
Definition at line 162 of file roomba_500.h.
Connection flags.
These flags allow to influence the connection creation and operation.
Definition at line 45 of file roomba_500.h.
Connection type.
CONNTYPE_SERIAL |
Use serial connection (device file). |
CONNTYPE_ROOTOOTH |
Use BlueZ to find and connect to RooTooth. |
Definition at line 38 of file roomba_500.h.
Infrared character values.
Definition at line 172 of file roomba_500.h.
enum Roomba500::Mode |
Roomba 500 operation mode.
MODE_OFF |
No connection. |
MODE_PASSIVE |
Passive mode, no control, only listening. |
MODE_SAFE |
Control acquired, safety measures in place. |
MODE_FULL |
Control acquired, safety measures disabled. |
Definition at line 148 of file roomba_500.h.
enum Roomba500::OpCode |
Roomba 500 Command op codes.
Definition at line 50 of file roomba_500.h.
Days for scheduler.
DAY_SUNDAY |
Sunday. |
DAY_MONDAY |
Monday. |
DAY_TUESDAY |
Tuesday. |
DAY_WEDNESDAY |
Wednesday. |
DAY_THURSDAY |
Thursday. |
DAY_FRIDAY |
Friday. |
DAY_SATURDAY |
Saturday. |
Definition at line 218 of file roomba_500.h.
Roomba 500 sensor package IDs.
Definition at line 82 of file roomba_500.h.
Sensor stream state.
Definition at line 156 of file roomba_500.h.
Turning direction.
Definition at line 229 of file roomba_500.h.
Roomba500::Roomba500 | ( | Roomba500::ConnectionType | conntype, |
const char * | device, | ||
unsigned int | flags = 0 |
||
) |
Constructor.
conntype | connection type |
device | for CONN_SERIAL connection type this is the device file for the serial connection. For CONN_ROOTOOTH this is either a name pattern of a bluetooth device to query or a bluetooth address. The name can be the full name, or a pattern using shell globs (e.g. FireFly-*). The bluetooth address must be given in hexadecimal manner (e.g. 00:11:22:33:44:55). |
flags | ConnectionFlags constants, joined with bit-wise "or" (|). |
Definition at line 241 of file roomba_500.cpp.
Roomba500::~Roomba500 | ( | ) |
Destructor.
Definition at line 275 of file roomba_500.cpp.
void Roomba500::clean | ( | ) |
Start normal cleaning operation.
Transitions to passive mode.
Definition at line 845 of file roomba_500.cpp.
void Roomba500::clean_spot | ( | ) |
Start spot cleaning operation.
Transitions to passive mode.
Definition at line 857 of file roomba_500.cpp.
void Roomba500::close | ( | ) |
Close serial connection.
Definition at line 545 of file roomba_500.cpp.
void Roomba500::disable_sensors | ( | ) |
Disable sensor data stream.
Definition at line 761 of file roomba_500.cpp.
void Roomba500::drive | ( | short int | velo_mm_per_sec, |
short int | radius_mm | ||
) |
Drive Roomba.
Available only in safe or full mode.
velo_mm_per_sec | desired velocity in m/sec |
radius_mm | desired radius of arc in m |
Definition at line 968 of file roomba_500.cpp.
void Roomba500::drive_arc | ( | short int | velo_mm_per_sec, |
short int | radius_mm | ||
) |
Drive Roomba on an arc.
Available only in safe or full mode.
velo_mm_per_sec | desired velocity in m/sec |
radius_mm | desired radius of arc in m |
Definition at line 945 of file roomba_500.cpp.
void Roomba500::drive_direct | ( | short int | left_mm_per_sec, |
short int | right_mm_per_sec | ||
) |
Directly control wheel velocities.
Available only in safe or full mode.
left_mm_per_sec | velocity of left wheel in m/sec |
right_mm_per_sec | velocity of right wheel in m/sec |
Definition at line 992 of file roomba_500.cpp.
void Roomba500::drive_pwm | ( | short int | left_wheel_pwm, |
short int | right_wheel_pwm | ||
) |
Directly control wheel velocities via PWM.
Available only in safe or full mode.
left_wheel_pwm | PWM parameter for left wheel |
right_wheel_pwm | PWM parameter for right wheel |
Definition at line 1017 of file roomba_500.cpp.
void Roomba500::drive_straight | ( | short int | velo_mm_per_sec | ) |
Drive Roomba straight.
Available only in safe or full mode.
velo_mm_per_sec | desired velocity in m/sec |
Definition at line 908 of file roomba_500.cpp.
void Roomba500::drive_turn | ( | Roomba500::TurnDirection | direction | ) |
Turn robot on the spot.
Available only in safe or full mode.
direction | turning direction |
Definition at line 927 of file roomba_500.cpp.
void Roomba500::enable_sensors | ( | ) |
Enable sensor data stream.
For simplicity and efficiency only the single SENSPACK_GROUP_ALL packet can be streamed at this time. Make sure that the used connection is fast enough. 56700 bit/sec should suffice, but 115200 is strongly recommended. If using RooTooth make sure to use it in fast mode.
Definition at line 741 of file roomba_500.cpp.
ConnectionType Roomba500::get_connection_type | ( | ) | const [inline] |
const char* Roomba500::get_device | ( | ) | const [inline] |
Mode Roomba500::get_mode | ( | ) | const [inline] |
unsigned short int Roomba500::get_packet_size | ( | Roomba500::SensorPacketID | packet | ) | [static] |
Get size of packet.
packet | ID of packet to query size for |
Exception | thrown for unknown packet IDs. |
Definition at line 1144 of file roomba_500.cpp.
const Roomba500::SensorPacketGroupAll Roomba500::get_sensor_packet | ( | ) | const |
bool Roomba500::has_sensor_packet | ( | ) | const [inline] |
Check if sensor packet is availabe.
Definition at line 491 of file roomba_500.h.
bool Roomba500::is_connected | ( | ) | const [inline] |
Check if connection has been established.
Definition at line 446 of file roomba_500.h.
Referenced by is_controlled().
bool Roomba500::is_controlled | ( | ) | const [inline] |
Check if robot is being controlled.
Definition at line 461 of file roomba_500.h.
References is_connected(), MODE_SAFE, and MODE_FULL.
bool Roomba500::is_data_available | ( | ) |
Check if data is available.
Definition at line 648 of file roomba_500.cpp.
void Roomba500::open | ( | ) |
Open serial port.
Definition at line 287 of file roomba_500.cpp.
void Roomba500::play_fanfare | ( | ) |
Play a simple fanfare.
You can play this for example upon connection to inform the user.
Definition at line 1105 of file roomba_500.cpp.
void Roomba500::power_down | ( | ) |
void Roomba500::query_sensors | ( | ) |
Query sensor once.
For simplicity and efficiency only the single SENSPACK_GROUP_ALL packet can be streamed at this time.
Definition at line 779 of file roomba_500.cpp.
void Roomba500::read_sensors | ( | ) |
Read sensor values.
Enable sensors before using enable_sensors(). This method will block until new data has been read. You can call is_data_available() to check if this method will block or not.
Definition at line 673 of file roomba_500.cpp.
void Roomba500::seek_dock | ( | ) |
Seek for the home base and dock.
Transitions to passive mode.
Definition at line 869 of file roomba_500.cpp.
void Roomba500::set_digit_leds | ( | const char | digits[4] | ) |
Set digit LEDs.
Available only in safe or full mode. Note, that not all characters are availabe. You can use ASCII table entries 32-39, 44-63, 65-96, and 123-126.
digits | array of digit values |
Definition at line 1093 of file roomba_500.cpp.
void Roomba500::set_leds | ( | bool | debris, |
bool | spot, | ||
bool | dock, | ||
bool | check_robot, | ||
unsigned char | clean_color, | ||
unsigned char | clean_intensity | ||
) |
Set LED status of main LEDs.
Available only in safe or full mode.
debris | true to enable debris LED, false to disable |
spot | true to enable spot LED, false to disable |
dock | true to enable dock LED, false to disable |
check_robot | true to enable check_robot LED, false to disable |
clean_color | color of clean button LED from green (0) to red (255) |
clean_intensity | intensity of clean button LED from off (0) to full intensity (255) |
Definition at line 1071 of file roomba_500.cpp.
void Roomba500::set_mode | ( | Roomba500::Mode | mode | ) |
Set control mode.
mode | the mode can be either MODE_FULL or MODE_SAFE (recommended). MODE_OFF and MODE_PASSIVE cannot be set explicitly. To enter MODE_PASSIVE issue a command which transitions mode, like clean() or seek_dock(). |
Exception | thrown if an invalid mode is passed |
Definition at line 824 of file roomba_500.cpp.
void Roomba500::set_motors | ( | bool | main = true , |
bool | side = true , |
||
bool | vacuum = true , |
||
bool | main_backward = false , |
||
bool | side_backward = false |
||
) |
Set motor states (brushes and vacuum).
Available only in safe or full mode.
main | true to enable main brushes |
side | true to enable side brush |
vacuum | true to enable vacuuming |
main_backward | true to enable backward operation of main brushes |
side_backward | true to enable backward operation of side brush |
Definition at line 1044 of file roomba_500.cpp.
void Roomba500::stop | ( | ) |
Stop moption of the Roomba.
Available only in safe or full mode.
Definition at line 895 of file roomba_500.cpp.
const float Roomba500::AXLE_LENGTH [static] |
Axle length.
Definition at line 365 of file roomba_500.h.
const unsigned char Roomba500::BUMP_LEFT [static] |
Left bumper bit.
Definition at line 245 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUMP_RIGHT [static] |
Right bumper bit.
Definition at line 246 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUMPER_CENTER_LEFT [static] |
Center left bumper.
Definition at line 258 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUMPER_CENTER_RIGHT [static] |
Center right bumper.
Definition at line 259 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUMPER_FRONT_LEFT [static] |
Front left bumper.
Definition at line 257 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUMPER_FRONT_RIGHT [static] |
Front right bumper.
Definition at line 260 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUMPER_LEFT [static] |
Left bumper.
Definition at line 256 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUMPER_RIGHT [static] |
Right bumper.
Definition at line 261 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const float Roomba500::BUMPER_X_OFFSET [static] |
X Offset of bumper.
Definition at line 364 of file roomba_500.h.
const unsigned char Roomba500::BUTTON_CLEAN [static] |
Cleaning button.
Definition at line 234 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUTTON_CLOCK [static] |
Clock button.
Definition at line 241 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUTTON_DAY [static] |
Day button.
Definition at line 239 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUTTON_DOCK [static] |
Dock button.
Definition at line 236 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUTTON_HOUR [static] |
Hour button.
Definition at line 238 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUTTON_MINUTE [static] |
Minute button.
Definition at line 237 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUTTON_SCHEDULE [static] |
Schedule button.
Definition at line 240 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::BUTTON_SPOT [static] |
Spot cleaning button.
Definition at line 235 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::CHARGER_HOME_BASE [static] |
Home base charger bit.
Definition at line 296 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::CHARGER_INTERNAL [static] |
Internal charger bit.
Definition at line 297 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::CHARGING_SOURCE_HOME_BASE [static] |
Docking station.
Definition at line 253 of file roomba_500.h.
const unsigned char Roomba500::CHARGING_SOURCE_INTERNAL [static] |
Internal socket.
Definition at line 254 of file roomba_500.h.
const unsigned char Roomba500::CHECKSUM_SIZE [static] |
Checksum byte size.
Definition at line 377 of file roomba_500.h.
const float Roomba500::DIAMETER [static] |
Robot diameter.
Definition at line 363 of file roomba_500.h.
const unsigned char Roomba500::DIGIT_LED_CENTER [static] |
Center segment LED.
Definition at line 285 of file roomba_500.h.
const unsigned char Roomba500::DIGIT_LED_NORTH [static] |
Top segment LED.
Definition at line 282 of file roomba_500.h.
const unsigned char Roomba500::DIGIT_LED_NORTH_EAST [static] |
Top right segment LED.
Definition at line 284 of file roomba_500.h.
const unsigned char Roomba500::DIGIT_LED_NORTH_WEST [static] |
Top left segment LED.
Definition at line 283 of file roomba_500.h.
const unsigned char Roomba500::DIGIT_LED_SOUTH [static] |
Bottom segment LED.
Definition at line 288 of file roomba_500.h.
const unsigned char Roomba500::DIGIT_LED_SOUTH_EAST [static] |
Bottom right segment.
Definition at line 287 of file roomba_500.h.
const unsigned char Roomba500::DIGIT_LED_SOUTH_WEST [static] |
Bottom left segment.
Definition at line 286 of file roomba_500.h.
const unsigned char Roomba500::LED_CHECK_ROBOT [static] |
Check robot LED bit.
Definition at line 266 of file roomba_500.h.
const unsigned char Roomba500::LED_DEBRIS [static] |
Debris LED bit.
Definition at line 263 of file roomba_500.h.
const unsigned char Roomba500::LED_DOCK [static] |
Dock LED bit.
Definition at line 265 of file roomba_500.h.
const unsigned char Roomba500::LED_SPOT [static] |
Spot LED bit.
Definition at line 264 of file roomba_500.h.
const unsigned short int Roomba500::MAX_ENCODER_COUNT [static] |
Maximum encoder count.
Definition at line 371 of file roomba_500.h.
const short int Roomba500::MAX_LIN_VEL_MM_S [static] |
Maximum linear velocity.
Definition at line 367 of file roomba_500.h.
const short int Roomba500::MAX_PWM [static] |
Maximum PWM value for wheels.
Definition at line 370 of file roomba_500.h.
const short int Roomba500::MAX_RADIUS_MM [static] |
Maximum drive radius.
Definition at line 368 of file roomba_500.h.
const unsigned short int Roomba500::MODE_CHANGE_WAIT_MS [static] |
Time in ms to wait after mode changes.
Definition at line 374 of file roomba_500.h.
const unsigned char Roomba500::MOTOR_MAIN_BRUSHES [static] |
Main brush motor bit.
Definition at line 292 of file roomba_500.h.
const unsigned char Roomba500::MOTOR_MAIN_BRUSHES_BACKWARD [static] |
Main backward bit.
Definition at line 294 of file roomba_500.h.
const unsigned char Roomba500::MOTOR_SIDE_BRUSH [static] |
Side brush motor bit.
Definition at line 290 of file roomba_500.h.
const unsigned char Roomba500::MOTOR_SIDE_BRUSH_BACKWARD [static] |
Side backward bit.
Definition at line 293 of file roomba_500.h.
const unsigned char Roomba500::MOTOR_VACUUM [static] |
Vacuum motor bit.
Definition at line 291 of file roomba_500.h.
const unsigned char Roomba500::OVERCURRENT_MAIN_BRUSH [static] |
Main brush bit.
Definition at line 250 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::OVERCURRENT_SIDE_BRUSH [static] |
Side brush bit.
Definition at line 251 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::OVERCURRENT_WHEEL_LEFT [static] |
Left wheel bit.
Definition at line 248 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::OVERCURRENT_WHEEL_RIGHT [static] |
Right wheel bit.
Definition at line 249 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::SCHEDULING_LED_AM [static] |
AM LED bit.
Definition at line 278 of file roomba_500.h.
const unsigned char Roomba500::SCHEDULING_LED_CLOCK [static] |
Clock LED bit.
Definition at line 279 of file roomba_500.h.
const unsigned char Roomba500::SCHEDULING_LED_COLON [static] |
Colon LED bit.
Definition at line 276 of file roomba_500.h.
const unsigned char Roomba500::SCHEDULING_LED_PM [static] |
PM LED bit.
Definition at line 277 of file roomba_500.h.
const unsigned char Roomba500::SCHEDULING_LED_SCHEDULE [static] |
Schedule LED bit.
Definition at line 280 of file roomba_500.h.
const unsigned short int Roomba500::STREAM_INTERVAL_MS [static] |
Time in ms between.
streamed sensor packets.
Definition at line 372 of file roomba_500.h.
Referenced by Roomba500Thread::WorkerThread::WorkerThread().
const unsigned char Roomba500::WEEKDAY_LED_FRI [static] |
Friday.
Definition at line 273 of file roomba_500.h.
const unsigned char Roomba500::WEEKDAY_LED_MON [static] |
Monday.
Definition at line 269 of file roomba_500.h.
const unsigned char Roomba500::WEEKDAY_LED_SAT [static] |
Saturday.
Definition at line 274 of file roomba_500.h.
const unsigned char Roomba500::WEEKDAY_LED_SUN [static] |
Sunday.
Definition at line 268 of file roomba_500.h.
const unsigned char Roomba500::WEEKDAY_LED_THU [static] |
Thursday.
Definition at line 272 of file roomba_500.h.
const unsigned char Roomba500::WEEKDAY_LED_TUE [static] |
Tuesday.
Definition at line 270 of file roomba_500.h.
const unsigned char Roomba500::WEEKDAY_LED_WED [static] |
Wednesday.
Definition at line 271 of file roomba_500.h.
const unsigned char Roomba500::WHEEL_DROP_LEFT [static] |
Left wheel drop bit.
Definition at line 243 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().
const unsigned char Roomba500::WHEEL_DROP_RIGHT [static] |
Right wheel drop bit.
Definition at line 244 of file roomba_500.h.
Referenced by Roomba500Thread::write_blackboard().