#include <perching_arm.h>
|
enum | Protocol {
PROTOCOL_WF_HEADER_1,
PROTOCOL_WF_HEADER_2,
PROTOCOL_WF_LENGTH,
PROTOCOL_WF_DATA,
PROTOCOL_WF_CHECKSUM
} |
|
enum | {
HOST_ARM_TELEMETRY_NULL = 0,
HOST_ARM_TELEMETRY_DC_GRIPPER_STATE = 1,
HOST_ARM_TELEMETRY_SERVO_JOINT_STATE = 2,
HOST_ARM_TELEMETRY_SERVO_JOINT_STATUS = 3,
HOST_ARM_TELEMETRY_ACK = 62,
HOST_ARM_TELEMETRY_PONG = 63,
HOST_ARM_TELEMETRY_BOARD_STATE = 64,
HOST_ARM_TELEMETRY_BOARD_INFO = 65,
HOST_ARM_TELEMETRY_LOG_MSG = 126,
HOST_ARM_TELEMETRY_ERROR_MSG = 127,
HOST_ARM_TELEMETRY_HOST_STATS = 140,
HOST_ARM_TELEMETRY_JOINT_STATS = 141
} |
|
enum | {
HOST_ARM_BASIC_CMD_NULL = 0,
HOST_ARM_BASIC_CMD_TILT_JOINT = 3,
HOST_ARM_BASIC_CMD_PAN_JOINT = 4,
HOST_ARM_BASIC_CMD_ALL_JOINTS = 6,
HOST_ARM_BASIC_CMD_RAW_MOTOR = 7,
HOST_ARM_BASIC_CMD_DC_GRIPPER = 8,
HOST_ARM_BASIC_CMD_POWER = 10,
HOST_ARM_BASIC_CMD_PING = 63,
HOST_ARM_BASIC_CMD_DUMP_HOST_STATS = 90,
HOST_ARM_BASIC_CMD_DUMP_JOINT_STATS = 91,
HOST_ARM_BASIC_CMD_RESET = 100,
HOST_ARM_BASIC_CMD_DUMP_LOG = 126,
HOST_ARM_BASIC_CMD_MAX = 127
} |
|
enum | {
HOST_ARM_DC_GRIPPER_FLAG_MOTOR_ENABLED = 0b00000001,
HOST_ARM_DC_GRIPPER_FLAG_MOTOR_HW_STATUS = 0b00000010,
HOST_ARM_DC_GRIPPER_FLAG_CALIBRATING = 0b00000100,
HOST_ARM_DC_GRIPPER_FLAG_CALIBRATED = 0b00001000,
HOST_ARM_DC_GRIPPER_FLAG_OVERLOAD = 0b00010000
} |
|
enum | { HOST_ARM_JOINT_BACKDRIVE_STATUS_NONE = 0,
HOST_ARM_JOINT_BACKDRIVE_STATUS_DETECTED = 1,
HOST_ARM_JOINT_BACKDRIVE_STATUS_ENDING = 2
} |
|
enum | {
HOST_ARM_SERVO_ERROR_FLAG_OVERLOAD = 0b00100000,
HOST_ARM_SERVO_ERROR_FLAG_ELEC_SHOCK = 0b00010000,
HOST_ARM_SERVO_ERROR_FLAG_ENCODER_ERR = 0b00001000,
HOST_ARM_SERVO_ERROR_FLAG_OVERTEMP = 0b00000100,
HOST_ARM_SERVO_ERROR_FLAG_VOLTAGE_ERR = 0b00000001
} |
|
enum | {
HOST_ARM_ACK_STATUS_NULL = -128,
HOST_ARM_ACK_STATUS_ERROR = -127,
HOST_ARM_ACK_STATUS_BUSY = -3,
HOST_ARM_ACK_STATUS_INVALID_ARG = -2,
HOST_ARM_ACK_STATUS_UNIMPLEMENTED = -1,
HOST_ARM_ACK_STATUS_PENDING = 0,
HOST_ARM_ACK_STATUS_CONFIRMED,
HOST_ARM_ACK_STATUS_DONE = 2
} |
|
enum | {
HOST_ARM_RESET_REASON_TRAP = 0b1000000000000000,
HOST_ARM_RESET_REASON_IOP = 0b0100000000000000,
HOST_ARM_RESET_REASON_CM = 0b0000001000000000,
HOST_ARM_RESET_REASON_EXT = 0b0000000010000000,
HOST_ARM_RESET_REASON_SW = 0b0000000001000000,
HOST_ARM_RESET_REASON_WD = 0b0000000000010000,
HOST_ARM_RESET_REASON_BRNOUT = 0b0000000000000010,
HOST_ARM_RESET_REASON_PWRON = 0b0000000000000001
} |
|
enum | { HOST_ARM_BOARD_FLAG_HAS_LOGMSG = 0b00000001
} |
|
◆ anonymous enum
Enumerator |
---|
HOST_ARM_TELEMETRY_NULL | |
HOST_ARM_TELEMETRY_DC_GRIPPER_STATE | |
HOST_ARM_TELEMETRY_SERVO_JOINT_STATE | |
HOST_ARM_TELEMETRY_SERVO_JOINT_STATUS | |
HOST_ARM_TELEMETRY_ACK | |
HOST_ARM_TELEMETRY_PONG | |
HOST_ARM_TELEMETRY_BOARD_STATE | |
HOST_ARM_TELEMETRY_BOARD_INFO | |
HOST_ARM_TELEMETRY_LOG_MSG | |
HOST_ARM_TELEMETRY_ERROR_MSG | |
HOST_ARM_TELEMETRY_HOST_STATS | |
HOST_ARM_TELEMETRY_JOINT_STATS | |
◆ anonymous enum
Enumerator |
---|
HOST_ARM_BASIC_CMD_NULL | |
HOST_ARM_BASIC_CMD_TILT_JOINT | |
HOST_ARM_BASIC_CMD_PAN_JOINT | |
HOST_ARM_BASIC_CMD_ALL_JOINTS | |
HOST_ARM_BASIC_CMD_RAW_MOTOR | |
HOST_ARM_BASIC_CMD_DC_GRIPPER | |
HOST_ARM_BASIC_CMD_POWER | |
HOST_ARM_BASIC_CMD_PING | |
HOST_ARM_BASIC_CMD_DUMP_HOST_STATS | |
HOST_ARM_BASIC_CMD_DUMP_JOINT_STATS | |
HOST_ARM_BASIC_CMD_RESET | |
HOST_ARM_BASIC_CMD_DUMP_LOG | |
HOST_ARM_BASIC_CMD_MAX | |
◆ anonymous enum
Enumerator |
---|
HOST_ARM_DC_GRIPPER_FLAG_MOTOR_ENABLED | |
HOST_ARM_DC_GRIPPER_FLAG_MOTOR_HW_STATUS | |
HOST_ARM_DC_GRIPPER_FLAG_CALIBRATING | |
HOST_ARM_DC_GRIPPER_FLAG_CALIBRATED | |
HOST_ARM_DC_GRIPPER_FLAG_OVERLOAD | |
◆ anonymous enum
Enumerator |
---|
HOST_ARM_JOINT_BACKDRIVE_STATUS_NONE | |
HOST_ARM_JOINT_BACKDRIVE_STATUS_DETECTED | |
HOST_ARM_JOINT_BACKDRIVE_STATUS_ENDING | |
◆ anonymous enum
Enumerator |
---|
HOST_ARM_SERVO_ERROR_FLAG_OVERLOAD | |
HOST_ARM_SERVO_ERROR_FLAG_ELEC_SHOCK | |
HOST_ARM_SERVO_ERROR_FLAG_ENCODER_ERR | |
HOST_ARM_SERVO_ERROR_FLAG_OVERTEMP | |
HOST_ARM_SERVO_ERROR_FLAG_VOLTAGE_ERR | |
◆ anonymous enum
Enumerator |
---|
HOST_ARM_ACK_STATUS_NULL | |
HOST_ARM_ACK_STATUS_ERROR | |
HOST_ARM_ACK_STATUS_BUSY | |
HOST_ARM_ACK_STATUS_INVALID_ARG | |
HOST_ARM_ACK_STATUS_UNIMPLEMENTED | |
HOST_ARM_ACK_STATUS_PENDING | |
HOST_ARM_ACK_STATUS_CONFIRMED | |
HOST_ARM_ACK_STATUS_DONE | |
◆ anonymous enum
Enumerator |
---|
HOST_ARM_RESET_REASON_TRAP | |
HOST_ARM_RESET_REASON_IOP | |
HOST_ARM_RESET_REASON_CM | |
HOST_ARM_RESET_REASON_EXT | |
HOST_ARM_RESET_REASON_SW | |
HOST_ARM_RESET_REASON_WD | |
HOST_ARM_RESET_REASON_BRNOUT | |
HOST_ARM_RESET_REASON_PWRON | |
◆ anonymous enum
Enumerator |
---|
HOST_ARM_BOARD_FLAG_HAS_LOGMSG | |
◆ Protocol
Enumerator |
---|
PROTOCOL_WF_HEADER_1 | |
PROTOCOL_WF_HEADER_2 | |
PROTOCOL_WF_LENGTH | |
PROTOCOL_WF_DATA | |
PROTOCOL_WF_CHECKSUM | |
◆ PerchingArm()
perching_arm::PerchingArm::PerchingArm |
( |
| ) |
|
◆ CalibrateGripper()
◆ Checksum()
uint8_t perching_arm::PerchingArm::Checksum |
( |
const uint8_t * |
buf, |
|
|
size_t |
len |
|
) |
| |
|
protected |
◆ CloseGripper()
◆ Connect()
◆ DisableGripper()
◆ Disconnect()
void perching_arm::PerchingArm::Disconnect |
( |
| ) |
|
◆ EnableGripper()
◆ FiniteStateMachine()
void perching_arm::PerchingArm::FiniteStateMachine |
( |
uint8_t const & |
c | ) |
|
|
protected |
◆ HardReset()
◆ OpenGripper()
◆ Process()
void perching_arm::PerchingArm::Process |
( |
const uint8_t * |
buf | ) |
|
|
protected |
◆ ProcessBoardInfoTelemetry()
void perching_arm::PerchingArm::ProcessBoardInfoTelemetry |
( |
const host_arm_board_info_telemetry_t * |
packet | ) |
|
|
protected |
◆ ProcessBoardStateTelemetry()
void perching_arm::PerchingArm::ProcessBoardStateTelemetry |
( |
const host_arm_board_state_telemetry_t * |
packet | ) |
|
|
protected |
◆ ProcessErrorMsgTelemetry()
void perching_arm::PerchingArm::ProcessErrorMsgTelemetry |
( |
const host_arm_error_msg_telemetry_t * |
packet | ) |
|
|
protected |
◆ ProcessGripperStateTelemetry()
void perching_arm::PerchingArm::ProcessGripperStateTelemetry |
( |
const host_arm_dc_gripper_state_telemetry_t * |
packet | ) |
|
|
protected |
◆ ProcessPacket()
void perching_arm::PerchingArm::ProcessPacket |
( |
const uint8_t * |
buffer, |
|
|
size_t |
length, |
|
|
double |
curr_time |
|
) |
| |
◆ ProcessServoJointStateTelemetry()
void perching_arm::PerchingArm::ProcessServoJointStateTelemetry |
( |
const host_arm_servo_joint_state_telemetry_t * |
packet | ) |
|
|
protected |
◆ ProcessServoJointStatusTelemetry()
void perching_arm::PerchingArm::ProcessServoJointStatusTelemetry |
( |
const host_arm_servo_joint_status_telemetry_t * |
packet | ) |
|
|
protected |
◆ Read()
void perching_arm::PerchingArm::Read |
( |
const uint8_t * |
buffer, |
|
|
size_t |
len |
|
) |
| |
|
protected |
◆ ResultToString()
bool perching_arm::PerchingArm::ResultToString |
( |
PerchingArmResult |
result, |
|
|
std::string & |
msg |
|
) |
| |
◆ SendCommand()
PerchingArmResult perching_arm::PerchingArm::SendCommand |
( |
uint8_t |
target, |
|
|
int16_t |
address, |
|
|
int16_t |
value |
|
) |
| |
◆ SetDistalDisabled()
◆ SetDistalEnabled()
◆ SetDistalPosition()
◆ SetDistalVelocity()
◆ SetGripperPosition()
◆ SetProximalDisabled()
◆ SetProximalEnabled()
◆ SetProximalPosition()
◆ SetProximalVelocity()
◆ Shutdown()
void perching_arm::PerchingArm::Shutdown |
( |
void |
| ) |
|
|
protected |
◆ SoftReset()
◆ Timeout()
void perching_arm::PerchingArm::Timeout |
( |
void |
| ) |
|
|
protected |
◆ ADDRESS_DISABLE
constexpr int16_t perching_arm::PerchingArm::ADDRESS_DISABLE = 4 |
|
staticconstexprprotected |
◆ ADDRESS_ENABLE
constexpr int16_t perching_arm::PerchingArm::ADDRESS_ENABLE = 3 |
|
staticconstexprprotected |
◆ ADDRESS_GRIPPER_CALIBRATE
constexpr int16_t perching_arm::PerchingArm::ADDRESS_GRIPPER_CALIBRATE = 51 |
|
staticconstexprprotected |
◆ ADDRESS_GRIPPER_CLOSE
constexpr int16_t perching_arm::PerchingArm::ADDRESS_GRIPPER_CLOSE = 53 |
|
staticconstexprprotected |
◆ ADDRESS_GRIPPER_DISABLE
constexpr int16_t perching_arm::PerchingArm::ADDRESS_GRIPPER_DISABLE = 100 |
|
staticconstexprprotected |
◆ ADDRESS_GRIPPER_ENABLE
constexpr int16_t perching_arm::PerchingArm::ADDRESS_GRIPPER_ENABLE = 101 |
|
staticconstexprprotected |
◆ ADDRESS_GRIPPER_OPEN
constexpr int16_t perching_arm::PerchingArm::ADDRESS_GRIPPER_OPEN = 52 |
|
staticconstexprprotected |
◆ ADDRESS_GRIPPER_RESET
constexpr int16_t perching_arm::PerchingArm::ADDRESS_GRIPPER_RESET = 55 |
|
staticconstexprprotected |
◆ ADDRESS_GRIPPER_SET
constexpr int16_t perching_arm::PerchingArm::ADDRESS_GRIPPER_SET = 54 |
|
staticconstexprprotected |
◆ ADDRESS_POSITION
constexpr int16_t perching_arm::PerchingArm::ADDRESS_POSITION = 1 |
|
staticconstexprprotected |
◆ ADDRESS_RESET
constexpr int16_t perching_arm::PerchingArm::ADDRESS_RESET = 10 |
|
staticconstexprprotected |
◆ ADDRESS_TORQUE_LIMIT
constexpr int16_t perching_arm::PerchingArm::ADDRESS_TORQUE_LIMIT = 34 |
|
staticconstexprprotected |
◆ ADDRESS_VELOCITY
constexpr int16_t perching_arm::PerchingArm::ADDRESS_VELOCITY = 2 |
|
staticconstexprprotected |
◆ DEPLOY_DIST
constexpr int16_t perching_arm::PerchingArm::DEPLOY_DIST = 0 |
|
staticconstexpr |
◆ DEPLOY_PROX
constexpr int16_t perching_arm::PerchingArm::DEPLOY_PROX = -90 |
|
staticconstexpr |
◆ DIST_POS_MAX
constexpr int16_t perching_arm::PerchingArm::DIST_POS_MAX = 90 |
|
staticconstexpr |
◆ DIST_POS_MIN
constexpr int16_t perching_arm::PerchingArm::DIST_POS_MIN = -90 |
|
staticconstexpr |
◆ DIST_VEL_MAX
constexpr int16_t perching_arm::PerchingArm::DIST_VEL_MAX = 20 |
|
staticconstexpr |
◆ DIST_VEL_MIN
constexpr int16_t perching_arm::PerchingArm::DIST_VEL_MIN = 0 |
|
staticconstexpr |
◆ GRIP_CALIBRATE
constexpr int16_t perching_arm::PerchingArm::GRIP_CALIBRATE = -100 |
|
staticconstexpr |
◆ GRIP_L_D_MAX
constexpr int16_t perching_arm::PerchingArm::GRIP_L_D_MAX = -40 |
|
staticconstexpr |
◆ GRIP_L_D_MIN
constexpr int16_t perching_arm::PerchingArm::GRIP_L_D_MIN = -70 |
|
staticconstexpr |
◆ GRIP_L_P_MAX
constexpr int16_t perching_arm::PerchingArm::GRIP_L_P_MAX = 40 |
|
staticconstexpr |
◆ GRIP_L_P_MIN
constexpr int16_t perching_arm::PerchingArm::GRIP_L_P_MIN = 20 |
|
staticconstexpr |
◆ GRIP_POS_MAX
constexpr int16_t perching_arm::PerchingArm::GRIP_POS_MAX = 0 |
|
staticconstexpr |
◆ GRIP_POS_MIN
constexpr int16_t perching_arm::PerchingArm::GRIP_POS_MIN = -100 |
|
staticconstexpr |
◆ GRIP_R_D_MAX
constexpr int16_t perching_arm::PerchingArm::GRIP_R_D_MAX = 40 |
|
staticconstexpr |
◆ GRIP_R_D_MIN
constexpr int16_t perching_arm::PerchingArm::GRIP_R_D_MIN = 70 |
|
staticconstexpr |
◆ GRIP_R_P_MAX
constexpr int16_t perching_arm::PerchingArm::GRIP_R_P_MAX = -40 |
|
staticconstexpr |
◆ GRIP_R_P_MIN
constexpr int16_t perching_arm::PerchingArm::GRIP_R_P_MIN = -20 |
|
staticconstexpr |
◆ K_CURRENT_11V
constexpr double perching_arm::PerchingArm::K_CURRENT_11V = 3.3 / (1024.0 * 0.75) |
|
staticconstexpr |
◆ K_CURRENT_5V
constexpr double perching_arm::PerchingArm::K_CURRENT_5V = 3.3 / (1024.0) |
|
staticconstexpr |
◆ K_LOAD_GRIPPER_MA
constexpr double perching_arm::PerchingArm::K_LOAD_GRIPPER_MA = 3.3 / (1024.0 * 0.525) |
|
staticconstexpr |
◆ K_LOAD_JOINT_MA
constexpr double perching_arm::PerchingArm::K_LOAD_JOINT_MA = 2.690 |
|
staticconstexpr |
◆ K_LOOP_TIME_MS
constexpr double perching_arm::PerchingArm::K_LOOP_TIME_MS = 1.0 |
|
staticconstexpr |
◆ K_MOTOR_VOLTAGE
constexpr double perching_arm::PerchingArm::K_MOTOR_VOLTAGE = 11.0 |
|
staticconstexpr |
◆ K_POSITION_DEG
constexpr double perching_arm::PerchingArm::K_POSITION_DEG = 0.088 |
|
staticconstexpr |
◆ K_TEMPERATURE_DEG
constexpr double perching_arm::PerchingArm::K_TEMPERATURE_DEG = 1.0 / 100.0 |
|
staticconstexpr |
◆ K_VELOCITY_RPM
constexpr double perching_arm::PerchingArm::K_VELOCITY_RPM = 0.229 |
|
staticconstexpr |
◆ PAN_MAX
constexpr int16_t perching_arm::PerchingArm::PAN_MAX = 90 |
|
staticconstexpr |
◆ PAN_MIN
constexpr int16_t perching_arm::PerchingArm::PAN_MIN = -90 |
|
staticconstexpr |
◆ PROTOCOL_HEADER_1
constexpr uint8_t perching_arm::PerchingArm::PROTOCOL_HEADER_1 = 0xFF |
|
staticconstexprprotected |
◆ PROTOCOL_HEADER_2
constexpr uint8_t perching_arm::PerchingArm::PROTOCOL_HEADER_2 = 0xFE |
|
staticconstexprprotected |
◆ PROX_POS_MAX
constexpr int16_t perching_arm::PerchingArm::PROX_POS_MAX = 90 |
|
staticconstexpr |
◆ PROX_POS_MIN
constexpr int16_t perching_arm::PerchingArm::PROX_POS_MIN = -120 |
|
staticconstexpr |
◆ PROX_VEL_MAX
constexpr int16_t perching_arm::PerchingArm::PROX_VEL_MAX = 20 |
|
staticconstexpr |
◆ PROX_VEL_MIN
constexpr int16_t perching_arm::PerchingArm::PROX_VEL_MIN = 0 |
|
staticconstexpr |
◆ STOW_DIST
constexpr int16_t perching_arm::PerchingArm::STOW_DIST = 0 |
|
staticconstexpr |
◆ STOW_PROX
constexpr int16_t perching_arm::PerchingArm::STOW_PROX = 90 |
|
staticconstexpr |
◆ TARGET_DISTAL
constexpr int16_t perching_arm::PerchingArm::TARGET_DISTAL = 1 |
|
staticconstexprprotected |
◆ TARGET_GRIPPER
constexpr int16_t perching_arm::PerchingArm::TARGET_GRIPPER = 4 |
|
staticconstexprprotected |
◆ TARGET_POWER
constexpr int16_t perching_arm::PerchingArm::TARGET_POWER = 2 |
|
staticconstexprprotected |
◆ TARGET_PROXIMAL
constexpr int16_t perching_arm::PerchingArm::TARGET_PROXIMAL = 0 |
|
staticconstexprprotected |
◆ TARGET_RESET
constexpr int16_t perching_arm::PerchingArm::TARGET_RESET = 10 |
|
staticconstexprprotected |
◆ TARGET_TORQUE
constexpr int16_t perching_arm::PerchingArm::TARGET_TORQUE = 3 |
|
staticconstexprprotected |
◆ TILT_MAX
constexpr int16_t perching_arm::PerchingArm::TILT_MAX = 0 |
|
staticconstexpr |
◆ TILT_MIN
constexpr int16_t perching_arm::PerchingArm::TILT_MIN = -120 |
|
staticconstexpr |
◆ VALUE_POWER_DISABLE
constexpr int16_t perching_arm::PerchingArm::VALUE_POWER_DISABLE = 0 |
|
staticconstexprprotected |
◆ VALUE_POWER_ENABLE
constexpr int16_t perching_arm::PerchingArm::VALUE_POWER_ENABLE = 1 |
|
staticconstexprprotected |
The documentation for this class was generated from the following files: