Classes | Namespaces | Defines | Typedefs | Enumerations
OpenInterface.h File Reference
#include "cereal_port/CerealPort.h"
Include dependency graph for OpenInterface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  irobot::OpenInterface
 C++ class implementation of the iRobot OI. More...

Namespaces

namespace  irobot

Defines

#define BUTTON_CLEAN   0
#define BUTTON_CLOCK   7
#define BUTTON_DAY   5
#define BUTTON_DOCK   2
#define BUTTON_HOUR   4
#define BUTTON_MINUTE   3
#define BUTTON_SCHEDULE   6
#define BUTTON_SPOT   1
#define CENTER_LEFT   4
#define CENTER_RIGHT   5
#define FORCE_FIELD   161
#define FRONT_LEFT   2
#define FRONT_RIGHT   3
#define GREEN_BUOY   164
#define GREEN_BUOY_FORCE_FIELD   165
#define LEFT   0
#define MAIN_BRUSH   2
#define MAX(a, b)   ((a > b) ? (a) : (b))
#define MAX_PATH   32
#define MIN(a, b)   ((a < b) ? (a) : (b))
#define NORMALIZE(z)   atan2(sin(z), cos(z))
#define OI_CHARGING_CHARGING   2
#define OI_CHARGING_ERROR   5
#define OI_CHARGING_NO   0
#define OI_CHARGING_RECOVERY   1
#define OI_CHARGING_TRICKLE   3
#define OI_CHARGING_WAITING   4
#define OI_DELAY_MODECHANGE_MS   20
#define OI_MODE_FULL   3
#define OI_MODE_OFF   0
#define OI_MODE_PASSIVE   1
#define OI_MODE_SAFE   2
#define OI_PACKET_ANGLE_SIZE   2
#define OI_PACKET_BATTERY_CAPACITY_SIZE   2
#define OI_PACKET_BATTERY_CHARGE_SIZE   2
#define OI_PACKET_BRUSH_MOTOR_CURRENT_SIZE   2
#define OI_PACKET_BUMPS_DROPS_SIZE   1
#define OI_PACKET_BUTTONS_SIZE   1
#define OI_PACKET_CHARGE_SOURCES_SIZE   1
#define OI_PACKET_CHARGING_STATE_SIZE   1
#define OI_PACKET_CLIFF_FRONT_LEFT_SIGNAL_SIZE   2
#define OI_PACKET_CLIFF_FRONT_LEFT_SIZE   1
#define OI_PACKET_CLIFF_FRONT_RIGHT_SIGNAL_SIZE   2
#define OI_PACKET_CLIFF_FRONT_RIGHT_SIZE   1
#define OI_PACKET_CLIFF_LEFT_SIGNAL_SIZE   2
#define OI_PACKET_CLIFF_LEFT_SIZE   1
#define OI_PACKET_CLIFF_RIGHT_SIGNAL_SIZE   2
#define OI_PACKET_CLIFF_RIGHT_SIZE   1
#define OI_PACKET_CURRENT_SIZE   2
#define OI_PACKET_DIRT_DETECT_SIZE   1
#define OI_PACKET_DISTANCE_SIZE   2
#define OI_PACKET_GROUP_0_SIZE   26
#define OI_PACKET_GROUP_100_SIZE   80
#define OI_PACKET_GROUP_101_SIZE   28
#define OI_PACKET_GROUP_106_SIZE   12
#define OI_PACKET_GROUP_107_SIZE   9
#define OI_PACKET_GROUP_1_SIZE   10
#define OI_PACKET_GROUP_2_SIZE   6
#define OI_PACKET_GROUP_3_SIZE   10
#define OI_PACKET_GROUP_4_SIZE   14
#define OI_PACKET_GROUP_5_SIZE   12
#define OI_PACKET_GROUP_6_SIZE   52
#define OI_PACKET_IR_CHAR_LEFT_SIZE   1
#define OI_PACKET_IR_CHAR_OMNI_SIZE   1
#define OI_PACKET_IR_CHAR_RIGHT_SIZE   1
#define OI_PACKET_LEFT_ENCODER_SIZE   2
#define OI_PACKET_LEFT_MOTOR_CURRENT_SIZE   2
#define OI_PACKET_LIGHT_BUMPER_CENTER_LEFT_SIZE   2
#define OI_PACKET_LIGHT_BUMPER_CENTER_RIGHT_SIZE   2
#define OI_PACKET_LIGHT_BUMPER_FRONT_LEFT_SIZE   2
#define OI_PACKET_LIGHT_BUMPER_FRONT_RIGHT_SIZE   2
#define OI_PACKET_LIGHT_BUMPER_LEFT_SIZE   2
#define OI_PACKET_LIGHT_BUMPER_RIGHT_SIZE   2
#define OI_PACKET_LIGHT_BUMPER_SIZE   1
#define OI_PACKET_OI_MODE_SIZE   1
#define OI_PACKET_REQ_LEFT_VELOCITY_SIZE   2
#define OI_PACKET_REQ_RADIUS_SIZE   2
#define OI_PACKET_REQ_RIGHT_VELOCITY_SIZE   2
#define OI_PACKET_REQ_VELOCITY_SIZE   2
#define OI_PACKET_RIGHT_ENCODER_SIZE   2
#define OI_PACKET_RIGHT_MOTOR_CURRENT_SIZE   2
#define OI_PACKET_SIDE_BRUSH_MOTOR_CURRENT_SIZE   2
#define OI_PACKET_SONG_NUMBER_SIZE   1
#define OI_PACKET_SONG_PLAYING_SIZE   1
#define OI_PACKET_STASIS_SIZE   1
#define OI_PACKET_STREAM_PACKETS_SIZE   1
#define OI_PACKET_TEMPERATURE_SIZE   1
#define OI_PACKET_VIRTUAL_WALL_SIZE   1
#define OI_PACKET_VOLTAGE_SIZE   2
#define OI_PACKET_WALL_SIGNAL_SIZE   2
#define OI_PACKET_WALL_SIZE   1
#define OI_PACKET_WHEEL_OVERCURRENTS_SIZE   1
#define OMNI   2
#define RED_BUOY   168
#define RED_BUOY_FORCE_FIELD   169
#define RED_BUOY_GREEN_BUOY   172
#define RED_BUOY_GREEN_BUOY_FORCE_FIELD   173
#define RIGHT   1
#define ROOMBA_AXLE_LENGTH   0.235
#define ROOMBA_BUMPER_X_OFFSET   0.050
#define ROOMBA_DIAMETER   0.330
#define ROOMBA_MAX_ANG_VEL_RAD_S   2
#define ROOMBA_MAX_ENCODER_COUNTS   65535
 Roomba max encoder counts.
