From ac7c9ceea69d1a4a4e033ea73e43e1ed240c4b5b Mon Sep 17 00:00:00 2001 From: Ildar Sadykov Date: Thu, 8 Aug 2019 16:29:01 +0300 Subject: [PATCH 1/2] Added telemetry requests. Added: 1. AttitudeAngularSpeed: current angular speed from ATTITUDE_QUATERNION message. See https://mavlink.io/en/messages/common.html#ATTITUDE_QUATERNION 2. ActuatorControlTarget: current vehicle attitude and body angular rates. See https://mavlink.io/en/messages/common.html#SET_ACTUATOR_CONTROL_TARGET 3. ActuatorOutputStatus: current raw values of the actuator outputs. See https://mavlink.io/en/messages/common.html#ACTUATOR_OUTPUT_STATUS --- protos/telemetry/telemetry.proto | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/protos/telemetry/telemetry.proto b/protos/telemetry/telemetry.proto index c450823b3..ad0202242 100644 --- a/protos/telemetry/telemetry.proto +++ b/protos/telemetry/telemetry.proto @@ -12,6 +12,7 @@ service TelemetryService { rpc SubscribeArmed(SubscribeArmedRequest) returns(stream ArmedResponse) {} rpc SubscribeAttitudeQuaternion(SubscribeAttitudeQuaternionRequest) returns(stream AttitudeQuaternionResponse) {} rpc SubscribeAttitudeEuler(SubscribeAttitudeEulerRequest) returns(stream AttitudeEulerResponse) {} + rpc SubscribeAttitudeAngularSpeed(SubscribeAttitudeAngularSpeedRequest) returns(stream AttitudeAngularSpeedResponse) {} rpc SubscribeCameraAttitudeQuaternion(SubscribeCameraAttitudeQuaternionRequest) returns(stream CameraAttitudeQuaternionResponse) {} rpc SubscribeCameraAttitudeEuler(SubscribeCameraAttitudeEulerRequest) returns(stream CameraAttitudeEulerResponse) {} rpc SubscribeGroundSpeedNed(SubscribeGroundSpeedNedRequest) returns(stream GroundSpeedNedResponse) {} @@ -21,6 +22,8 @@ service TelemetryService { rpc SubscribeHealth(SubscribeHealthRequest) returns(stream HealthResponse) {} rpc SubscribeRcStatus(SubscribeRcStatusRequest) returns(stream RcStatusResponse) {} rpc SubscribeStatusText(SubscribeStatusTextRequest) returns(stream StatusTextResponse) {} + rpc SubscribeActuatorControlTarget(SubscribeActuatorControlTargetRequest) returns(stream ActuatorControlTargetResponse) {} + rpc SubscribeActuatorOutputStatus(SubscribeActuatorOutputStatusRequest) returns(stream ActuatorOutputStatusResponse) {} } message SubscribePositionRequest {} @@ -53,6 +56,11 @@ message AttitudeEulerResponse { EulerAngle attitude_euler = 1; } +message SubscribeAttitudeAngularSpeedRequest {} +message AttitudeAngularSpeedResponse { + AngularSpeed attitude_angular_speed = 1; +} + message SubscribeCameraAttitudeQuaternionRequest {} message CameraAttitudeQuaternionResponse { Quaternion attitude_quaternion = 1; @@ -98,6 +106,16 @@ message StatusTextResponse { StatusText status_text = 1; } +message SubscribeActuatorControlTargetRequest {} +message ActuatorControlTargetResponse { + ActuatorControlTarget actuator_control_target = 1; +} + +message SubscribeActuatorOutputStatusRequest {} +message ActuatorOutputStatusResponse { + ActuatorOutputStatus actuator_output_status = 1; +} + message Position { double latitude_deg = 1; double longitude_deg = 2; @@ -118,6 +136,12 @@ message EulerAngle { float yaw_deg = 3; } +message AngularSpeed { + float rollspeed = 1; + float pitchspeed = 2; + float yawspeed = 3; +} + message SpeedNed { float velocity_north_m_s = 1; float velocity_east_m_s = 2; @@ -182,3 +206,13 @@ message StatusText { StatusType type = 1; string text = 2; } + +message ActuatorControlTarget { + int32 group = 1; + repeated float controls = 2; +} + +message ActuatorOutputStatus { + uint32 active = 1; + repeated float actuator = 2; +} From 067c0882a020de3e6e89f142a6641fbd3dd31bb3 Mon Sep 17 00:00:00 2001 From: Ildar Sadykov Date: Mon, 12 Aug 2019 16:48:02 +0300 Subject: [PATCH 2/2] AngularSpeed -> AngularVelocityBody --- protos/telemetry/telemetry.proto | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/protos/telemetry/telemetry.proto b/protos/telemetry/telemetry.proto index ad0202242..cabfbd26b 100644 --- a/protos/telemetry/telemetry.proto +++ b/protos/telemetry/telemetry.proto @@ -12,7 +12,7 @@ service TelemetryService { rpc SubscribeArmed(SubscribeArmedRequest) returns(stream ArmedResponse) {} rpc SubscribeAttitudeQuaternion(SubscribeAttitudeQuaternionRequest) returns(stream AttitudeQuaternionResponse) {} rpc SubscribeAttitudeEuler(SubscribeAttitudeEulerRequest) returns(stream AttitudeEulerResponse) {} - rpc SubscribeAttitudeAngularSpeed(SubscribeAttitudeAngularSpeedRequest) returns(stream AttitudeAngularSpeedResponse) {} + rpc SubscribeAttitudeAngularVelocityBody(SubscribeAttitudeAngularVelocityBodyRequest) returns(stream AttitudeAngularVelocityBodyResponse) {} rpc SubscribeCameraAttitudeQuaternion(SubscribeCameraAttitudeQuaternionRequest) returns(stream CameraAttitudeQuaternionResponse) {} rpc SubscribeCameraAttitudeEuler(SubscribeCameraAttitudeEulerRequest) returns(stream CameraAttitudeEulerResponse) {} rpc SubscribeGroundSpeedNed(SubscribeGroundSpeedNedRequest) returns(stream GroundSpeedNedResponse) {} @@ -56,9 +56,9 @@ message AttitudeEulerResponse { EulerAngle attitude_euler = 1; } -message SubscribeAttitudeAngularSpeedRequest {} -message AttitudeAngularSpeedResponse { - AngularSpeed attitude_angular_speed = 1; +message SubscribeAttitudeAngularVelocityBodyRequest {} +message AttitudeAngularVelocityBodyResponse { + AngularVelocityBody attitude_angular_velocity_body = 1; } message SubscribeCameraAttitudeQuaternionRequest {} @@ -136,10 +136,10 @@ message EulerAngle { float yaw_deg = 3; } -message AngularSpeed { - float rollspeed = 1; - float pitchspeed = 2; - float yawspeed = 3; +message AngularVelocityBody { + float roll_rad_s = 1; + float pitch_rad_s = 2; + float yaw_rad_s = 3; } message SpeedNed {