diff --git a/protobuf_definitions/message_formats.proto b/protobuf_definitions/message_formats.proto index d3bb1b4b..05c06df6 100644 --- a/protobuf_definitions/message_formats.proto +++ b/protobuf_definitions/message_formats.proto @@ -320,6 +320,68 @@ message Gripper { ManipulatorPose moving_to = 8; // Named pose the arm is moving towards, if any. } +// Hardware status flags a device of a Reach Robotics gripper raises about itself, named as Reach names them. +// A gripper of another make would need flags of its own. +message ReachHardwareStatus { + bool flash_failed_read = 1; // Reading the device's flash memory failed. + bool over_humidity = 2; // Humidity in the housing is too high: water may have got in. + bool over_temperature = 3; // The housing is too hot. + bool comms_serial_error = 4; // Error on the serial line. + bool comms_crc_error = 5; // A packet failed its checksum. + bool motor_driver_fault = 6; // The motor driver reports a fault. + bool encoder_position_error = 7; // The position encoder reads an invalid position. + bool encoder_not_detected = 8; // The position encoder is not detected. + bool device_axis_conflict = 9; // Another device has the same axis. + bool motor_not_connected = 10; // The motor is not connected. + bool motor_over_current = 11; // The motor draws too much current. + bool input_encoder_position_error = 12; // The input encoder reads an invalid position. + bool device_id_conflict = 13; // Another device has the same ID. + bool over_pressure = 14; // Pressure in the housing is too high: the seal may have failed. + bool motor_driver_over_current_and_under_voltage = 15; // Over current or under voltage in the motor driver. + bool motor_driver_over_temperature = 16; // The motor driver is too hot. + bool joint_service_due = 17; // The device is due for service. + bool encoder_fault = 18; // The position encoder reports a fault. + bool low_supply_voltage = 19; // The supply voltage is too low. + bool position_report_not_received = 20; // A position report the device waits for has not arrived. +} + +// Health of one device of a gripper: a joint, or a device of its own. +// +// A value the device did not report is 0, with its is_*_valid false. +message GripperDeviceDiagnostics { + uint32 address = 1; // Address of the device on the gripper's bus. On a Reach Robotics arm, 1 is the jaws. + float supply_voltage = 2; // Supply voltage (V). + bool is_supply_voltage_valid = 8; // True when the device reported its supply voltage. + float temperature = 3; // Temperature in the housing (°C). + bool is_temperature_valid = 9; // True when the device reported the temperature in its housing. + float humidity = 4; // Relative humidity in the housing (%). + bool is_humidity_valid = 10; // True when the device reported the humidity in its housing. + float internal_pressure = 5; // Absolute pressure in the housing (bar), a partial vacuum: a rise can mean a leak. + bool is_internal_pressure_valid = 11; // True when the device reported the pressure in its housing. + float current = 6; // Motor current (A). + bool is_current_valid = 12; // True when the device reported its motor current. + // Flags the device reported, and those it raised since the last report. + // Not set if the device sent no hardware status. + ReachHardwareStatus hardware_status = 7; +} + +// Identity of a gripper: what it is, and what it reports of itself. +// +// A value the gripper does not report is empty. +message GripperInfo { + GuestPortNumber guest_port_number = 1; // Guest port the gripper is on. + GuestPortDeviceID device_id = 2; // What the gripper is, as its guest-port connector names it. + string serial_number = 3; // Serial number of the gripper, such as 5854. + string model_number = 4; // Model number of the gripper, such as 5001 for a Reach Alpha 5 or 2130 for a Reach Alpha 2. + string firmware_version = 5; // Firmware version of the gripper, such as 5.2.0. +} + +// Health of a gripper and its devices, for diagnostics. +message GripperDiagnostics { + repeated GripperDeviceDiagnostics devices = 1; // One for each device of the gripper that answered. + GuestPortNumber guest_port_number = 2; // Guest port the gripper is on. +} + // Information about a remote client. message ClientInfo { string type = 1; // The type of client (such as Blueye App, Observer App, SDK, etc). diff --git a/protobuf_definitions/telemetry.proto b/protobuf_definitions/telemetry.proto index d51326d7..f693a6db 100644 --- a/protobuf_definitions/telemetry.proto +++ b/protobuf_definitions/telemetry.proto @@ -273,6 +273,18 @@ message GripperTel { Gripper gripper = 1; // Gripper state. } +// Identity of a gripper, published every minute for each connected gripper. +// With several grippers, GetTelemetryReq returns the one that published last: its guest port tells which. +message GripperInfoTel { + GripperInfo gripper_info = 1; // Gripper identity. +} + +// Health of a gripper, published every few seconds for each connected gripper that reports it. +// With several grippers, GetTelemetryReq returns the one that published last: its guest port tells which. +message GripperDiagnosticsTel { + GripperDiagnostics gripper_diagnostics = 1; // Gripper diagnostics. +} + // GuestPort current readings. message GuestPortCurrentTel { GuestPortCurrent current = 1; // Guest port current readings.