#define ROOMBA_MAX_LIN_VEL_MM_S   500
#define ROOMBA_MAX_RADIUS_MM   2000
#define ROOMBA_PULSES_TO_M   0.000445558279992234
 Roomba encoder pulses to meter constant.
#define SIDE_BRUSH   3
#define VIRTUAL_WALL   162

Typedefs

typedef enum irobot::_OI_Opcode irobot::OI_Opcode
 OI op codes.
typedef enum irobot::_OI_Packet_ID irobot::OI_Packet_ID
 OI packet id.

Enumerations

enum  irobot::_OI_Opcode {
  irobot::OI_OPCODE_START = 128, irobot::OI_OPCODE_BAUD = 129, irobot::OI_OPCODE_CONTROL = 130, irobot::OI_OPCODE_SAFE = 131,
  irobot::OI_OPCODE_FULL = 132, irobot::OI_OPCODE_POWER = 133, irobot::OI_OPCODE_SPOT = 134, irobot::OI_OPCODE_CLEAN = 135,
  irobot::OI_OPCODE_MAX = 136, irobot::OI_OPCODE_DRIVE = 137, irobot::OI_OPCODE_MOTORS = 138, irobot::OI_OPCODE_LEDS = 139,
  irobot::OI_OPCODE_SONG = 140, irobot::OI_OPCODE_PLAY = 141, irobot::OI_OPCODE_SENSORS = 142, irobot::OI_OPCODE_FORCE_DOCK = 143,
  irobot::OI_OPCODE_PWM_MOTORS = 144, irobot::OI_OPCODE_DRIVE_DIRECT = 145, irobot::OI_OPCODE_DRIVE_PWM = 146, irobot::OI_OPCODE_STREAM = 148,
  irobot::OI_OPCODE_QUERY = 149, irobot::OI_OPCODE_PAUSE_RESUME_STREAM = 150, irobot::OI_OPCODE_SCHEDULE_LEDS = 162, irobot::OI_OPCODE_DIGIT_LEDS_RAW = 163,
  irobot::OI_OPCODE_DIGIT_LEDS_ASCII = 164, irobot::OI_OPCODE_BUTTONS = 165, irobot::OI_OPCODE_SCHEDULE = 167, irobot::OI_OPCODE_SET_DAY_TIME = 168
}
 OI op codes. More...
