Public Types |
enum | _miniQaction {
MQ_ACTION_GET_VERSION = 1,
MQ_ACTION_DRIVE = 2,
MQ_ACTION_DRIVE_DIRECT = 3,
MQ_ACTION_GET_ODOMETRY = 4,
MQ_ACTION_GET_ENCODER_PULSES = 5,
MQ_ACTION_GET_WHEEL_VELOCITIES = 6,
MQ_ACTION_GET_GAS_SENSOR = 7,
MQ_ACTION_GET_IR_BUMPER = 8,
MQ_ACTION_GET_LINE_SENSOR = 9,
MQ_ACTION_GET_BATTERY = 10,
MQ_ACTION_GET_DEBUG = 11,
MQ_ACTION_SET_DEBUG = 12,
MQ_ACTION_SET_PID_GAINS = 13,
MQ_ACTION_GET_PID_GAINS = 14,
MQ_ACTION_SET_ODOMETRY_CALIBRATION = 15,
MQ_ACTION_GET_ODOMETRY_CALIBRATION = 16,
MQ_ACTION_SET_ID = 17,
MQ_ACTION_GET_ID = 18,
MQ_ACTION_SET_MODE = 19,
MQ_ACTION_GET_MODE = 20,
MQ_ACTION_SET_GAS_CALIBRATION = 21,
MQ_ACTION_GET_GAS_CALIBRATION = 22,
MQ_ACTION_SET_BATTERY_TYPE = 23,
MQ_ACTION_GET_BATTERY_TYPE = 24,
MQ_ACTION_SET_TIMEOUT = 25,
MQ_ACTION_GET_TIMEOUT = 26,
MQ_ACTION_GET_GROUP_1 = 27,
MQ_ACTION_GET_GROUP_2 = 28,
MQ_ACTION_COUNT = 29
} |
| miniQ actions More...
|
enum | _miniQPID { LeftStartingPID = 0,
LeftRunningPID = 1,
RightStartingPID = 2,
RightRunningPID = 3
} |
typedef enum miniQ::_miniQaction | miniQaction |
| miniQ actions
|
typedef enum miniQ::_miniQPID | miniQPID |
Public Member Functions |
bool | checkVersion () |
| This function asks the firmware version from the miniQ robot.
|
double | getAngularVelocity () |
| Getter for the robot angular velocity.
|
double | getGas () |
| Getter for the gas sensor reading.
|
int | getID () |
double | getLeftWheelVelocity () |
| Getter for the left wheel velocity.
|
double | getLinearVelocity () |
| Getter for the robot linear velocity.
|
double | getRawGas () |
| Getter for the gas sensor reading.
|
double | getRightWheelVelocity () |
| Getter for the right wheel velocity.
|
double | getX () |
double | getY () |
double | getYaw () |
| miniQ () |
bool | setBatteryType (int battery_type) |
bool | setGasSensorCallibration (double a, double b) |
void | setId (int id) |
bool | setMode (int mode) |
bool | setOdometryCallibration (double odometry_d, double odometry_yaw) |
bool | setPIDGains (int kp, int ki, int kd, miniQPID pid) |
void | setPWM (int left_pwm, int left_dir, int right_pwm, int right_dir) |
bool | setTimeout (double timeout) |
void | setVelocities (double linear_velocity, double angular_velocity) |
| This function allows to send velocity commands to the velocity controllers.
|
bool | update () |
| This function communicates with the robot to update the odometry and gas sensor data.
|
bool | updateVelocities () |
| This function pushes the velocities in memory to the robot.
|
bool | updateWheelVelocities () |
| ~miniQ () |
Static Public Member Functions |
static bool | openPort (char *port, int baudrate) |
| This function opens the virtual comm to the miniQ robot.
|
static int | scanForId (int id) |
Private Attributes |
double | angular_velocity_ |
| Angular velocity.
|
double | gas_ |
| Gas.
|
double | gas_raw_ |
| Raw gas.
|
int | id_ |
| Robot id.
|
double | left_wheel_velocity_ |
| Left wheel velocity.
|
double | linear_velocity_ |
| Velocity in x.
|
double | right_wheel_velocity_ |
| Right wheel velocity.
|
double | x_ |
| Position in x.
|
double | y_ |
| Position in y.
|
double | yaw_ |
| Yaw.
|
Static Private Attributes |
static cereal::CerealPort | serial_port |
Definition at line 44 of file miniQ.h.