syntax="proto3"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "clone_client/proto/data_types.proto"; package clone.state_store; service StateStoreReceiverGRPC { rpc SubscribeTelemetry (google.protobuf.Empty) returns (stream TelemetryDataResponse); rpc GetTelemetry (google.protobuf.Empty) returns (TelemetryDataResponse); rpc GetSystemInfo (google.protobuf.Empty) returns (SystemInfoResponse); rpc Ping (google.protobuf.Empty) returns (google.protobuf.Empty); rpc GetErrors(google.protobuf.Empty) returns (clone.data_types.ErrorList); } message IMUData { enum SignalState { UNKNOWN = 0; /**< Unknown / uninitialized */ VALID = 1; /**< Healthy and trusted */ SUSPECT = 2; /**< Usable but near limits */ RECONFIG_FAILED = 3; /**< Last re-config attempt failed; using previous settings */ INVALID = 4; /**< Fails gating or plausibility checks */ NOT_AVAILABLE = 5; /**< No fresh data or sensor inactive */ UNDER_CALIBRATION = 6; /**< Under user calibration */ INIT = 7; /**< Initialization value / default */ } enum CalibrationStatusValue { UNKNOWN_OR_NOT_CALIBRATED = 0; POOR = 1; OK = 2; GOOD = 3; ONGOING = 4; } message CalibrationStatusPacked { CalibrationStatusValue mag_calib_status = 1; CalibrationStatusValue acc_calib_status = 2; CalibrationStatusValue gyr_calib_status = 3; uint32 gyr_time_since_last_bias_calib_ms = 4; } uint32 node_id=1; float w=2; float x=3; float y=4; float z=5; // 6, 7, 8 SignalState signal_state = 9; CalibrationStatusPacked calibration_status = 10; } message MagneticSensor { message MagneticPixel { int32 x=1; int32 y=2; int32 z=3; } repeated MagneticPixel pixels = 1; int32 temperature = 5; } message GaussRiderRaw { uint32 node_id=1; MagneticSensor sensor=2; } message SensorData { repeated float pressures=1; repeated IMUData imu=2; // repeated MagneticHubRaw magnetic_data=3; // Unprocessed magnetic hub's data - currently also here repeated GaussRiderRaw gauss_rider_data=4; // Unprocessed gauss rider's data map bfields=5; } message Quaternion { double w = 1; double x = 2; double y = 3; double z = 4; } message PoseEstimationData { map pose_estimation = 1; } message Mat3 { Vec3 col0 = 1; Vec3 col1 = 2; Vec3 col2 = 3; } message AxisToHingeBindings { map axis_to_hinge_bindings = 1; } message JointFrames { message Frame { Mat3 r_wj = 1; Vec3 origin_w = 2; } map frames = 1; } message SensorGeometry { Mat3 frame_wS = 1; Vec3 origin_w = 2; } message MagnetGeometry { Vec3 origin_w = 1; Vec3 base_z_in_sensor = 2; } message DipoleSeed { Vec3 position = 1; Vec3 direction = 2; } message SensorMapping { string clone_sensor_id = 1; Vec3 magnet_local_axis = 2; bool sensor_magnet_inversion = 3; Mat3 R_corr = 4; } message JointModelInfo { message JointModel { JointFrames joint_frames = 1; SensorGeometry sensor = 2; MagnetGeometry magnet = 3; DipoleSeed dipole = 4; SensorMapping mapping = 5; repeated AxisToHingeBindings axis_to_hinge_bindings = 6; } map joints = 1; } message TelemetryData { SensorData sensor_data=1; google.protobuf.Timestamp time_since_start=3; PoseEstimationData pose_estimation=4; } message Bfield { repeated double bfield=1; // Bfield vector, pxs: 0, 1, 2, 3, axes: x, y, z, in teslas } message TelemetryDataResponse { TelemetryData data = 1; clone.data_types.ServerResponse response_data=2; } enum TelemetryConfig { PRESSURE = 0; IMU = 1; ALL = 2; } message PressureSensorCalibration { int32 min = 1; int32 max = 2; } message CalibrationData { repeated PressureSensorCalibration pressure_sensors=1; } message Vec3 { double x = 1; double y = 2; double z = 3; } message Joint { message Axis { // 1; optional Vec3 axis = 2; } map axes = 1; } // Joint with information on what nodes are used to estimate it message JointExt { Joint joint = 1; repeated uint32 node_ids = 2; } message PoseEstimationInfo { message MagInterpInfo { message MagMapPosition { repeated double angles_rad = 1; // 2vec of angles repeated double bfields_teslas = 2; // 12vec of bfields } message MagMapJointEntry { optional string axis0name = 1; optional string axis1name = 2; uint32 gauss_rider_id = 3; // nodeid of corresponding gauss rider repeated MagMapPosition angle_bfield_points = 4; } map magmap = 1; } // 1; map joints=2; optional MagInterpInfo maginterp = 3; } message SystemInfo { message MuscleInfo { uint32 index = 1; uint32 node_id = 2; uint32 channel_id = 3; } map muscles=2; // 3; CalibrationData calibration_data=4; TelemetryConfig telemetry_config=5; optional PoseEstimationInfo pose_estimation=6; optional JointModelInfo joint_model_info=7; } message SystemInfoResponse { SystemInfo info=1; clone.data_types.ServerResponse response=2; }