enum  irobot::_OI_Packet_ID {
  irobot::OI_PACKET_GROUP_0 = 0, irobot::OI_PACKET_GROUP_1 = 1, irobot::OI_PACKET_GROUP_2 = 2, irobot::OI_PACKET_GROUP_3 = 3,
  irobot::OI_PACKET_GROUP_4 = 4, irobot::OI_PACKET_GROUP_5 = 5, irobot::OI_PACKET_GROUP_6 = 6, irobot::OI_PACKET_GROUP_100 = 100,
  irobot::OI_PACKET_GROUP_101 = 101, irobot::OI_PACKET_GROUP_106 = 106, irobot::OI_PACKET_GROUP_107 = 107, irobot::OI_PACKET_BUMPS_DROPS = 7,
  irobot::OI_PACKET_WALL = 8, irobot::OI_PACKET_CLIFF_LEFT = 9, irobot::OI_PACKET_CLIFF_FRONT_LEFT = 10, irobot::OI_PACKET_CLIFF_FRONT_RIGHT = 11,
  irobot::OI_PACKET_CLIFF_RIGHT = 12, irobot::OI_PACKET_VIRTUAL_WALL = 13, irobot::OI_PACKET_WHEEL_OVERCURRENTS = 14, irobot::OI_PACKET_DIRT_DETECT = 15,
  irobot::OI_PACKET_IR_CHAR_OMNI = 17, irobot::OI_PACKET_BUTTONS = 18, irobot::OI_PACKET_DISTANCE = 19, irobot::OI_PACKET_ANGLE = 20,
  irobot::OI_PACKET_CHARGING_STATE = 21, irobot::OI_PACKET_VOLTAGE = 22, irobot::OI_PACKET_CURRENT = 23, irobot::OI_PACKET_TEMPERATURE = 24,
  irobot::OI_PACKET_BATTERY_CHARGE = 25, irobot::OI_PACKET_BATTERY_CAPACITY = 26, irobot::OI_PACKET_WALL_SIGNAL = 27, irobot::OI_PACKET_CLIFF_LEFT_SIGNAL = 28,
  irobot::OI_PACKET_CLIFF_FRONT_LEFT_SIGNAL = 29, irobot::OI_PACKET_CLIFF_FRONT_RIGHT_SIGNAL = 30, irobot::OI_PACKET_CLIFF_RIGHT_SIGNAL = 31, irobot::OI_PACKET_CHARGE_SOURCES = 34,
  irobot::OI_PACKET_OI_MODE = 35, irobot::OI_PACKET_SONG_NUMBER = 36, irobot::OI_PACKET_SONG_PLAYING = 37, irobot::OI_PACKET_STREAM_PACKETS = 38,
  irobot::OI_PACKET_REQ_VELOCITY = 39, irobot::OI_PACKET_REQ_RADIUS = 40, irobot::OI_PACKET_REQ_RIGHT_VELOCITY = 41, irobot::OI_PACKET_REQ_LEFT_VELOCITY = 42,
  irobot::OI_PACKET_RIGHT_ENCODER = 43, irobot::OI_PACKET_LEFT_ENCODER = 44, irobot::OI_PACKET_LIGHT_BUMPER = 45, irobot::OI_PACKET_LIGHT_BUMPER_LEFT = 46,
  irobot::OI_PACKET_LIGHT_BUMPER_FRONT_LEFT = 47, irobot::OI_PACKET_LIGHT_BUMPER_CENTER_LEFT = 48, irobot::OI_PACKET_LIGHT_BUMPER_CENTER_RIGHT = 49, irobot::OI_PACKET_LIGHT_BUMPER_FRONT_RIGHT = 50,
  irobot::OI_PACKET_LIGHT_BUMPER_RIGHT = 51, irobot::OI_PACKET_IR_CHAR_LEFT = 52, irobot::OI_PACKET_IR_CHAR_RIGHT = 53, irobot::OI_PACKET_LEFT_MOTOR_CURRENT = 54,
  irobot::OI_PACKET_RIGHT_MOTOR_CURRENT = 55, irobot::OI_PACKET_BRUSH_MOTOR_CURRENT = 56, irobot::OI_PACKET_SIDE_BRUSH_MOTOR_CURRENT = 57, irobot::OI_PACKET_STASIS = 58
}
 OI packet id. More...

Define Documentation

#define BUTTON_CLEAN   0

Definition at line 147 of file OpenInterface.h.

#define BUTTON_CLOCK   7

Definition at line 140 of file OpenInterface.h.

#define BUTTON_DAY   5

Definition at line 142 of file OpenInterface.h.

#define BUTTON_DOCK   2

Definition at line 145 of file OpenInterface.h.

#define BUTTON_HOUR   4

Definition at line 143 of file OpenInterface.h.

#define BUTTON_MINUTE   3

Definition at line 144 of file OpenInterface.h.

#define BUTTON_SCHEDULE   6

Definition at line 141 of file OpenInterface.h.

#define BUTTON_SPOT   1

Definition at line 146 of file OpenInterface.h.

#define CENTER_LEFT   4

Definition at line 133 of file OpenInterface.h.

#define CENTER_RIGHT   5

Definition at line 134 of file OpenInterface.h.

#define FORCE_FIELD   161

Definition at line 119 of file OpenInterface.h.

#define FRONT_LEFT   2

Definition at line 131 of file OpenInterface.h.

#define FRONT_RIGHT   3

Definition at line 132 of file OpenInterface.h.

#define GREEN_BUOY   164

Definition at line 120 of file OpenInterface.h.

#define GREEN_BUOY_FORCE_FIELD   165

Definition at line 121 of file OpenInterface.h.

#define LEFT   0

Definition at line 129 of file OpenInterface.h.

#define MAIN_BRUSH   2

Definition at line 136 of file OpenInterface.h.

#define MAX (   a,
 
)    ((a > b) ? (a) : (b))

Definition at line 170 of file OpenInterface.h.

#define MAX_PATH   32

Definition at line 163 of file OpenInterface.h.

#define MIN (   a,
 
)    ((a < b) ? (a) : (b))

Definition at line 167 of file OpenInterface.h.

#define NORMALIZE (   z)    atan2(sin(z), cos(z))

Definition at line 173 of file OpenInterface.h.

#define OI_CHARGING_CHARGING   2

Definition at line 113 of file OpenInterface.h.

#define OI_CHARGING_ERROR   5

Definition at line 116 of file OpenInterface.h.

#define OI_CHARGING_NO   0

Definition at line 111 of file OpenInterface.h.

#define OI_CHARGING_RECOVERY   1

Definition at line 112 of file OpenInterface.h.

#define OI_CHARGING_TRICKLE   3

Definition at line 114 of file OpenInterface.h.

#define OI_CHARGING_WAITING   4

Definition at line 115 of file OpenInterface.h.

#define OI_DELAY_MODECHANGE_MS   20

Definition at line 108 of file OpenInterface.h.

#define OI_MODE_FULL   3

Definition at line 105 of file OpenInterface.h.

#define OI_MODE_OFF   0

Definition at line 102 of file OpenInterface.h.

#define OI_MODE_PASSIVE   1

Definition at line 103 of file OpenInterface.h.

#define OI_MODE_SAFE   2

Definition at line 104 of file OpenInterface.h.

#define OI_PACKET_ANGLE_SIZE   2

Definition at line 65 of file OpenInterface.h.

Definition at line 71 of file OpenInterface.h.

Definition at line 70 of file OpenInterface.h.

Definition at line 97 of file OpenInterface.h.

Definition at line 51 of file OpenInterface.h.

#define OI_PACKET_BUTTONS_SIZE   1

Definition at line 63 of file OpenInterface.h.

Definition at line 77 of file OpenInterface.h.

Definition at line 66 of file OpenInterface.h.

Definition at line 74 of file OpenInterface.h.

Definition at line 54 of file OpenInterface.h.

Definition at line 75 of file OpenInterface.h.

Definition at line 55 of file OpenInterface.h.

Definition at line 73 of file OpenInterface.h.

#define OI_PACKET_CLIFF_LEFT_SIZE   1

Definition at line 53 of file OpenInterface.h.

Definition at line 76 of file OpenInterface.h.

Definition at line 56 of file OpenInterface.h.

#define OI_PACKET_CURRENT_SIZE   2

Definition at line 68 of file OpenInterface.h.

Definition at line 59 of file OpenInterface.h.

#define OI_PACKET_DISTANCE_SIZE   2

Definition at line 64 of file OpenInterface.h.

#define OI_PACKET_GROUP_0_SIZE   26

Definition at line 40 of file OpenInterface.h.

#define OI_PACKET_GROUP_100_SIZE   80

Definition at line 47 of file OpenInterface.h.

#define OI_PACKET_GROUP_101_SIZE   28

Definition at line 48 of file OpenInterface.h.

#define OI_PACKET_GROUP_106_SIZE   12

Definition at line 49 of file OpenInterface.h.

#define OI_PACKET_GROUP_107_SIZE   9

Definition at line 50 of file OpenInterface.h.

#define OI_PACKET_GROUP_1_SIZE   10

Definition at line 41 of file OpenInterface.h.

#define OI_PACKET_GROUP_2_SIZE   6

Definition at line 42 of file OpenInterface.h.

#define OI_PACKET_GROUP_3_SIZE   10

Definition at line 43 of file OpenInterface.h.

#define OI_PACKET_GROUP_4_SIZE   14

Definition at line 44 of file OpenInterface.h.

#define OI_PACKET_GROUP_5_SIZE   12

Definition at line 45 of file OpenInterface.h.

#define OI_PACKET_GROUP_6_SIZE   52

Definition at line 46 of file OpenInterface.h.

Definition at line 61 of file OpenInterface.h.

Definition at line 60 of file OpenInterface.h.

Definition at line 62 of file OpenInterface.h.

Definition at line 87 of file OpenInterface.h.

Definition at line 95 of file OpenInterface.h.

Definition at line 91 of file OpenInterface.h.

Definition at line 92 of file OpenInterface.h.

Definition at line 90 of file OpenInterface.h.

Definition at line 93 of file OpenInterface.h.

Definition at line 89 of file OpenInterface.h.

Definition at line 94 of file OpenInterface.h.

Definition at line 88 of file OpenInterface.h.

#define OI_PACKET_OI_MODE_SIZE   1

Definition at line 78 of file OpenInterface.h.

Definition at line 85 of file OpenInterface.h.

#define OI_PACKET_REQ_RADIUS_SIZE   2

Definition at line 83 of file OpenInterface.h.

Definition at line 84 of file OpenInterface.h.

Definition at line 82 of file OpenInterface.h.

Definition at line 86 of file OpenInterface.h.

Definition at line 96 of file OpenInterface.h.

Definition at line 98 of file OpenInterface.h.

Definition at line 79 of file OpenInterface.h.

Definition at line 80 of file OpenInterface.h.

#define OI_PACKET_STASIS_SIZE   1

Definition at line 99 of file OpenInterface.h.

Definition at line 81 of file OpenInterface.h.

Definition at line 69 of file OpenInterface.h.

Definition at line 57 of file OpenInterface.h.

#define OI_PACKET_VOLTAGE_SIZE   2

Definition at line 67 of file OpenInterface.h.

Definition at line 72 of file OpenInterface.h.

#define OI_PACKET_WALL_SIZE   1

Definition at line 52 of file OpenInterface.h.

Definition at line 58 of file OpenInterface.h.

#define OMNI   2

Definition at line 135 of file OpenInterface.h.

#define RED_BUOY   168

Definition at line 122 of file OpenInterface.h.

#define RED_BUOY_FORCE_FIELD   169

Definition at line 123 of file OpenInterface.h.

#define RED_BUOY_GREEN_BUOY   172

Definition at line 124 of file OpenInterface.h.

Definition at line 125 of file OpenInterface.h.

#define RIGHT   1

Definition at line 130 of file OpenInterface.h.

#define ROOMBA_AXLE_LENGTH   0.235

Definition at line 152 of file OpenInterface.h.

#define ROOMBA_BUMPER_X_OFFSET   0.050

Definition at line 150 of file OpenInterface.h.

#define ROOMBA_DIAMETER   0.330

Definition at line 151 of file OpenInterface.h.

#define ROOMBA_MAX_ANG_VEL_RAD_S   2

Definition at line 155 of file OpenInterface.h.

#define ROOMBA_MAX_ENCODER_COUNTS   65535

Roomba max encoder counts.

Definition at line 159 of file OpenInterface.h.

#define ROOMBA_MAX_LIN_VEL_MM_S   500

Definition at line 154 of file OpenInterface.h.

#define ROOMBA_MAX_RADIUS_MM   2000

Definition at line 156 of file OpenInterface.h.

#define ROOMBA_PULSES_TO_M   0.000445558279992234

Roomba encoder pulses to meter constant.

Definition at line 161 of file OpenInterface.h.

#define SIDE_BRUSH   3

Definition at line 137 of file OpenInterface.h.

#define VIRTUAL_WALL   162

Definition at line 126 of file OpenInterface.h.



roomba_500_series
Author(s): Gonçalo Cabrita
autogenerated on Mon Jan 6 2014 11:26:40