From 8f8e81fb89914a2e98a9c9657230a08024edbb6c Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Sun, 28 Jan 2024 13:05:39 +1300 Subject: [PATCH 1/2] Update to MAVSDK v2.1.0 This brings in lots of new stuff and improvements within mavsdk_server. Signed-off-by: Julian Oes --- MAVSDK_SERVER_VERSION | 2 +- mavsdk/action.py | 8 + mavsdk/action_pb2.py | 14 +- mavsdk/camera.py | 60 +- mavsdk/camera_pb2.py | 220 ++-- mavsdk/camera_pb2_grpc.py | 37 + mavsdk/camera_server.py | 1394 +++++++++++++++++++++++--- mavsdk/camera_server_pb2.py | 537 +++++++++- mavsdk/camera_server_pb2_grpc.py | 646 ++++++++++++ mavsdk/follow_me.py | 142 +-- mavsdk/follow_me_pb2.py | 94 +- mavsdk/ftp.py | 74 +- mavsdk/ftp_pb2.py | 156 +-- mavsdk/ftp_pb2_grpc.py | 105 -- mavsdk/ftp_server.py | 197 ++++ mavsdk/ftp_server_pb2.py | 64 ++ mavsdk/ftp_server_pb2_grpc.py | 76 ++ mavsdk/geofence.py | 275 ++++- mavsdk/geofence_pb2.py | 71 +- mavsdk/geofence_pb2_grpc.py | 4 +- mavsdk/gimbal.py | 40 +- mavsdk/gimbal_pb2.py | 102 +- mavsdk/gimbal_pb2_grpc.py | 40 + mavsdk/gripper.py | 279 ++++++ mavsdk/gripper_pb2.py | 88 ++ mavsdk/gripper_pb2_grpc.py | 109 ++ mavsdk/info.py | 92 +- mavsdk/info_pb2.py | 19 +- mavsdk/mission.py | 108 +- mavsdk/mission_pb2.py | 39 +- mavsdk/mission_raw.py | 165 ++- mavsdk/mission_raw_pb2.py | 168 +++- mavsdk/mission_raw_pb2_grpc.py | 113 ++- mavsdk/offboard.py | 55 +- mavsdk/offboard_pb2.py | 88 +- mavsdk/offboard_pb2_grpc.py | 35 + mavsdk/param.py | 81 +- mavsdk/param_pb2.py | 59 +- mavsdk/param_pb2_grpc.py | 37 + mavsdk/param_server.py | 74 +- mavsdk/param_server_pb2.py | 96 +- mavsdk/param_server_pb2_grpc.py | 102 ++ mavsdk/source/plugins/ftp_server.rst | 8 + mavsdk/source/plugins/gripper.rst | 8 + mavsdk/source/plugins/index.rst | 3 + mavsdk/source/plugins/winch.rst | 8 + mavsdk/telemetry.py | 298 +++++- mavsdk/telemetry_pb2.py | 466 +++++---- mavsdk/telemetry_pb2_grpc.py | 130 ++- mavsdk/telemetry_server.py | 29 + mavsdk/telemetry_server_pb2.py | 220 ++-- mavsdk/telemetry_server_pb2_grpc.py | 34 + mavsdk/transponder.py | 54 +- mavsdk/transponder_pb2.py | 26 +- mavsdk/winch.py | 1021 +++++++++++++++++++ mavsdk/winch_pb2.py | 299 ++++++ mavsdk/winch_pb2_grpc.py | 428 ++++++++ proto | 2 +- 58 files changed, 7939 insertions(+), 1260 deletions(-) create mode 100644 mavsdk/ftp_server.py create mode 100644 mavsdk/ftp_server_pb2.py create mode 100644 mavsdk/ftp_server_pb2_grpc.py create mode 100644 mavsdk/gripper.py create mode 100644 mavsdk/gripper_pb2.py create mode 100644 mavsdk/gripper_pb2_grpc.py create mode 100644 mavsdk/source/plugins/ftp_server.rst create mode 100644 mavsdk/source/plugins/gripper.rst create mode 100644 mavsdk/source/plugins/winch.rst create mode 100644 mavsdk/winch.py create mode 100644 mavsdk/winch_pb2.py create mode 100644 mavsdk/winch_pb2_grpc.py diff --git a/MAVSDK_SERVER_VERSION b/MAVSDK_SERVER_VERSION index 4c984210..1defe531 100644 --- a/MAVSDK_SERVER_VERSION +++ b/MAVSDK_SERVER_VERSION @@ -1 +1 @@ -v1.4.17 +v2.1.0 diff --git a/mavsdk/action.py b/mavsdk/action.py index 3efaf082..5dfe5562 100644 --- a/mavsdk/action.py +++ b/mavsdk/action.py @@ -127,6 +127,9 @@ class Result(Enum): UNSUPPORTED Action not supported + FAILED + Action failed + """ @@ -143,6 +146,7 @@ class Result(Enum): NO_VTOL_TRANSITION_SUPPORT = 10 PARAMETER_ERROR = 11 UNSUPPORTED = 12 + FAILED = 13 def translate_to_rpc(self): if self == ActionResult.Result.UNKNOWN: @@ -171,6 +175,8 @@ def translate_to_rpc(self): return action_pb2.ActionResult.RESULT_PARAMETER_ERROR if self == ActionResult.Result.UNSUPPORTED: return action_pb2.ActionResult.RESULT_UNSUPPORTED + if self == ActionResult.Result.FAILED: + return action_pb2.ActionResult.RESULT_FAILED @staticmethod def translate_from_rpc(rpc_enum_value): @@ -201,6 +207,8 @@ def translate_from_rpc(rpc_enum_value): return ActionResult.Result.PARAMETER_ERROR if rpc_enum_value == action_pb2.ActionResult.RESULT_UNSUPPORTED: return ActionResult.Result.UNSUPPORTED + if rpc_enum_value == action_pb2.ActionResult.RESULT_FAILED: + return ActionResult.Result.FAILED def __str__(self): return self.name diff --git a/mavsdk/action_pb2.py b/mavsdk/action_pb2.py index 6832aba7..fde9a77e 100644 --- a/mavsdk/action_pb2.py +++ b/mavsdk/action_pb2.py @@ -16,7 +16,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x61\x63tion/action.proto\x12\x11mavsdk.rpc.action\x1a\x14mavsdk_options.proto\"\x0c\n\nArmRequest\"E\n\x0b\x41rmResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x0f\n\rDisarmRequest\"H\n\x0e\x44isarmResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x10\n\x0eTakeoffRequest\"I\n\x0fTakeoffResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bLandRequest\"F\n\x0cLandResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x0f\n\rRebootRequest\"H\n\x0eRebootResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x11\n\x0fShutdownRequest\"J\n\x10ShutdownResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x12\n\x10TerminateRequest\"K\n\x11TerminateResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bKillRequest\"F\n\x0cKillResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x17\n\x15ReturnToLaunchRequest\"P\n\x16ReturnToLaunchResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"p\n\x13GotoLocationRequest\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x04 \x01(\x02\"N\n\x14GotoLocationResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\xd7\x01\n\x0e\x44oOrbitRequest\x12\x10\n\x08radius_m\x18\x01 \x01(\x02\x12\x13\n\x0bvelocity_ms\x18\x02 \x01(\x02\x12\x39\n\x0cyaw_behavior\x18\x03 \x01(\x0e\x32#.mavsdk.rpc.action.OrbitYawBehavior\x12\x1d\n\x0clatitude_deg\x18\x05 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x06 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x07 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\"I\n\x0f\x44oOrbitResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bHoldRequest\"F\n\x0cHoldResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"2\n\x12SetActuatorRequest\x12\r\n\x05index\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x02\"M\n\x13SetActuatorResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x1e\n\x1cTransitionToFixedwingRequest\"W\n\x1dTransitionToFixedwingResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\" \n\x1eTransitionToMulticopterRequest\"Y\n\x1fTransitionToMulticopterResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x1b\n\x19GetTakeoffAltitudeRequest\"f\n\x1aGetTakeoffAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\x10\n\x08\x61ltitude\x18\x02 \x01(\x02\"-\n\x19SetTakeoffAltitudeRequest\x12\x10\n\x08\x61ltitude\x18\x01 \x01(\x02\"T\n\x1aSetTakeoffAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x18\n\x16GetMaximumSpeedRequest\"`\n\x17GetMaximumSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\r\n\x05speed\x18\x02 \x01(\x02\"\'\n\x16SetMaximumSpeedRequest\x12\r\n\x05speed\x18\x01 \x01(\x02\"Q\n\x17SetMaximumSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\"\n GetReturnToLaunchAltitudeRequest\"x\n!GetReturnToLaunchAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\x1b\n\x13relative_altitude_m\x18\x02 \x01(\x02\"?\n SetReturnToLaunchAltitudeRequest\x12\x1b\n\x13relative_altitude_m\x18\x01 \x01(\x02\"[\n!SetReturnToLaunchAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"+\n\x16SetCurrentSpeedRequest\x12\x11\n\tspeed_m_s\x18\x01 \x01(\x02\"Q\n\x17SetCurrentSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\xdd\x03\n\x0c\x41\x63tionResult\x12\x36\n\x06result\x18\x01 \x01(\x0e\x32&.mavsdk.rpc.action.ActionResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\x80\x03\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12.\n*RESULT_COMMAND_DENIED_LANDED_STATE_UNKNOWN\x10\x06\x12$\n RESULT_COMMAND_DENIED_NOT_LANDED\x10\x07\x12\x12\n\x0eRESULT_TIMEOUT\x10\x08\x12*\n&RESULT_VTOL_TRANSITION_SUPPORT_UNKNOWN\x10\t\x12%\n!RESULT_NO_VTOL_TRANSITION_SUPPORT\x10\n\x12\x1a\n\x16RESULT_PARAMETER_ERROR\x10\x0b\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x0c*\xf3\x01\n\x10OrbitYawBehavior\x12\x32\n.ORBIT_YAW_BEHAVIOR_HOLD_FRONT_TO_CIRCLE_CENTER\x10\x00\x12+\n\'ORBIT_YAW_BEHAVIOR_HOLD_INITIAL_HEADING\x10\x01\x12#\n\x1fORBIT_YAW_BEHAVIOR_UNCONTROLLED\x10\x02\x12\x33\n/ORBIT_YAW_BEHAVIOR_HOLD_FRONT_TANGENT_TO_CIRCLE\x10\x03\x12$\n ORBIT_YAW_BEHAVIOR_RC_CONTROLLED\x10\x04\x32\xa6\x11\n\rActionService\x12\x46\n\x03\x41rm\x12\x1d.mavsdk.rpc.action.ArmRequest\x1a\x1e.mavsdk.rpc.action.ArmResponse\"\x00\x12O\n\x06\x44isarm\x12 .mavsdk.rpc.action.DisarmRequest\x1a!.mavsdk.rpc.action.DisarmResponse\"\x00\x12R\n\x07Takeoff\x12!.mavsdk.rpc.action.TakeoffRequest\x1a\".mavsdk.rpc.action.TakeoffResponse\"\x00\x12I\n\x04Land\x12\x1e.mavsdk.rpc.action.LandRequest\x1a\x1f.mavsdk.rpc.action.LandResponse\"\x00\x12O\n\x06Reboot\x12 .mavsdk.rpc.action.RebootRequest\x1a!.mavsdk.rpc.action.RebootResponse\"\x00\x12U\n\x08Shutdown\x12\".mavsdk.rpc.action.ShutdownRequest\x1a#.mavsdk.rpc.action.ShutdownResponse\"\x00\x12X\n\tTerminate\x12#.mavsdk.rpc.action.TerminateRequest\x1a$.mavsdk.rpc.action.TerminateResponse\"\x00\x12I\n\x04Kill\x12\x1e.mavsdk.rpc.action.KillRequest\x1a\x1f.mavsdk.rpc.action.KillResponse\"\x00\x12g\n\x0eReturnToLaunch\x12(.mavsdk.rpc.action.ReturnToLaunchRequest\x1a).mavsdk.rpc.action.ReturnToLaunchResponse\"\x00\x12\x61\n\x0cGotoLocation\x12&.mavsdk.rpc.action.GotoLocationRequest\x1a\'.mavsdk.rpc.action.GotoLocationResponse\"\x00\x12R\n\x07\x44oOrbit\x12!.mavsdk.rpc.action.DoOrbitRequest\x1a\".mavsdk.rpc.action.DoOrbitResponse\"\x00\x12I\n\x04Hold\x12\x1e.mavsdk.rpc.action.HoldRequest\x1a\x1f.mavsdk.rpc.action.HoldResponse\"\x00\x12^\n\x0bSetActuator\x12%.mavsdk.rpc.action.SetActuatorRequest\x1a&.mavsdk.rpc.action.SetActuatorResponse\"\x00\x12|\n\x15TransitionToFixedwing\x12/.mavsdk.rpc.action.TransitionToFixedwingRequest\x1a\x30.mavsdk.rpc.action.TransitionToFixedwingResponse\"\x00\x12\x82\x01\n\x17TransitionToMulticopter\x12\x31.mavsdk.rpc.action.TransitionToMulticopterRequest\x1a\x32.mavsdk.rpc.action.TransitionToMulticopterResponse\"\x00\x12s\n\x12GetTakeoffAltitude\x12,.mavsdk.rpc.action.GetTakeoffAltitudeRequest\x1a-.mavsdk.rpc.action.GetTakeoffAltitudeResponse\"\x00\x12s\n\x12SetTakeoffAltitude\x12,.mavsdk.rpc.action.SetTakeoffAltitudeRequest\x1a-.mavsdk.rpc.action.SetTakeoffAltitudeResponse\"\x00\x12j\n\x0fGetMaximumSpeed\x12).mavsdk.rpc.action.GetMaximumSpeedRequest\x1a*.mavsdk.rpc.action.GetMaximumSpeedResponse\"\x00\x12j\n\x0fSetMaximumSpeed\x12).mavsdk.rpc.action.SetMaximumSpeedRequest\x1a*.mavsdk.rpc.action.SetMaximumSpeedResponse\"\x00\x12\x88\x01\n\x19GetReturnToLaunchAltitude\x12\x33.mavsdk.rpc.action.GetReturnToLaunchAltitudeRequest\x1a\x34.mavsdk.rpc.action.GetReturnToLaunchAltitudeResponse\"\x00\x12\x88\x01\n\x19SetReturnToLaunchAltitude\x12\x33.mavsdk.rpc.action.SetReturnToLaunchAltitudeRequest\x1a\x34.mavsdk.rpc.action.SetReturnToLaunchAltitudeResponse\"\x00\x12j\n\x0fSetCurrentSpeed\x12).mavsdk.rpc.action.SetCurrentSpeedRequest\x1a*.mavsdk.rpc.action.SetCurrentSpeedResponse\"\x00\x42\x1f\n\x10io.mavsdk.actionB\x0b\x41\x63tionProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x61\x63tion/action.proto\x12\x11mavsdk.rpc.action\x1a\x14mavsdk_options.proto\"\x0c\n\nArmRequest\"E\n\x0b\x41rmResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x0f\n\rDisarmRequest\"H\n\x0e\x44isarmResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x10\n\x0eTakeoffRequest\"I\n\x0fTakeoffResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bLandRequest\"F\n\x0cLandResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x0f\n\rRebootRequest\"H\n\x0eRebootResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x11\n\x0fShutdownRequest\"J\n\x10ShutdownResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x12\n\x10TerminateRequest\"K\n\x11TerminateResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bKillRequest\"F\n\x0cKillResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x17\n\x15ReturnToLaunchRequest\"P\n\x16ReturnToLaunchResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"p\n\x13GotoLocationRequest\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x04 \x01(\x02\"N\n\x14GotoLocationResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\xd7\x01\n\x0e\x44oOrbitRequest\x12\x10\n\x08radius_m\x18\x01 \x01(\x02\x12\x13\n\x0bvelocity_ms\x18\x02 \x01(\x02\x12\x39\n\x0cyaw_behavior\x18\x03 \x01(\x0e\x32#.mavsdk.rpc.action.OrbitYawBehavior\x12\x1d\n\x0clatitude_deg\x18\x05 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x06 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x07 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\"I\n\x0f\x44oOrbitResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bHoldRequest\"F\n\x0cHoldResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"2\n\x12SetActuatorRequest\x12\r\n\x05index\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x02\"M\n\x13SetActuatorResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x1e\n\x1cTransitionToFixedwingRequest\"W\n\x1dTransitionToFixedwingResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\" \n\x1eTransitionToMulticopterRequest\"Y\n\x1fTransitionToMulticopterResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x1b\n\x19GetTakeoffAltitudeRequest\"f\n\x1aGetTakeoffAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\x10\n\x08\x61ltitude\x18\x02 \x01(\x02\"-\n\x19SetTakeoffAltitudeRequest\x12\x10\n\x08\x61ltitude\x18\x01 \x01(\x02\"T\n\x1aSetTakeoffAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x18\n\x16GetMaximumSpeedRequest\"`\n\x17GetMaximumSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\r\n\x05speed\x18\x02 \x01(\x02\"\'\n\x16SetMaximumSpeedRequest\x12\r\n\x05speed\x18\x01 \x01(\x02\"Q\n\x17SetMaximumSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\"\n GetReturnToLaunchAltitudeRequest\"x\n!GetReturnToLaunchAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\x1b\n\x13relative_altitude_m\x18\x02 \x01(\x02\"?\n SetReturnToLaunchAltitudeRequest\x12\x1b\n\x13relative_altitude_m\x18\x01 \x01(\x02\"[\n!SetReturnToLaunchAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"+\n\x16SetCurrentSpeedRequest\x12\x11\n\tspeed_m_s\x18\x01 \x01(\x02\"Q\n\x17SetCurrentSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\xf0\x03\n\x0c\x41\x63tionResult\x12\x36\n\x06result\x18\x01 \x01(\x0e\x32&.mavsdk.rpc.action.ActionResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\x93\x03\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12.\n*RESULT_COMMAND_DENIED_LANDED_STATE_UNKNOWN\x10\x06\x12$\n RESULT_COMMAND_DENIED_NOT_LANDED\x10\x07\x12\x12\n\x0eRESULT_TIMEOUT\x10\x08\x12*\n&RESULT_VTOL_TRANSITION_SUPPORT_UNKNOWN\x10\t\x12%\n!RESULT_NO_VTOL_TRANSITION_SUPPORT\x10\n\x12\x1a\n\x16RESULT_PARAMETER_ERROR\x10\x0b\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x0c\x12\x11\n\rRESULT_FAILED\x10\r*\xf3\x01\n\x10OrbitYawBehavior\x12\x32\n.ORBIT_YAW_BEHAVIOR_HOLD_FRONT_TO_CIRCLE_CENTER\x10\x00\x12+\n\'ORBIT_YAW_BEHAVIOR_HOLD_INITIAL_HEADING\x10\x01\x12#\n\x1fORBIT_YAW_BEHAVIOR_UNCONTROLLED\x10\x02\x12\x33\n/ORBIT_YAW_BEHAVIOR_HOLD_FRONT_TANGENT_TO_CIRCLE\x10\x03\x12$\n ORBIT_YAW_BEHAVIOR_RC_CONTROLLED\x10\x04\x32\xa6\x11\n\rActionService\x12\x46\n\x03\x41rm\x12\x1d.mavsdk.rpc.action.ArmRequest\x1a\x1e.mavsdk.rpc.action.ArmResponse\"\x00\x12O\n\x06\x44isarm\x12 .mavsdk.rpc.action.DisarmRequest\x1a!.mavsdk.rpc.action.DisarmResponse\"\x00\x12R\n\x07Takeoff\x12!.mavsdk.rpc.action.TakeoffRequest\x1a\".mavsdk.rpc.action.TakeoffResponse\"\x00\x12I\n\x04Land\x12\x1e.mavsdk.rpc.action.LandRequest\x1a\x1f.mavsdk.rpc.action.LandResponse\"\x00\x12O\n\x06Reboot\x12 .mavsdk.rpc.action.RebootRequest\x1a!.mavsdk.rpc.action.RebootResponse\"\x00\x12U\n\x08Shutdown\x12\".mavsdk.rpc.action.ShutdownRequest\x1a#.mavsdk.rpc.action.ShutdownResponse\"\x00\x12X\n\tTerminate\x12#.mavsdk.rpc.action.TerminateRequest\x1a$.mavsdk.rpc.action.TerminateResponse\"\x00\x12I\n\x04Kill\x12\x1e.mavsdk.rpc.action.KillRequest\x1a\x1f.mavsdk.rpc.action.KillResponse\"\x00\x12g\n\x0eReturnToLaunch\x12(.mavsdk.rpc.action.ReturnToLaunchRequest\x1a).mavsdk.rpc.action.ReturnToLaunchResponse\"\x00\x12\x61\n\x0cGotoLocation\x12&.mavsdk.rpc.action.GotoLocationRequest\x1a\'.mavsdk.rpc.action.GotoLocationResponse\"\x00\x12R\n\x07\x44oOrbit\x12!.mavsdk.rpc.action.DoOrbitRequest\x1a\".mavsdk.rpc.action.DoOrbitResponse\"\x00\x12I\n\x04Hold\x12\x1e.mavsdk.rpc.action.HoldRequest\x1a\x1f.mavsdk.rpc.action.HoldResponse\"\x00\x12^\n\x0bSetActuator\x12%.mavsdk.rpc.action.SetActuatorRequest\x1a&.mavsdk.rpc.action.SetActuatorResponse\"\x00\x12|\n\x15TransitionToFixedwing\x12/.mavsdk.rpc.action.TransitionToFixedwingRequest\x1a\x30.mavsdk.rpc.action.TransitionToFixedwingResponse\"\x00\x12\x82\x01\n\x17TransitionToMulticopter\x12\x31.mavsdk.rpc.action.TransitionToMulticopterRequest\x1a\x32.mavsdk.rpc.action.TransitionToMulticopterResponse\"\x00\x12s\n\x12GetTakeoffAltitude\x12,.mavsdk.rpc.action.GetTakeoffAltitudeRequest\x1a-.mavsdk.rpc.action.GetTakeoffAltitudeResponse\"\x00\x12s\n\x12SetTakeoffAltitude\x12,.mavsdk.rpc.action.SetTakeoffAltitudeRequest\x1a-.mavsdk.rpc.action.SetTakeoffAltitudeResponse\"\x00\x12j\n\x0fGetMaximumSpeed\x12).mavsdk.rpc.action.GetMaximumSpeedRequest\x1a*.mavsdk.rpc.action.GetMaximumSpeedResponse\"\x00\x12j\n\x0fSetMaximumSpeed\x12).mavsdk.rpc.action.SetMaximumSpeedRequest\x1a*.mavsdk.rpc.action.SetMaximumSpeedResponse\"\x00\x12\x88\x01\n\x19GetReturnToLaunchAltitude\x12\x33.mavsdk.rpc.action.GetReturnToLaunchAltitudeRequest\x1a\x34.mavsdk.rpc.action.GetReturnToLaunchAltitudeResponse\"\x00\x12\x88\x01\n\x19SetReturnToLaunchAltitude\x12\x33.mavsdk.rpc.action.SetReturnToLaunchAltitudeRequest\x1a\x34.mavsdk.rpc.action.SetReturnToLaunchAltitudeResponse\"\x00\x12j\n\x0fSetCurrentSpeed\x12).mavsdk.rpc.action.SetCurrentSpeedRequest\x1a*.mavsdk.rpc.action.SetCurrentSpeedResponse\"\x00\x42\x1f\n\x10io.mavsdk.actionB\x0b\x41\x63tionProtob\x06proto3') _ORBITYAWBEHAVIOR = DESCRIPTOR.enum_types_by_name['OrbitYawBehavior'] OrbitYawBehavior = enum_type_wrapper.EnumTypeWrapper(_ORBITYAWBEHAVIOR) @@ -399,8 +399,8 @@ _DOORBITREQUEST.fields_by_name['longitude_deg']._serialized_options = b'\202\265\030\003NaN' _DOORBITREQUEST.fields_by_name['absolute_altitude_m']._options = None _DOORBITREQUEST.fields_by_name['absolute_altitude_m']._serialized_options = b'\202\265\030\003NaN' - _ORBITYAWBEHAVIOR._serialized_start=3287 - _ORBITYAWBEHAVIOR._serialized_end=3530 + _ORBITYAWBEHAVIOR._serialized_start=3306 + _ORBITYAWBEHAVIOR._serialized_end=3549 _ARMREQUEST._serialized_start=64 _ARMREQUEST._serialized_end=76 _ARMRESPONSE._serialized_start=78 @@ -490,9 +490,9 @@ _SETCURRENTSPEEDRESPONSE._serialized_start=2723 _SETCURRENTSPEEDRESPONSE._serialized_end=2804 _ACTIONRESULT._serialized_start=2807 - _ACTIONRESULT._serialized_end=3284 + _ACTIONRESULT._serialized_end=3303 _ACTIONRESULT_RESULT._serialized_start=2900 - _ACTIONRESULT_RESULT._serialized_end=3284 - _ACTIONSERVICE._serialized_start=3533 - _ACTIONSERVICE._serialized_end=5747 + _ACTIONRESULT_RESULT._serialized_end=3303 + _ACTIONSERVICE._serialized_start=3552 + _ACTIONSERVICE._serialized_end=5766 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/camera.py b/mavsdk/camera.py index a41d5a30..65448c38 100644 --- a/mavsdk/camera.py +++ b/mavsdk/camera.py @@ -135,6 +135,9 @@ class Result(Enum): NO_SYSTEM No system connected + PROTOCOL_UNSUPPORTED + Definition file protocol not supported + """ @@ -147,6 +150,7 @@ class Result(Enum): TIMEOUT = 6 WRONG_ARGUMENT = 7 NO_SYSTEM = 8 + PROTOCOL_UNSUPPORTED = 9 def translate_to_rpc(self): if self == CameraResult.Result.UNKNOWN: @@ -167,6 +171,8 @@ def translate_to_rpc(self): return camera_pb2.CameraResult.RESULT_WRONG_ARGUMENT if self == CameraResult.Result.NO_SYSTEM: return camera_pb2.CameraResult.RESULT_NO_SYSTEM + if self == CameraResult.Result.PROTOCOL_UNSUPPORTED: + return camera_pb2.CameraResult.RESULT_PROTOCOL_UNSUPPORTED @staticmethod def translate_from_rpc(rpc_enum_value): @@ -189,6 +195,8 @@ def translate_from_rpc(rpc_enum_value): return CameraResult.Result.WRONG_ARGUMENT if rpc_enum_value == camera_pb2.CameraResult.RESULT_NO_SYSTEM: return CameraResult.Result.NO_SYSTEM + if rpc_enum_value == camera_pb2.CameraResult.RESULT_PROTOCOL_UNSUPPORTED: + return CameraResult.Result.PROTOCOL_UNSUPPORTED def __str__(self): return self.name @@ -1978,10 +1986,15 @@ async def stop_video(self): raise CameraError(result, "stop_video()") - async def start_video_streaming(self): + async def start_video_streaming(self, stream_id): """ Start video streaming. + Parameters + ---------- + stream_id : int32_t + video stream id + Raises ------ CameraError @@ -1989,19 +2002,25 @@ async def start_video_streaming(self): """ request = camera_pb2.StartVideoStreamingRequest() + request.stream_id = stream_id response = await self._stub.StartVideoStreaming(request) result = self._extract_result(response) if result.result != CameraResult.Result.SUCCESS: - raise CameraError(result, "start_video_streaming()") + raise CameraError(result, "start_video_streaming()", stream_id) - async def stop_video_streaming(self): + async def stop_video_streaming(self, stream_id): """ Stop current video streaming. + Parameters + ---------- + stream_id : int32_t + video stream id + Raises ------ CameraError @@ -2009,13 +2028,14 @@ async def stop_video_streaming(self): """ request = camera_pb2.StopVideoStreamingRequest() + request.stream_id = stream_id response = await self._stub.StopVideoStreaming(request) result = self._extract_result(response) if result.result != CameraResult.Result.SUCCESS: - raise CameraError(result, "stop_video_streaming()") + raise CameraError(result, "stop_video_streaming()", stream_id) async def set_mode(self, mode): @@ -2330,12 +2350,17 @@ async def get_setting(self, setting): return Setting.translate_from_rpc(response.setting) - async def format_storage(self): + async def format_storage(self, storage_id): """ Format storage (e.g. SD card) in camera. This will delete all content of the camera storage! + Parameters + ---------- + storage_id : int32_t + Storage identify to be format + Raises ------ CameraError @@ -2343,13 +2368,14 @@ async def format_storage(self): """ request = camera_pb2.FormatStorageRequest() + request.storage_id = storage_id response = await self._stub.FormatStorage(request) result = self._extract_result(response) if result.result != CameraResult.Result.SUCCESS: - raise CameraError(result, "format_storage()") + raise CameraError(result, "format_storage()", storage_id) async def select_camera(self, camera_id): @@ -2378,4 +2404,26 @@ async def select_camera(self, camera_id): if result.result != CameraResult.Result.SUCCESS: raise CameraError(result, "select_camera()", camera_id) + + + async def reset_settings(self): + """ + Reset all settings in camera. + + This will reset all camera settings to default value + + Raises + ------ + CameraError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_pb2.ResetSettingsRequest() + response = await self._stub.ResetSettings(request) + + + result = self._extract_result(response) + + if result.result != CameraResult.Result.SUCCESS: + raise CameraError(result, "reset_settings()") \ No newline at end of file diff --git a/mavsdk/camera_pb2.py b/mavsdk/camera_pb2.py index 15de88d9..872f3934 100644 --- a/mavsdk/camera_pb2.py +++ b/mavsdk/camera_pb2.py @@ -16,7 +16,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x63\x61mera/camera.proto\x12\x11mavsdk.rpc.camera\x1a\x14mavsdk_options.proto\"\x10\n\x0ePrepareRequest\"I\n\x0fPrepareResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"\x12\n\x10TakePhotoRequest\"K\n\x11TakePhotoResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"/\n\x19StartPhotoIntervalRequest\x12\x12\n\ninterval_s\x18\x01 \x01(\x02\"T\n\x1aStartPhotoIntervalResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"\x1a\n\x18StopPhotoIntervalRequest\"S\n\x19StopPhotoIntervalResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"\x13\n\x11StartVideoRequest\"L\n\x12StartVideoResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"\x12\n\x10StopVideoRequest\"K\n\x11StopVideoResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"\x1c\n\x1aStartVideoStreamingRequest\"U\n\x1bStartVideoStreamingResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"\x1b\n\x19StopVideoStreamingRequest\"T\n\x1aStopVideoStreamingResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"7\n\x0eSetModeRequest\x12%\n\x04mode\x18\x01 \x01(\x0e\x32\x17.mavsdk.rpc.camera.Mode\"I\n\x0fSetModeResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"I\n\x11ListPhotosRequest\x12\x34\n\x0cphotos_range\x18\x01 \x01(\x0e\x32\x1e.mavsdk.rpc.camera.PhotosRange\"\x83\x01\n\x12ListPhotosResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\x12\x35\n\rcapture_infos\x18\x02 \x03(\x0b\x32\x1e.mavsdk.rpc.camera.CaptureInfo\"\x1d\n\x1bSubscribeInformationRequest\"J\n\x13InformationResponse\x12\x33\n\x0binformation\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.camera.Information\"\x16\n\x14SubscribeModeRequest\"5\n\x0cModeResponse\x12%\n\x04mode\x18\x01 \x01(\x0e\x32\x17.mavsdk.rpc.camera.Mode\"!\n\x1fSubscribeVideoStreamInfoRequest\"X\n\x17VideoStreamInfoResponse\x12=\n\x11video_stream_info\x18\x01 \x01(\x0b\x32\".mavsdk.rpc.camera.VideoStreamInfo\"\x1d\n\x1bSubscribeCaptureInfoRequest\"K\n\x13\x43\x61ptureInfoResponse\x12\x34\n\x0c\x63\x61pture_info\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.camera.CaptureInfo\"\x18\n\x16SubscribeStatusRequest\"B\n\x0eStatusResponse\x12\x30\n\rcamera_status\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.camera.Status\"!\n\x1fSubscribeCurrentSettingsRequest\"O\n\x17\x43urrentSettingsResponse\x12\x34\n\x10\x63urrent_settings\x18\x01 \x03(\x0b\x32\x1a.mavsdk.rpc.camera.Setting\"(\n&SubscribePossibleSettingOptionsRequest\"\\\n\x1ePossibleSettingOptionsResponse\x12:\n\x0fsetting_options\x18\x01 \x03(\x0b\x32!.mavsdk.rpc.camera.SettingOptions\"@\n\x11SetSettingRequest\x12+\n\x07setting\x18\x01 \x01(\x0b\x32\x1a.mavsdk.rpc.camera.Setting\"L\n\x12SetSettingResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"@\n\x11GetSettingRequest\x12+\n\x07setting\x18\x01 \x01(\x0b\x32\x1a.mavsdk.rpc.camera.Setting\"y\n\x12GetSettingResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\x12+\n\x07setting\x18\x02 \x01(\x0b\x32\x1a.mavsdk.rpc.camera.Setting\"\x16\n\x14\x46ormatStorageRequest\"O\n\x15\x46ormatStorageResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"N\n\x14SelectCameraResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"(\n\x13SelectCameraRequest\x12\x11\n\tcamera_id\x18\x01 \x01(\x05\"\xa0\x02\n\x0c\x43\x61meraResult\x12\x36\n\x06result\x18\x01 \x01(\x0e\x32&.mavsdk.rpc.camera.CameraResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xc3\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x16\n\x12RESULT_IN_PROGRESS\x10\x02\x12\x0f\n\x0bRESULT_BUSY\x10\x03\x12\x11\n\rRESULT_DENIED\x10\x04\x12\x10\n\x0cRESULT_ERROR\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x19\n\x15RESULT_WRONG_ARGUMENT\x10\x07\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x08\"q\n\x08Position\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x12\x1b\n\x13relative_altitude_m\x18\x04 \x01(\x02\"8\n\nQuaternion\x12\t\n\x01w\x18\x01 \x01(\x02\x12\t\n\x01x\x18\x02 \x01(\x02\x12\t\n\x01y\x18\x03 \x01(\x02\x12\t\n\x01z\x18\x04 \x01(\x02\"B\n\nEulerAngle\x12\x10\n\x08roll_deg\x18\x01 \x01(\x02\x12\x11\n\tpitch_deg\x18\x02 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x03 \x01(\x02\"\xff\x01\n\x0b\x43\x61ptureInfo\x12-\n\x08position\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.camera.Position\x12:\n\x13\x61ttitude_quaternion\x18\x02 \x01(\x0b\x32\x1d.mavsdk.rpc.camera.Quaternion\x12;\n\x14\x61ttitude_euler_angle\x18\x03 \x01(\x0b\x32\x1d.mavsdk.rpc.camera.EulerAngle\x12\x13\n\x0btime_utc_us\x18\x04 \x01(\x04\x12\x12\n\nis_success\x18\x05 \x01(\x08\x12\r\n\x05index\x18\x06 \x01(\x05\x12\x10\n\x08\x66ile_url\x18\x07 \x01(\t\"\xc5\x01\n\x13VideoStreamSettings\x12\x15\n\rframe_rate_hz\x18\x01 \x01(\x02\x12!\n\x19horizontal_resolution_pix\x18\x02 \x01(\r\x12\x1f\n\x17vertical_resolution_pix\x18\x03 \x01(\r\x12\x14\n\x0c\x62it_rate_b_s\x18\x04 \x01(\r\x12\x14\n\x0crotation_deg\x18\x05 \x01(\r\x12\x0b\n\x03uri\x18\x06 \x01(\t\x12\x1a\n\x12horizontal_fov_deg\x18\x07 \x01(\x02\"\xc2\x03\n\x0fVideoStreamInfo\x12\x38\n\x08settings\x18\x01 \x01(\x0b\x32&.mavsdk.rpc.camera.VideoStreamSettings\x12\x44\n\x06status\x18\x02 \x01(\x0e\x32\x34.mavsdk.rpc.camera.VideoStreamInfo.VideoStreamStatus\x12H\n\x08spectrum\x18\x03 \x01(\x0e\x32\x36.mavsdk.rpc.camera.VideoStreamInfo.VideoStreamSpectrum\"]\n\x11VideoStreamStatus\x12#\n\x1fVIDEO_STREAM_STATUS_NOT_RUNNING\x10\x00\x12#\n\x1fVIDEO_STREAM_STATUS_IN_PROGRESS\x10\x01\"\x85\x01\n\x13VideoStreamSpectrum\x12!\n\x1dVIDEO_STREAM_SPECTRUM_UNKNOWN\x10\x00\x12\'\n#VIDEO_STREAM_SPECTRUM_VISIBLE_LIGHT\x10\x01\x12\"\n\x1eVIDEO_STREAM_SPECTRUM_INFRARED\x10\x02\"\x87\x05\n\x06Status\x12\x10\n\x08video_on\x18\x01 \x01(\x08\x12\x19\n\x11photo_interval_on\x18\x02 \x01(\x08\x12\x18\n\x10used_storage_mib\x18\x03 \x01(\x02\x12\x1d\n\x15\x61vailable_storage_mib\x18\x04 \x01(\x02\x12\x19\n\x11total_storage_mib\x18\x05 \x01(\x02\x12\x18\n\x10recording_time_s\x18\x06 \x01(\x02\x12\x19\n\x11media_folder_name\x18\x07 \x01(\t\x12?\n\x0estorage_status\x18\x08 \x01(\x0e\x32\'.mavsdk.rpc.camera.Status.StorageStatus\x12\x12\n\nstorage_id\x18\t \x01(\r\x12;\n\x0cstorage_type\x18\n \x01(\x0e\x32%.mavsdk.rpc.camera.Status.StorageType\"\x91\x01\n\rStorageStatus\x12 \n\x1cSTORAGE_STATUS_NOT_AVAILABLE\x10\x00\x12\x1e\n\x1aSTORAGE_STATUS_UNFORMATTED\x10\x01\x12\x1c\n\x18STORAGE_STATUS_FORMATTED\x10\x02\x12 \n\x1cSTORAGE_STATUS_NOT_SUPPORTED\x10\x03\"\xa0\x01\n\x0bStorageType\x12\x18\n\x14STORAGE_TYPE_UNKNOWN\x10\x00\x12\x1a\n\x16STORAGE_TYPE_USB_STICK\x10\x01\x12\x13\n\x0fSTORAGE_TYPE_SD\x10\x02\x12\x18\n\x14STORAGE_TYPE_MICROSD\x10\x03\x12\x13\n\x0fSTORAGE_TYPE_HD\x10\x07\x12\x17\n\x12STORAGE_TYPE_OTHER\x10\xfe\x01\"7\n\x06Option\x12\x11\n\toption_id\x18\x01 \x01(\t\x12\x1a\n\x12option_description\x18\x02 \x01(\t\"w\n\x07Setting\x12\x12\n\nsetting_id\x18\x01 \x01(\t\x12\x1b\n\x13setting_description\x18\x02 \x01(\t\x12)\n\x06option\x18\x03 \x01(\x0b\x32\x19.mavsdk.rpc.camera.Option\x12\x10\n\x08is_range\x18\x04 \x01(\x08\"\x7f\n\x0eSettingOptions\x12\x12\n\nsetting_id\x18\x01 \x01(\t\x12\x1b\n\x13setting_description\x18\x02 \x01(\t\x12*\n\x07options\x18\x03 \x03(\x0b\x32\x19.mavsdk.rpc.camera.Option\x12\x10\n\x08is_range\x18\x04 \x01(\x08\"\xd5\x01\n\x0bInformation\x12\x13\n\x0bvendor_name\x18\x01 \x01(\t\x12\x12\n\nmodel_name\x18\x02 \x01(\t\x12\x17\n\x0f\x66ocal_length_mm\x18\x03 \x01(\x02\x12!\n\x19horizontal_sensor_size_mm\x18\x04 \x01(\x02\x12\x1f\n\x17vertical_sensor_size_mm\x18\x05 \x01(\x02\x12 \n\x18horizontal_resolution_px\x18\x06 \x01(\r\x12\x1e\n\x16vertical_resolution_px\x18\x07 \x01(\r*8\n\x04Mode\x12\x10\n\x0cMODE_UNKNOWN\x10\x00\x12\x0e\n\nMODE_PHOTO\x10\x01\x12\x0e\n\nMODE_VIDEO\x10\x02*F\n\x0bPhotosRange\x12\x14\n\x10PHOTOS_RANGE_ALL\x10\x00\x12!\n\x1dPHOTOS_RANGE_SINCE_CONNECTION\x10\x01\x32\xd3\x11\n\rCameraService\x12R\n\x07Prepare\x12!.mavsdk.rpc.camera.PrepareRequest\x1a\".mavsdk.rpc.camera.PrepareResponse\"\x00\x12X\n\tTakePhoto\x12#.mavsdk.rpc.camera.TakePhotoRequest\x1a$.mavsdk.rpc.camera.TakePhotoResponse\"\x00\x12s\n\x12StartPhotoInterval\x12,.mavsdk.rpc.camera.StartPhotoIntervalRequest\x1a-.mavsdk.rpc.camera.StartPhotoIntervalResponse\"\x00\x12p\n\x11StopPhotoInterval\x12+.mavsdk.rpc.camera.StopPhotoIntervalRequest\x1a,.mavsdk.rpc.camera.StopPhotoIntervalResponse\"\x00\x12[\n\nStartVideo\x12$.mavsdk.rpc.camera.StartVideoRequest\x1a%.mavsdk.rpc.camera.StartVideoResponse\"\x00\x12X\n\tStopVideo\x12#.mavsdk.rpc.camera.StopVideoRequest\x1a$.mavsdk.rpc.camera.StopVideoResponse\"\x00\x12z\n\x13StartVideoStreaming\x12-.mavsdk.rpc.camera.StartVideoStreamingRequest\x1a..mavsdk.rpc.camera.StartVideoStreamingResponse\"\x04\x80\xb5\x18\x01\x12w\n\x12StopVideoStreaming\x12,.mavsdk.rpc.camera.StopVideoStreamingRequest\x1a-.mavsdk.rpc.camera.StopVideoStreamingResponse\"\x04\x80\xb5\x18\x01\x12R\n\x07SetMode\x12!.mavsdk.rpc.camera.SetModeRequest\x1a\".mavsdk.rpc.camera.SetModeResponse\"\x00\x12[\n\nListPhotos\x12$.mavsdk.rpc.camera.ListPhotosRequest\x1a%.mavsdk.rpc.camera.ListPhotosResponse\"\x00\x12]\n\rSubscribeMode\x12\'.mavsdk.rpc.camera.SubscribeModeRequest\x1a\x1f.mavsdk.rpc.camera.ModeResponse\"\x00\x30\x01\x12r\n\x14SubscribeInformation\x12..mavsdk.rpc.camera.SubscribeInformationRequest\x1a&.mavsdk.rpc.camera.InformationResponse\"\x00\x30\x01\x12~\n\x18SubscribeVideoStreamInfo\x12\x32.mavsdk.rpc.camera.SubscribeVideoStreamInfoRequest\x1a*.mavsdk.rpc.camera.VideoStreamInfoResponse\"\x00\x30\x01\x12v\n\x14SubscribeCaptureInfo\x12..mavsdk.rpc.camera.SubscribeCaptureInfoRequest\x1a&.mavsdk.rpc.camera.CaptureInfoResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x63\n\x0fSubscribeStatus\x12).mavsdk.rpc.camera.SubscribeStatusRequest\x1a!.mavsdk.rpc.camera.StatusResponse\"\x00\x30\x01\x12\x82\x01\n\x18SubscribeCurrentSettings\x12\x32.mavsdk.rpc.camera.SubscribeCurrentSettingsRequest\x1a*.mavsdk.rpc.camera.CurrentSettingsResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x93\x01\n\x1fSubscribePossibleSettingOptions\x12\x39.mavsdk.rpc.camera.SubscribePossibleSettingOptionsRequest\x1a\x31.mavsdk.rpc.camera.PossibleSettingOptionsResponse\"\x00\x30\x01\x12[\n\nSetSetting\x12$.mavsdk.rpc.camera.SetSettingRequest\x1a%.mavsdk.rpc.camera.SetSettingResponse\"\x00\x12[\n\nGetSetting\x12$.mavsdk.rpc.camera.GetSettingRequest\x1a%.mavsdk.rpc.camera.GetSettingResponse\"\x00\x12\x64\n\rFormatStorage\x12\'.mavsdk.rpc.camera.FormatStorageRequest\x1a(.mavsdk.rpc.camera.FormatStorageResponse\"\x00\x12\x65\n\x0cSelectCamera\x12&.mavsdk.rpc.camera.SelectCameraRequest\x1a\'.mavsdk.rpc.camera.SelectCameraResponse\"\x04\x80\xb5\x18\x01\x42\x1f\n\x10io.mavsdk.cameraB\x0b\x43\x61meraProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x63\x61mera/camera.proto\x12\x11mavsdk.rpc.camera\x1a\x14mavsdk_options.proto\"\x10\n\x0ePrepareRequest\"I\n\x0fPrepareResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"\x12\n\x10TakePhotoRequest\"K\n\x11TakePhotoResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"/\n\x19StartPhotoIntervalRequest\x12\x12\n\ninterval_s\x18\x01 \x01(\x02\"T\n\x1aStartPhotoIntervalResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"\x1a\n\x18StopPhotoIntervalRequest\"S\n\x19StopPhotoIntervalResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"\x13\n\x11StartVideoRequest\"L\n\x12StartVideoResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"\x12\n\x10StopVideoRequest\"K\n\x11StopVideoResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"/\n\x1aStartVideoStreamingRequest\x12\x11\n\tstream_id\x18\x01 \x01(\x05\"U\n\x1bStartVideoStreamingResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\".\n\x19StopVideoStreamingRequest\x12\x11\n\tstream_id\x18\x01 \x01(\x05\"T\n\x1aStopVideoStreamingResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"7\n\x0eSetModeRequest\x12%\n\x04mode\x18\x01 \x01(\x0e\x32\x17.mavsdk.rpc.camera.Mode\"I\n\x0fSetModeResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"I\n\x11ListPhotosRequest\x12\x34\n\x0cphotos_range\x18\x01 \x01(\x0e\x32\x1e.mavsdk.rpc.camera.PhotosRange\"\x83\x01\n\x12ListPhotosResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\x12\x35\n\rcapture_infos\x18\x02 \x03(\x0b\x32\x1e.mavsdk.rpc.camera.CaptureInfo\"\x1d\n\x1bSubscribeInformationRequest\"J\n\x13InformationResponse\x12\x33\n\x0binformation\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.camera.Information\"\x16\n\x14SubscribeModeRequest\"5\n\x0cModeResponse\x12%\n\x04mode\x18\x01 \x01(\x0e\x32\x17.mavsdk.rpc.camera.Mode\"!\n\x1fSubscribeVideoStreamInfoRequest\"X\n\x17VideoStreamInfoResponse\x12=\n\x11video_stream_info\x18\x01 \x01(\x0b\x32\".mavsdk.rpc.camera.VideoStreamInfo\"\x1d\n\x1bSubscribeCaptureInfoRequest\"K\n\x13\x43\x61ptureInfoResponse\x12\x34\n\x0c\x63\x61pture_info\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.camera.CaptureInfo\"\x18\n\x16SubscribeStatusRequest\"B\n\x0eStatusResponse\x12\x30\n\rcamera_status\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.camera.Status\"!\n\x1fSubscribeCurrentSettingsRequest\"O\n\x17\x43urrentSettingsResponse\x12\x34\n\x10\x63urrent_settings\x18\x01 \x03(\x0b\x32\x1a.mavsdk.rpc.camera.Setting\"(\n&SubscribePossibleSettingOptionsRequest\"\\\n\x1ePossibleSettingOptionsResponse\x12:\n\x0fsetting_options\x18\x01 \x03(\x0b\x32!.mavsdk.rpc.camera.SettingOptions\"@\n\x11SetSettingRequest\x12+\n\x07setting\x18\x01 \x01(\x0b\x32\x1a.mavsdk.rpc.camera.Setting\"L\n\x12SetSettingResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"@\n\x11GetSettingRequest\x12+\n\x07setting\x18\x01 \x01(\x0b\x32\x1a.mavsdk.rpc.camera.Setting\"y\n\x12GetSettingResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\x12+\n\x07setting\x18\x02 \x01(\x0b\x32\x1a.mavsdk.rpc.camera.Setting\"*\n\x14\x46ormatStorageRequest\x12\x12\n\nstorage_id\x18\x01 \x01(\x05\"O\n\x15\x46ormatStorageResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"N\n\x14SelectCameraResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"(\n\x13SelectCameraRequest\x12\x11\n\tcamera_id\x18\x01 \x01(\x05\"\x16\n\x14ResetSettingsRequest\"O\n\x15ResetSettingsResponse\x12\x36\n\rcamera_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.camera.CameraResult\"\xc1\x02\n\x0c\x43\x61meraResult\x12\x36\n\x06result\x18\x01 \x01(\x0e\x32&.mavsdk.rpc.camera.CameraResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xe4\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x16\n\x12RESULT_IN_PROGRESS\x10\x02\x12\x0f\n\x0bRESULT_BUSY\x10\x03\x12\x11\n\rRESULT_DENIED\x10\x04\x12\x10\n\x0cRESULT_ERROR\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x19\n\x15RESULT_WRONG_ARGUMENT\x10\x07\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x08\x12\x1f\n\x1bRESULT_PROTOCOL_UNSUPPORTED\x10\t\"q\n\x08Position\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x12\x1b\n\x13relative_altitude_m\x18\x04 \x01(\x02\"8\n\nQuaternion\x12\t\n\x01w\x18\x01 \x01(\x02\x12\t\n\x01x\x18\x02 \x01(\x02\x12\t\n\x01y\x18\x03 \x01(\x02\x12\t\n\x01z\x18\x04 \x01(\x02\"B\n\nEulerAngle\x12\x10\n\x08roll_deg\x18\x01 \x01(\x02\x12\x11\n\tpitch_deg\x18\x02 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x03 \x01(\x02\"\xff\x01\n\x0b\x43\x61ptureInfo\x12-\n\x08position\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.camera.Position\x12:\n\x13\x61ttitude_quaternion\x18\x02 \x01(\x0b\x32\x1d.mavsdk.rpc.camera.Quaternion\x12;\n\x14\x61ttitude_euler_angle\x18\x03 \x01(\x0b\x32\x1d.mavsdk.rpc.camera.EulerAngle\x12\x13\n\x0btime_utc_us\x18\x04 \x01(\x04\x12\x12\n\nis_success\x18\x05 \x01(\x08\x12\r\n\x05index\x18\x06 \x01(\x05\x12\x10\n\x08\x66ile_url\x18\x07 \x01(\t\"\xc5\x01\n\x13VideoStreamSettings\x12\x15\n\rframe_rate_hz\x18\x01 \x01(\x02\x12!\n\x19horizontal_resolution_pix\x18\x02 \x01(\r\x12\x1f\n\x17vertical_resolution_pix\x18\x03 \x01(\r\x12\x14\n\x0c\x62it_rate_b_s\x18\x04 \x01(\r\x12\x14\n\x0crotation_deg\x18\x05 \x01(\r\x12\x0b\n\x03uri\x18\x06 \x01(\t\x12\x1a\n\x12horizontal_fov_deg\x18\x07 \x01(\x02\"\xc2\x03\n\x0fVideoStreamInfo\x12\x38\n\x08settings\x18\x01 \x01(\x0b\x32&.mavsdk.rpc.camera.VideoStreamSettings\x12\x44\n\x06status\x18\x02 \x01(\x0e\x32\x34.mavsdk.rpc.camera.VideoStreamInfo.VideoStreamStatus\x12H\n\x08spectrum\x18\x03 \x01(\x0e\x32\x36.mavsdk.rpc.camera.VideoStreamInfo.VideoStreamSpectrum\"]\n\x11VideoStreamStatus\x12#\n\x1fVIDEO_STREAM_STATUS_NOT_RUNNING\x10\x00\x12#\n\x1fVIDEO_STREAM_STATUS_IN_PROGRESS\x10\x01\"\x85\x01\n\x13VideoStreamSpectrum\x12!\n\x1dVIDEO_STREAM_SPECTRUM_UNKNOWN\x10\x00\x12\'\n#VIDEO_STREAM_SPECTRUM_VISIBLE_LIGHT\x10\x01\x12\"\n\x1eVIDEO_STREAM_SPECTRUM_INFRARED\x10\x02\"\x87\x05\n\x06Status\x12\x10\n\x08video_on\x18\x01 \x01(\x08\x12\x19\n\x11photo_interval_on\x18\x02 \x01(\x08\x12\x18\n\x10used_storage_mib\x18\x03 \x01(\x02\x12\x1d\n\x15\x61vailable_storage_mib\x18\x04 \x01(\x02\x12\x19\n\x11total_storage_mib\x18\x05 \x01(\x02\x12\x18\n\x10recording_time_s\x18\x06 \x01(\x02\x12\x19\n\x11media_folder_name\x18\x07 \x01(\t\x12?\n\x0estorage_status\x18\x08 \x01(\x0e\x32\'.mavsdk.rpc.camera.Status.StorageStatus\x12\x12\n\nstorage_id\x18\t \x01(\r\x12;\n\x0cstorage_type\x18\n \x01(\x0e\x32%.mavsdk.rpc.camera.Status.StorageType\"\x91\x01\n\rStorageStatus\x12 \n\x1cSTORAGE_STATUS_NOT_AVAILABLE\x10\x00\x12\x1e\n\x1aSTORAGE_STATUS_UNFORMATTED\x10\x01\x12\x1c\n\x18STORAGE_STATUS_FORMATTED\x10\x02\x12 \n\x1cSTORAGE_STATUS_NOT_SUPPORTED\x10\x03\"\xa0\x01\n\x0bStorageType\x12\x18\n\x14STORAGE_TYPE_UNKNOWN\x10\x00\x12\x1a\n\x16STORAGE_TYPE_USB_STICK\x10\x01\x12\x13\n\x0fSTORAGE_TYPE_SD\x10\x02\x12\x18\n\x14STORAGE_TYPE_MICROSD\x10\x03\x12\x13\n\x0fSTORAGE_TYPE_HD\x10\x07\x12\x17\n\x12STORAGE_TYPE_OTHER\x10\xfe\x01\"7\n\x06Option\x12\x11\n\toption_id\x18\x01 \x01(\t\x12\x1a\n\x12option_description\x18\x02 \x01(\t\"w\n\x07Setting\x12\x12\n\nsetting_id\x18\x01 \x01(\t\x12\x1b\n\x13setting_description\x18\x02 \x01(\t\x12)\n\x06option\x18\x03 \x01(\x0b\x32\x19.mavsdk.rpc.camera.Option\x12\x10\n\x08is_range\x18\x04 \x01(\x08\"\x7f\n\x0eSettingOptions\x12\x12\n\nsetting_id\x18\x01 \x01(\t\x12\x1b\n\x13setting_description\x18\x02 \x01(\t\x12*\n\x07options\x18\x03 \x03(\x0b\x32\x19.mavsdk.rpc.camera.Option\x12\x10\n\x08is_range\x18\x04 \x01(\x08\"\xd5\x01\n\x0bInformation\x12\x13\n\x0bvendor_name\x18\x01 \x01(\t\x12\x12\n\nmodel_name\x18\x02 \x01(\t\x12\x17\n\x0f\x66ocal_length_mm\x18\x03 \x01(\x02\x12!\n\x19horizontal_sensor_size_mm\x18\x04 \x01(\x02\x12\x1f\n\x17vertical_sensor_size_mm\x18\x05 \x01(\x02\x12 \n\x18horizontal_resolution_px\x18\x06 \x01(\r\x12\x1e\n\x16vertical_resolution_px\x18\x07 \x01(\r*8\n\x04Mode\x12\x10\n\x0cMODE_UNKNOWN\x10\x00\x12\x0e\n\nMODE_PHOTO\x10\x01\x12\x0e\n\nMODE_VIDEO\x10\x02*F\n\x0bPhotosRange\x12\x14\n\x10PHOTOS_RANGE_ALL\x10\x00\x12!\n\x1dPHOTOS_RANGE_SINCE_CONNECTION\x10\x01\x32\xb9\x12\n\rCameraService\x12R\n\x07Prepare\x12!.mavsdk.rpc.camera.PrepareRequest\x1a\".mavsdk.rpc.camera.PrepareResponse\"\x00\x12X\n\tTakePhoto\x12#.mavsdk.rpc.camera.TakePhotoRequest\x1a$.mavsdk.rpc.camera.TakePhotoResponse\"\x00\x12s\n\x12StartPhotoInterval\x12,.mavsdk.rpc.camera.StartPhotoIntervalRequest\x1a-.mavsdk.rpc.camera.StartPhotoIntervalResponse\"\x00\x12p\n\x11StopPhotoInterval\x12+.mavsdk.rpc.camera.StopPhotoIntervalRequest\x1a,.mavsdk.rpc.camera.StopPhotoIntervalResponse\"\x00\x12[\n\nStartVideo\x12$.mavsdk.rpc.camera.StartVideoRequest\x1a%.mavsdk.rpc.camera.StartVideoResponse\"\x00\x12X\n\tStopVideo\x12#.mavsdk.rpc.camera.StopVideoRequest\x1a$.mavsdk.rpc.camera.StopVideoResponse\"\x00\x12z\n\x13StartVideoStreaming\x12-.mavsdk.rpc.camera.StartVideoStreamingRequest\x1a..mavsdk.rpc.camera.StartVideoStreamingResponse\"\x04\x80\xb5\x18\x01\x12w\n\x12StopVideoStreaming\x12,.mavsdk.rpc.camera.StopVideoStreamingRequest\x1a-.mavsdk.rpc.camera.StopVideoStreamingResponse\"\x04\x80\xb5\x18\x01\x12R\n\x07SetMode\x12!.mavsdk.rpc.camera.SetModeRequest\x1a\".mavsdk.rpc.camera.SetModeResponse\"\x00\x12[\n\nListPhotos\x12$.mavsdk.rpc.camera.ListPhotosRequest\x1a%.mavsdk.rpc.camera.ListPhotosResponse\"\x00\x12]\n\rSubscribeMode\x12\'.mavsdk.rpc.camera.SubscribeModeRequest\x1a\x1f.mavsdk.rpc.camera.ModeResponse\"\x00\x30\x01\x12r\n\x14SubscribeInformation\x12..mavsdk.rpc.camera.SubscribeInformationRequest\x1a&.mavsdk.rpc.camera.InformationResponse\"\x00\x30\x01\x12~\n\x18SubscribeVideoStreamInfo\x12\x32.mavsdk.rpc.camera.SubscribeVideoStreamInfoRequest\x1a*.mavsdk.rpc.camera.VideoStreamInfoResponse\"\x00\x30\x01\x12v\n\x14SubscribeCaptureInfo\x12..mavsdk.rpc.camera.SubscribeCaptureInfoRequest\x1a&.mavsdk.rpc.camera.CaptureInfoResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x63\n\x0fSubscribeStatus\x12).mavsdk.rpc.camera.SubscribeStatusRequest\x1a!.mavsdk.rpc.camera.StatusResponse\"\x00\x30\x01\x12\x82\x01\n\x18SubscribeCurrentSettings\x12\x32.mavsdk.rpc.camera.SubscribeCurrentSettingsRequest\x1a*.mavsdk.rpc.camera.CurrentSettingsResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x93\x01\n\x1fSubscribePossibleSettingOptions\x12\x39.mavsdk.rpc.camera.SubscribePossibleSettingOptionsRequest\x1a\x31.mavsdk.rpc.camera.PossibleSettingOptionsResponse\"\x00\x30\x01\x12[\n\nSetSetting\x12$.mavsdk.rpc.camera.SetSettingRequest\x1a%.mavsdk.rpc.camera.SetSettingResponse\"\x00\x12[\n\nGetSetting\x12$.mavsdk.rpc.camera.GetSettingRequest\x1a%.mavsdk.rpc.camera.GetSettingResponse\"\x00\x12\x64\n\rFormatStorage\x12\'.mavsdk.rpc.camera.FormatStorageRequest\x1a(.mavsdk.rpc.camera.FormatStorageResponse\"\x00\x12\x65\n\x0cSelectCamera\x12&.mavsdk.rpc.camera.SelectCameraRequest\x1a\'.mavsdk.rpc.camera.SelectCameraResponse\"\x04\x80\xb5\x18\x01\x12\x64\n\rResetSettings\x12\'.mavsdk.rpc.camera.ResetSettingsRequest\x1a(.mavsdk.rpc.camera.ResetSettingsResponse\"\x00\x42\x1f\n\x10io.mavsdk.cameraB\x0b\x43\x61meraProtob\x06proto3') _MODE = DESCRIPTOR.enum_types_by_name['Mode'] Mode = enum_type_wrapper.EnumTypeWrapper(_MODE) @@ -71,6 +71,8 @@ _FORMATSTORAGERESPONSE = DESCRIPTOR.message_types_by_name['FormatStorageResponse'] _SELECTCAMERARESPONSE = DESCRIPTOR.message_types_by_name['SelectCameraResponse'] _SELECTCAMERAREQUEST = DESCRIPTOR.message_types_by_name['SelectCameraRequest'] +_RESETSETTINGSREQUEST = DESCRIPTOR.message_types_by_name['ResetSettingsRequest'] +_RESETSETTINGSRESPONSE = DESCRIPTOR.message_types_by_name['ResetSettingsResponse'] _CAMERARESULT = DESCRIPTOR.message_types_by_name['CameraResult'] _POSITION = DESCRIPTOR.message_types_by_name['Position'] _QUATERNION = DESCRIPTOR.message_types_by_name['Quaternion'] @@ -382,6 +384,20 @@ }) _sym_db.RegisterMessage(SelectCameraRequest) +ResetSettingsRequest = _reflection.GeneratedProtocolMessageType('ResetSettingsRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESETSETTINGSREQUEST, + '__module__' : 'camera.camera_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera.ResetSettingsRequest) + }) +_sym_db.RegisterMessage(ResetSettingsRequest) + +ResetSettingsResponse = _reflection.GeneratedProtocolMessageType('ResetSettingsResponse', (_message.Message,), { + 'DESCRIPTOR' : _RESETSETTINGSRESPONSE, + '__module__' : 'camera.camera_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera.ResetSettingsResponse) + }) +_sym_db.RegisterMessage(ResetSettingsResponse) + CameraResult = _reflection.GeneratedProtocolMessageType('CameraResult', (_message.Message,), { 'DESCRIPTOR' : _CAMERARESULT, '__module__' : 'camera.camera_pb2' @@ -481,10 +497,10 @@ _CAMERASERVICE.methods_by_name['SubscribeCurrentSettings']._serialized_options = b'\200\265\030\000' _CAMERASERVICE.methods_by_name['SelectCamera']._options = None _CAMERASERVICE.methods_by_name['SelectCamera']._serialized_options = b'\200\265\030\001' - _MODE._serialized_start=5212 - _MODE._serialized_end=5268 - _PHOTOSRANGE._serialized_start=5270 - _PHOTOSRANGE._serialized_end=5340 + _MODE._serialized_start=5408 + _MODE._serialized_end=5464 + _PHOTOSRANGE._serialized_start=5466 + _PHOTOSRANGE._serialized_end=5536 _PREPAREREQUEST._serialized_start=64 _PREPAREREQUEST._serialized_end=80 _PREPARERESPONSE._serialized_start=82 @@ -510,99 +526,103 @@ _STOPVIDEORESPONSE._serialized_start=621 _STOPVIDEORESPONSE._serialized_end=696 _STARTVIDEOSTREAMINGREQUEST._serialized_start=698 - _STARTVIDEOSTREAMINGREQUEST._serialized_end=726 - _STARTVIDEOSTREAMINGRESPONSE._serialized_start=728 - _STARTVIDEOSTREAMINGRESPONSE._serialized_end=813 - _STOPVIDEOSTREAMINGREQUEST._serialized_start=815 - _STOPVIDEOSTREAMINGREQUEST._serialized_end=842 - _STOPVIDEOSTREAMINGRESPONSE._serialized_start=844 - _STOPVIDEOSTREAMINGRESPONSE._serialized_end=928 - _SETMODEREQUEST._serialized_start=930 - _SETMODEREQUEST._serialized_end=985 - _SETMODERESPONSE._serialized_start=987 - _SETMODERESPONSE._serialized_end=1060 - _LISTPHOTOSREQUEST._serialized_start=1062 - _LISTPHOTOSREQUEST._serialized_end=1135 - _LISTPHOTOSRESPONSE._serialized_start=1138 - _LISTPHOTOSRESPONSE._serialized_end=1269 - _SUBSCRIBEINFORMATIONREQUEST._serialized_start=1271 - _SUBSCRIBEINFORMATIONREQUEST._serialized_end=1300 - _INFORMATIONRESPONSE._serialized_start=1302 - _INFORMATIONRESPONSE._serialized_end=1376 - _SUBSCRIBEMODEREQUEST._serialized_start=1378 - _SUBSCRIBEMODEREQUEST._serialized_end=1400 - _MODERESPONSE._serialized_start=1402 - _MODERESPONSE._serialized_end=1455 - _SUBSCRIBEVIDEOSTREAMINFOREQUEST._serialized_start=1457 - _SUBSCRIBEVIDEOSTREAMINFOREQUEST._serialized_end=1490 - _VIDEOSTREAMINFORESPONSE._serialized_start=1492 - _VIDEOSTREAMINFORESPONSE._serialized_end=1580 - _SUBSCRIBECAPTUREINFOREQUEST._serialized_start=1582 - _SUBSCRIBECAPTUREINFOREQUEST._serialized_end=1611 - _CAPTUREINFORESPONSE._serialized_start=1613 - _CAPTUREINFORESPONSE._serialized_end=1688 - _SUBSCRIBESTATUSREQUEST._serialized_start=1690 - _SUBSCRIBESTATUSREQUEST._serialized_end=1714 - _STATUSRESPONSE._serialized_start=1716 - _STATUSRESPONSE._serialized_end=1782 - _SUBSCRIBECURRENTSETTINGSREQUEST._serialized_start=1784 - _SUBSCRIBECURRENTSETTINGSREQUEST._serialized_end=1817 - _CURRENTSETTINGSRESPONSE._serialized_start=1819 - _CURRENTSETTINGSRESPONSE._serialized_end=1898 - _SUBSCRIBEPOSSIBLESETTINGOPTIONSREQUEST._serialized_start=1900 - _SUBSCRIBEPOSSIBLESETTINGOPTIONSREQUEST._serialized_end=1940 - _POSSIBLESETTINGOPTIONSRESPONSE._serialized_start=1942 - _POSSIBLESETTINGOPTIONSRESPONSE._serialized_end=2034 - _SETSETTINGREQUEST._serialized_start=2036 - _SETSETTINGREQUEST._serialized_end=2100 - _SETSETTINGRESPONSE._serialized_start=2102 - _SETSETTINGRESPONSE._serialized_end=2178 - _GETSETTINGREQUEST._serialized_start=2180 - _GETSETTINGREQUEST._serialized_end=2244 - _GETSETTINGRESPONSE._serialized_start=2246 - _GETSETTINGRESPONSE._serialized_end=2367 - _FORMATSTORAGEREQUEST._serialized_start=2369 - _FORMATSTORAGEREQUEST._serialized_end=2391 - _FORMATSTORAGERESPONSE._serialized_start=2393 - _FORMATSTORAGERESPONSE._serialized_end=2472 - _SELECTCAMERARESPONSE._serialized_start=2474 - _SELECTCAMERARESPONSE._serialized_end=2552 - _SELECTCAMERAREQUEST._serialized_start=2554 - _SELECTCAMERAREQUEST._serialized_end=2594 - _CAMERARESULT._serialized_start=2597 - _CAMERARESULT._serialized_end=2885 - _CAMERARESULT_RESULT._serialized_start=2690 - _CAMERARESULT_RESULT._serialized_end=2885 - _POSITION._serialized_start=2887 - _POSITION._serialized_end=3000 - _QUATERNION._serialized_start=3002 - _QUATERNION._serialized_end=3058 - _EULERANGLE._serialized_start=3060 - _EULERANGLE._serialized_end=3126 - _CAPTUREINFO._serialized_start=3129 - _CAPTUREINFO._serialized_end=3384 - _VIDEOSTREAMSETTINGS._serialized_start=3387 - _VIDEOSTREAMSETTINGS._serialized_end=3584 - _VIDEOSTREAMINFO._serialized_start=3587 - _VIDEOSTREAMINFO._serialized_end=4037 - _VIDEOSTREAMINFO_VIDEOSTREAMSTATUS._serialized_start=3808 - _VIDEOSTREAMINFO_VIDEOSTREAMSTATUS._serialized_end=3901 - _VIDEOSTREAMINFO_VIDEOSTREAMSPECTRUM._serialized_start=3904 - _VIDEOSTREAMINFO_VIDEOSTREAMSPECTRUM._serialized_end=4037 - _STATUS._serialized_start=4040 - _STATUS._serialized_end=4687 - _STATUS_STORAGESTATUS._serialized_start=4379 - _STATUS_STORAGESTATUS._serialized_end=4524 - _STATUS_STORAGETYPE._serialized_start=4527 - _STATUS_STORAGETYPE._serialized_end=4687 - _OPTION._serialized_start=4689 - _OPTION._serialized_end=4744 - _SETTING._serialized_start=4746 - _SETTING._serialized_end=4865 - _SETTINGOPTIONS._serialized_start=4867 - _SETTINGOPTIONS._serialized_end=4994 - _INFORMATION._serialized_start=4997 - _INFORMATION._serialized_end=5210 - _CAMERASERVICE._serialized_start=5343 - _CAMERASERVICE._serialized_end=7602 + _STARTVIDEOSTREAMINGREQUEST._serialized_end=745 + _STARTVIDEOSTREAMINGRESPONSE._serialized_start=747 + _STARTVIDEOSTREAMINGRESPONSE._serialized_end=832 + _STOPVIDEOSTREAMINGREQUEST._serialized_start=834 + _STOPVIDEOSTREAMINGREQUEST._serialized_end=880 + _STOPVIDEOSTREAMINGRESPONSE._serialized_start=882 + _STOPVIDEOSTREAMINGRESPONSE._serialized_end=966 + _SETMODEREQUEST._serialized_start=968 + _SETMODEREQUEST._serialized_end=1023 + _SETMODERESPONSE._serialized_start=1025 + _SETMODERESPONSE._serialized_end=1098 + _LISTPHOTOSREQUEST._serialized_start=1100 + _LISTPHOTOSREQUEST._serialized_end=1173 + _LISTPHOTOSRESPONSE._serialized_start=1176 + _LISTPHOTOSRESPONSE._serialized_end=1307 + _SUBSCRIBEINFORMATIONREQUEST._serialized_start=1309 + _SUBSCRIBEINFORMATIONREQUEST._serialized_end=1338 + _INFORMATIONRESPONSE._serialized_start=1340 + _INFORMATIONRESPONSE._serialized_end=1414 + _SUBSCRIBEMODEREQUEST._serialized_start=1416 + _SUBSCRIBEMODEREQUEST._serialized_end=1438 + _MODERESPONSE._serialized_start=1440 + _MODERESPONSE._serialized_end=1493 + _SUBSCRIBEVIDEOSTREAMINFOREQUEST._serialized_start=1495 + _SUBSCRIBEVIDEOSTREAMINFOREQUEST._serialized_end=1528 + _VIDEOSTREAMINFORESPONSE._serialized_start=1530 + _VIDEOSTREAMINFORESPONSE._serialized_end=1618 + _SUBSCRIBECAPTUREINFOREQUEST._serialized_start=1620 + _SUBSCRIBECAPTUREINFOREQUEST._serialized_end=1649 + _CAPTUREINFORESPONSE._serialized_start=1651 + _CAPTUREINFORESPONSE._serialized_end=1726 + _SUBSCRIBESTATUSREQUEST._serialized_start=1728 + _SUBSCRIBESTATUSREQUEST._serialized_end=1752 + _STATUSRESPONSE._serialized_start=1754 + _STATUSRESPONSE._serialized_end=1820 + _SUBSCRIBECURRENTSETTINGSREQUEST._serialized_start=1822 + _SUBSCRIBECURRENTSETTINGSREQUEST._serialized_end=1855 + _CURRENTSETTINGSRESPONSE._serialized_start=1857 + _CURRENTSETTINGSRESPONSE._serialized_end=1936 + _SUBSCRIBEPOSSIBLESETTINGOPTIONSREQUEST._serialized_start=1938 + _SUBSCRIBEPOSSIBLESETTINGOPTIONSREQUEST._serialized_end=1978 + _POSSIBLESETTINGOPTIONSRESPONSE._serialized_start=1980 + _POSSIBLESETTINGOPTIONSRESPONSE._serialized_end=2072 + _SETSETTINGREQUEST._serialized_start=2074 + _SETSETTINGREQUEST._serialized_end=2138 + _SETSETTINGRESPONSE._serialized_start=2140 + _SETSETTINGRESPONSE._serialized_end=2216 + _GETSETTINGREQUEST._serialized_start=2218 + _GETSETTINGREQUEST._serialized_end=2282 + _GETSETTINGRESPONSE._serialized_start=2284 + _GETSETTINGRESPONSE._serialized_end=2405 + _FORMATSTORAGEREQUEST._serialized_start=2407 + _FORMATSTORAGEREQUEST._serialized_end=2449 + _FORMATSTORAGERESPONSE._serialized_start=2451 + _FORMATSTORAGERESPONSE._serialized_end=2530 + _SELECTCAMERARESPONSE._serialized_start=2532 + _SELECTCAMERARESPONSE._serialized_end=2610 + _SELECTCAMERAREQUEST._serialized_start=2612 + _SELECTCAMERAREQUEST._serialized_end=2652 + _RESETSETTINGSREQUEST._serialized_start=2654 + _RESETSETTINGSREQUEST._serialized_end=2676 + _RESETSETTINGSRESPONSE._serialized_start=2678 + _RESETSETTINGSRESPONSE._serialized_end=2757 + _CAMERARESULT._serialized_start=2760 + _CAMERARESULT._serialized_end=3081 + _CAMERARESULT_RESULT._serialized_start=2853 + _CAMERARESULT_RESULT._serialized_end=3081 + _POSITION._serialized_start=3083 + _POSITION._serialized_end=3196 + _QUATERNION._serialized_start=3198 + _QUATERNION._serialized_end=3254 + _EULERANGLE._serialized_start=3256 + _EULERANGLE._serialized_end=3322 + _CAPTUREINFO._serialized_start=3325 + _CAPTUREINFO._serialized_end=3580 + _VIDEOSTREAMSETTINGS._serialized_start=3583 + _VIDEOSTREAMSETTINGS._serialized_end=3780 + _VIDEOSTREAMINFO._serialized_start=3783 + _VIDEOSTREAMINFO._serialized_end=4233 + _VIDEOSTREAMINFO_VIDEOSTREAMSTATUS._serialized_start=4004 + _VIDEOSTREAMINFO_VIDEOSTREAMSTATUS._serialized_end=4097 + _VIDEOSTREAMINFO_VIDEOSTREAMSPECTRUM._serialized_start=4100 + _VIDEOSTREAMINFO_VIDEOSTREAMSPECTRUM._serialized_end=4233 + _STATUS._serialized_start=4236 + _STATUS._serialized_end=4883 + _STATUS_STORAGESTATUS._serialized_start=4575 + _STATUS_STORAGESTATUS._serialized_end=4720 + _STATUS_STORAGETYPE._serialized_start=4723 + _STATUS_STORAGETYPE._serialized_end=4883 + _OPTION._serialized_start=4885 + _OPTION._serialized_end=4940 + _SETTING._serialized_start=4942 + _SETTING._serialized_end=5061 + _SETTINGOPTIONS._serialized_start=5063 + _SETTINGOPTIONS._serialized_end=5190 + _INFORMATION._serialized_start=5193 + _INFORMATION._serialized_end=5406 + _CAMERASERVICE._serialized_start=5539 + _CAMERASERVICE._serialized_end=7900 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/camera_pb2_grpc.py b/mavsdk/camera_pb2_grpc.py index 91aef2a5..ff4f474a 100644 --- a/mavsdk/camera_pb2_grpc.py +++ b/mavsdk/camera_pb2_grpc.py @@ -127,6 +127,11 @@ def __init__(self, channel): request_serializer=camera_dot_camera__pb2.SelectCameraRequest.SerializeToString, response_deserializer=camera_dot_camera__pb2.SelectCameraResponse.FromString, ) + self.ResetSettings = channel.unary_unary( + '/mavsdk.rpc.camera.CameraService/ResetSettings', + request_serializer=camera_dot_camera__pb2.ResetSettingsRequest.SerializeToString, + response_deserializer=camera_dot_camera__pb2.ResetSettingsResponse.FromString, + ) class CameraServiceServicer(object): @@ -316,6 +321,16 @@ def SelectCamera(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def ResetSettings(self, request, context): + """ + Reset all settings in camera. + + This will reset all camera settings to default value + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_CameraServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -424,6 +439,11 @@ def add_CameraServiceServicer_to_server(servicer, server): request_deserializer=camera_dot_camera__pb2.SelectCameraRequest.FromString, response_serializer=camera_dot_camera__pb2.SelectCameraResponse.SerializeToString, ), + 'ResetSettings': grpc.unary_unary_rpc_method_handler( + servicer.ResetSettings, + request_deserializer=camera_dot_camera__pb2.ResetSettingsRequest.FromString, + response_serializer=camera_dot_camera__pb2.ResetSettingsResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.camera.CameraService', rpc_method_handlers) @@ -798,3 +818,20 @@ def SelectCamera(request, camera_dot_camera__pb2.SelectCameraResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ResetSettings(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.camera.CameraService/ResetSettings', + camera_dot_camera__pb2.ResetSettingsRequest.SerializeToString, + camera_dot_camera__pb2.ResetSettingsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/mavsdk/camera_server.py b/mavsdk/camera_server.py index a961c5eb..cc868979 100644 --- a/mavsdk/camera_server.py +++ b/mavsdk/camera_server.py @@ -6,9 +6,9 @@ from enum import Enum -class TakePhotoFeedback(Enum): +class CameraFeedback(Enum): """ - Possible results when taking a photo. + Possible feedback results for camera respond command. Values ------ @@ -33,26 +33,70 @@ class TakePhotoFeedback(Enum): FAILED = 3 def translate_to_rpc(self): - if self == TakePhotoFeedback.UNKNOWN: - return camera_server_pb2.TAKE_PHOTO_FEEDBACK_UNKNOWN - if self == TakePhotoFeedback.OK: - return camera_server_pb2.TAKE_PHOTO_FEEDBACK_OK - if self == TakePhotoFeedback.BUSY: - return camera_server_pb2.TAKE_PHOTO_FEEDBACK_BUSY - if self == TakePhotoFeedback.FAILED: - return camera_server_pb2.TAKE_PHOTO_FEEDBACK_FAILED + if self == CameraFeedback.UNKNOWN: + return camera_server_pb2.CAMERA_FEEDBACK_UNKNOWN + if self == CameraFeedback.OK: + return camera_server_pb2.CAMERA_FEEDBACK_OK + if self == CameraFeedback.BUSY: + return camera_server_pb2.CAMERA_FEEDBACK_BUSY + if self == CameraFeedback.FAILED: + return camera_server_pb2.CAMERA_FEEDBACK_FAILED @staticmethod def translate_from_rpc(rpc_enum_value): """ Parses a gRPC response """ - if rpc_enum_value == camera_server_pb2.TAKE_PHOTO_FEEDBACK_UNKNOWN: - return TakePhotoFeedback.UNKNOWN - if rpc_enum_value == camera_server_pb2.TAKE_PHOTO_FEEDBACK_OK: - return TakePhotoFeedback.OK - if rpc_enum_value == camera_server_pb2.TAKE_PHOTO_FEEDBACK_BUSY: - return TakePhotoFeedback.BUSY - if rpc_enum_value == camera_server_pb2.TAKE_PHOTO_FEEDBACK_FAILED: - return TakePhotoFeedback.FAILED + if rpc_enum_value == camera_server_pb2.CAMERA_FEEDBACK_UNKNOWN: + return CameraFeedback.UNKNOWN + if rpc_enum_value == camera_server_pb2.CAMERA_FEEDBACK_OK: + return CameraFeedback.OK + if rpc_enum_value == camera_server_pb2.CAMERA_FEEDBACK_BUSY: + return CameraFeedback.BUSY + if rpc_enum_value == camera_server_pb2.CAMERA_FEEDBACK_FAILED: + return CameraFeedback.FAILED + + def __str__(self): + return self.name + + +class Mode(Enum): + """ + Camera mode type. + + Values + ------ + UNKNOWN + Unknown mode + + PHOTO + Photo mode + + VIDEO + Video mode + + """ + + + UNKNOWN = 0 + PHOTO = 1 + VIDEO = 2 + + def translate_to_rpc(self): + if self == Mode.UNKNOWN: + return camera_server_pb2.MODE_UNKNOWN + if self == Mode.PHOTO: + return camera_server_pb2.MODE_PHOTO + if self == Mode.VIDEO: + return camera_server_pb2.MODE_VIDEO + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == camera_server_pb2.MODE_UNKNOWN: + return Mode.UNKNOWN + if rpc_enum_value == camera_server_pb2.MODE_PHOTO: + return Mode.PHOTO + if rpc_enum_value == camera_server_pb2.MODE_VIDEO: + return Mode.VIDEO def __str__(self): return self.name @@ -276,6 +320,80 @@ def translate_to_rpc(self, rpcInformation): +class VideoStreaming: + """ + Type to represent video streaming settings + + Parameters + ---------- + has_rtsp_server : bool + True if the capture was successful + + rtsp_uri : std::string + RTSP URI (e.g. rtsp://192.168.1.42:8554/live) + + """ + + + + def __init__( + self, + has_rtsp_server, + rtsp_uri): + """ Initializes the VideoStreaming object """ + self.has_rtsp_server = has_rtsp_server + self.rtsp_uri = rtsp_uri + + def __eq__(self, to_compare): + """ Checks if two VideoStreaming are the same """ + try: + # Try to compare - this likely fails when it is compared to a non + # VideoStreaming object + return \ + (self.has_rtsp_server == to_compare.has_rtsp_server) and \ + (self.rtsp_uri == to_compare.rtsp_uri) + + except AttributeError: + return False + + def __str__(self): + """ VideoStreaming in string representation """ + struct_repr = ", ".join([ + "has_rtsp_server: " + str(self.has_rtsp_server), + "rtsp_uri: " + str(self.rtsp_uri) + ]) + + return f"VideoStreaming: [{struct_repr}]" + + @staticmethod + def translate_from_rpc(rpcVideoStreaming): + """ Translates a gRPC struct to the SDK equivalent """ + return VideoStreaming( + + rpcVideoStreaming.has_rtsp_server, + + + rpcVideoStreaming.rtsp_uri + ) + + def translate_to_rpc(self, rpcVideoStreaming): + """ Translates this SDK object into its gRPC equivalent """ + + + + + rpcVideoStreaming.has_rtsp_server = self.has_rtsp_server + + + + + + rpcVideoStreaming.rtsp_uri = self.rtsp_uri + + + + + class Position: """ Position type in global coordinates. @@ -799,149 +917,1183 @@ def translate_to_rpc(self, rpcCameraServerResult): +class StorageInformation: + """ + Information about the camera storage. -class CameraServerError(Exception): - """ Raised when a CameraServerResult is a fail code """ + Parameters + ---------- + used_storage_mib : float + Used storage (in MiB) - def __init__(self, result, origin, *params): - self._result = result - self._origin = origin - self._params = params + available_storage_mib : float + Available storage (in MiB) - def __str__(self): - return f"{self._result.result}: '{self._result.result_str}'; origin: {self._origin}; params: {self._params}" + total_storage_mib : float + Total storage (in MiB) + storage_status : StorageStatus + Storage status -class CameraServer(AsyncBase): - """ - Provides handling of camera trigger commands. + storage_id : uint32_t + Storage ID starting at 1 - Generated by dcsdkgen - MAVSDK CameraServer API - """ + storage_type : StorageType + Storage type - # Plugin name - name = "CameraServer" + read_speed_mib_s : float + Read speed [MiB/s] - def _setup_stub(self, channel): - """ Setups the api stub """ - self._stub = camera_server_pb2_grpc.CameraServerServiceStub(channel) + write_speed_mib_s : float + Write speed [MiB/s] + + """ - def _extract_result(self, response): - """ Returns the response status and description """ - return CameraServerResult.translate_from_rpc(response.camera_server_result) - - async def set_information(self, information): + class StorageStatus(Enum): """ - Sets the camera information. This must be called as soon as the camera server is created. - - Parameters - ---------- - information : Information - information about the camera + Storage status type. - Raises + Values ------ - CameraServerError - If the request fails. The error contains the reason for the failure. - """ + NOT_AVAILABLE + Storage not available - request = camera_server_pb2.SetInformationRequest() - - information.translate_to_rpc(request.information) - - - response = await self._stub.SetInformation(request) + UNFORMATTED + Storage is not formatted (i.e. has no recognized file system) - - result = self._extract_result(response) + FORMATTED + Storage is formatted (i.e. has recognized a file system) + + NOT_SUPPORTED + Storage status is not supported + + """ - if result.result != CameraServerResult.Result.SUCCESS: - raise CameraServerError(result, "set_information()", information) + NOT_AVAILABLE = 0 + UNFORMATTED = 1 + FORMATTED = 2 + NOT_SUPPORTED = 3 - async def set_in_progress(self, in_progress): - """ - Sets image capture in progress status flags. This should be set to true when the camera is busy taking a photo and false when it is done. + def translate_to_rpc(self): + if self == StorageInformation.StorageStatus.NOT_AVAILABLE: + return camera_server_pb2.StorageInformation.STORAGE_STATUS_NOT_AVAILABLE + if self == StorageInformation.StorageStatus.UNFORMATTED: + return camera_server_pb2.StorageInformation.STORAGE_STATUS_UNFORMATTED + if self == StorageInformation.StorageStatus.FORMATTED: + return camera_server_pb2.StorageInformation.STORAGE_STATUS_FORMATTED + if self == StorageInformation.StorageStatus.NOT_SUPPORTED: + return camera_server_pb2.StorageInformation.STORAGE_STATUS_NOT_SUPPORTED - Parameters - ---------- - in_progress : bool - true if capture is in progress or false for idle. + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == camera_server_pb2.StorageInformation.STORAGE_STATUS_NOT_AVAILABLE: + return StorageInformation.StorageStatus.NOT_AVAILABLE + if rpc_enum_value == camera_server_pb2.StorageInformation.STORAGE_STATUS_UNFORMATTED: + return StorageInformation.StorageStatus.UNFORMATTED + if rpc_enum_value == camera_server_pb2.StorageInformation.STORAGE_STATUS_FORMATTED: + return StorageInformation.StorageStatus.FORMATTED + if rpc_enum_value == camera_server_pb2.StorageInformation.STORAGE_STATUS_NOT_SUPPORTED: + return StorageInformation.StorageStatus.NOT_SUPPORTED - Raises - ------ - CameraServerError - If the request fails. The error contains the reason for the failure. + def __str__(self): + return self.name + + + class StorageType(Enum): """ + Storage type. - request = camera_server_pb2.SetInProgressRequest() - request.in_progress = in_progress - response = await self._stub.SetInProgress(request) + Values + ------ + UNKNOWN + Storage type unknown - - result = self._extract_result(response) + USB_STICK + Storage type USB stick + + SD + Storage type SD card + + MICROSD + Storage type MicroSD card + + HD + Storage type HD mass storage + + OTHER + Storage type other, not listed + + """ - if result.result != CameraServerResult.Result.SUCCESS: - raise CameraServerError(result, "set_in_progress()", in_progress) + UNKNOWN = 0 + USB_STICK = 1 + SD = 2 + MICROSD = 3 + HD = 4 + OTHER = 5 - async def take_photo(self): - """ - Subscribe to image capture requests. Each request received should respond to using RespondTakePhoto. + def translate_to_rpc(self): + if self == StorageInformation.StorageType.UNKNOWN: + return camera_server_pb2.StorageInformation.STORAGE_TYPE_UNKNOWN + if self == StorageInformation.StorageType.USB_STICK: + return camera_server_pb2.StorageInformation.STORAGE_TYPE_USB_STICK + if self == StorageInformation.StorageType.SD: + return camera_server_pb2.StorageInformation.STORAGE_TYPE_SD + if self == StorageInformation.StorageType.MICROSD: + return camera_server_pb2.StorageInformation.STORAGE_TYPE_MICROSD + if self == StorageInformation.StorageType.HD: + return camera_server_pb2.StorageInformation.STORAGE_TYPE_HD + if self == StorageInformation.StorageType.OTHER: + return camera_server_pb2.StorageInformation.STORAGE_TYPE_OTHER - Yields - ------- - index : int32_t - - - """ + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == camera_server_pb2.StorageInformation.STORAGE_TYPE_UNKNOWN: + return StorageInformation.StorageType.UNKNOWN + if rpc_enum_value == camera_server_pb2.StorageInformation.STORAGE_TYPE_USB_STICK: + return StorageInformation.StorageType.USB_STICK + if rpc_enum_value == camera_server_pb2.StorageInformation.STORAGE_TYPE_SD: + return StorageInformation.StorageType.SD + if rpc_enum_value == camera_server_pb2.StorageInformation.STORAGE_TYPE_MICROSD: + return StorageInformation.StorageType.MICROSD + if rpc_enum_value == camera_server_pb2.StorageInformation.STORAGE_TYPE_HD: + return StorageInformation.StorageType.HD + if rpc_enum_value == camera_server_pb2.StorageInformation.STORAGE_TYPE_OTHER: + return StorageInformation.StorageType.OTHER - request = camera_server_pb2.SubscribeTakePhotoRequest() - take_photo_stream = self._stub.SubscribeTakePhoto(request) + def __str__(self): + return self.name + + + def __init__( + self, + used_storage_mib, + available_storage_mib, + total_storage_mib, + storage_status, + storage_id, + storage_type, + read_speed_mib_s, + write_speed_mib_s): + """ Initializes the StorageInformation object """ + self.used_storage_mib = used_storage_mib + self.available_storage_mib = available_storage_mib + self.total_storage_mib = total_storage_mib + self.storage_status = storage_status + self.storage_id = storage_id + self.storage_type = storage_type + self.read_speed_mib_s = read_speed_mib_s + self.write_speed_mib_s = write_speed_mib_s + def __eq__(self, to_compare): + """ Checks if two StorageInformation are the same """ try: - async for response in take_photo_stream: - + # Try to compare - this likely fails when it is compared to a non + # StorageInformation object + return \ + (self.used_storage_mib == to_compare.used_storage_mib) and \ + (self.available_storage_mib == to_compare.available_storage_mib) and \ + (self.total_storage_mib == to_compare.total_storage_mib) and \ + (self.storage_status == to_compare.storage_status) and \ + (self.storage_id == to_compare.storage_id) and \ + (self.storage_type == to_compare.storage_type) and \ + (self.read_speed_mib_s == to_compare.read_speed_mib_s) and \ + (self.write_speed_mib_s == to_compare.write_speed_mib_s) - - yield response.index - finally: - take_photo_stream.cancel() + except AttributeError: + return False - async def respond_take_photo(self, take_photo_feedback, capture_info): - """ - Respond to an image capture request from SubscribeTakePhoto. + def __str__(self): + """ StorageInformation in string representation """ + struct_repr = ", ".join([ + "used_storage_mib: " + str(self.used_storage_mib), + "available_storage_mib: " + str(self.available_storage_mib), + "total_storage_mib: " + str(self.total_storage_mib), + "storage_status: " + str(self.storage_status), + "storage_id: " + str(self.storage_id), + "storage_type: " + str(self.storage_type), + "read_speed_mib_s: " + str(self.read_speed_mib_s), + "write_speed_mib_s: " + str(self.write_speed_mib_s) + ]) - Parameters - ---------- - take_photo_feedback : TakePhotoFeedback - The feedback + return f"StorageInformation: [{struct_repr}]" - capture_info : CaptureInfo - The capture information + @staticmethod + def translate_from_rpc(rpcStorageInformation): + """ Translates a gRPC struct to the SDK equivalent """ + return StorageInformation( + + rpcStorageInformation.used_storage_mib, + + + rpcStorageInformation.available_storage_mib, + + + rpcStorageInformation.total_storage_mib, + + + StorageInformation.StorageStatus.translate_from_rpc(rpcStorageInformation.storage_status), + + + rpcStorageInformation.storage_id, + + + StorageInformation.StorageType.translate_from_rpc(rpcStorageInformation.storage_type), + + + rpcStorageInformation.read_speed_mib_s, + + + rpcStorageInformation.write_speed_mib_s + ) - Raises - ------ - CameraServerError - If the request fails. The error contains the reason for the failure. - """ + def translate_to_rpc(self, rpcStorageInformation): + """ Translates this SDK object into its gRPC equivalent """ - request = camera_server_pb2.RespondTakePhotoRequest() - request.take_photo_feedback = take_photo_feedback.translate_to_rpc() - + + + rpcStorageInformation.used_storage_mib = self.used_storage_mib - capture_info.translate_to_rpc(request.capture_info) - + + + + rpcStorageInformation.available_storage_mib = self.available_storage_mib - response = await self._stub.RespondTakePhoto(request) - - result = self._extract_result(response) - - if result.result != CameraServerResult.Result.SUCCESS: - raise CameraServerError(result, "respond_take_photo()", take_photo_feedback, capture_info) + + + + rpcStorageInformation.total_storage_mib = self.total_storage_mib + + + + + + rpcStorageInformation.storage_status = self.storage_status.translate_to_rpc() + + + + + + rpcStorageInformation.storage_id = self.storage_id + + + + + + rpcStorageInformation.storage_type = self.storage_type.translate_to_rpc() + + + + + + rpcStorageInformation.read_speed_mib_s = self.read_speed_mib_s + + + + + + rpcStorageInformation.write_speed_mib_s = self.write_speed_mib_s + + + + + +class CaptureStatus: + """ + + + Parameters + ---------- + image_interval_s : float + Image capture interval (in s) + + recording_time_s : float + Elapsed time since recording started (in s) + + available_capacity_mib : float + Available storage capacity. (in MiB) + + image_status : ImageStatus + Current status of image capturing + + video_status : VideoStatus + Current status of video capturing + + image_count : int32_t + Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT) + + """ + + + + class ImageStatus(Enum): + """ + + + Values + ------ + IDLE + idle + + CAPTURE_IN_PROGRESS + capture in progress + + INTERVAL_IDLE + interval set but idle + + INTERVAL_IN_PROGRESS + interval set and capture in progress) + + """ + + + IDLE = 0 + CAPTURE_IN_PROGRESS = 1 + INTERVAL_IDLE = 2 + INTERVAL_IN_PROGRESS = 3 + + def translate_to_rpc(self): + if self == CaptureStatus.ImageStatus.IDLE: + return camera_server_pb2.CaptureStatus.IMAGE_STATUS_IDLE + if self == CaptureStatus.ImageStatus.CAPTURE_IN_PROGRESS: + return camera_server_pb2.CaptureStatus.IMAGE_STATUS_CAPTURE_IN_PROGRESS + if self == CaptureStatus.ImageStatus.INTERVAL_IDLE: + return camera_server_pb2.CaptureStatus.IMAGE_STATUS_INTERVAL_IDLE + if self == CaptureStatus.ImageStatus.INTERVAL_IN_PROGRESS: + return camera_server_pb2.CaptureStatus.IMAGE_STATUS_INTERVAL_IN_PROGRESS + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == camera_server_pb2.CaptureStatus.IMAGE_STATUS_IDLE: + return CaptureStatus.ImageStatus.IDLE + if rpc_enum_value == camera_server_pb2.CaptureStatus.IMAGE_STATUS_CAPTURE_IN_PROGRESS: + return CaptureStatus.ImageStatus.CAPTURE_IN_PROGRESS + if rpc_enum_value == camera_server_pb2.CaptureStatus.IMAGE_STATUS_INTERVAL_IDLE: + return CaptureStatus.ImageStatus.INTERVAL_IDLE + if rpc_enum_value == camera_server_pb2.CaptureStatus.IMAGE_STATUS_INTERVAL_IN_PROGRESS: + return CaptureStatus.ImageStatus.INTERVAL_IN_PROGRESS + + def __str__(self): + return self.name + + + class VideoStatus(Enum): + """ + + + Values + ------ + IDLE + idle + + CAPTURE_IN_PROGRESS + capture in progress + + """ + + + IDLE = 0 + CAPTURE_IN_PROGRESS = 1 + + def translate_to_rpc(self): + if self == CaptureStatus.VideoStatus.IDLE: + return camera_server_pb2.CaptureStatus.VIDEO_STATUS_IDLE + if self == CaptureStatus.VideoStatus.CAPTURE_IN_PROGRESS: + return camera_server_pb2.CaptureStatus.VIDEO_STATUS_CAPTURE_IN_PROGRESS + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == camera_server_pb2.CaptureStatus.VIDEO_STATUS_IDLE: + return CaptureStatus.VideoStatus.IDLE + if rpc_enum_value == camera_server_pb2.CaptureStatus.VIDEO_STATUS_CAPTURE_IN_PROGRESS: + return CaptureStatus.VideoStatus.CAPTURE_IN_PROGRESS + + def __str__(self): + return self.name + + + def __init__( + self, + image_interval_s, + recording_time_s, + available_capacity_mib, + image_status, + video_status, + image_count): + """ Initializes the CaptureStatus object """ + self.image_interval_s = image_interval_s + self.recording_time_s = recording_time_s + self.available_capacity_mib = available_capacity_mib + self.image_status = image_status + self.video_status = video_status + self.image_count = image_count + + def __eq__(self, to_compare): + """ Checks if two CaptureStatus are the same """ + try: + # Try to compare - this likely fails when it is compared to a non + # CaptureStatus object + return \ + (self.image_interval_s == to_compare.image_interval_s) and \ + (self.recording_time_s == to_compare.recording_time_s) and \ + (self.available_capacity_mib == to_compare.available_capacity_mib) and \ + (self.image_status == to_compare.image_status) and \ + (self.video_status == to_compare.video_status) and \ + (self.image_count == to_compare.image_count) + + except AttributeError: + return False + + def __str__(self): + """ CaptureStatus in string representation """ + struct_repr = ", ".join([ + "image_interval_s: " + str(self.image_interval_s), + "recording_time_s: " + str(self.recording_time_s), + "available_capacity_mib: " + str(self.available_capacity_mib), + "image_status: " + str(self.image_status), + "video_status: " + str(self.video_status), + "image_count: " + str(self.image_count) + ]) + + return f"CaptureStatus: [{struct_repr}]" + + @staticmethod + def translate_from_rpc(rpcCaptureStatus): + """ Translates a gRPC struct to the SDK equivalent """ + return CaptureStatus( + + rpcCaptureStatus.image_interval_s, + + + rpcCaptureStatus.recording_time_s, + + + rpcCaptureStatus.available_capacity_mib, + + + CaptureStatus.ImageStatus.translate_from_rpc(rpcCaptureStatus.image_status), + + + CaptureStatus.VideoStatus.translate_from_rpc(rpcCaptureStatus.video_status), + + + rpcCaptureStatus.image_count + ) + + def translate_to_rpc(self, rpcCaptureStatus): + """ Translates this SDK object into its gRPC equivalent """ + + + + + rpcCaptureStatus.image_interval_s = self.image_interval_s + + + + + + rpcCaptureStatus.recording_time_s = self.recording_time_s + + + + + + rpcCaptureStatus.available_capacity_mib = self.available_capacity_mib + + + + + + rpcCaptureStatus.image_status = self.image_status.translate_to_rpc() + + + + + + rpcCaptureStatus.video_status = self.video_status.translate_to_rpc() + + + + + + rpcCaptureStatus.image_count = self.image_count + + + + + + +class CameraServerError(Exception): + """ Raised when a CameraServerResult is a fail code """ + + def __init__(self, result, origin, *params): + self._result = result + self._origin = origin + self._params = params + + def __str__(self): + return f"{self._result.result}: '{self._result.result_str}'; origin: {self._origin}; params: {self._params}" + + +class CameraServer(AsyncBase): + """ + Provides handling of camera trigger commands. + + Generated by dcsdkgen - MAVSDK CameraServer API + """ + + # Plugin name + name = "CameraServer" + + def _setup_stub(self, channel): + """ Setups the api stub """ + self._stub = camera_server_pb2_grpc.CameraServerServiceStub(channel) + + + def _extract_result(self, response): + """ Returns the response status and description """ + return CameraServerResult.translate_from_rpc(response.camera_server_result) + + + async def set_information(self, information): + """ + Sets the camera information. This must be called as soon as the camera server is created. + + Parameters + ---------- + information : Information + information about the camera + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.SetInformationRequest() + + information.translate_to_rpc(request.information) + + + response = await self._stub.SetInformation(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "set_information()", information) + + + async def set_video_streaming(self, video_streaming): + """ + Sets video streaming settings. + + Parameters + ---------- + video_streaming : VideoStreaming + information about the video stream + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.SetVideoStreamingRequest() + + video_streaming.translate_to_rpc(request.video_streaming) + + + response = await self._stub.SetVideoStreaming(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "set_video_streaming()", video_streaming) + + + async def set_in_progress(self, in_progress): + """ + Sets image capture in progress status flags. This should be set to true when the camera is busy taking a photo and false when it is done. + + Parameters + ---------- + in_progress : bool + true if capture is in progress or false for idle. + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.SetInProgressRequest() + request.in_progress = in_progress + response = await self._stub.SetInProgress(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "set_in_progress()", in_progress) + + + async def take_photo(self): + """ + Subscribe to image capture requests. Each request received should respond to using RespondTakePhoto. + + Yields + ------- + index : int32_t + + + """ + + request = camera_server_pb2.SubscribeTakePhotoRequest() + take_photo_stream = self._stub.SubscribeTakePhoto(request) + + try: + async for response in take_photo_stream: + + + + yield response.index + finally: + take_photo_stream.cancel() + + async def respond_take_photo(self, take_photo_feedback, capture_info): + """ + Respond to an image capture request from SubscribeTakePhoto. + + Parameters + ---------- + take_photo_feedback : CameraFeedback + the feedback + + capture_info : CaptureInfo + the capture information + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.RespondTakePhotoRequest() + + request.take_photo_feedback = take_photo_feedback.translate_to_rpc() + + + + capture_info.translate_to_rpc(request.capture_info) + + + response = await self._stub.RespondTakePhoto(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "respond_take_photo()", take_photo_feedback, capture_info) + + + async def start_video(self): + """ + Subscribe to start video requests. Each request received should respond to using RespondStartVideo + + Yields + ------- + stream_id : int32_t + video stream id + + + """ + + request = camera_server_pb2.SubscribeStartVideoRequest() + start_video_stream = self._stub.SubscribeStartVideo(request) + + try: + async for response in start_video_stream: + + + + yield response.stream_id + finally: + start_video_stream.cancel() + + async def respond_start_video(self, start_video_feedback): + """ + Subscribe to stop video requests. Each request received should respond using StopVideoResponse + + Parameters + ---------- + start_video_feedback : CameraFeedback + the feedback + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.RespondStartVideoRequest() + + request.start_video_feedback = start_video_feedback.translate_to_rpc() + + + response = await self._stub.RespondStartVideo(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "respond_start_video()", start_video_feedback) + + + async def stop_video(self): + """ + Subscribe to stop video requests. Each request received should response to using RespondStopVideo + + Yields + ------- + stream_id : int32_t + video stream id + + + """ + + request = camera_server_pb2.SubscribeStopVideoRequest() + stop_video_stream = self._stub.SubscribeStopVideo(request) + + try: + async for response in stop_video_stream: + + + + yield response.stream_id + finally: + stop_video_stream.cancel() + + async def respond_stop_video(self, stop_video_feedback): + """ + Respond to stop video request from SubscribeStopVideo. + + Parameters + ---------- + stop_video_feedback : CameraFeedback + the feedback + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.RespondStopVideoRequest() + + request.stop_video_feedback = stop_video_feedback.translate_to_rpc() + + + response = await self._stub.RespondStopVideo(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "respond_stop_video()", stop_video_feedback) + + + async def start_video_streaming(self): + """ + Subscribe to start video streaming requests. Each request received should response to using RespondStartVideoStreaming + + Yields + ------- + stream_id : int32_t + video stream id + + + """ + + request = camera_server_pb2.SubscribeStartVideoStreamingRequest() + start_video_streaming_stream = self._stub.SubscribeStartVideoStreaming(request) + + try: + async for response in start_video_streaming_stream: + + + + yield response.stream_id + finally: + start_video_streaming_stream.cancel() + + async def respond_start_video_streaming(self, start_video_streaming_feedback): + """ + Respond to start video streaming from SubscribeStartVideoStreaming. + + Parameters + ---------- + start_video_streaming_feedback : CameraFeedback + the feedback + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.RespondStartVideoStreamingRequest() + + request.start_video_streaming_feedback = start_video_streaming_feedback.translate_to_rpc() + + + response = await self._stub.RespondStartVideoStreaming(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "respond_start_video_streaming()", start_video_streaming_feedback) + + + async def stop_video_streaming(self): + """ + Subscribe to stop video streaming requests. Each request received should response to using RespondStopVideoStreaming + + Yields + ------- + stream_id : int32_t + video stream id + + + """ + + request = camera_server_pb2.SubscribeStopVideoStreamingRequest() + stop_video_streaming_stream = self._stub.SubscribeStopVideoStreaming(request) + + try: + async for response in stop_video_streaming_stream: + + + + yield response.stream_id + finally: + stop_video_streaming_stream.cancel() + + async def respond_stop_video_streaming(self, stop_video_streaming_feedback): + """ + Respond to stop video streaming from SubscribeStopVideoStreaming. + + Parameters + ---------- + stop_video_streaming_feedback : CameraFeedback + the feedback + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.RespondStopVideoStreamingRequest() + + request.stop_video_streaming_feedback = stop_video_streaming_feedback.translate_to_rpc() + + + response = await self._stub.RespondStopVideoStreaming(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "respond_stop_video_streaming()", stop_video_streaming_feedback) + + + async def set_mode(self): + """ + Subscribe to set camera mode requests. Each request received should response to using RespondSetMode + + Yields + ------- + mode : Mode + + + """ + + request = camera_server_pb2.SubscribeSetModeRequest() + set_mode_stream = self._stub.SubscribeSetMode(request) + + try: + async for response in set_mode_stream: + + + + yield Mode.translate_from_rpc(response.mode) + finally: + set_mode_stream.cancel() + + async def respond_set_mode(self, set_mode_feedback): + """ + Respond to set camera mode from SubscribeSetMode. + + Parameters + ---------- + set_mode_feedback : CameraFeedback + the feedback + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.RespondSetModeRequest() + + request.set_mode_feedback = set_mode_feedback.translate_to_rpc() + + + response = await self._stub.RespondSetMode(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "respond_set_mode()", set_mode_feedback) + + + async def storage_information(self): + """ + Subscribe to camera storage information requests. Each request received should response to using RespondStorageInformation + + Yields + ------- + storage_id : int32_t + + + """ + + request = camera_server_pb2.SubscribeStorageInformationRequest() + storage_information_stream = self._stub.SubscribeStorageInformation(request) + + try: + async for response in storage_information_stream: + + + + yield response.storage_id + finally: + storage_information_stream.cancel() + + async def respond_storage_information(self, storage_information_feedback, storage_information): + """ + Respond to camera storage information from SubscribeStorageInformation. + + Parameters + ---------- + storage_information_feedback : CameraFeedback + the feedback + + storage_information : StorageInformation + the storage information + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.RespondStorageInformationRequest() + + request.storage_information_feedback = storage_information_feedback.translate_to_rpc() + + + + storage_information.translate_to_rpc(request.storage_information) + + + response = await self._stub.RespondStorageInformation(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "respond_storage_information()", storage_information_feedback, storage_information) + + + async def capture_status(self): + """ + Subscribe to camera capture status requests. Each request received should response to using RespondCaptureStatus + + Yields + ------- + reserved : int32_t + reserved, just make protoc-gen-mavsdk working + + + """ + + request = camera_server_pb2.SubscribeCaptureStatusRequest() + capture_status_stream = self._stub.SubscribeCaptureStatus(request) + + try: + async for response in capture_status_stream: + + + + yield response.reserved + finally: + capture_status_stream.cancel() + + async def respond_capture_status(self, capture_status_feedback, capture_status): + """ + Respond to camera capture status from SubscribeCaptureStatus. + + Parameters + ---------- + capture_status_feedback : CameraFeedback + the feedback + + capture_status : CaptureStatus + the capture status + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.RespondCaptureStatusRequest() + + request.capture_status_feedback = capture_status_feedback.translate_to_rpc() + + + + capture_status.translate_to_rpc(request.capture_status) + + + response = await self._stub.RespondCaptureStatus(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "respond_capture_status()", capture_status_feedback, capture_status) + + + async def format_storage(self): + """ + Subscribe to format storage requests. Each request received should response to using RespondFormatStorage + + Yields + ------- + storage_id : int32_t + the storage id to format + + + """ + + request = camera_server_pb2.SubscribeFormatStorageRequest() + format_storage_stream = self._stub.SubscribeFormatStorage(request) + + try: + async for response in format_storage_stream: + + + + yield response.storage_id + finally: + format_storage_stream.cancel() + + async def respond_format_storage(self, format_storage_feedback): + """ + Respond to format storage from SubscribeFormatStorage. + + Parameters + ---------- + format_storage_feedback : CameraFeedback + the feedback + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.RespondFormatStorageRequest() + + request.format_storage_feedback = format_storage_feedback.translate_to_rpc() + + + response = await self._stub.RespondFormatStorage(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "respond_format_storage()", format_storage_feedback) + + + async def reset_settings(self): + """ + Subscribe to reset settings requests. Each request received should response to using RespondResetSettings + + Yields + ------- + reserved : int32_t + reserved, just make protoc-gen-mavsdk working + + + """ + + request = camera_server_pb2.SubscribeResetSettingsRequest() + reset_settings_stream = self._stub.SubscribeResetSettings(request) + + try: + async for response in reset_settings_stream: + + + + yield response.reserved + finally: + reset_settings_stream.cancel() + + async def respond_reset_settings(self, reset_settings_feedback): + """ + Respond to reset settings from SubscribeResetSettings. + + Parameters + ---------- + reset_settings_feedback : CameraFeedback + the feedback + + Raises + ------ + CameraServerError + If the request fails. The error contains the reason for the failure. + """ + + request = camera_server_pb2.RespondResetSettingsRequest() + + request.reset_settings_feedback = reset_settings_feedback.translate_to_rpc() + + + response = await self._stub.RespondResetSettings(request) + + + result = self._extract_result(response) + + if result.result != CameraServerResult.Result.SUCCESS: + raise CameraServerError(result, "respond_reset_settings()", reset_settings_feedback) \ No newline at end of file diff --git a/mavsdk/camera_server_pb2.py b/mavsdk/camera_server_pb2.py index fe50c48e..3fbda45f 100644 --- a/mavsdk/camera_server_pb2.py +++ b/mavsdk/camera_server_pb2.py @@ -16,30 +16,80 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!camera_server/camera_server.proto\x12\x18mavsdk.rpc.camera_server\x1a\x14mavsdk_options.proto\"S\n\x15SetInformationRequest\x12:\n\x0binformation\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.camera_server.Information\"d\n\x16SetInformationResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"+\n\x14SetInProgressRequest\x12\x13\n\x0bin_progress\x18\x01 \x01(\x08\"c\n\x15SetInProgressResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"\x1b\n\x19SubscribeTakePhotoRequest\"\"\n\x11TakePhotoResponse\x12\r\n\x05index\x18\x01 \x01(\x05\"\xa0\x01\n\x17RespondTakePhotoRequest\x12H\n\x13take_photo_feedback\x18\x01 \x01(\x0e\x32+.mavsdk.rpc.camera_server.TakePhotoFeedback\x12;\n\x0c\x63\x61pture_info\x18\x02 \x01(\x0b\x32%.mavsdk.rpc.camera_server.CaptureInfo\"f\n\x18RespondTakePhotoResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"\xbe\x02\n\x0bInformation\x12\x13\n\x0bvendor_name\x18\x01 \x01(\t\x12\x12\n\nmodel_name\x18\x02 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x03 \x01(\t\x12\x17\n\x0f\x66ocal_length_mm\x18\x04 \x01(\x02\x12!\n\x19horizontal_sensor_size_mm\x18\x05 \x01(\x02\x12\x1f\n\x17vertical_sensor_size_mm\x18\x06 \x01(\x02\x12 \n\x18horizontal_resolution_px\x18\x07 \x01(\r\x12\x1e\n\x16vertical_resolution_px\x18\x08 \x01(\r\x12\x0f\n\x07lens_id\x18\t \x01(\r\x12\x1f\n\x17\x64\x65\x66inition_file_version\x18\n \x01(\r\x12\x1b\n\x13\x64\x65\x66inition_file_uri\x18\x0b \x01(\t\"q\n\x08Position\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x12\x1b\n\x13relative_altitude_m\x18\x04 \x01(\x02\"8\n\nQuaternion\x12\t\n\x01w\x18\x01 \x01(\x02\x12\t\n\x01x\x18\x02 \x01(\x02\x12\t\n\x01y\x18\x03 \x01(\x02\x12\t\n\x01z\x18\x04 \x01(\x02\"\xd0\x01\n\x0b\x43\x61ptureInfo\x12\x34\n\x08position\x18\x01 \x01(\x0b\x32\".mavsdk.rpc.camera_server.Position\x12\x41\n\x13\x61ttitude_quaternion\x18\x02 \x01(\x0b\x32$.mavsdk.rpc.camera_server.Quaternion\x12\x13\n\x0btime_utc_us\x18\x03 \x01(\x04\x12\x12\n\nis_success\x18\x04 \x01(\x08\x12\r\n\x05index\x18\x05 \x01(\x05\x12\x10\n\x08\x66ile_url\x18\x06 \x01(\t\"\xb3\x02\n\x12\x43\x61meraServerResult\x12\x43\n\x06result\x18\x01 \x01(\x0e\x32\x33.mavsdk.rpc.camera_server.CameraServerResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xc3\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x16\n\x12RESULT_IN_PROGRESS\x10\x02\x12\x0f\n\x0bRESULT_BUSY\x10\x03\x12\x11\n\rRESULT_DENIED\x10\x04\x12\x10\n\x0cRESULT_ERROR\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x19\n\x15RESULT_WRONG_ARGUMENT\x10\x07\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x08*\x8e\x01\n\x11TakePhotoFeedback\x12\x1f\n\x1bTAKE_PHOTO_FEEDBACK_UNKNOWN\x10\x00\x12\x1a\n\x16TAKE_PHOTO_FEEDBACK_OK\x10\x01\x12\x1c\n\x18TAKE_PHOTO_FEEDBACK_BUSY\x10\x02\x12\x1e\n\x1aTAKE_PHOTO_FEEDBACK_FAILED\x10\x03\x32\x89\x04\n\x13\x43\x61meraServerService\x12y\n\x0eSetInformation\x12/.mavsdk.rpc.camera_server.SetInformationRequest\x1a\x30.mavsdk.rpc.camera_server.SetInformationResponse\"\x04\x80\xb5\x18\x01\x12v\n\rSetInProgress\x12..mavsdk.rpc.camera_server.SetInProgressRequest\x1a/.mavsdk.rpc.camera_server.SetInProgressResponse\"\x04\x80\xb5\x18\x01\x12~\n\x12SubscribeTakePhoto\x12\x33.mavsdk.rpc.camera_server.SubscribeTakePhotoRequest\x1a+.mavsdk.rpc.camera_server.TakePhotoResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x7f\n\x10RespondTakePhoto\x12\x31.mavsdk.rpc.camera_server.RespondTakePhotoRequest\x1a\x32.mavsdk.rpc.camera_server.RespondTakePhotoResponse\"\x04\x80\xb5\x18\x01\x42,\n\x17io.mavsdk.camera_serverB\x11\x43\x61meraServerProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!camera_server/camera_server.proto\x12\x18mavsdk.rpc.camera_server\x1a\x14mavsdk_options.proto\"S\n\x15SetInformationRequest\x12:\n\x0binformation\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.camera_server.Information\"d\n\x16SetInformationResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"]\n\x18SetVideoStreamingRequest\x12\x41\n\x0fvideo_streaming\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.camera_server.VideoStreaming\"g\n\x19SetVideoStreamingResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"+\n\x14SetInProgressRequest\x12\x13\n\x0bin_progress\x18\x01 \x01(\x08\"c\n\x15SetInProgressResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"\x1b\n\x19SubscribeTakePhotoRequest\"\"\n\x11TakePhotoResponse\x12\r\n\x05index\x18\x01 \x01(\x05\"\x9d\x01\n\x17RespondTakePhotoRequest\x12\x45\n\x13take_photo_feedback\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.camera_server.CameraFeedback\x12;\n\x0c\x63\x61pture_info\x18\x02 \x01(\x0b\x32%.mavsdk.rpc.camera_server.CaptureInfo\"f\n\x18RespondTakePhotoResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"\x1c\n\x1aSubscribeStartVideoRequest\"\'\n\x12StartVideoResponse\x12\x11\n\tstream_id\x18\x01 \x01(\x05\"b\n\x18RespondStartVideoRequest\x12\x46\n\x14start_video_feedback\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.camera_server.CameraFeedback\"g\n\x19RespondStartVideoResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"\x1b\n\x19SubscribeStopVideoRequest\"&\n\x11StopVideoResponse\x12\x11\n\tstream_id\x18\x01 \x01(\x05\"`\n\x17RespondStopVideoRequest\x12\x45\n\x13stop_video_feedback\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.camera_server.CameraFeedback\"f\n\x18RespondStopVideoResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"%\n#SubscribeStartVideoStreamingRequest\"0\n\x1bStartVideoStreamingResponse\x12\x11\n\tstream_id\x18\x01 \x01(\x05\"u\n!RespondStartVideoStreamingRequest\x12P\n\x1estart_video_streaming_feedback\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.camera_server.CameraFeedback\"p\n\"RespondStartVideoStreamingResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"$\n\"SubscribeStopVideoStreamingRequest\"/\n\x1aStopVideoStreamingResponse\x12\x11\n\tstream_id\x18\x01 \x01(\x05\"s\n RespondStopVideoStreamingRequest\x12O\n\x1dstop_video_streaming_feedback\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.camera_server.CameraFeedback\"o\n!RespondStopVideoStreamingResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"\x19\n\x17SubscribeSetModeRequest\"?\n\x0fSetModeResponse\x12,\n\x04mode\x18\x01 \x01(\x0e\x32\x1e.mavsdk.rpc.camera_server.Mode\"\\\n\x15RespondSetModeRequest\x12\x43\n\x11set_mode_feedback\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.camera_server.CameraFeedback\"d\n\x16RespondSetModeResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"$\n\"SubscribeStorageInformationRequest\"0\n\x1aStorageInformationResponse\x12\x12\n\nstorage_id\x18\x01 \x01(\x05\"\xbd\x01\n RespondStorageInformationRequest\x12N\n\x1cstorage_information_feedback\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.camera_server.CameraFeedback\x12I\n\x13storage_information\x18\x02 \x01(\x0b\x32,.mavsdk.rpc.camera_server.StorageInformation\"o\n!RespondStorageInformationResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"\x1f\n\x1dSubscribeCaptureStatusRequest\")\n\x15\x43\x61ptureStatusResponse\x12\x10\n\x08reserved\x18\x01 \x01(\x05\"\xa9\x01\n\x1bRespondCaptureStatusRequest\x12I\n\x17\x63\x61pture_status_feedback\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.camera_server.CameraFeedback\x12?\n\x0e\x63\x61pture_status\x18\x02 \x01(\x0b\x32\'.mavsdk.rpc.camera_server.CaptureStatus\"j\n\x1cRespondCaptureStatusResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"\x1f\n\x1dSubscribeFormatStorageRequest\"+\n\x15\x46ormatStorageResponse\x12\x12\n\nstorage_id\x18\x01 \x01(\x05\"h\n\x1bRespondFormatStorageRequest\x12I\n\x17\x66ormat_storage_feedback\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.camera_server.CameraFeedback\"j\n\x1cRespondFormatStorageResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"\x1f\n\x1dSubscribeResetSettingsRequest\")\n\x15ResetSettingsResponse\x12\x10\n\x08reserved\x18\x01 \x01(\x05\"h\n\x1bRespondResetSettingsRequest\x12I\n\x17reset_settings_feedback\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.camera_server.CameraFeedback\"j\n\x1cRespondResetSettingsResponse\x12J\n\x14\x63\x61mera_server_result\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.camera_server.CameraServerResult\"\xbe\x02\n\x0bInformation\x12\x13\n\x0bvendor_name\x18\x01 \x01(\t\x12\x12\n\nmodel_name\x18\x02 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x03 \x01(\t\x12\x17\n\x0f\x66ocal_length_mm\x18\x04 \x01(\x02\x12!\n\x19horizontal_sensor_size_mm\x18\x05 \x01(\x02\x12\x1f\n\x17vertical_sensor_size_mm\x18\x06 \x01(\x02\x12 \n\x18horizontal_resolution_px\x18\x07 \x01(\r\x12\x1e\n\x16vertical_resolution_px\x18\x08 \x01(\r\x12\x0f\n\x07lens_id\x18\t \x01(\r\x12\x1f\n\x17\x64\x65\x66inition_file_version\x18\n \x01(\r\x12\x1b\n\x13\x64\x65\x66inition_file_uri\x18\x0b \x01(\t\";\n\x0eVideoStreaming\x12\x17\n\x0fhas_rtsp_server\x18\x01 \x01(\x08\x12\x10\n\x08rtsp_uri\x18\x02 \x01(\t\"q\n\x08Position\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x12\x1b\n\x13relative_altitude_m\x18\x04 \x01(\x02\"8\n\nQuaternion\x12\t\n\x01w\x18\x01 \x01(\x02\x12\t\n\x01x\x18\x02 \x01(\x02\x12\t\n\x01y\x18\x03 \x01(\x02\x12\t\n\x01z\x18\x04 \x01(\x02\"\xd0\x01\n\x0b\x43\x61ptureInfo\x12\x34\n\x08position\x18\x01 \x01(\x0b\x32\".mavsdk.rpc.camera_server.Position\x12\x41\n\x13\x61ttitude_quaternion\x18\x02 \x01(\x0b\x32$.mavsdk.rpc.camera_server.Quaternion\x12\x13\n\x0btime_utc_us\x18\x03 \x01(\x04\x12\x12\n\nis_success\x18\x04 \x01(\x08\x12\r\n\x05index\x18\x05 \x01(\x05\x12\x10\n\x08\x66ile_url\x18\x06 \x01(\t\"\xb3\x02\n\x12\x43\x61meraServerResult\x12\x43\n\x06result\x18\x01 \x01(\x0e\x32\x33.mavsdk.rpc.camera_server.CameraServerResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xc3\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x16\n\x12RESULT_IN_PROGRESS\x10\x02\x12\x0f\n\x0bRESULT_BUSY\x10\x03\x12\x11\n\rRESULT_DENIED\x10\x04\x12\x10\n\x0cRESULT_ERROR\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x19\n\x15RESULT_WRONG_ARGUMENT\x10\x07\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x08\"\x8c\x05\n\x12StorageInformation\x12\x18\n\x10used_storage_mib\x18\x01 \x01(\x02\x12\x1d\n\x15\x61vailable_storage_mib\x18\x02 \x01(\x02\x12\x19\n\x11total_storage_mib\x18\x03 \x01(\x02\x12R\n\x0estorage_status\x18\x04 \x01(\x0e\x32:.mavsdk.rpc.camera_server.StorageInformation.StorageStatus\x12\x12\n\nstorage_id\x18\x05 \x01(\r\x12N\n\x0cstorage_type\x18\x06 \x01(\x0e\x32\x38.mavsdk.rpc.camera_server.StorageInformation.StorageType\x12\x18\n\x10read_speed_mib_s\x18\x07 \x01(\x02\x12\x19\n\x11write_speed_mib_s\x18\x08 \x01(\x02\"\x91\x01\n\rStorageStatus\x12 \n\x1cSTORAGE_STATUS_NOT_AVAILABLE\x10\x00\x12\x1e\n\x1aSTORAGE_STATUS_UNFORMATTED\x10\x01\x12\x1c\n\x18STORAGE_STATUS_FORMATTED\x10\x02\x12 \n\x1cSTORAGE_STATUS_NOT_SUPPORTED\x10\x03\"\xa0\x01\n\x0bStorageType\x12\x18\n\x14STORAGE_TYPE_UNKNOWN\x10\x00\x12\x1a\n\x16STORAGE_TYPE_USB_STICK\x10\x01\x12\x13\n\x0fSTORAGE_TYPE_SD\x10\x02\x12\x18\n\x14STORAGE_TYPE_MICROSD\x10\x03\x12\x13\n\x0fSTORAGE_TYPE_HD\x10\x07\x12\x17\n\x12STORAGE_TYPE_OTHER\x10\xfe\x01\"\xee\x03\n\rCaptureStatus\x12\x18\n\x10image_interval_s\x18\x01 \x01(\x02\x12\x18\n\x10recording_time_s\x18\x02 \x01(\x02\x12\x1e\n\x16\x61vailable_capacity_mib\x18\x03 \x01(\x02\x12I\n\x0cimage_status\x18\x04 \x01(\x0e\x32\x33.mavsdk.rpc.camera_server.CaptureStatus.ImageStatus\x12I\n\x0cvideo_status\x18\x05 \x01(\x0e\x32\x33.mavsdk.rpc.camera_server.CaptureStatus.VideoStatus\x12\x13\n\x0bimage_count\x18\x06 \x01(\x05\"\x91\x01\n\x0bImageStatus\x12\x15\n\x11IMAGE_STATUS_IDLE\x10\x00\x12$\n IMAGE_STATUS_CAPTURE_IN_PROGRESS\x10\x01\x12\x1e\n\x1aIMAGE_STATUS_INTERVAL_IDLE\x10\x02\x12%\n!IMAGE_STATUS_INTERVAL_IN_PROGRESS\x10\x03\"J\n\x0bVideoStatus\x12\x15\n\x11VIDEO_STATUS_IDLE\x10\x00\x12$\n VIDEO_STATUS_CAPTURE_IN_PROGRESS\x10\x01*{\n\x0e\x43\x61meraFeedback\x12\x1b\n\x17\x43\x41MERA_FEEDBACK_UNKNOWN\x10\x00\x12\x16\n\x12\x43\x41MERA_FEEDBACK_OK\x10\x01\x12\x18\n\x14\x43\x41MERA_FEEDBACK_BUSY\x10\x02\x12\x1a\n\x16\x43\x41MERA_FEEDBACK_FAILED\x10\x03*8\n\x04Mode\x12\x10\n\x0cMODE_UNKNOWN\x10\x00\x12\x0e\n\nMODE_PHOTO\x10\x01\x12\x0e\n\nMODE_VIDEO\x10\x02\x32\x8f\x19\n\x13\x43\x61meraServerService\x12y\n\x0eSetInformation\x12/.mavsdk.rpc.camera_server.SetInformationRequest\x1a\x30.mavsdk.rpc.camera_server.SetInformationResponse\"\x04\x80\xb5\x18\x01\x12\x82\x01\n\x11SetVideoStreaming\x12\x32.mavsdk.rpc.camera_server.SetVideoStreamingRequest\x1a\x33.mavsdk.rpc.camera_server.SetVideoStreamingResponse\"\x04\x80\xb5\x18\x01\x12v\n\rSetInProgress\x12..mavsdk.rpc.camera_server.SetInProgressRequest\x1a/.mavsdk.rpc.camera_server.SetInProgressResponse\"\x04\x80\xb5\x18\x01\x12~\n\x12SubscribeTakePhoto\x12\x33.mavsdk.rpc.camera_server.SubscribeTakePhotoRequest\x1a+.mavsdk.rpc.camera_server.TakePhotoResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x7f\n\x10RespondTakePhoto\x12\x31.mavsdk.rpc.camera_server.RespondTakePhotoRequest\x1a\x32.mavsdk.rpc.camera_server.RespondTakePhotoResponse\"\x04\x80\xb5\x18\x01\x12\x81\x01\n\x13SubscribeStartVideo\x12\x34.mavsdk.rpc.camera_server.SubscribeStartVideoRequest\x1a,.mavsdk.rpc.camera_server.StartVideoResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x82\x01\n\x11RespondStartVideo\x12\x32.mavsdk.rpc.camera_server.RespondStartVideoRequest\x1a\x33.mavsdk.rpc.camera_server.RespondStartVideoResponse\"\x04\x80\xb5\x18\x01\x12~\n\x12SubscribeStopVideo\x12\x33.mavsdk.rpc.camera_server.SubscribeStopVideoRequest\x1a+.mavsdk.rpc.camera_server.StopVideoResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x7f\n\x10RespondStopVideo\x12\x31.mavsdk.rpc.camera_server.RespondStopVideoRequest\x1a\x32.mavsdk.rpc.camera_server.RespondStopVideoResponse\"\x04\x80\xb5\x18\x01\x12\x9c\x01\n\x1cSubscribeStartVideoStreaming\x12=.mavsdk.rpc.camera_server.SubscribeStartVideoStreamingRequest\x1a\x35.mavsdk.rpc.camera_server.StartVideoStreamingResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x9d\x01\n\x1aRespondStartVideoStreaming\x12;.mavsdk.rpc.camera_server.RespondStartVideoStreamingRequest\x1a<.mavsdk.rpc.camera_server.RespondStartVideoStreamingResponse\"\x04\x80\xb5\x18\x01\x12\x99\x01\n\x1bSubscribeStopVideoStreaming\x12<.mavsdk.rpc.camera_server.SubscribeStopVideoStreamingRequest\x1a\x34.mavsdk.rpc.camera_server.StopVideoStreamingResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x9a\x01\n\x19RespondStopVideoStreaming\x12:.mavsdk.rpc.camera_server.RespondStopVideoStreamingRequest\x1a;.mavsdk.rpc.camera_server.RespondStopVideoStreamingResponse\"\x04\x80\xb5\x18\x01\x12x\n\x10SubscribeSetMode\x12\x31.mavsdk.rpc.camera_server.SubscribeSetModeRequest\x1a).mavsdk.rpc.camera_server.SetModeResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12y\n\x0eRespondSetMode\x12/.mavsdk.rpc.camera_server.RespondSetModeRequest\x1a\x30.mavsdk.rpc.camera_server.RespondSetModeResponse\"\x04\x80\xb5\x18\x01\x12\x99\x01\n\x1bSubscribeStorageInformation\x12<.mavsdk.rpc.camera_server.SubscribeStorageInformationRequest\x1a\x34.mavsdk.rpc.camera_server.StorageInformationResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x9a\x01\n\x19RespondStorageInformation\x12:.mavsdk.rpc.camera_server.RespondStorageInformationRequest\x1a;.mavsdk.rpc.camera_server.RespondStorageInformationResponse\"\x04\x80\xb5\x18\x01\x12\x8a\x01\n\x16SubscribeCaptureStatus\x12\x37.mavsdk.rpc.camera_server.SubscribeCaptureStatusRequest\x1a/.mavsdk.rpc.camera_server.CaptureStatusResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x8b\x01\n\x14RespondCaptureStatus\x12\x35.mavsdk.rpc.camera_server.RespondCaptureStatusRequest\x1a\x36.mavsdk.rpc.camera_server.RespondCaptureStatusResponse\"\x04\x80\xb5\x18\x01\x12\x8a\x01\n\x16SubscribeFormatStorage\x12\x37.mavsdk.rpc.camera_server.SubscribeFormatStorageRequest\x1a/.mavsdk.rpc.camera_server.FormatStorageResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x8b\x01\n\x14RespondFormatStorage\x12\x35.mavsdk.rpc.camera_server.RespondFormatStorageRequest\x1a\x36.mavsdk.rpc.camera_server.RespondFormatStorageResponse\"\x04\x80\xb5\x18\x01\x12\x8a\x01\n\x16SubscribeResetSettings\x12\x37.mavsdk.rpc.camera_server.SubscribeResetSettingsRequest\x1a/.mavsdk.rpc.camera_server.ResetSettingsResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x8b\x01\n\x14RespondResetSettings\x12\x35.mavsdk.rpc.camera_server.RespondResetSettingsRequest\x1a\x36.mavsdk.rpc.camera_server.RespondResetSettingsResponse\"\x04\x80\xb5\x18\x01\x42,\n\x17io.mavsdk.camera_serverB\x11\x43\x61meraServerProtob\x06proto3') -_TAKEPHOTOFEEDBACK = DESCRIPTOR.enum_types_by_name['TakePhotoFeedback'] -TakePhotoFeedback = enum_type_wrapper.EnumTypeWrapper(_TAKEPHOTOFEEDBACK) -TAKE_PHOTO_FEEDBACK_UNKNOWN = 0 -TAKE_PHOTO_FEEDBACK_OK = 1 -TAKE_PHOTO_FEEDBACK_BUSY = 2 -TAKE_PHOTO_FEEDBACK_FAILED = 3 +_CAMERAFEEDBACK = DESCRIPTOR.enum_types_by_name['CameraFeedback'] +CameraFeedback = enum_type_wrapper.EnumTypeWrapper(_CAMERAFEEDBACK) +_MODE = DESCRIPTOR.enum_types_by_name['Mode'] +Mode = enum_type_wrapper.EnumTypeWrapper(_MODE) +CAMERA_FEEDBACK_UNKNOWN = 0 +CAMERA_FEEDBACK_OK = 1 +CAMERA_FEEDBACK_BUSY = 2 +CAMERA_FEEDBACK_FAILED = 3 +MODE_UNKNOWN = 0 +MODE_PHOTO = 1 +MODE_VIDEO = 2 _SETINFORMATIONREQUEST = DESCRIPTOR.message_types_by_name['SetInformationRequest'] _SETINFORMATIONRESPONSE = DESCRIPTOR.message_types_by_name['SetInformationResponse'] +_SETVIDEOSTREAMINGREQUEST = DESCRIPTOR.message_types_by_name['SetVideoStreamingRequest'] +_SETVIDEOSTREAMINGRESPONSE = DESCRIPTOR.message_types_by_name['SetVideoStreamingResponse'] _SETINPROGRESSREQUEST = DESCRIPTOR.message_types_by_name['SetInProgressRequest'] _SETINPROGRESSRESPONSE = DESCRIPTOR.message_types_by_name['SetInProgressResponse'] _SUBSCRIBETAKEPHOTOREQUEST = DESCRIPTOR.message_types_by_name['SubscribeTakePhotoRequest'] _TAKEPHOTORESPONSE = DESCRIPTOR.message_types_by_name['TakePhotoResponse'] _RESPONDTAKEPHOTOREQUEST = DESCRIPTOR.message_types_by_name['RespondTakePhotoRequest'] _RESPONDTAKEPHOTORESPONSE = DESCRIPTOR.message_types_by_name['RespondTakePhotoResponse'] +_SUBSCRIBESTARTVIDEOREQUEST = DESCRIPTOR.message_types_by_name['SubscribeStartVideoRequest'] +_STARTVIDEORESPONSE = DESCRIPTOR.message_types_by_name['StartVideoResponse'] +_RESPONDSTARTVIDEOREQUEST = DESCRIPTOR.message_types_by_name['RespondStartVideoRequest'] +_RESPONDSTARTVIDEORESPONSE = DESCRIPTOR.message_types_by_name['RespondStartVideoResponse'] +_SUBSCRIBESTOPVIDEOREQUEST = DESCRIPTOR.message_types_by_name['SubscribeStopVideoRequest'] +_STOPVIDEORESPONSE = DESCRIPTOR.message_types_by_name['StopVideoResponse'] +_RESPONDSTOPVIDEOREQUEST = DESCRIPTOR.message_types_by_name['RespondStopVideoRequest'] +_RESPONDSTOPVIDEORESPONSE = DESCRIPTOR.message_types_by_name['RespondStopVideoResponse'] +_SUBSCRIBESTARTVIDEOSTREAMINGREQUEST = DESCRIPTOR.message_types_by_name['SubscribeStartVideoStreamingRequest'] +_STARTVIDEOSTREAMINGRESPONSE = DESCRIPTOR.message_types_by_name['StartVideoStreamingResponse'] +_RESPONDSTARTVIDEOSTREAMINGREQUEST = DESCRIPTOR.message_types_by_name['RespondStartVideoStreamingRequest'] +_RESPONDSTARTVIDEOSTREAMINGRESPONSE = DESCRIPTOR.message_types_by_name['RespondStartVideoStreamingResponse'] +_SUBSCRIBESTOPVIDEOSTREAMINGREQUEST = DESCRIPTOR.message_types_by_name['SubscribeStopVideoStreamingRequest'] +_STOPVIDEOSTREAMINGRESPONSE = DESCRIPTOR.message_types_by_name['StopVideoStreamingResponse'] +_RESPONDSTOPVIDEOSTREAMINGREQUEST = DESCRIPTOR.message_types_by_name['RespondStopVideoStreamingRequest'] +_RESPONDSTOPVIDEOSTREAMINGRESPONSE = DESCRIPTOR.message_types_by_name['RespondStopVideoStreamingResponse'] +_SUBSCRIBESETMODEREQUEST = DESCRIPTOR.message_types_by_name['SubscribeSetModeRequest'] +_SETMODERESPONSE = DESCRIPTOR.message_types_by_name['SetModeResponse'] +_RESPONDSETMODEREQUEST = DESCRIPTOR.message_types_by_name['RespondSetModeRequest'] +_RESPONDSETMODERESPONSE = DESCRIPTOR.message_types_by_name['RespondSetModeResponse'] +_SUBSCRIBESTORAGEINFORMATIONREQUEST = DESCRIPTOR.message_types_by_name['SubscribeStorageInformationRequest'] +_STORAGEINFORMATIONRESPONSE = DESCRIPTOR.message_types_by_name['StorageInformationResponse'] +_RESPONDSTORAGEINFORMATIONREQUEST = DESCRIPTOR.message_types_by_name['RespondStorageInformationRequest'] +_RESPONDSTORAGEINFORMATIONRESPONSE = DESCRIPTOR.message_types_by_name['RespondStorageInformationResponse'] +_SUBSCRIBECAPTURESTATUSREQUEST = DESCRIPTOR.message_types_by_name['SubscribeCaptureStatusRequest'] +_CAPTURESTATUSRESPONSE = DESCRIPTOR.message_types_by_name['CaptureStatusResponse'] +_RESPONDCAPTURESTATUSREQUEST = DESCRIPTOR.message_types_by_name['RespondCaptureStatusRequest'] +_RESPONDCAPTURESTATUSRESPONSE = DESCRIPTOR.message_types_by_name['RespondCaptureStatusResponse'] +_SUBSCRIBEFORMATSTORAGEREQUEST = DESCRIPTOR.message_types_by_name['SubscribeFormatStorageRequest'] +_FORMATSTORAGERESPONSE = DESCRIPTOR.message_types_by_name['FormatStorageResponse'] +_RESPONDFORMATSTORAGEREQUEST = DESCRIPTOR.message_types_by_name['RespondFormatStorageRequest'] +_RESPONDFORMATSTORAGERESPONSE = DESCRIPTOR.message_types_by_name['RespondFormatStorageResponse'] +_SUBSCRIBERESETSETTINGSREQUEST = DESCRIPTOR.message_types_by_name['SubscribeResetSettingsRequest'] +_RESETSETTINGSRESPONSE = DESCRIPTOR.message_types_by_name['ResetSettingsResponse'] +_RESPONDRESETSETTINGSREQUEST = DESCRIPTOR.message_types_by_name['RespondResetSettingsRequest'] +_RESPONDRESETSETTINGSRESPONSE = DESCRIPTOR.message_types_by_name['RespondResetSettingsResponse'] _INFORMATION = DESCRIPTOR.message_types_by_name['Information'] +_VIDEOSTREAMING = DESCRIPTOR.message_types_by_name['VideoStreaming'] _POSITION = DESCRIPTOR.message_types_by_name['Position'] _QUATERNION = DESCRIPTOR.message_types_by_name['Quaternion'] _CAPTUREINFO = DESCRIPTOR.message_types_by_name['CaptureInfo'] _CAMERASERVERRESULT = DESCRIPTOR.message_types_by_name['CameraServerResult'] +_STORAGEINFORMATION = DESCRIPTOR.message_types_by_name['StorageInformation'] +_CAPTURESTATUS = DESCRIPTOR.message_types_by_name['CaptureStatus'] _CAMERASERVERRESULT_RESULT = _CAMERASERVERRESULT.enum_types_by_name['Result'] +_STORAGEINFORMATION_STORAGESTATUS = _STORAGEINFORMATION.enum_types_by_name['StorageStatus'] +_STORAGEINFORMATION_STORAGETYPE = _STORAGEINFORMATION.enum_types_by_name['StorageType'] +_CAPTURESTATUS_IMAGESTATUS = _CAPTURESTATUS.enum_types_by_name['ImageStatus'] +_CAPTURESTATUS_VIDEOSTATUS = _CAPTURESTATUS.enum_types_by_name['VideoStatus'] SetInformationRequest = _reflection.GeneratedProtocolMessageType('SetInformationRequest', (_message.Message,), { 'DESCRIPTOR' : _SETINFORMATIONREQUEST, '__module__' : 'camera_server.camera_server_pb2' @@ -54,6 +104,20 @@ }) _sym_db.RegisterMessage(SetInformationResponse) +SetVideoStreamingRequest = _reflection.GeneratedProtocolMessageType('SetVideoStreamingRequest', (_message.Message,), { + 'DESCRIPTOR' : _SETVIDEOSTREAMINGREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SetVideoStreamingRequest) + }) +_sym_db.RegisterMessage(SetVideoStreamingRequest) + +SetVideoStreamingResponse = _reflection.GeneratedProtocolMessageType('SetVideoStreamingResponse', (_message.Message,), { + 'DESCRIPTOR' : _SETVIDEOSTREAMINGRESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SetVideoStreamingResponse) + }) +_sym_db.RegisterMessage(SetVideoStreamingResponse) + SetInProgressRequest = _reflection.GeneratedProtocolMessageType('SetInProgressRequest', (_message.Message,), { 'DESCRIPTOR' : _SETINPROGRESSREQUEST, '__module__' : 'camera_server.camera_server_pb2' @@ -96,6 +160,258 @@ }) _sym_db.RegisterMessage(RespondTakePhotoResponse) +SubscribeStartVideoRequest = _reflection.GeneratedProtocolMessageType('SubscribeStartVideoRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBESTARTVIDEOREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SubscribeStartVideoRequest) + }) +_sym_db.RegisterMessage(SubscribeStartVideoRequest) + +StartVideoResponse = _reflection.GeneratedProtocolMessageType('StartVideoResponse', (_message.Message,), { + 'DESCRIPTOR' : _STARTVIDEORESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.StartVideoResponse) + }) +_sym_db.RegisterMessage(StartVideoResponse) + +RespondStartVideoRequest = _reflection.GeneratedProtocolMessageType('RespondStartVideoRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSTARTVIDEOREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondStartVideoRequest) + }) +_sym_db.RegisterMessage(RespondStartVideoRequest) + +RespondStartVideoResponse = _reflection.GeneratedProtocolMessageType('RespondStartVideoResponse', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSTARTVIDEORESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondStartVideoResponse) + }) +_sym_db.RegisterMessage(RespondStartVideoResponse) + +SubscribeStopVideoRequest = _reflection.GeneratedProtocolMessageType('SubscribeStopVideoRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBESTOPVIDEOREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SubscribeStopVideoRequest) + }) +_sym_db.RegisterMessage(SubscribeStopVideoRequest) + +StopVideoResponse = _reflection.GeneratedProtocolMessageType('StopVideoResponse', (_message.Message,), { + 'DESCRIPTOR' : _STOPVIDEORESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.StopVideoResponse) + }) +_sym_db.RegisterMessage(StopVideoResponse) + +RespondStopVideoRequest = _reflection.GeneratedProtocolMessageType('RespondStopVideoRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSTOPVIDEOREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondStopVideoRequest) + }) +_sym_db.RegisterMessage(RespondStopVideoRequest) + +RespondStopVideoResponse = _reflection.GeneratedProtocolMessageType('RespondStopVideoResponse', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSTOPVIDEORESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondStopVideoResponse) + }) +_sym_db.RegisterMessage(RespondStopVideoResponse) + +SubscribeStartVideoStreamingRequest = _reflection.GeneratedProtocolMessageType('SubscribeStartVideoStreamingRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBESTARTVIDEOSTREAMINGREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SubscribeStartVideoStreamingRequest) + }) +_sym_db.RegisterMessage(SubscribeStartVideoStreamingRequest) + +StartVideoStreamingResponse = _reflection.GeneratedProtocolMessageType('StartVideoStreamingResponse', (_message.Message,), { + 'DESCRIPTOR' : _STARTVIDEOSTREAMINGRESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.StartVideoStreamingResponse) + }) +_sym_db.RegisterMessage(StartVideoStreamingResponse) + +RespondStartVideoStreamingRequest = _reflection.GeneratedProtocolMessageType('RespondStartVideoStreamingRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSTARTVIDEOSTREAMINGREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondStartVideoStreamingRequest) + }) +_sym_db.RegisterMessage(RespondStartVideoStreamingRequest) + +RespondStartVideoStreamingResponse = _reflection.GeneratedProtocolMessageType('RespondStartVideoStreamingResponse', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSTARTVIDEOSTREAMINGRESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondStartVideoStreamingResponse) + }) +_sym_db.RegisterMessage(RespondStartVideoStreamingResponse) + +SubscribeStopVideoStreamingRequest = _reflection.GeneratedProtocolMessageType('SubscribeStopVideoStreamingRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBESTOPVIDEOSTREAMINGREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SubscribeStopVideoStreamingRequest) + }) +_sym_db.RegisterMessage(SubscribeStopVideoStreamingRequest) + +StopVideoStreamingResponse = _reflection.GeneratedProtocolMessageType('StopVideoStreamingResponse', (_message.Message,), { + 'DESCRIPTOR' : _STOPVIDEOSTREAMINGRESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.StopVideoStreamingResponse) + }) +_sym_db.RegisterMessage(StopVideoStreamingResponse) + +RespondStopVideoStreamingRequest = _reflection.GeneratedProtocolMessageType('RespondStopVideoStreamingRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSTOPVIDEOSTREAMINGREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondStopVideoStreamingRequest) + }) +_sym_db.RegisterMessage(RespondStopVideoStreamingRequest) + +RespondStopVideoStreamingResponse = _reflection.GeneratedProtocolMessageType('RespondStopVideoStreamingResponse', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSTOPVIDEOSTREAMINGRESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondStopVideoStreamingResponse) + }) +_sym_db.RegisterMessage(RespondStopVideoStreamingResponse) + +SubscribeSetModeRequest = _reflection.GeneratedProtocolMessageType('SubscribeSetModeRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBESETMODEREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SubscribeSetModeRequest) + }) +_sym_db.RegisterMessage(SubscribeSetModeRequest) + +SetModeResponse = _reflection.GeneratedProtocolMessageType('SetModeResponse', (_message.Message,), { + 'DESCRIPTOR' : _SETMODERESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SetModeResponse) + }) +_sym_db.RegisterMessage(SetModeResponse) + +RespondSetModeRequest = _reflection.GeneratedProtocolMessageType('RespondSetModeRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSETMODEREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondSetModeRequest) + }) +_sym_db.RegisterMessage(RespondSetModeRequest) + +RespondSetModeResponse = _reflection.GeneratedProtocolMessageType('RespondSetModeResponse', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSETMODERESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondSetModeResponse) + }) +_sym_db.RegisterMessage(RespondSetModeResponse) + +SubscribeStorageInformationRequest = _reflection.GeneratedProtocolMessageType('SubscribeStorageInformationRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBESTORAGEINFORMATIONREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SubscribeStorageInformationRequest) + }) +_sym_db.RegisterMessage(SubscribeStorageInformationRequest) + +StorageInformationResponse = _reflection.GeneratedProtocolMessageType('StorageInformationResponse', (_message.Message,), { + 'DESCRIPTOR' : _STORAGEINFORMATIONRESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.StorageInformationResponse) + }) +_sym_db.RegisterMessage(StorageInformationResponse) + +RespondStorageInformationRequest = _reflection.GeneratedProtocolMessageType('RespondStorageInformationRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSTORAGEINFORMATIONREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondStorageInformationRequest) + }) +_sym_db.RegisterMessage(RespondStorageInformationRequest) + +RespondStorageInformationResponse = _reflection.GeneratedProtocolMessageType('RespondStorageInformationResponse', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDSTORAGEINFORMATIONRESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondStorageInformationResponse) + }) +_sym_db.RegisterMessage(RespondStorageInformationResponse) + +SubscribeCaptureStatusRequest = _reflection.GeneratedProtocolMessageType('SubscribeCaptureStatusRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBECAPTURESTATUSREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SubscribeCaptureStatusRequest) + }) +_sym_db.RegisterMessage(SubscribeCaptureStatusRequest) + +CaptureStatusResponse = _reflection.GeneratedProtocolMessageType('CaptureStatusResponse', (_message.Message,), { + 'DESCRIPTOR' : _CAPTURESTATUSRESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.CaptureStatusResponse) + }) +_sym_db.RegisterMessage(CaptureStatusResponse) + +RespondCaptureStatusRequest = _reflection.GeneratedProtocolMessageType('RespondCaptureStatusRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDCAPTURESTATUSREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondCaptureStatusRequest) + }) +_sym_db.RegisterMessage(RespondCaptureStatusRequest) + +RespondCaptureStatusResponse = _reflection.GeneratedProtocolMessageType('RespondCaptureStatusResponse', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDCAPTURESTATUSRESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondCaptureStatusResponse) + }) +_sym_db.RegisterMessage(RespondCaptureStatusResponse) + +SubscribeFormatStorageRequest = _reflection.GeneratedProtocolMessageType('SubscribeFormatStorageRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBEFORMATSTORAGEREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SubscribeFormatStorageRequest) + }) +_sym_db.RegisterMessage(SubscribeFormatStorageRequest) + +FormatStorageResponse = _reflection.GeneratedProtocolMessageType('FormatStorageResponse', (_message.Message,), { + 'DESCRIPTOR' : _FORMATSTORAGERESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.FormatStorageResponse) + }) +_sym_db.RegisterMessage(FormatStorageResponse) + +RespondFormatStorageRequest = _reflection.GeneratedProtocolMessageType('RespondFormatStorageRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDFORMATSTORAGEREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondFormatStorageRequest) + }) +_sym_db.RegisterMessage(RespondFormatStorageRequest) + +RespondFormatStorageResponse = _reflection.GeneratedProtocolMessageType('RespondFormatStorageResponse', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDFORMATSTORAGERESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondFormatStorageResponse) + }) +_sym_db.RegisterMessage(RespondFormatStorageResponse) + +SubscribeResetSettingsRequest = _reflection.GeneratedProtocolMessageType('SubscribeResetSettingsRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBERESETSETTINGSREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.SubscribeResetSettingsRequest) + }) +_sym_db.RegisterMessage(SubscribeResetSettingsRequest) + +ResetSettingsResponse = _reflection.GeneratedProtocolMessageType('ResetSettingsResponse', (_message.Message,), { + 'DESCRIPTOR' : _RESETSETTINGSRESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.ResetSettingsResponse) + }) +_sym_db.RegisterMessage(ResetSettingsResponse) + +RespondResetSettingsRequest = _reflection.GeneratedProtocolMessageType('RespondResetSettingsRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDRESETSETTINGSREQUEST, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondResetSettingsRequest) + }) +_sym_db.RegisterMessage(RespondResetSettingsRequest) + +RespondResetSettingsResponse = _reflection.GeneratedProtocolMessageType('RespondResetSettingsResponse', (_message.Message,), { + 'DESCRIPTOR' : _RESPONDRESETSETTINGSRESPONSE, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.RespondResetSettingsResponse) + }) +_sym_db.RegisterMessage(RespondResetSettingsResponse) + Information = _reflection.GeneratedProtocolMessageType('Information', (_message.Message,), { 'DESCRIPTOR' : _INFORMATION, '__module__' : 'camera_server.camera_server_pb2' @@ -103,6 +419,13 @@ }) _sym_db.RegisterMessage(Information) +VideoStreaming = _reflection.GeneratedProtocolMessageType('VideoStreaming', (_message.Message,), { + 'DESCRIPTOR' : _VIDEOSTREAMING, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.VideoStreaming) + }) +_sym_db.RegisterMessage(VideoStreaming) + Position = _reflection.GeneratedProtocolMessageType('Position', (_message.Message,), { 'DESCRIPTOR' : _POSITION, '__module__' : 'camera_server.camera_server_pb2' @@ -131,6 +454,20 @@ }) _sym_db.RegisterMessage(CameraServerResult) +StorageInformation = _reflection.GeneratedProtocolMessageType('StorageInformation', (_message.Message,), { + 'DESCRIPTOR' : _STORAGEINFORMATION, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.StorageInformation) + }) +_sym_db.RegisterMessage(StorageInformation) + +CaptureStatus = _reflection.GeneratedProtocolMessageType('CaptureStatus', (_message.Message,), { + 'DESCRIPTOR' : _CAPTURESTATUS, + '__module__' : 'camera_server.camera_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.camera_server.CaptureStatus) + }) +_sym_db.RegisterMessage(CaptureStatus) + _CAMERASERVERSERVICE = DESCRIPTOR.services_by_name['CameraServerService'] if _descriptor._USE_C_DESCRIPTORS == False: @@ -138,42 +475,172 @@ DESCRIPTOR._serialized_options = b'\n\027io.mavsdk.camera_serverB\021CameraServerProto' _CAMERASERVERSERVICE.methods_by_name['SetInformation']._options = None _CAMERASERVERSERVICE.methods_by_name['SetInformation']._serialized_options = b'\200\265\030\001' + _CAMERASERVERSERVICE.methods_by_name['SetVideoStreaming']._options = None + _CAMERASERVERSERVICE.methods_by_name['SetVideoStreaming']._serialized_options = b'\200\265\030\001' _CAMERASERVERSERVICE.methods_by_name['SetInProgress']._options = None _CAMERASERVERSERVICE.methods_by_name['SetInProgress']._serialized_options = b'\200\265\030\001' _CAMERASERVERSERVICE.methods_by_name['SubscribeTakePhoto']._options = None _CAMERASERVERSERVICE.methods_by_name['SubscribeTakePhoto']._serialized_options = b'\200\265\030\000' _CAMERASERVERSERVICE.methods_by_name['RespondTakePhoto']._options = None _CAMERASERVERSERVICE.methods_by_name['RespondTakePhoto']._serialized_options = b'\200\265\030\001' - _TAKEPHOTOFEEDBACK._serialized_start=1766 - _TAKEPHOTOFEEDBACK._serialized_end=1908 + _CAMERASERVERSERVICE.methods_by_name['SubscribeStartVideo']._options = None + _CAMERASERVERSERVICE.methods_by_name['SubscribeStartVideo']._serialized_options = b'\200\265\030\000' + _CAMERASERVERSERVICE.methods_by_name['RespondStartVideo']._options = None + _CAMERASERVERSERVICE.methods_by_name['RespondStartVideo']._serialized_options = b'\200\265\030\001' + _CAMERASERVERSERVICE.methods_by_name['SubscribeStopVideo']._options = None + _CAMERASERVERSERVICE.methods_by_name['SubscribeStopVideo']._serialized_options = b'\200\265\030\000' + _CAMERASERVERSERVICE.methods_by_name['RespondStopVideo']._options = None + _CAMERASERVERSERVICE.methods_by_name['RespondStopVideo']._serialized_options = b'\200\265\030\001' + _CAMERASERVERSERVICE.methods_by_name['SubscribeStartVideoStreaming']._options = None + _CAMERASERVERSERVICE.methods_by_name['SubscribeStartVideoStreaming']._serialized_options = b'\200\265\030\000' + _CAMERASERVERSERVICE.methods_by_name['RespondStartVideoStreaming']._options = None + _CAMERASERVERSERVICE.methods_by_name['RespondStartVideoStreaming']._serialized_options = b'\200\265\030\001' + _CAMERASERVERSERVICE.methods_by_name['SubscribeStopVideoStreaming']._options = None + _CAMERASERVERSERVICE.methods_by_name['SubscribeStopVideoStreaming']._serialized_options = b'\200\265\030\000' + _CAMERASERVERSERVICE.methods_by_name['RespondStopVideoStreaming']._options = None + _CAMERASERVERSERVICE.methods_by_name['RespondStopVideoStreaming']._serialized_options = b'\200\265\030\001' + _CAMERASERVERSERVICE.methods_by_name['SubscribeSetMode']._options = None + _CAMERASERVERSERVICE.methods_by_name['SubscribeSetMode']._serialized_options = b'\200\265\030\000' + _CAMERASERVERSERVICE.methods_by_name['RespondSetMode']._options = None + _CAMERASERVERSERVICE.methods_by_name['RespondSetMode']._serialized_options = b'\200\265\030\001' + _CAMERASERVERSERVICE.methods_by_name['SubscribeStorageInformation']._options = None + _CAMERASERVERSERVICE.methods_by_name['SubscribeStorageInformation']._serialized_options = b'\200\265\030\000' + _CAMERASERVERSERVICE.methods_by_name['RespondStorageInformation']._options = None + _CAMERASERVERSERVICE.methods_by_name['RespondStorageInformation']._serialized_options = b'\200\265\030\001' + _CAMERASERVERSERVICE.methods_by_name['SubscribeCaptureStatus']._options = None + _CAMERASERVERSERVICE.methods_by_name['SubscribeCaptureStatus']._serialized_options = b'\200\265\030\000' + _CAMERASERVERSERVICE.methods_by_name['RespondCaptureStatus']._options = None + _CAMERASERVERSERVICE.methods_by_name['RespondCaptureStatus']._serialized_options = b'\200\265\030\001' + _CAMERASERVERSERVICE.methods_by_name['SubscribeFormatStorage']._options = None + _CAMERASERVERSERVICE.methods_by_name['SubscribeFormatStorage']._serialized_options = b'\200\265\030\000' + _CAMERASERVERSERVICE.methods_by_name['RespondFormatStorage']._options = None + _CAMERASERVERSERVICE.methods_by_name['RespondFormatStorage']._serialized_options = b'\200\265\030\001' + _CAMERASERVERSERVICE.methods_by_name['SubscribeResetSettings']._options = None + _CAMERASERVERSERVICE.methods_by_name['SubscribeResetSettings']._serialized_options = b'\200\265\030\000' + _CAMERASERVERSERVICE.methods_by_name['RespondResetSettings']._options = None + _CAMERASERVERSERVICE.methods_by_name['RespondResetSettings']._serialized_options = b'\200\265\030\001' + _CAMERAFEEDBACK._serialized_start=5980 + _CAMERAFEEDBACK._serialized_end=6103 + _MODE._serialized_start=6105 + _MODE._serialized_end=6161 _SETINFORMATIONREQUEST._serialized_start=85 _SETINFORMATIONREQUEST._serialized_end=168 _SETINFORMATIONRESPONSE._serialized_start=170 _SETINFORMATIONRESPONSE._serialized_end=270 - _SETINPROGRESSREQUEST._serialized_start=272 - _SETINPROGRESSREQUEST._serialized_end=315 - _SETINPROGRESSRESPONSE._serialized_start=317 - _SETINPROGRESSRESPONSE._serialized_end=416 - _SUBSCRIBETAKEPHOTOREQUEST._serialized_start=418 - _SUBSCRIBETAKEPHOTOREQUEST._serialized_end=445 - _TAKEPHOTORESPONSE._serialized_start=447 - _TAKEPHOTORESPONSE._serialized_end=481 - _RESPONDTAKEPHOTOREQUEST._serialized_start=484 - _RESPONDTAKEPHOTOREQUEST._serialized_end=644 - _RESPONDTAKEPHOTORESPONSE._serialized_start=646 - _RESPONDTAKEPHOTORESPONSE._serialized_end=748 - _INFORMATION._serialized_start=751 - _INFORMATION._serialized_end=1069 - _POSITION._serialized_start=1071 - _POSITION._serialized_end=1184 - _QUATERNION._serialized_start=1186 - _QUATERNION._serialized_end=1242 - _CAPTUREINFO._serialized_start=1245 - _CAPTUREINFO._serialized_end=1453 - _CAMERASERVERRESULT._serialized_start=1456 - _CAMERASERVERRESULT._serialized_end=1763 - _CAMERASERVERRESULT_RESULT._serialized_start=1568 - _CAMERASERVERRESULT_RESULT._serialized_end=1763 - _CAMERASERVERSERVICE._serialized_start=1911 - _CAMERASERVERSERVICE._serialized_end=2432 + _SETVIDEOSTREAMINGREQUEST._serialized_start=272 + _SETVIDEOSTREAMINGREQUEST._serialized_end=365 + _SETVIDEOSTREAMINGRESPONSE._serialized_start=367 + _SETVIDEOSTREAMINGRESPONSE._serialized_end=470 + _SETINPROGRESSREQUEST._serialized_start=472 + _SETINPROGRESSREQUEST._serialized_end=515 + _SETINPROGRESSRESPONSE._serialized_start=517 + _SETINPROGRESSRESPONSE._serialized_end=616 + _SUBSCRIBETAKEPHOTOREQUEST._serialized_start=618 + _SUBSCRIBETAKEPHOTOREQUEST._serialized_end=645 + _TAKEPHOTORESPONSE._serialized_start=647 + _TAKEPHOTORESPONSE._serialized_end=681 + _RESPONDTAKEPHOTOREQUEST._serialized_start=684 + _RESPONDTAKEPHOTOREQUEST._serialized_end=841 + _RESPONDTAKEPHOTORESPONSE._serialized_start=843 + _RESPONDTAKEPHOTORESPONSE._serialized_end=945 + _SUBSCRIBESTARTVIDEOREQUEST._serialized_start=947 + _SUBSCRIBESTARTVIDEOREQUEST._serialized_end=975 + _STARTVIDEORESPONSE._serialized_start=977 + _STARTVIDEORESPONSE._serialized_end=1016 + _RESPONDSTARTVIDEOREQUEST._serialized_start=1018 + _RESPONDSTARTVIDEOREQUEST._serialized_end=1116 + _RESPONDSTARTVIDEORESPONSE._serialized_start=1118 + _RESPONDSTARTVIDEORESPONSE._serialized_end=1221 + _SUBSCRIBESTOPVIDEOREQUEST._serialized_start=1223 + _SUBSCRIBESTOPVIDEOREQUEST._serialized_end=1250 + _STOPVIDEORESPONSE._serialized_start=1252 + _STOPVIDEORESPONSE._serialized_end=1290 + _RESPONDSTOPVIDEOREQUEST._serialized_start=1292 + _RESPONDSTOPVIDEOREQUEST._serialized_end=1388 + _RESPONDSTOPVIDEORESPONSE._serialized_start=1390 + _RESPONDSTOPVIDEORESPONSE._serialized_end=1492 + _SUBSCRIBESTARTVIDEOSTREAMINGREQUEST._serialized_start=1494 + _SUBSCRIBESTARTVIDEOSTREAMINGREQUEST._serialized_end=1531 + _STARTVIDEOSTREAMINGRESPONSE._serialized_start=1533 + _STARTVIDEOSTREAMINGRESPONSE._serialized_end=1581 + _RESPONDSTARTVIDEOSTREAMINGREQUEST._serialized_start=1583 + _RESPONDSTARTVIDEOSTREAMINGREQUEST._serialized_end=1700 + _RESPONDSTARTVIDEOSTREAMINGRESPONSE._serialized_start=1702 + _RESPONDSTARTVIDEOSTREAMINGRESPONSE._serialized_end=1814 + _SUBSCRIBESTOPVIDEOSTREAMINGREQUEST._serialized_start=1816 + _SUBSCRIBESTOPVIDEOSTREAMINGREQUEST._serialized_end=1852 + _STOPVIDEOSTREAMINGRESPONSE._serialized_start=1854 + _STOPVIDEOSTREAMINGRESPONSE._serialized_end=1901 + _RESPONDSTOPVIDEOSTREAMINGREQUEST._serialized_start=1903 + _RESPONDSTOPVIDEOSTREAMINGREQUEST._serialized_end=2018 + _RESPONDSTOPVIDEOSTREAMINGRESPONSE._serialized_start=2020 + _RESPONDSTOPVIDEOSTREAMINGRESPONSE._serialized_end=2131 + _SUBSCRIBESETMODEREQUEST._serialized_start=2133 + _SUBSCRIBESETMODEREQUEST._serialized_end=2158 + _SETMODERESPONSE._serialized_start=2160 + _SETMODERESPONSE._serialized_end=2223 + _RESPONDSETMODEREQUEST._serialized_start=2225 + _RESPONDSETMODEREQUEST._serialized_end=2317 + _RESPONDSETMODERESPONSE._serialized_start=2319 + _RESPONDSETMODERESPONSE._serialized_end=2419 + _SUBSCRIBESTORAGEINFORMATIONREQUEST._serialized_start=2421 + _SUBSCRIBESTORAGEINFORMATIONREQUEST._serialized_end=2457 + _STORAGEINFORMATIONRESPONSE._serialized_start=2459 + _STORAGEINFORMATIONRESPONSE._serialized_end=2507 + _RESPONDSTORAGEINFORMATIONREQUEST._serialized_start=2510 + _RESPONDSTORAGEINFORMATIONREQUEST._serialized_end=2699 + _RESPONDSTORAGEINFORMATIONRESPONSE._serialized_start=2701 + _RESPONDSTORAGEINFORMATIONRESPONSE._serialized_end=2812 + _SUBSCRIBECAPTURESTATUSREQUEST._serialized_start=2814 + _SUBSCRIBECAPTURESTATUSREQUEST._serialized_end=2845 + _CAPTURESTATUSRESPONSE._serialized_start=2847 + _CAPTURESTATUSRESPONSE._serialized_end=2888 + _RESPONDCAPTURESTATUSREQUEST._serialized_start=2891 + _RESPONDCAPTURESTATUSREQUEST._serialized_end=3060 + _RESPONDCAPTURESTATUSRESPONSE._serialized_start=3062 + _RESPONDCAPTURESTATUSRESPONSE._serialized_end=3168 + _SUBSCRIBEFORMATSTORAGEREQUEST._serialized_start=3170 + _SUBSCRIBEFORMATSTORAGEREQUEST._serialized_end=3201 + _FORMATSTORAGERESPONSE._serialized_start=3203 + _FORMATSTORAGERESPONSE._serialized_end=3246 + _RESPONDFORMATSTORAGEREQUEST._serialized_start=3248 + _RESPONDFORMATSTORAGEREQUEST._serialized_end=3352 + _RESPONDFORMATSTORAGERESPONSE._serialized_start=3354 + _RESPONDFORMATSTORAGERESPONSE._serialized_end=3460 + _SUBSCRIBERESETSETTINGSREQUEST._serialized_start=3462 + _SUBSCRIBERESETSETTINGSREQUEST._serialized_end=3493 + _RESETSETTINGSRESPONSE._serialized_start=3495 + _RESETSETTINGSRESPONSE._serialized_end=3536 + _RESPONDRESETSETTINGSREQUEST._serialized_start=3538 + _RESPONDRESETSETTINGSREQUEST._serialized_end=3642 + _RESPONDRESETSETTINGSRESPONSE._serialized_start=3644 + _RESPONDRESETSETTINGSRESPONSE._serialized_end=3750 + _INFORMATION._serialized_start=3753 + _INFORMATION._serialized_end=4071 + _VIDEOSTREAMING._serialized_start=4073 + _VIDEOSTREAMING._serialized_end=4132 + _POSITION._serialized_start=4134 + _POSITION._serialized_end=4247 + _QUATERNION._serialized_start=4249 + _QUATERNION._serialized_end=4305 + _CAPTUREINFO._serialized_start=4308 + _CAPTUREINFO._serialized_end=4516 + _CAMERASERVERRESULT._serialized_start=4519 + _CAMERASERVERRESULT._serialized_end=4826 + _CAMERASERVERRESULT_RESULT._serialized_start=4631 + _CAMERASERVERRESULT_RESULT._serialized_end=4826 + _STORAGEINFORMATION._serialized_start=4829 + _STORAGEINFORMATION._serialized_end=5481 + _STORAGEINFORMATION_STORAGESTATUS._serialized_start=5173 + _STORAGEINFORMATION_STORAGESTATUS._serialized_end=5318 + _STORAGEINFORMATION_STORAGETYPE._serialized_start=5321 + _STORAGEINFORMATION_STORAGETYPE._serialized_end=5481 + _CAPTURESTATUS._serialized_start=5484 + _CAPTURESTATUS._serialized_end=5978 + _CAPTURESTATUS_IMAGESTATUS._serialized_start=5757 + _CAPTURESTATUS_IMAGESTATUS._serialized_end=5902 + _CAPTURESTATUS_VIDEOSTATUS._serialized_start=5904 + _CAPTURESTATUS_VIDEOSTATUS._serialized_end=5978 + _CAMERASERVERSERVICE._serialized_start=6164 + _CAMERASERVERSERVICE._serialized_end=9379 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/camera_server_pb2_grpc.py b/mavsdk/camera_server_pb2_grpc.py index cf0a8464..2a3ebe76 100644 --- a/mavsdk/camera_server_pb2_grpc.py +++ b/mavsdk/camera_server_pb2_grpc.py @@ -20,6 +20,11 @@ def __init__(self, channel): request_serializer=camera__server_dot_camera__server__pb2.SetInformationRequest.SerializeToString, response_deserializer=camera__server_dot_camera__server__pb2.SetInformationResponse.FromString, ) + self.SetVideoStreaming = channel.unary_unary( + '/mavsdk.rpc.camera_server.CameraServerService/SetVideoStreaming', + request_serializer=camera__server_dot_camera__server__pb2.SetVideoStreamingRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.SetVideoStreamingResponse.FromString, + ) self.SetInProgress = channel.unary_unary( '/mavsdk.rpc.camera_server.CameraServerService/SetInProgress', request_serializer=camera__server_dot_camera__server__pb2.SetInProgressRequest.SerializeToString, @@ -35,6 +40,96 @@ def __init__(self, channel): request_serializer=camera__server_dot_camera__server__pb2.RespondTakePhotoRequest.SerializeToString, response_deserializer=camera__server_dot_camera__server__pb2.RespondTakePhotoResponse.FromString, ) + self.SubscribeStartVideo = channel.unary_stream( + '/mavsdk.rpc.camera_server.CameraServerService/SubscribeStartVideo', + request_serializer=camera__server_dot_camera__server__pb2.SubscribeStartVideoRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.StartVideoResponse.FromString, + ) + self.RespondStartVideo = channel.unary_unary( + '/mavsdk.rpc.camera_server.CameraServerService/RespondStartVideo', + request_serializer=camera__server_dot_camera__server__pb2.RespondStartVideoRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.RespondStartVideoResponse.FromString, + ) + self.SubscribeStopVideo = channel.unary_stream( + '/mavsdk.rpc.camera_server.CameraServerService/SubscribeStopVideo', + request_serializer=camera__server_dot_camera__server__pb2.SubscribeStopVideoRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.StopVideoResponse.FromString, + ) + self.RespondStopVideo = channel.unary_unary( + '/mavsdk.rpc.camera_server.CameraServerService/RespondStopVideo', + request_serializer=camera__server_dot_camera__server__pb2.RespondStopVideoRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.RespondStopVideoResponse.FromString, + ) + self.SubscribeStartVideoStreaming = channel.unary_stream( + '/mavsdk.rpc.camera_server.CameraServerService/SubscribeStartVideoStreaming', + request_serializer=camera__server_dot_camera__server__pb2.SubscribeStartVideoStreamingRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.StartVideoStreamingResponse.FromString, + ) + self.RespondStartVideoStreaming = channel.unary_unary( + '/mavsdk.rpc.camera_server.CameraServerService/RespondStartVideoStreaming', + request_serializer=camera__server_dot_camera__server__pb2.RespondStartVideoStreamingRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.RespondStartVideoStreamingResponse.FromString, + ) + self.SubscribeStopVideoStreaming = channel.unary_stream( + '/mavsdk.rpc.camera_server.CameraServerService/SubscribeStopVideoStreaming', + request_serializer=camera__server_dot_camera__server__pb2.SubscribeStopVideoStreamingRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.StopVideoStreamingResponse.FromString, + ) + self.RespondStopVideoStreaming = channel.unary_unary( + '/mavsdk.rpc.camera_server.CameraServerService/RespondStopVideoStreaming', + request_serializer=camera__server_dot_camera__server__pb2.RespondStopVideoStreamingRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.RespondStopVideoStreamingResponse.FromString, + ) + self.SubscribeSetMode = channel.unary_stream( + '/mavsdk.rpc.camera_server.CameraServerService/SubscribeSetMode', + request_serializer=camera__server_dot_camera__server__pb2.SubscribeSetModeRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.SetModeResponse.FromString, + ) + self.RespondSetMode = channel.unary_unary( + '/mavsdk.rpc.camera_server.CameraServerService/RespondSetMode', + request_serializer=camera__server_dot_camera__server__pb2.RespondSetModeRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.RespondSetModeResponse.FromString, + ) + self.SubscribeStorageInformation = channel.unary_stream( + '/mavsdk.rpc.camera_server.CameraServerService/SubscribeStorageInformation', + request_serializer=camera__server_dot_camera__server__pb2.SubscribeStorageInformationRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.StorageInformationResponse.FromString, + ) + self.RespondStorageInformation = channel.unary_unary( + '/mavsdk.rpc.camera_server.CameraServerService/RespondStorageInformation', + request_serializer=camera__server_dot_camera__server__pb2.RespondStorageInformationRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.RespondStorageInformationResponse.FromString, + ) + self.SubscribeCaptureStatus = channel.unary_stream( + '/mavsdk.rpc.camera_server.CameraServerService/SubscribeCaptureStatus', + request_serializer=camera__server_dot_camera__server__pb2.SubscribeCaptureStatusRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.CaptureStatusResponse.FromString, + ) + self.RespondCaptureStatus = channel.unary_unary( + '/mavsdk.rpc.camera_server.CameraServerService/RespondCaptureStatus', + request_serializer=camera__server_dot_camera__server__pb2.RespondCaptureStatusRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.RespondCaptureStatusResponse.FromString, + ) + self.SubscribeFormatStorage = channel.unary_stream( + '/mavsdk.rpc.camera_server.CameraServerService/SubscribeFormatStorage', + request_serializer=camera__server_dot_camera__server__pb2.SubscribeFormatStorageRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.FormatStorageResponse.FromString, + ) + self.RespondFormatStorage = channel.unary_unary( + '/mavsdk.rpc.camera_server.CameraServerService/RespondFormatStorage', + request_serializer=camera__server_dot_camera__server__pb2.RespondFormatStorageRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.RespondFormatStorageResponse.FromString, + ) + self.SubscribeResetSettings = channel.unary_stream( + '/mavsdk.rpc.camera_server.CameraServerService/SubscribeResetSettings', + request_serializer=camera__server_dot_camera__server__pb2.SubscribeResetSettingsRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.ResetSettingsResponse.FromString, + ) + self.RespondResetSettings = channel.unary_unary( + '/mavsdk.rpc.camera_server.CameraServerService/RespondResetSettings', + request_serializer=camera__server_dot_camera__server__pb2.RespondResetSettingsRequest.SerializeToString, + response_deserializer=camera__server_dot_camera__server__pb2.RespondResetSettingsResponse.FromString, + ) class CameraServerServiceServicer(object): @@ -48,6 +143,13 @@ def SetInformation(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def SetVideoStreaming(self, request, context): + """Sets video streaming settings. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SetInProgress(self, request, context): """Sets image capture in progress status flags. This should be set to true when the camera is busy taking a photo and false when it is done. """ @@ -69,6 +171,132 @@ def RespondTakePhoto(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def SubscribeStartVideo(self, request, context): + """Subscribe to start video requests. Each request received should respond to using RespondStartVideo + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RespondStartVideo(self, request, context): + """Subscribe to stop video requests. Each request received should respond using StopVideoResponse + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SubscribeStopVideo(self, request, context): + """Subscribe to stop video requests. Each request received should response to using RespondStopVideo + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RespondStopVideo(self, request, context): + """Respond to stop video request from SubscribeStopVideo. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SubscribeStartVideoStreaming(self, request, context): + """Subscribe to start video streaming requests. Each request received should response to using RespondStartVideoStreaming + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RespondStartVideoStreaming(self, request, context): + """Respond to start video streaming from SubscribeStartVideoStreaming. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SubscribeStopVideoStreaming(self, request, context): + """Subscribe to stop video streaming requests. Each request received should response to using RespondStopVideoStreaming + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RespondStopVideoStreaming(self, request, context): + """Respond to stop video streaming from SubscribeStopVideoStreaming. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SubscribeSetMode(self, request, context): + """Subscribe to set camera mode requests. Each request received should response to using RespondSetMode + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RespondSetMode(self, request, context): + """Respond to set camera mode from SubscribeSetMode. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SubscribeStorageInformation(self, request, context): + """Subscribe to camera storage information requests. Each request received should response to using RespondStorageInformation + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RespondStorageInformation(self, request, context): + """Respond to camera storage information from SubscribeStorageInformation. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SubscribeCaptureStatus(self, request, context): + """Subscribe to camera capture status requests. Each request received should response to using RespondCaptureStatus + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RespondCaptureStatus(self, request, context): + """Respond to camera capture status from SubscribeCaptureStatus. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SubscribeFormatStorage(self, request, context): + """Subscribe to format storage requests. Each request received should response to using RespondFormatStorage + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RespondFormatStorage(self, request, context): + """Respond to format storage from SubscribeFormatStorage. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SubscribeResetSettings(self, request, context): + """Subscribe to reset settings requests. Each request received should response to using RespondResetSettings + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RespondResetSettings(self, request, context): + """Respond to reset settings from SubscribeResetSettings. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_CameraServerServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -77,6 +305,11 @@ def add_CameraServerServiceServicer_to_server(servicer, server): request_deserializer=camera__server_dot_camera__server__pb2.SetInformationRequest.FromString, response_serializer=camera__server_dot_camera__server__pb2.SetInformationResponse.SerializeToString, ), + 'SetVideoStreaming': grpc.unary_unary_rpc_method_handler( + servicer.SetVideoStreaming, + request_deserializer=camera__server_dot_camera__server__pb2.SetVideoStreamingRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.SetVideoStreamingResponse.SerializeToString, + ), 'SetInProgress': grpc.unary_unary_rpc_method_handler( servicer.SetInProgress, request_deserializer=camera__server_dot_camera__server__pb2.SetInProgressRequest.FromString, @@ -92,6 +325,96 @@ def add_CameraServerServiceServicer_to_server(servicer, server): request_deserializer=camera__server_dot_camera__server__pb2.RespondTakePhotoRequest.FromString, response_serializer=camera__server_dot_camera__server__pb2.RespondTakePhotoResponse.SerializeToString, ), + 'SubscribeStartVideo': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeStartVideo, + request_deserializer=camera__server_dot_camera__server__pb2.SubscribeStartVideoRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.StartVideoResponse.SerializeToString, + ), + 'RespondStartVideo': grpc.unary_unary_rpc_method_handler( + servicer.RespondStartVideo, + request_deserializer=camera__server_dot_camera__server__pb2.RespondStartVideoRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.RespondStartVideoResponse.SerializeToString, + ), + 'SubscribeStopVideo': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeStopVideo, + request_deserializer=camera__server_dot_camera__server__pb2.SubscribeStopVideoRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.StopVideoResponse.SerializeToString, + ), + 'RespondStopVideo': grpc.unary_unary_rpc_method_handler( + servicer.RespondStopVideo, + request_deserializer=camera__server_dot_camera__server__pb2.RespondStopVideoRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.RespondStopVideoResponse.SerializeToString, + ), + 'SubscribeStartVideoStreaming': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeStartVideoStreaming, + request_deserializer=camera__server_dot_camera__server__pb2.SubscribeStartVideoStreamingRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.StartVideoStreamingResponse.SerializeToString, + ), + 'RespondStartVideoStreaming': grpc.unary_unary_rpc_method_handler( + servicer.RespondStartVideoStreaming, + request_deserializer=camera__server_dot_camera__server__pb2.RespondStartVideoStreamingRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.RespondStartVideoStreamingResponse.SerializeToString, + ), + 'SubscribeStopVideoStreaming': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeStopVideoStreaming, + request_deserializer=camera__server_dot_camera__server__pb2.SubscribeStopVideoStreamingRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.StopVideoStreamingResponse.SerializeToString, + ), + 'RespondStopVideoStreaming': grpc.unary_unary_rpc_method_handler( + servicer.RespondStopVideoStreaming, + request_deserializer=camera__server_dot_camera__server__pb2.RespondStopVideoStreamingRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.RespondStopVideoStreamingResponse.SerializeToString, + ), + 'SubscribeSetMode': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeSetMode, + request_deserializer=camera__server_dot_camera__server__pb2.SubscribeSetModeRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.SetModeResponse.SerializeToString, + ), + 'RespondSetMode': grpc.unary_unary_rpc_method_handler( + servicer.RespondSetMode, + request_deserializer=camera__server_dot_camera__server__pb2.RespondSetModeRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.RespondSetModeResponse.SerializeToString, + ), + 'SubscribeStorageInformation': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeStorageInformation, + request_deserializer=camera__server_dot_camera__server__pb2.SubscribeStorageInformationRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.StorageInformationResponse.SerializeToString, + ), + 'RespondStorageInformation': grpc.unary_unary_rpc_method_handler( + servicer.RespondStorageInformation, + request_deserializer=camera__server_dot_camera__server__pb2.RespondStorageInformationRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.RespondStorageInformationResponse.SerializeToString, + ), + 'SubscribeCaptureStatus': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeCaptureStatus, + request_deserializer=camera__server_dot_camera__server__pb2.SubscribeCaptureStatusRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.CaptureStatusResponse.SerializeToString, + ), + 'RespondCaptureStatus': grpc.unary_unary_rpc_method_handler( + servicer.RespondCaptureStatus, + request_deserializer=camera__server_dot_camera__server__pb2.RespondCaptureStatusRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.RespondCaptureStatusResponse.SerializeToString, + ), + 'SubscribeFormatStorage': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeFormatStorage, + request_deserializer=camera__server_dot_camera__server__pb2.SubscribeFormatStorageRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.FormatStorageResponse.SerializeToString, + ), + 'RespondFormatStorage': grpc.unary_unary_rpc_method_handler( + servicer.RespondFormatStorage, + request_deserializer=camera__server_dot_camera__server__pb2.RespondFormatStorageRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.RespondFormatStorageResponse.SerializeToString, + ), + 'SubscribeResetSettings': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeResetSettings, + request_deserializer=camera__server_dot_camera__server__pb2.SubscribeResetSettingsRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.ResetSettingsResponse.SerializeToString, + ), + 'RespondResetSettings': grpc.unary_unary_rpc_method_handler( + servicer.RespondResetSettings, + request_deserializer=camera__server_dot_camera__server__pb2.RespondResetSettingsRequest.FromString, + response_serializer=camera__server_dot_camera__server__pb2.RespondResetSettingsResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.camera_server.CameraServerService', rpc_method_handlers) @@ -120,6 +443,23 @@ def SetInformation(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def SetVideoStreaming(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.camera_server.CameraServerService/SetVideoStreaming', + camera__server_dot_camera__server__pb2.SetVideoStreamingRequest.SerializeToString, + camera__server_dot_camera__server__pb2.SetVideoStreamingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def SetInProgress(request, target, @@ -170,3 +510,309 @@ def RespondTakePhoto(request, camera__server_dot_camera__server__pb2.RespondTakePhotoResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeStartVideo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.camera_server.CameraServerService/SubscribeStartVideo', + camera__server_dot_camera__server__pb2.SubscribeStartVideoRequest.SerializeToString, + camera__server_dot_camera__server__pb2.StartVideoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RespondStartVideo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.camera_server.CameraServerService/RespondStartVideo', + camera__server_dot_camera__server__pb2.RespondStartVideoRequest.SerializeToString, + camera__server_dot_camera__server__pb2.RespondStartVideoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeStopVideo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.camera_server.CameraServerService/SubscribeStopVideo', + camera__server_dot_camera__server__pb2.SubscribeStopVideoRequest.SerializeToString, + camera__server_dot_camera__server__pb2.StopVideoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RespondStopVideo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.camera_server.CameraServerService/RespondStopVideo', + camera__server_dot_camera__server__pb2.RespondStopVideoRequest.SerializeToString, + camera__server_dot_camera__server__pb2.RespondStopVideoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeStartVideoStreaming(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.camera_server.CameraServerService/SubscribeStartVideoStreaming', + camera__server_dot_camera__server__pb2.SubscribeStartVideoStreamingRequest.SerializeToString, + camera__server_dot_camera__server__pb2.StartVideoStreamingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RespondStartVideoStreaming(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.camera_server.CameraServerService/RespondStartVideoStreaming', + camera__server_dot_camera__server__pb2.RespondStartVideoStreamingRequest.SerializeToString, + camera__server_dot_camera__server__pb2.RespondStartVideoStreamingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeStopVideoStreaming(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.camera_server.CameraServerService/SubscribeStopVideoStreaming', + camera__server_dot_camera__server__pb2.SubscribeStopVideoStreamingRequest.SerializeToString, + camera__server_dot_camera__server__pb2.StopVideoStreamingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RespondStopVideoStreaming(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.camera_server.CameraServerService/RespondStopVideoStreaming', + camera__server_dot_camera__server__pb2.RespondStopVideoStreamingRequest.SerializeToString, + camera__server_dot_camera__server__pb2.RespondStopVideoStreamingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeSetMode(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.camera_server.CameraServerService/SubscribeSetMode', + camera__server_dot_camera__server__pb2.SubscribeSetModeRequest.SerializeToString, + camera__server_dot_camera__server__pb2.SetModeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RespondSetMode(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.camera_server.CameraServerService/RespondSetMode', + camera__server_dot_camera__server__pb2.RespondSetModeRequest.SerializeToString, + camera__server_dot_camera__server__pb2.RespondSetModeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeStorageInformation(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.camera_server.CameraServerService/SubscribeStorageInformation', + camera__server_dot_camera__server__pb2.SubscribeStorageInformationRequest.SerializeToString, + camera__server_dot_camera__server__pb2.StorageInformationResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RespondStorageInformation(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.camera_server.CameraServerService/RespondStorageInformation', + camera__server_dot_camera__server__pb2.RespondStorageInformationRequest.SerializeToString, + camera__server_dot_camera__server__pb2.RespondStorageInformationResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeCaptureStatus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.camera_server.CameraServerService/SubscribeCaptureStatus', + camera__server_dot_camera__server__pb2.SubscribeCaptureStatusRequest.SerializeToString, + camera__server_dot_camera__server__pb2.CaptureStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RespondCaptureStatus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.camera_server.CameraServerService/RespondCaptureStatus', + camera__server_dot_camera__server__pb2.RespondCaptureStatusRequest.SerializeToString, + camera__server_dot_camera__server__pb2.RespondCaptureStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeFormatStorage(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.camera_server.CameraServerService/SubscribeFormatStorage', + camera__server_dot_camera__server__pb2.SubscribeFormatStorageRequest.SerializeToString, + camera__server_dot_camera__server__pb2.FormatStorageResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RespondFormatStorage(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.camera_server.CameraServerService/RespondFormatStorage', + camera__server_dot_camera__server__pb2.RespondFormatStorageRequest.SerializeToString, + camera__server_dot_camera__server__pb2.RespondFormatStorageResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeResetSettings(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.camera_server.CameraServerService/SubscribeResetSettings', + camera__server_dot_camera__server__pb2.SubscribeResetSettingsRequest.SerializeToString, + camera__server_dot_camera__server__pb2.ResetSettingsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RespondResetSettings(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.camera_server.CameraServerService/RespondResetSettings', + camera__server_dot_camera__server__pb2.RespondResetSettingsRequest.SerializeToString, + camera__server_dot_camera__server__pb2.RespondResetSettingsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/mavsdk/follow_me.py b/mavsdk/follow_me.py index 58d5337f..168fbc1e 100644 --- a/mavsdk/follow_me.py +++ b/mavsdk/follow_me.py @@ -12,77 +12,67 @@ class Config: Parameters ---------- - min_height_m : float - Minimum height for the vehicle in meters (recommended minimum 8 meters) + follow_height_m : float + [m] Follow height in meters (recommended minimum 8 meters) follow_distance_m : float - Distance from target for vehicle to follow in meters (recommended minimum 1 meter) - - follow_direction : FollowDirection - Direction to follow in + [m] Follow distance to target in meters (recommended minimum 4 meter) responsiveness : float - How responsive the vehicle is to the motion of the target (range 0.0 to 1.0) + How responsive the vehicle is to the motion of the target, Lower value = More responsive (range 0.0 to 1.0) + + altitude_mode : FollowAltitudeMode + Follow Altitude control mode + + max_tangential_vel_m_s : float + [m/s] Maximum orbit tangential velocity relative to the target, in meters per second. Higher value = More aggressive follow angle tracking. + + follow_angle_deg : float + [deg] Follow Angle relative to the target. 0 equals following in front of the target's direction. Angle increases in Clockwise direction, so following from right would be 90 degrees, from the left is -90 degrees, and so on. """ - class FollowDirection(Enum): + class FollowAltitudeMode(Enum): """ - Direction relative to the target that the vehicle should follow + Altitude mode to configure which altitude the follow me will assume the target to be at. Values ------ - NONE - Do not follow - - BEHIND - Follow from behind - - FRONT - Follow from front + CONSTANT + Target assumed to be mobing at a constant altitude of home position (where the vehicle armed) - FRONT_RIGHT - Follow from front right + TERRAIN + Target assumed to be at the terrain level sensed by the distance sensor - FRONT_LEFT - Follow from front left + TARGET_GPS + Target GPS altitude taken into account to do 3D tracking """ - NONE = 0 - BEHIND = 1 - FRONT = 2 - FRONT_RIGHT = 3 - FRONT_LEFT = 4 + CONSTANT = 0 + TERRAIN = 1 + TARGET_GPS = 2 def translate_to_rpc(self): - if self == Config.FollowDirection.NONE: - return follow_me_pb2.Config.FOLLOW_DIRECTION_NONE - if self == Config.FollowDirection.BEHIND: - return follow_me_pb2.Config.FOLLOW_DIRECTION_BEHIND - if self == Config.FollowDirection.FRONT: - return follow_me_pb2.Config.FOLLOW_DIRECTION_FRONT - if self == Config.FollowDirection.FRONT_RIGHT: - return follow_me_pb2.Config.FOLLOW_DIRECTION_FRONT_RIGHT - if self == Config.FollowDirection.FRONT_LEFT: - return follow_me_pb2.Config.FOLLOW_DIRECTION_FRONT_LEFT + if self == Config.FollowAltitudeMode.CONSTANT: + return follow_me_pb2.Config.FOLLOW_ALTITUDE_MODE_CONSTANT + if self == Config.FollowAltitudeMode.TERRAIN: + return follow_me_pb2.Config.FOLLOW_ALTITUDE_MODE_TERRAIN + if self == Config.FollowAltitudeMode.TARGET_GPS: + return follow_me_pb2.Config.FOLLOW_ALTITUDE_MODE_TARGET_GPS @staticmethod def translate_from_rpc(rpc_enum_value): """ Parses a gRPC response """ - if rpc_enum_value == follow_me_pb2.Config.FOLLOW_DIRECTION_NONE: - return Config.FollowDirection.NONE - if rpc_enum_value == follow_me_pb2.Config.FOLLOW_DIRECTION_BEHIND: - return Config.FollowDirection.BEHIND - if rpc_enum_value == follow_me_pb2.Config.FOLLOW_DIRECTION_FRONT: - return Config.FollowDirection.FRONT - if rpc_enum_value == follow_me_pb2.Config.FOLLOW_DIRECTION_FRONT_RIGHT: - return Config.FollowDirection.FRONT_RIGHT - if rpc_enum_value == follow_me_pb2.Config.FOLLOW_DIRECTION_FRONT_LEFT: - return Config.FollowDirection.FRONT_LEFT + if rpc_enum_value == follow_me_pb2.Config.FOLLOW_ALTITUDE_MODE_CONSTANT: + return Config.FollowAltitudeMode.CONSTANT + if rpc_enum_value == follow_me_pb2.Config.FOLLOW_ALTITUDE_MODE_TERRAIN: + return Config.FollowAltitudeMode.TERRAIN + if rpc_enum_value == follow_me_pb2.Config.FOLLOW_ALTITUDE_MODE_TARGET_GPS: + return Config.FollowAltitudeMode.TARGET_GPS def __str__(self): return self.name @@ -90,15 +80,19 @@ def __str__(self): def __init__( self, - min_height_m, + follow_height_m, follow_distance_m, - follow_direction, - responsiveness): + responsiveness, + altitude_mode, + max_tangential_vel_m_s, + follow_angle_deg): """ Initializes the Config object """ - self.min_height_m = min_height_m + self.follow_height_m = follow_height_m self.follow_distance_m = follow_distance_m - self.follow_direction = follow_direction self.responsiveness = responsiveness + self.altitude_mode = altitude_mode + self.max_tangential_vel_m_s = max_tangential_vel_m_s + self.follow_angle_deg = follow_angle_deg def __eq__(self, to_compare): """ Checks if two Config are the same """ @@ -106,10 +100,12 @@ def __eq__(self, to_compare): # Try to compare - this likely fails when it is compared to a non # Config object return \ - (self.min_height_m == to_compare.min_height_m) and \ + (self.follow_height_m == to_compare.follow_height_m) and \ (self.follow_distance_m == to_compare.follow_distance_m) and \ - (self.follow_direction == to_compare.follow_direction) and \ - (self.responsiveness == to_compare.responsiveness) + (self.responsiveness == to_compare.responsiveness) and \ + (self.altitude_mode == to_compare.altitude_mode) and \ + (self.max_tangential_vel_m_s == to_compare.max_tangential_vel_m_s) and \ + (self.follow_angle_deg == to_compare.follow_angle_deg) except AttributeError: return False @@ -117,10 +113,12 @@ def __eq__(self, to_compare): def __str__(self): """ Config in string representation """ struct_repr = ", ".join([ - "min_height_m: " + str(self.min_height_m), + "follow_height_m: " + str(self.follow_height_m), "follow_distance_m: " + str(self.follow_distance_m), - "follow_direction: " + str(self.follow_direction), - "responsiveness: " + str(self.responsiveness) + "responsiveness: " + str(self.responsiveness), + "altitude_mode: " + str(self.altitude_mode), + "max_tangential_vel_m_s: " + str(self.max_tangential_vel_m_s), + "follow_angle_deg: " + str(self.follow_angle_deg) ]) return f"Config: [{struct_repr}]" @@ -130,16 +128,22 @@ def translate_from_rpc(rpcConfig): """ Translates a gRPC struct to the SDK equivalent """ return Config( - rpcConfig.min_height_m, + rpcConfig.follow_height_m, rpcConfig.follow_distance_m, - Config.FollowDirection.translate_from_rpc(rpcConfig.follow_direction), + rpcConfig.responsiveness, - rpcConfig.responsiveness + Config.FollowAltitudeMode.translate_from_rpc(rpcConfig.altitude_mode), + + + rpcConfig.max_tangential_vel_m_s, + + + rpcConfig.follow_angle_deg ) def translate_to_rpc(self, rpcConfig): @@ -148,7 +152,7 @@ def translate_to_rpc(self, rpcConfig): - rpcConfig.min_height_m = self.min_height_m + rpcConfig.follow_height_m = self.follow_height_m @@ -160,13 +164,25 @@ def translate_to_rpc(self, rpcConfig): - rpcConfig.follow_direction = self.follow_direction.translate_to_rpc() + rpcConfig.responsiveness = self.responsiveness + + + + + + rpcConfig.altitude_mode = self.altitude_mode.translate_to_rpc() - rpcConfig.responsiveness = self.responsiveness + rpcConfig.max_tangential_vel_m_s = self.max_tangential_vel_m_s + + + + + + rpcConfig.follow_angle_deg = self.follow_angle_deg diff --git a/mavsdk/follow_me_pb2.py b/mavsdk/follow_me_pb2.py index dba484b3..af13feb9 100644 --- a/mavsdk/follow_me_pb2.py +++ b/mavsdk/follow_me_pb2.py @@ -15,7 +15,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19\x66ollow_me/follow_me.proto\x12\x14mavsdk.rpc.follow_me\x1a\x14mavsdk_options.proto\"\xdf\x02\n\x06\x43onfig\x12\x1d\n\x0cmin_height_m\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03\x38.0\x12\"\n\x11\x66ollow_distance_m\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03\x38.0\x12\x46\n\x10\x66ollow_direction\x18\x03 \x01(\x0e\x32,.mavsdk.rpc.follow_me.Config.FollowDirection\x12\x1f\n\x0eresponsiveness\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03\x30.5\"\xa8\x01\n\x0f\x46ollowDirection\x12\x19\n\x15\x46OLLOW_DIRECTION_NONE\x10\x00\x12\x1b\n\x17\x46OLLOW_DIRECTION_BEHIND\x10\x01\x12\x1a\n\x16\x46OLLOW_DIRECTION_FRONT\x10\x02\x12 \n\x1c\x46OLLOW_DIRECTION_FRONT_RIGHT\x10\x03\x12\x1f\n\x1b\x46OLLOW_DIRECTION_FRONT_LEFT\x10\x04\"\xd8\x01\n\x0eTargetLocation\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1f\n\x0evelocity_x_m_s\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1f\n\x0evelocity_y_m_s\x18\x05 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1f\n\x0evelocity_z_m_s\x18\x06 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\x12\n\x10GetConfigRequest\"A\n\x11GetConfigResponse\x12,\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1c.mavsdk.rpc.follow_me.Config\"@\n\x10SetConfigRequest\x12,\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1c.mavsdk.rpc.follow_me.Config\"S\n\x11SetConfigResponse\x12>\n\x10\x66ollow_me_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.FollowMeResult\"\x11\n\x0fIsActiveRequest\"%\n\x10IsActiveResponse\x12\x11\n\tis_active\x18\x01 \x01(\x08\"R\n\x18SetTargetLocationRequest\x12\x36\n\x08location\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.TargetLocation\"[\n\x19SetTargetLocationResponse\x12>\n\x10\x66ollow_me_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.FollowMeResult\"\x18\n\x16GetLastLocationRequest\"Q\n\x17GetLastLocationResponse\x12\x36\n\x08location\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.TargetLocation\"\x0e\n\x0cStartRequest\"O\n\rStartResponse\x12>\n\x10\x66ollow_me_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.FollowMeResult\"\r\n\x0bStopRequest\"N\n\x0cStopResponse\x12>\n\x10\x66ollow_me_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.FollowMeResult\"\xbc\x02\n\x0e\x46ollowMeResult\x12;\n\x06result\x18\x01 \x01(\x0e\x32+.mavsdk.rpc.follow_me.FollowMeResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xd8\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x15\n\x11RESULT_NOT_ACTIVE\x10\x07\x12\x1c\n\x18RESULT_SET_CONFIG_FAILED\x10\x08\x32\xd9\x05\n\x0f\x46ollowMeService\x12\x62\n\tGetConfig\x12&.mavsdk.rpc.follow_me.GetConfigRequest\x1a\'.mavsdk.rpc.follow_me.GetConfigResponse\"\x04\x80\xb5\x18\x01\x12\x62\n\tSetConfig\x12&.mavsdk.rpc.follow_me.SetConfigRequest\x1a\'.mavsdk.rpc.follow_me.SetConfigResponse\"\x04\x80\xb5\x18\x01\x12_\n\x08IsActive\x12%.mavsdk.rpc.follow_me.IsActiveRequest\x1a&.mavsdk.rpc.follow_me.IsActiveResponse\"\x04\x80\xb5\x18\x01\x12z\n\x11SetTargetLocation\x12..mavsdk.rpc.follow_me.SetTargetLocationRequest\x1a/.mavsdk.rpc.follow_me.SetTargetLocationResponse\"\x04\x80\xb5\x18\x01\x12t\n\x0fGetLastLocation\x12,.mavsdk.rpc.follow_me.GetLastLocationRequest\x1a-.mavsdk.rpc.follow_me.GetLastLocationResponse\"\x04\x80\xb5\x18\x01\x12V\n\x05Start\x12\".mavsdk.rpc.follow_me.StartRequest\x1a#.mavsdk.rpc.follow_me.StartResponse\"\x04\x80\xb5\x18\x01\x12S\n\x04Stop\x12!.mavsdk.rpc.follow_me.StopRequest\x1a\".mavsdk.rpc.follow_me.StopResponse\"\x04\x80\xb5\x18\x01\x42$\n\x13io.mavsdk.follow_meB\rFollowMeProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19\x66ollow_me/follow_me.proto\x12\x14mavsdk.rpc.follow_me\x1a\x14mavsdk_options.proto\"\x8a\x03\n\x06\x43onfig\x12!\n\x0f\x66ollow_height_m\x18\x01 \x01(\x02\x42\x08\x82\xb5\x18\x04\x38.0f\x12#\n\x11\x66ollow_distance_m\x18\x02 \x01(\x02\x42\x08\x82\xb5\x18\x04\x38.0f\x12 \n\x0eresponsiveness\x18\x04 \x01(\x02\x42\x08\x82\xb5\x18\x04\x30.1f\x12\x46\n\raltitude_mode\x18\x05 \x01(\x0e\x32/.mavsdk.rpc.follow_me.Config.FollowAltitudeMode\x12(\n\x16max_tangential_vel_m_s\x18\x06 \x01(\x02\x42\x08\x82\xb5\x18\x04\x38.0f\x12$\n\x10\x66ollow_angle_deg\x18\x07 \x01(\x02\x42\n\x82\xb5\x18\x06\x31\x38\x30.0f\"~\n\x12\x46ollowAltitudeMode\x12!\n\x1d\x46OLLOW_ALTITUDE_MODE_CONSTANT\x10\x00\x12 \n\x1c\x46OLLOW_ALTITUDE_MODE_TERRAIN\x10\x01\x12#\n\x1f\x46OLLOW_ALTITUDE_MODE_TARGET_GPS\x10\x02\"\xd8\x01\n\x0eTargetLocation\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1f\n\x0evelocity_x_m_s\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1f\n\x0evelocity_y_m_s\x18\x05 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1f\n\x0evelocity_z_m_s\x18\x06 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\x12\n\x10GetConfigRequest\"A\n\x11GetConfigResponse\x12,\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1c.mavsdk.rpc.follow_me.Config\"@\n\x10SetConfigRequest\x12,\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1c.mavsdk.rpc.follow_me.Config\"S\n\x11SetConfigResponse\x12>\n\x10\x66ollow_me_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.FollowMeResult\"\x11\n\x0fIsActiveRequest\"%\n\x10IsActiveResponse\x12\x11\n\tis_active\x18\x01 \x01(\x08\"R\n\x18SetTargetLocationRequest\x12\x36\n\x08location\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.TargetLocation\"[\n\x19SetTargetLocationResponse\x12>\n\x10\x66ollow_me_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.FollowMeResult\"\x18\n\x16GetLastLocationRequest\"Q\n\x17GetLastLocationResponse\x12\x36\n\x08location\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.TargetLocation\"\x0e\n\x0cStartRequest\"O\n\rStartResponse\x12>\n\x10\x66ollow_me_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.FollowMeResult\"\r\n\x0bStopRequest\"N\n\x0cStopResponse\x12>\n\x10\x66ollow_me_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.follow_me.FollowMeResult\"\xbc\x02\n\x0e\x46ollowMeResult\x12;\n\x06result\x18\x01 \x01(\x0e\x32+.mavsdk.rpc.follow_me.FollowMeResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xd8\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x15\n\x11RESULT_NOT_ACTIVE\x10\x07\x12\x1c\n\x18RESULT_SET_CONFIG_FAILED\x10\x08\x32\xd9\x05\n\x0f\x46ollowMeService\x12\x62\n\tGetConfig\x12&.mavsdk.rpc.follow_me.GetConfigRequest\x1a\'.mavsdk.rpc.follow_me.GetConfigResponse\"\x04\x80\xb5\x18\x01\x12\x62\n\tSetConfig\x12&.mavsdk.rpc.follow_me.SetConfigRequest\x1a\'.mavsdk.rpc.follow_me.SetConfigResponse\"\x04\x80\xb5\x18\x01\x12_\n\x08IsActive\x12%.mavsdk.rpc.follow_me.IsActiveRequest\x1a&.mavsdk.rpc.follow_me.IsActiveResponse\"\x04\x80\xb5\x18\x01\x12z\n\x11SetTargetLocation\x12..mavsdk.rpc.follow_me.SetTargetLocationRequest\x1a/.mavsdk.rpc.follow_me.SetTargetLocationResponse\"\x04\x80\xb5\x18\x01\x12t\n\x0fGetLastLocation\x12,.mavsdk.rpc.follow_me.GetLastLocationRequest\x1a-.mavsdk.rpc.follow_me.GetLastLocationResponse\"\x04\x80\xb5\x18\x01\x12V\n\x05Start\x12\".mavsdk.rpc.follow_me.StartRequest\x1a#.mavsdk.rpc.follow_me.StartResponse\"\x04\x80\xb5\x18\x01\x12S\n\x04Stop\x12!.mavsdk.rpc.follow_me.StopRequest\x1a\".mavsdk.rpc.follow_me.StopResponse\"\x04\x80\xb5\x18\x01\x42$\n\x13io.mavsdk.follow_meB\rFollowMeProtob\x06proto3') @@ -36,7 +36,7 @@ _STOPREQUEST = DESCRIPTOR.message_types_by_name['StopRequest'] _STOPRESPONSE = DESCRIPTOR.message_types_by_name['StopResponse'] _FOLLOWMERESULT = DESCRIPTOR.message_types_by_name['FollowMeResult'] -_CONFIG_FOLLOWDIRECTION = _CONFIG.enum_types_by_name['FollowDirection'] +_CONFIG_FOLLOWALTITUDEMODE = _CONFIG.enum_types_by_name['FollowAltitudeMode'] _FOLLOWMERESULT_RESULT = _FOLLOWMERESULT.enum_types_by_name['Result'] Config = _reflection.GeneratedProtocolMessageType('Config', (_message.Message,), { 'DESCRIPTOR' : _CONFIG, @@ -162,12 +162,16 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\023io.mavsdk.follow_meB\rFollowMeProto' - _CONFIG.fields_by_name['min_height_m']._options = None - _CONFIG.fields_by_name['min_height_m']._serialized_options = b'\202\265\030\0038.0' + _CONFIG.fields_by_name['follow_height_m']._options = None + _CONFIG.fields_by_name['follow_height_m']._serialized_options = b'\202\265\030\0048.0f' _CONFIG.fields_by_name['follow_distance_m']._options = None - _CONFIG.fields_by_name['follow_distance_m']._serialized_options = b'\202\265\030\0038.0' + _CONFIG.fields_by_name['follow_distance_m']._serialized_options = b'\202\265\030\0048.0f' _CONFIG.fields_by_name['responsiveness']._options = None - _CONFIG.fields_by_name['responsiveness']._serialized_options = b'\202\265\030\0030.5' + _CONFIG.fields_by_name['responsiveness']._serialized_options = b'\202\265\030\0040.1f' + _CONFIG.fields_by_name['max_tangential_vel_m_s']._options = None + _CONFIG.fields_by_name['max_tangential_vel_m_s']._serialized_options = b'\202\265\030\0048.0f' + _CONFIG.fields_by_name['follow_angle_deg']._options = None + _CONFIG.fields_by_name['follow_angle_deg']._serialized_options = b'\202\265\030\006180.0f' _TARGETLOCATION.fields_by_name['latitude_deg']._options = None _TARGETLOCATION.fields_by_name['latitude_deg']._serialized_options = b'\202\265\030\003NaN' _TARGETLOCATION.fields_by_name['longitude_deg']._options = None @@ -195,43 +199,43 @@ _FOLLOWMESERVICE.methods_by_name['Stop']._options = None _FOLLOWMESERVICE.methods_by_name['Stop']._serialized_options = b'\200\265\030\001' _CONFIG._serialized_start=74 - _CONFIG._serialized_end=425 - _CONFIG_FOLLOWDIRECTION._serialized_start=257 - _CONFIG_FOLLOWDIRECTION._serialized_end=425 - _TARGETLOCATION._serialized_start=428 - _TARGETLOCATION._serialized_end=644 - _GETCONFIGREQUEST._serialized_start=646 - _GETCONFIGREQUEST._serialized_end=664 - _GETCONFIGRESPONSE._serialized_start=666 - _GETCONFIGRESPONSE._serialized_end=731 - _SETCONFIGREQUEST._serialized_start=733 - _SETCONFIGREQUEST._serialized_end=797 - _SETCONFIGRESPONSE._serialized_start=799 - _SETCONFIGRESPONSE._serialized_end=882 - _ISACTIVEREQUEST._serialized_start=884 - _ISACTIVEREQUEST._serialized_end=901 - _ISACTIVERESPONSE._serialized_start=903 - _ISACTIVERESPONSE._serialized_end=940 - _SETTARGETLOCATIONREQUEST._serialized_start=942 - _SETTARGETLOCATIONREQUEST._serialized_end=1024 - _SETTARGETLOCATIONRESPONSE._serialized_start=1026 - _SETTARGETLOCATIONRESPONSE._serialized_end=1117 - _GETLASTLOCATIONREQUEST._serialized_start=1119 - _GETLASTLOCATIONREQUEST._serialized_end=1143 - _GETLASTLOCATIONRESPONSE._serialized_start=1145 - _GETLASTLOCATIONRESPONSE._serialized_end=1226 - _STARTREQUEST._serialized_start=1228 - _STARTREQUEST._serialized_end=1242 - _STARTRESPONSE._serialized_start=1244 - _STARTRESPONSE._serialized_end=1323 - _STOPREQUEST._serialized_start=1325 - _STOPREQUEST._serialized_end=1338 - _STOPRESPONSE._serialized_start=1340 - _STOPRESPONSE._serialized_end=1418 - _FOLLOWMERESULT._serialized_start=1421 - _FOLLOWMERESULT._serialized_end=1737 - _FOLLOWMERESULT_RESULT._serialized_start=1521 - _FOLLOWMERESULT_RESULT._serialized_end=1737 - _FOLLOWMESERVICE._serialized_start=1740 - _FOLLOWMESERVICE._serialized_end=2469 + _CONFIG._serialized_end=468 + _CONFIG_FOLLOWALTITUDEMODE._serialized_start=342 + _CONFIG_FOLLOWALTITUDEMODE._serialized_end=468 + _TARGETLOCATION._serialized_start=471 + _TARGETLOCATION._serialized_end=687 + _GETCONFIGREQUEST._serialized_start=689 + _GETCONFIGREQUEST._serialized_end=707 + _GETCONFIGRESPONSE._serialized_start=709 + _GETCONFIGRESPONSE._serialized_end=774 + _SETCONFIGREQUEST._serialized_start=776 + _SETCONFIGREQUEST._serialized_end=840 + _SETCONFIGRESPONSE._serialized_start=842 + _SETCONFIGRESPONSE._serialized_end=925 + _ISACTIVEREQUEST._serialized_start=927 + _ISACTIVEREQUEST._serialized_end=944 + _ISACTIVERESPONSE._serialized_start=946 + _ISACTIVERESPONSE._serialized_end=983 + _SETTARGETLOCATIONREQUEST._serialized_start=985 + _SETTARGETLOCATIONREQUEST._serialized_end=1067 + _SETTARGETLOCATIONRESPONSE._serialized_start=1069 + _SETTARGETLOCATIONRESPONSE._serialized_end=1160 + _GETLASTLOCATIONREQUEST._serialized_start=1162 + _GETLASTLOCATIONREQUEST._serialized_end=1186 + _GETLASTLOCATIONRESPONSE._serialized_start=1188 + _GETLASTLOCATIONRESPONSE._serialized_end=1269 + _STARTREQUEST._serialized_start=1271 + _STARTREQUEST._serialized_end=1285 + _STARTRESPONSE._serialized_start=1287 + _STARTRESPONSE._serialized_end=1366 + _STOPREQUEST._serialized_start=1368 + _STOPREQUEST._serialized_end=1381 + _STOPRESPONSE._serialized_start=1383 + _STOPRESPONSE._serialized_end=1461 + _FOLLOWMERESULT._serialized_start=1464 + _FOLLOWMERESULT._serialized_end=1780 + _FOLLOWMERESULT_RESULT._serialized_start=1564 + _FOLLOWMERESULT_RESULT._serialized_end=1780 + _FOLLOWMESERVICE._serialized_start=1783 + _FOLLOWMESERVICE._serialized_end=2512 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/ftp.py b/mavsdk/ftp.py index 16d8eb8c..083b193a 100644 --- a/mavsdk/ftp.py +++ b/mavsdk/ftp.py @@ -311,27 +311,7 @@ def _extract_result(self, response): return FtpResult.translate_from_rpc(response.ftp_result) - async def reset(self): - """ - Resets FTP server in case there are stale open sessions. - - Raises - ------ - FtpError - If the request fails. The error contains the reason for the failure. - """ - - request = ftp_pb2.ResetRequest() - response = await self._stub.Reset(request) - - - result = self._extract_result(response) - - if result.result != FtpResult.Result.SUCCESS: - raise FtpError(result, "reset()") - - - async def download(self, remote_file_path, local_dir): + async def download(self, remote_file_path, local_dir, use_burst): """ Downloads a file to local directory. @@ -343,6 +323,9 @@ async def download(self, remote_file_path, local_dir): local_dir : std::string The local directory to download to. + use_burst : bool + Use burst for faster downloading. + Yields ------- progress_data : ProgressData @@ -357,6 +340,7 @@ async def download(self, remote_file_path, local_dir): request = ftp_pb2.SubscribeDownloadRequest() request.remote_file_path = remote_file_path request.local_dir = local_dir + request.use_burst = use_burst download_stream = self._stub.SubscribeDownload(request) try: @@ -369,7 +353,7 @@ async def download(self, remote_file_path, local_dir): success_codes.append(FtpResult.Result.NEXT) if result.result not in success_codes: - raise FtpError(result, "download()", remote_file_path, local_dir) + raise FtpError(result, "download()", remote_file_path, local_dir, use_burst) if result.result == FtpResult.Result.SUCCESS: download_stream.cancel(); @@ -620,32 +604,6 @@ async def are_files_identical(self, local_file_path, remote_file_path): return response.are_identical - async def set_root_directory(self, root_dir): - """ - Set root directory for MAVLink FTP server. - - Parameters - ---------- - root_dir : std::string - The root directory to set. - - Raises - ------ - FtpError - If the request fails. The error contains the reason for the failure. - """ - - request = ftp_pb2.SetRootDirectoryRequest() - request.root_dir = root_dir - response = await self._stub.SetRootDirectory(request) - - - result = self._extract_result(response) - - if result.result != FtpResult.Result.SUCCESS: - raise FtpError(result, "set_root_directory()", root_dir) - - async def set_target_compid(self, compid): """ Set target component ID. By default it is the autopilot. @@ -670,24 +628,4 @@ async def set_target_compid(self, compid): if result.result != FtpResult.Result.SUCCESS: raise FtpError(result, "set_target_compid()", compid) - - - async def get_our_compid(self): - """ - Get our own component ID. - - Returns - ------- - compid : uint32_t - Our component ID. - - - """ - - request = ftp_pb2.GetOurCompidRequest() - response = await self._stub.GetOurCompid(request) - - - - return response.compid \ No newline at end of file diff --git a/mavsdk/ftp_pb2.py b/mavsdk/ftp_pb2.py index 4d0e872f..52ac5048 100644 --- a/mavsdk/ftp_pb2.py +++ b/mavsdk/ftp_pb2.py @@ -15,12 +15,10 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rftp/ftp.proto\x12\x0emavsdk.rpc.ftp\x1a\x14mavsdk_options.proto\"\x0e\n\x0cResetRequest\">\n\rResetResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\"G\n\x18SubscribeDownloadRequest\x12\x18\n\x10remote_file_path\x18\x01 \x01(\t\x12\x11\n\tlocal_dir\x18\x02 \x01(\t\"v\n\x10\x44ownloadResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\x12\x33\n\rprogress_data\x18\x02 \x01(\x0b\x32\x1c.mavsdk.rpc.ftp.ProgressData\"E\n\x16SubscribeUploadRequest\x12\x17\n\x0flocal_file_path\x18\x01 \x01(\t\x12\x12\n\nremote_dir\x18\x02 \x01(\t\"t\n\x0eUploadResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\x12\x33\n\rprogress_data\x18\x02 \x01(\x0b\x32\x1c.mavsdk.rpc.ftp.ProgressData\"*\n\x14ListDirectoryRequest\x12\x12\n\nremote_dir\x18\x01 \x01(\t\"U\n\x15ListDirectoryResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\x12\r\n\x05paths\x18\x02 \x03(\t\",\n\x16\x43reateDirectoryRequest\x12\x12\n\nremote_dir\x18\x01 \x01(\t\"H\n\x17\x43reateDirectoryResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\",\n\x16RemoveDirectoryRequest\x12\x12\n\nremote_dir\x18\x01 \x01(\t\"H\n\x17RemoveDirectoryResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\"-\n\x11RemoveFileRequest\x12\x18\n\x10remote_file_path\x18\x01 \x01(\t\"C\n\x12RemoveFileResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\"A\n\rRenameRequest\x12\x18\n\x10remote_from_path\x18\x01 \x01(\t\x12\x16\n\x0eremote_to_path\x18\x02 \x01(\t\"?\n\x0eRenameResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\"M\n\x18\x41reFilesIdenticalRequest\x12\x17\n\x0flocal_file_path\x18\x01 \x01(\t\x12\x18\n\x10remote_file_path\x18\x02 \x01(\t\"a\n\x19\x41reFilesIdenticalResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\x12\x15\n\rare_identical\x18\x02 \x01(\x08\"+\n\x17SetRootDirectoryRequest\x12\x10\n\x08root_dir\x18\x01 \x01(\t\"I\n\x18SetRootDirectoryResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\"(\n\x16SetTargetCompidRequest\x12\x0e\n\x06\x63ompid\x18\x01 \x01(\r\"H\n\x17SetTargetCompidResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\"\x15\n\x13GetOurCompidRequest\"&\n\x14GetOurCompidResponse\x12\x0e\n\x06\x63ompid\x18\x01 \x01(\r\">\n\x0cProgressData\x12\x19\n\x11\x62ytes_transferred\x18\x01 \x01(\r\x12\x13\n\x0btotal_bytes\x18\x02 \x01(\r\"\x8e\x03\n\tFtpResult\x12\x30\n\x06result\x18\x01 \x01(\x0e\x32 .mavsdk.rpc.ftp.FtpResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xba\x02\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x0f\n\x0bRESULT_NEXT\x10\x02\x12\x12\n\x0eRESULT_TIMEOUT\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x18\n\x14RESULT_FILE_IO_ERROR\x10\x05\x12\x16\n\x12RESULT_FILE_EXISTS\x10\x06\x12\x1e\n\x1aRESULT_FILE_DOES_NOT_EXIST\x10\x07\x12\x19\n\x15RESULT_FILE_PROTECTED\x10\x08\x12\x1c\n\x18RESULT_INVALID_PARAMETER\x10\t\x12\x16\n\x12RESULT_UNSUPPORTED\x10\n\x12\x19\n\x15RESULT_PROTOCOL_ERROR\x10\x0b\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x0c\x32\x9e\t\n\nFtpService\x12J\n\x05Reset\x12\x1c.mavsdk.rpc.ftp.ResetRequest\x1a\x1d.mavsdk.rpc.ftp.ResetResponse\"\x04\x80\xb5\x18\x00\x12k\n\x11SubscribeDownload\x12(.mavsdk.rpc.ftp.SubscribeDownloadRequest\x1a .mavsdk.rpc.ftp.DownloadResponse\"\x08\x80\xb5\x18\x00\x88\xb5\x18\x01\x30\x01\x12\x65\n\x0fSubscribeUpload\x12&.mavsdk.rpc.ftp.SubscribeUploadRequest\x1a\x1e.mavsdk.rpc.ftp.UploadResponse\"\x08\x80\xb5\x18\x00\x88\xb5\x18\x01\x30\x01\x12^\n\rListDirectory\x12$.mavsdk.rpc.ftp.ListDirectoryRequest\x1a%.mavsdk.rpc.ftp.ListDirectoryResponse\"\x00\x12\x64\n\x0f\x43reateDirectory\x12&.mavsdk.rpc.ftp.CreateDirectoryRequest\x1a\'.mavsdk.rpc.ftp.CreateDirectoryResponse\"\x00\x12\x64\n\x0fRemoveDirectory\x12&.mavsdk.rpc.ftp.RemoveDirectoryRequest\x1a\'.mavsdk.rpc.ftp.RemoveDirectoryResponse\"\x00\x12U\n\nRemoveFile\x12!.mavsdk.rpc.ftp.RemoveFileRequest\x1a\".mavsdk.rpc.ftp.RemoveFileResponse\"\x00\x12I\n\x06Rename\x12\x1d.mavsdk.rpc.ftp.RenameRequest\x1a\x1e.mavsdk.rpc.ftp.RenameResponse\"\x00\x12j\n\x11\x41reFilesIdentical\x12(.mavsdk.rpc.ftp.AreFilesIdenticalRequest\x1a).mavsdk.rpc.ftp.AreFilesIdenticalResponse\"\x00\x12k\n\x10SetRootDirectory\x12\'.mavsdk.rpc.ftp.SetRootDirectoryRequest\x1a(.mavsdk.rpc.ftp.SetRootDirectoryResponse\"\x04\x80\xb5\x18\x01\x12h\n\x0fSetTargetCompid\x12&.mavsdk.rpc.ftp.SetTargetCompidRequest\x1a\'.mavsdk.rpc.ftp.SetTargetCompidResponse\"\x04\x80\xb5\x18\x01\x12_\n\x0cGetOurCompid\x12#.mavsdk.rpc.ftp.GetOurCompidRequest\x1a$.mavsdk.rpc.ftp.GetOurCompidResponse\"\x04\x80\xb5\x18\x01\x42\x19\n\rio.mavsdk.ftpB\x08\x46tpProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rftp/ftp.proto\x12\x0emavsdk.rpc.ftp\x1a\x14mavsdk_options.proto\"Z\n\x18SubscribeDownloadRequest\x12\x18\n\x10remote_file_path\x18\x01 \x01(\t\x12\x11\n\tlocal_dir\x18\x02 \x01(\t\x12\x11\n\tuse_burst\x18\x03 \x01(\x08\"v\n\x10\x44ownloadResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\x12\x33\n\rprogress_data\x18\x02 \x01(\x0b\x32\x1c.mavsdk.rpc.ftp.ProgressData\"E\n\x16SubscribeUploadRequest\x12\x17\n\x0flocal_file_path\x18\x01 \x01(\t\x12\x12\n\nremote_dir\x18\x02 \x01(\t\"t\n\x0eUploadResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\x12\x33\n\rprogress_data\x18\x02 \x01(\x0b\x32\x1c.mavsdk.rpc.ftp.ProgressData\"*\n\x14ListDirectoryRequest\x12\x12\n\nremote_dir\x18\x01 \x01(\t\"U\n\x15ListDirectoryResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\x12\r\n\x05paths\x18\x02 \x03(\t\",\n\x16\x43reateDirectoryRequest\x12\x12\n\nremote_dir\x18\x01 \x01(\t\"H\n\x17\x43reateDirectoryResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\",\n\x16RemoveDirectoryRequest\x12\x12\n\nremote_dir\x18\x01 \x01(\t\"H\n\x17RemoveDirectoryResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\"-\n\x11RemoveFileRequest\x12\x18\n\x10remote_file_path\x18\x01 \x01(\t\"C\n\x12RemoveFileResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\"A\n\rRenameRequest\x12\x18\n\x10remote_from_path\x18\x01 \x01(\t\x12\x16\n\x0eremote_to_path\x18\x02 \x01(\t\"?\n\x0eRenameResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\"M\n\x18\x41reFilesIdenticalRequest\x12\x17\n\x0flocal_file_path\x18\x01 \x01(\t\x12\x18\n\x10remote_file_path\x18\x02 \x01(\t\"a\n\x19\x41reFilesIdenticalResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\x12\x15\n\rare_identical\x18\x02 \x01(\x08\"(\n\x16SetTargetCompidRequest\x12\x0e\n\x06\x63ompid\x18\x01 \x01(\r\"H\n\x17SetTargetCompidResponse\x12-\n\nftp_result\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.ftp.FtpResult\">\n\x0cProgressData\x12\x19\n\x11\x62ytes_transferred\x18\x01 \x01(\r\x12\x13\n\x0btotal_bytes\x18\x02 \x01(\r\"\x8e\x03\n\tFtpResult\x12\x30\n\x06result\x18\x01 \x01(\x0e\x32 .mavsdk.rpc.ftp.FtpResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xba\x02\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x0f\n\x0bRESULT_NEXT\x10\x02\x12\x12\n\x0eRESULT_TIMEOUT\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x18\n\x14RESULT_FILE_IO_ERROR\x10\x05\x12\x16\n\x12RESULT_FILE_EXISTS\x10\x06\x12\x1e\n\x1aRESULT_FILE_DOES_NOT_EXIST\x10\x07\x12\x19\n\x15RESULT_FILE_PROTECTED\x10\x08\x12\x1c\n\x18RESULT_INVALID_PARAMETER\x10\t\x12\x16\n\x12RESULT_UNSUPPORTED\x10\n\x12\x19\n\x15RESULT_PROTOCOL_ERROR\x10\x0b\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x0c\x32\x84\x07\n\nFtpService\x12k\n\x11SubscribeDownload\x12(.mavsdk.rpc.ftp.SubscribeDownloadRequest\x1a .mavsdk.rpc.ftp.DownloadResponse\"\x08\x80\xb5\x18\x00\x88\xb5\x18\x01\x30\x01\x12\x65\n\x0fSubscribeUpload\x12&.mavsdk.rpc.ftp.SubscribeUploadRequest\x1a\x1e.mavsdk.rpc.ftp.UploadResponse\"\x08\x80\xb5\x18\x00\x88\xb5\x18\x01\x30\x01\x12^\n\rListDirectory\x12$.mavsdk.rpc.ftp.ListDirectoryRequest\x1a%.mavsdk.rpc.ftp.ListDirectoryResponse\"\x00\x12\x64\n\x0f\x43reateDirectory\x12&.mavsdk.rpc.ftp.CreateDirectoryRequest\x1a\'.mavsdk.rpc.ftp.CreateDirectoryResponse\"\x00\x12\x64\n\x0fRemoveDirectory\x12&.mavsdk.rpc.ftp.RemoveDirectoryRequest\x1a\'.mavsdk.rpc.ftp.RemoveDirectoryResponse\"\x00\x12U\n\nRemoveFile\x12!.mavsdk.rpc.ftp.RemoveFileRequest\x1a\".mavsdk.rpc.ftp.RemoveFileResponse\"\x00\x12I\n\x06Rename\x12\x1d.mavsdk.rpc.ftp.RenameRequest\x1a\x1e.mavsdk.rpc.ftp.RenameResponse\"\x00\x12j\n\x11\x41reFilesIdentical\x12(.mavsdk.rpc.ftp.AreFilesIdenticalRequest\x1a).mavsdk.rpc.ftp.AreFilesIdenticalResponse\"\x00\x12h\n\x0fSetTargetCompid\x12&.mavsdk.rpc.ftp.SetTargetCompidRequest\x1a\'.mavsdk.rpc.ftp.SetTargetCompidResponse\"\x04\x80\xb5\x18\x01\x42\x19\n\rio.mavsdk.ftpB\x08\x46tpProtob\x06proto3') -_RESETREQUEST = DESCRIPTOR.message_types_by_name['ResetRequest'] -_RESETRESPONSE = DESCRIPTOR.message_types_by_name['ResetResponse'] _SUBSCRIBEDOWNLOADREQUEST = DESCRIPTOR.message_types_by_name['SubscribeDownloadRequest'] _DOWNLOADRESPONSE = DESCRIPTOR.message_types_by_name['DownloadResponse'] _SUBSCRIBEUPLOADREQUEST = DESCRIPTOR.message_types_by_name['SubscribeUploadRequest'] @@ -37,29 +35,11 @@ _RENAMERESPONSE = DESCRIPTOR.message_types_by_name['RenameResponse'] _AREFILESIDENTICALREQUEST = DESCRIPTOR.message_types_by_name['AreFilesIdenticalRequest'] _AREFILESIDENTICALRESPONSE = DESCRIPTOR.message_types_by_name['AreFilesIdenticalResponse'] -_SETROOTDIRECTORYREQUEST = DESCRIPTOR.message_types_by_name['SetRootDirectoryRequest'] -_SETROOTDIRECTORYRESPONSE = DESCRIPTOR.message_types_by_name['SetRootDirectoryResponse'] _SETTARGETCOMPIDREQUEST = DESCRIPTOR.message_types_by_name['SetTargetCompidRequest'] _SETTARGETCOMPIDRESPONSE = DESCRIPTOR.message_types_by_name['SetTargetCompidResponse'] -_GETOURCOMPIDREQUEST = DESCRIPTOR.message_types_by_name['GetOurCompidRequest'] -_GETOURCOMPIDRESPONSE = DESCRIPTOR.message_types_by_name['GetOurCompidResponse'] _PROGRESSDATA = DESCRIPTOR.message_types_by_name['ProgressData'] _FTPRESULT = DESCRIPTOR.message_types_by_name['FtpResult'] _FTPRESULT_RESULT = _FTPRESULT.enum_types_by_name['Result'] -ResetRequest = _reflection.GeneratedProtocolMessageType('ResetRequest', (_message.Message,), { - 'DESCRIPTOR' : _RESETREQUEST, - '__module__' : 'ftp.ftp_pb2' - # @@protoc_insertion_point(class_scope:mavsdk.rpc.ftp.ResetRequest) - }) -_sym_db.RegisterMessage(ResetRequest) - -ResetResponse = _reflection.GeneratedProtocolMessageType('ResetResponse', (_message.Message,), { - 'DESCRIPTOR' : _RESETRESPONSE, - '__module__' : 'ftp.ftp_pb2' - # @@protoc_insertion_point(class_scope:mavsdk.rpc.ftp.ResetResponse) - }) -_sym_db.RegisterMessage(ResetResponse) - SubscribeDownloadRequest = _reflection.GeneratedProtocolMessageType('SubscribeDownloadRequest', (_message.Message,), { 'DESCRIPTOR' : _SUBSCRIBEDOWNLOADREQUEST, '__module__' : 'ftp.ftp_pb2' @@ -172,20 +152,6 @@ }) _sym_db.RegisterMessage(AreFilesIdenticalResponse) -SetRootDirectoryRequest = _reflection.GeneratedProtocolMessageType('SetRootDirectoryRequest', (_message.Message,), { - 'DESCRIPTOR' : _SETROOTDIRECTORYREQUEST, - '__module__' : 'ftp.ftp_pb2' - # @@protoc_insertion_point(class_scope:mavsdk.rpc.ftp.SetRootDirectoryRequest) - }) -_sym_db.RegisterMessage(SetRootDirectoryRequest) - -SetRootDirectoryResponse = _reflection.GeneratedProtocolMessageType('SetRootDirectoryResponse', (_message.Message,), { - 'DESCRIPTOR' : _SETROOTDIRECTORYRESPONSE, - '__module__' : 'ftp.ftp_pb2' - # @@protoc_insertion_point(class_scope:mavsdk.rpc.ftp.SetRootDirectoryResponse) - }) -_sym_db.RegisterMessage(SetRootDirectoryResponse) - SetTargetCompidRequest = _reflection.GeneratedProtocolMessageType('SetTargetCompidRequest', (_message.Message,), { 'DESCRIPTOR' : _SETTARGETCOMPIDREQUEST, '__module__' : 'ftp.ftp_pb2' @@ -200,20 +166,6 @@ }) _sym_db.RegisterMessage(SetTargetCompidResponse) -GetOurCompidRequest = _reflection.GeneratedProtocolMessageType('GetOurCompidRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETOURCOMPIDREQUEST, - '__module__' : 'ftp.ftp_pb2' - # @@protoc_insertion_point(class_scope:mavsdk.rpc.ftp.GetOurCompidRequest) - }) -_sym_db.RegisterMessage(GetOurCompidRequest) - -GetOurCompidResponse = _reflection.GeneratedProtocolMessageType('GetOurCompidResponse', (_message.Message,), { - 'DESCRIPTOR' : _GETOURCOMPIDRESPONSE, - '__module__' : 'ftp.ftp_pb2' - # @@protoc_insertion_point(class_scope:mavsdk.rpc.ftp.GetOurCompidResponse) - }) -_sym_db.RegisterMessage(GetOurCompidResponse) - ProgressData = _reflection.GeneratedProtocolMessageType('ProgressData', (_message.Message,), { 'DESCRIPTOR' : _PROGRESSDATA, '__module__' : 'ftp.ftp_pb2' @@ -233,72 +185,54 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\rio.mavsdk.ftpB\010FtpProto' - _FTPSERVICE.methods_by_name['Reset']._options = None - _FTPSERVICE.methods_by_name['Reset']._serialized_options = b'\200\265\030\000' _FTPSERVICE.methods_by_name['SubscribeDownload']._options = None _FTPSERVICE.methods_by_name['SubscribeDownload']._serialized_options = b'\200\265\030\000\210\265\030\001' _FTPSERVICE.methods_by_name['SubscribeUpload']._options = None _FTPSERVICE.methods_by_name['SubscribeUpload']._serialized_options = b'\200\265\030\000\210\265\030\001' - _FTPSERVICE.methods_by_name['SetRootDirectory']._options = None - _FTPSERVICE.methods_by_name['SetRootDirectory']._serialized_options = b'\200\265\030\001' _FTPSERVICE.methods_by_name['SetTargetCompid']._options = None _FTPSERVICE.methods_by_name['SetTargetCompid']._serialized_options = b'\200\265\030\001' - _FTPSERVICE.methods_by_name['GetOurCompid']._options = None - _FTPSERVICE.methods_by_name['GetOurCompid']._serialized_options = b'\200\265\030\001' - _RESETREQUEST._serialized_start=55 - _RESETREQUEST._serialized_end=69 - _RESETRESPONSE._serialized_start=71 - _RESETRESPONSE._serialized_end=133 - _SUBSCRIBEDOWNLOADREQUEST._serialized_start=135 - _SUBSCRIBEDOWNLOADREQUEST._serialized_end=206 - _DOWNLOADRESPONSE._serialized_start=208 - _DOWNLOADRESPONSE._serialized_end=326 - _SUBSCRIBEUPLOADREQUEST._serialized_start=328 - _SUBSCRIBEUPLOADREQUEST._serialized_end=397 - _UPLOADRESPONSE._serialized_start=399 - _UPLOADRESPONSE._serialized_end=515 - _LISTDIRECTORYREQUEST._serialized_start=517 - _LISTDIRECTORYREQUEST._serialized_end=559 - _LISTDIRECTORYRESPONSE._serialized_start=561 - _LISTDIRECTORYRESPONSE._serialized_end=646 - _CREATEDIRECTORYREQUEST._serialized_start=648 - _CREATEDIRECTORYREQUEST._serialized_end=692 - _CREATEDIRECTORYRESPONSE._serialized_start=694 - _CREATEDIRECTORYRESPONSE._serialized_end=766 - _REMOVEDIRECTORYREQUEST._serialized_start=768 - _REMOVEDIRECTORYREQUEST._serialized_end=812 - _REMOVEDIRECTORYRESPONSE._serialized_start=814 - _REMOVEDIRECTORYRESPONSE._serialized_end=886 - _REMOVEFILEREQUEST._serialized_start=888 - _REMOVEFILEREQUEST._serialized_end=933 - _REMOVEFILERESPONSE._serialized_start=935 - _REMOVEFILERESPONSE._serialized_end=1002 - _RENAMEREQUEST._serialized_start=1004 - _RENAMEREQUEST._serialized_end=1069 - _RENAMERESPONSE._serialized_start=1071 - _RENAMERESPONSE._serialized_end=1134 - _AREFILESIDENTICALREQUEST._serialized_start=1136 - _AREFILESIDENTICALREQUEST._serialized_end=1213 - _AREFILESIDENTICALRESPONSE._serialized_start=1215 - _AREFILESIDENTICALRESPONSE._serialized_end=1312 - _SETROOTDIRECTORYREQUEST._serialized_start=1314 - _SETROOTDIRECTORYREQUEST._serialized_end=1357 - _SETROOTDIRECTORYRESPONSE._serialized_start=1359 - _SETROOTDIRECTORYRESPONSE._serialized_end=1432 - _SETTARGETCOMPIDREQUEST._serialized_start=1434 - _SETTARGETCOMPIDREQUEST._serialized_end=1474 - _SETTARGETCOMPIDRESPONSE._serialized_start=1476 - _SETTARGETCOMPIDRESPONSE._serialized_end=1548 - _GETOURCOMPIDREQUEST._serialized_start=1550 - _GETOURCOMPIDREQUEST._serialized_end=1571 - _GETOURCOMPIDRESPONSE._serialized_start=1573 - _GETOURCOMPIDRESPONSE._serialized_end=1611 - _PROGRESSDATA._serialized_start=1613 - _PROGRESSDATA._serialized_end=1675 - _FTPRESULT._serialized_start=1678 - _FTPRESULT._serialized_end=2076 - _FTPRESULT_RESULT._serialized_start=1762 - _FTPRESULT_RESULT._serialized_end=2076 - _FTPSERVICE._serialized_start=2079 - _FTPSERVICE._serialized_end=3261 + _SUBSCRIBEDOWNLOADREQUEST._serialized_start=55 + _SUBSCRIBEDOWNLOADREQUEST._serialized_end=145 + _DOWNLOADRESPONSE._serialized_start=147 + _DOWNLOADRESPONSE._serialized_end=265 + _SUBSCRIBEUPLOADREQUEST._serialized_start=267 + _SUBSCRIBEUPLOADREQUEST._serialized_end=336 + _UPLOADRESPONSE._serialized_start=338 + _UPLOADRESPONSE._serialized_end=454 + _LISTDIRECTORYREQUEST._serialized_start=456 + _LISTDIRECTORYREQUEST._serialized_end=498 + _LISTDIRECTORYRESPONSE._serialized_start=500 + _LISTDIRECTORYRESPONSE._serialized_end=585 + _CREATEDIRECTORYREQUEST._serialized_start=587 + _CREATEDIRECTORYREQUEST._serialized_end=631 + _CREATEDIRECTORYRESPONSE._serialized_start=633 + _CREATEDIRECTORYRESPONSE._serialized_end=705 + _REMOVEDIRECTORYREQUEST._serialized_start=707 + _REMOVEDIRECTORYREQUEST._serialized_end=751 + _REMOVEDIRECTORYRESPONSE._serialized_start=753 + _REMOVEDIRECTORYRESPONSE._serialized_end=825 + _REMOVEFILEREQUEST._serialized_start=827 + _REMOVEFILEREQUEST._serialized_end=872 + _REMOVEFILERESPONSE._serialized_start=874 + _REMOVEFILERESPONSE._serialized_end=941 + _RENAMEREQUEST._serialized_start=943 + _RENAMEREQUEST._serialized_end=1008 + _RENAMERESPONSE._serialized_start=1010 + _RENAMERESPONSE._serialized_end=1073 + _AREFILESIDENTICALREQUEST._serialized_start=1075 + _AREFILESIDENTICALREQUEST._serialized_end=1152 + _AREFILESIDENTICALRESPONSE._serialized_start=1154 + _AREFILESIDENTICALRESPONSE._serialized_end=1251 + _SETTARGETCOMPIDREQUEST._serialized_start=1253 + _SETTARGETCOMPIDREQUEST._serialized_end=1293 + _SETTARGETCOMPIDRESPONSE._serialized_start=1295 + _SETTARGETCOMPIDRESPONSE._serialized_end=1367 + _PROGRESSDATA._serialized_start=1369 + _PROGRESSDATA._serialized_end=1431 + _FTPRESULT._serialized_start=1434 + _FTPRESULT._serialized_end=1832 + _FTPRESULT_RESULT._serialized_start=1518 + _FTPRESULT_RESULT._serialized_end=1832 + _FTPSERVICE._serialized_start=1835 + _FTPSERVICE._serialized_end=2735 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/ftp_pb2_grpc.py b/mavsdk/ftp_pb2_grpc.py index d21e68e9..2bd5e45f 100644 --- a/mavsdk/ftp_pb2_grpc.py +++ b/mavsdk/ftp_pb2_grpc.py @@ -16,11 +16,6 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ - self.Reset = channel.unary_unary( - '/mavsdk.rpc.ftp.FtpService/Reset', - request_serializer=ftp_dot_ftp__pb2.ResetRequest.SerializeToString, - response_deserializer=ftp_dot_ftp__pb2.ResetResponse.FromString, - ) self.SubscribeDownload = channel.unary_stream( '/mavsdk.rpc.ftp.FtpService/SubscribeDownload', request_serializer=ftp_dot_ftp__pb2.SubscribeDownloadRequest.SerializeToString, @@ -61,21 +56,11 @@ def __init__(self, channel): request_serializer=ftp_dot_ftp__pb2.AreFilesIdenticalRequest.SerializeToString, response_deserializer=ftp_dot_ftp__pb2.AreFilesIdenticalResponse.FromString, ) - self.SetRootDirectory = channel.unary_unary( - '/mavsdk.rpc.ftp.FtpService/SetRootDirectory', - request_serializer=ftp_dot_ftp__pb2.SetRootDirectoryRequest.SerializeToString, - response_deserializer=ftp_dot_ftp__pb2.SetRootDirectoryResponse.FromString, - ) self.SetTargetCompid = channel.unary_unary( '/mavsdk.rpc.ftp.FtpService/SetTargetCompid', request_serializer=ftp_dot_ftp__pb2.SetTargetCompidRequest.SerializeToString, response_deserializer=ftp_dot_ftp__pb2.SetTargetCompidResponse.FromString, ) - self.GetOurCompid = channel.unary_unary( - '/mavsdk.rpc.ftp.FtpService/GetOurCompid', - request_serializer=ftp_dot_ftp__pb2.GetOurCompidRequest.SerializeToString, - response_deserializer=ftp_dot_ftp__pb2.GetOurCompidResponse.FromString, - ) class FtpServiceServicer(object): @@ -83,14 +68,6 @@ class FtpServiceServicer(object): Implements file transfer functionality using MAVLink FTP. """ - def Reset(self, request, context): - """ - Resets FTP server in case there are stale open sessions. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def SubscribeDownload(self, request, context): """ Downloads a file to local directory. @@ -155,14 +132,6 @@ def AreFilesIdentical(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def SetRootDirectory(self, request, context): - """ - Set root directory for MAVLink FTP server. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def SetTargetCompid(self, request, context): """ Set target component ID. By default it is the autopilot. @@ -171,22 +140,9 @@ def SetTargetCompid(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def GetOurCompid(self, request, context): - """ - Get our own component ID. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def add_FtpServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'Reset': grpc.unary_unary_rpc_method_handler( - servicer.Reset, - request_deserializer=ftp_dot_ftp__pb2.ResetRequest.FromString, - response_serializer=ftp_dot_ftp__pb2.ResetResponse.SerializeToString, - ), 'SubscribeDownload': grpc.unary_stream_rpc_method_handler( servicer.SubscribeDownload, request_deserializer=ftp_dot_ftp__pb2.SubscribeDownloadRequest.FromString, @@ -227,21 +183,11 @@ def add_FtpServiceServicer_to_server(servicer, server): request_deserializer=ftp_dot_ftp__pb2.AreFilesIdenticalRequest.FromString, response_serializer=ftp_dot_ftp__pb2.AreFilesIdenticalResponse.SerializeToString, ), - 'SetRootDirectory': grpc.unary_unary_rpc_method_handler( - servicer.SetRootDirectory, - request_deserializer=ftp_dot_ftp__pb2.SetRootDirectoryRequest.FromString, - response_serializer=ftp_dot_ftp__pb2.SetRootDirectoryResponse.SerializeToString, - ), 'SetTargetCompid': grpc.unary_unary_rpc_method_handler( servicer.SetTargetCompid, request_deserializer=ftp_dot_ftp__pb2.SetTargetCompidRequest.FromString, response_serializer=ftp_dot_ftp__pb2.SetTargetCompidResponse.SerializeToString, ), - 'GetOurCompid': grpc.unary_unary_rpc_method_handler( - servicer.GetOurCompid, - request_deserializer=ftp_dot_ftp__pb2.GetOurCompidRequest.FromString, - response_serializer=ftp_dot_ftp__pb2.GetOurCompidResponse.SerializeToString, - ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.ftp.FtpService', rpc_method_handlers) @@ -254,23 +200,6 @@ class FtpService(object): Implements file transfer functionality using MAVLink FTP. """ - @staticmethod - def Reset(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.ftp.FtpService/Reset', - ftp_dot_ftp__pb2.ResetRequest.SerializeToString, - ftp_dot_ftp__pb2.ResetResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - @staticmethod def SubscribeDownload(request, target, @@ -407,23 +336,6 @@ def AreFilesIdentical(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - @staticmethod - def SetRootDirectory(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.ftp.FtpService/SetRootDirectory', - ftp_dot_ftp__pb2.SetRootDirectoryRequest.SerializeToString, - ftp_dot_ftp__pb2.SetRootDirectoryResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - @staticmethod def SetTargetCompid(request, target, @@ -440,20 +352,3 @@ def SetTargetCompid(request, ftp_dot_ftp__pb2.SetTargetCompidResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetOurCompid(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.ftp.FtpService/GetOurCompid', - ftp_dot_ftp__pb2.GetOurCompidRequest.SerializeToString, - ftp_dot_ftp__pb2.GetOurCompidResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/mavsdk/ftp_server.py b/mavsdk/ftp_server.py new file mode 100644 index 00000000..32dfd82d --- /dev/null +++ b/mavsdk/ftp_server.py @@ -0,0 +1,197 @@ +# -*- coding: utf-8 -*- +# DO NOT EDIT! This file is auto-generated from +# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py +from ._base import AsyncBase +from . import ftp_server_pb2, ftp_server_pb2_grpc +from enum import Enum + + +class FtpServerResult: + """ + Result type. + + Parameters + ---------- + result : Result + Result enum value + + result_str : std::string + Human-readable English string describing the result + + """ + + + + class Result(Enum): + """ + Possible results returned for FTP server requests. + + Values + ------ + UNKNOWN + Unknown result + + SUCCESS + Request succeeded + + DOES_NOT_EXIST + Directory does not exist + + BUSY + Operations in progress + + """ + + + UNKNOWN = 0 + SUCCESS = 1 + DOES_NOT_EXIST = 2 + BUSY = 3 + + def translate_to_rpc(self): + if self == FtpServerResult.Result.UNKNOWN: + return ftp_server_pb2.FtpServerResult.RESULT_UNKNOWN + if self == FtpServerResult.Result.SUCCESS: + return ftp_server_pb2.FtpServerResult.RESULT_SUCCESS + if self == FtpServerResult.Result.DOES_NOT_EXIST: + return ftp_server_pb2.FtpServerResult.RESULT_DOES_NOT_EXIST + if self == FtpServerResult.Result.BUSY: + return ftp_server_pb2.FtpServerResult.RESULT_BUSY + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == ftp_server_pb2.FtpServerResult.RESULT_UNKNOWN: + return FtpServerResult.Result.UNKNOWN + if rpc_enum_value == ftp_server_pb2.FtpServerResult.RESULT_SUCCESS: + return FtpServerResult.Result.SUCCESS + if rpc_enum_value == ftp_server_pb2.FtpServerResult.RESULT_DOES_NOT_EXIST: + return FtpServerResult.Result.DOES_NOT_EXIST + if rpc_enum_value == ftp_server_pb2.FtpServerResult.RESULT_BUSY: + return FtpServerResult.Result.BUSY + + def __str__(self): + return self.name + + + def __init__( + self, + result, + result_str): + """ Initializes the FtpServerResult object """ + self.result = result + self.result_str = result_str + + def __eq__(self, to_compare): + """ Checks if two FtpServerResult are the same """ + try: + # Try to compare - this likely fails when it is compared to a non + # FtpServerResult object + return \ + (self.result == to_compare.result) and \ + (self.result_str == to_compare.result_str) + + except AttributeError: + return False + + def __str__(self): + """ FtpServerResult in string representation """ + struct_repr = ", ".join([ + "result: " + str(self.result), + "result_str: " + str(self.result_str) + ]) + + return f"FtpServerResult: [{struct_repr}]" + + @staticmethod + def translate_from_rpc(rpcFtpServerResult): + """ Translates a gRPC struct to the SDK equivalent """ + return FtpServerResult( + + FtpServerResult.Result.translate_from_rpc(rpcFtpServerResult.result), + + + rpcFtpServerResult.result_str + ) + + def translate_to_rpc(self, rpcFtpServerResult): + """ Translates this SDK object into its gRPC equivalent """ + + + + + rpcFtpServerResult.result = self.result.translate_to_rpc() + + + + + + rpcFtpServerResult.result_str = self.result_str + + + + + + +class FtpServerError(Exception): + """ Raised when a FtpServerResult is a fail code """ + + def __init__(self, result, origin, *params): + self._result = result + self._origin = origin + self._params = params + + def __str__(self): + return f"{self._result.result}: '{self._result.result_str}'; origin: {self._origin}; params: {self._params}" + + +class FtpServer(AsyncBase): + """ + Provide files or directories to transfer. + + Generated by dcsdkgen - MAVSDK FtpServer API + """ + + # Plugin name + name = "FtpServer" + + def _setup_stub(self, channel): + """ Setups the api stub """ + self._stub = ftp_server_pb2_grpc.FtpServerServiceStub(channel) + + + def _extract_result(self, response): + """ Returns the response status and description """ + return FtpServerResult.translate_from_rpc(response.ftp_server_result) + + + async def set_root_dir(self, path): + """ + Set root directory. + + This is the directory that can then be accessed by a client. + The directory needs to exist when this is called. + The permissions are the same as the file permission for the user running the server. + The root directory can't be changed while an FTP process is in progress. + + Parameters + ---------- + path : std::string + Absolute path of folder + + Raises + ------ + FtpServerError + If the request fails. The error contains the reason for the failure. + """ + + request = ftp_server_pb2.SetRootDirRequest() + request.path = path + response = await self._stub.SetRootDir(request) + + + result = self._extract_result(response) + + if result.result != FtpServerResult.Result.SUCCESS: + raise FtpServerError(result, "set_root_dir()", path) + \ No newline at end of file diff --git a/mavsdk/ftp_server_pb2.py b/mavsdk/ftp_server_pb2.py new file mode 100644 index 00000000..96cf73aa --- /dev/null +++ b/mavsdk/ftp_server_pb2.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ftp_server/ftp_server.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import mavsdk_options_pb2 as mavsdk__options__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x66tp_server/ftp_server.proto\x12\x15mavsdk.rpc.ftp_server\x1a\x14mavsdk_options.proto\"!\n\x11SetRootDirRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\"W\n\x12SetRootDirResponse\x12\x41\n\x11\x66tp_server_result\x18\x01 \x01(\x0b\x32&.mavsdk.rpc.ftp_server.FtpServerResult\"\xc2\x01\n\x0f\x46tpServerResult\x12=\n\x06result\x18\x01 \x01(\x0e\x32-.mavsdk.rpc.ftp_server.FtpServerResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\\\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x19\n\x15RESULT_DOES_NOT_EXIST\x10\x02\x12\x0f\n\x0bRESULT_BUSY\x10\x03\x32{\n\x10\x46tpServerService\x12g\n\nSetRootDir\x12(.mavsdk.rpc.ftp_server.SetRootDirRequest\x1a).mavsdk.rpc.ftp_server.SetRootDirResponse\"\x04\x80\xb5\x18\x01\x42&\n\x14io.mavsdk.ftp_serverB\x0e\x46tpServerProtob\x06proto3') + + + +_SETROOTDIRREQUEST = DESCRIPTOR.message_types_by_name['SetRootDirRequest'] +_SETROOTDIRRESPONSE = DESCRIPTOR.message_types_by_name['SetRootDirResponse'] +_FTPSERVERRESULT = DESCRIPTOR.message_types_by_name['FtpServerResult'] +_FTPSERVERRESULT_RESULT = _FTPSERVERRESULT.enum_types_by_name['Result'] +SetRootDirRequest = _reflection.GeneratedProtocolMessageType('SetRootDirRequest', (_message.Message,), { + 'DESCRIPTOR' : _SETROOTDIRREQUEST, + '__module__' : 'ftp_server.ftp_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.ftp_server.SetRootDirRequest) + }) +_sym_db.RegisterMessage(SetRootDirRequest) + +SetRootDirResponse = _reflection.GeneratedProtocolMessageType('SetRootDirResponse', (_message.Message,), { + 'DESCRIPTOR' : _SETROOTDIRRESPONSE, + '__module__' : 'ftp_server.ftp_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.ftp_server.SetRootDirResponse) + }) +_sym_db.RegisterMessage(SetRootDirResponse) + +FtpServerResult = _reflection.GeneratedProtocolMessageType('FtpServerResult', (_message.Message,), { + 'DESCRIPTOR' : _FTPSERVERRESULT, + '__module__' : 'ftp_server.ftp_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.ftp_server.FtpServerResult) + }) +_sym_db.RegisterMessage(FtpServerResult) + +_FTPSERVERSERVICE = DESCRIPTOR.services_by_name['FtpServerService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\024io.mavsdk.ftp_serverB\016FtpServerProto' + _FTPSERVERSERVICE.methods_by_name['SetRootDir']._options = None + _FTPSERVERSERVICE.methods_by_name['SetRootDir']._serialized_options = b'\200\265\030\001' + _SETROOTDIRREQUEST._serialized_start=76 + _SETROOTDIRREQUEST._serialized_end=109 + _SETROOTDIRRESPONSE._serialized_start=111 + _SETROOTDIRRESPONSE._serialized_end=198 + _FTPSERVERRESULT._serialized_start=201 + _FTPSERVERRESULT._serialized_end=395 + _FTPSERVERRESULT_RESULT._serialized_start=303 + _FTPSERVERRESULT_RESULT._serialized_end=395 + _FTPSERVERSERVICE._serialized_start=397 + _FTPSERVERSERVICE._serialized_end=520 +# @@protoc_insertion_point(module_scope) diff --git a/mavsdk/ftp_server_pb2_grpc.py b/mavsdk/ftp_server_pb2_grpc.py new file mode 100644 index 00000000..a563e34b --- /dev/null +++ b/mavsdk/ftp_server_pb2_grpc.py @@ -0,0 +1,76 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import ftp_server_pb2 as ftp__server_dot_ftp__server__pb2 + + +class FtpServerServiceStub(object): + """Provide files or directories to transfer. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.SetRootDir = channel.unary_unary( + '/mavsdk.rpc.ftp_server.FtpServerService/SetRootDir', + request_serializer=ftp__server_dot_ftp__server__pb2.SetRootDirRequest.SerializeToString, + response_deserializer=ftp__server_dot_ftp__server__pb2.SetRootDirResponse.FromString, + ) + + +class FtpServerServiceServicer(object): + """Provide files or directories to transfer. + """ + + def SetRootDir(self, request, context): + """ + Set root directory. + + This is the directory that can then be accessed by a client. + The directory needs to exist when this is called. + The permissions are the same as the file permission for the user running the server. + The root directory can't be changed while an FTP process is in progress. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_FtpServerServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'SetRootDir': grpc.unary_unary_rpc_method_handler( + servicer.SetRootDir, + request_deserializer=ftp__server_dot_ftp__server__pb2.SetRootDirRequest.FromString, + response_serializer=ftp__server_dot_ftp__server__pb2.SetRootDirResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'mavsdk.rpc.ftp_server.FtpServerService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class FtpServerService(object): + """Provide files or directories to transfer. + """ + + @staticmethod + def SetRootDir(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.ftp_server.FtpServerService/SetRootDir', + ftp__server_dot_ftp__server__pb2.SetRootDirRequest.SerializeToString, + ftp__server_dot_ftp__server__pb2.SetRootDirResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/mavsdk/geofence.py b/mavsdk/geofence.py index 67a874a7..274a8388 100644 --- a/mavsdk/geofence.py +++ b/mavsdk/geofence.py @@ -6,6 +6,42 @@ from enum import Enum +class FenceType(Enum): + """ + Geofence types. + + Values + ------ + INCLUSION + Type representing an inclusion fence + + EXCLUSION + Type representing an exclusion fence + + """ + + + INCLUSION = 0 + EXCLUSION = 1 + + def translate_to_rpc(self): + if self == FenceType.INCLUSION: + return geofence_pb2.FENCE_TYPE_INCLUSION + if self == FenceType.EXCLUSION: + return geofence_pb2.FENCE_TYPE_EXCLUSION + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == geofence_pb2.FENCE_TYPE_INCLUSION: + return FenceType.INCLUSION + if rpc_enum_value == geofence_pb2.FENCE_TYPE_EXCLUSION: + return FenceType.EXCLUSION + + def __str__(self): + return self.name + + class Point: """ Point type. @@ -95,42 +131,6 @@ class Polygon: """ - - class FenceType(Enum): - """ - Geofence polygon types. - - Values - ------ - INCLUSION - Type representing an inclusion fence - - EXCLUSION - Type representing an exclusion fence - - """ - - - INCLUSION = 0 - EXCLUSION = 1 - - def translate_to_rpc(self): - if self == Polygon.FenceType.INCLUSION: - return geofence_pb2.Polygon.FENCE_TYPE_INCLUSION - if self == Polygon.FenceType.EXCLUSION: - return geofence_pb2.Polygon.FENCE_TYPE_EXCLUSION - - @staticmethod - def translate_from_rpc(rpc_enum_value): - """ Parses a gRPC response """ - if rpc_enum_value == geofence_pb2.Polygon.FENCE_TYPE_INCLUSION: - return Polygon.FenceType.INCLUSION - if rpc_enum_value == geofence_pb2.Polygon.FENCE_TYPE_EXCLUSION: - return Polygon.FenceType.EXCLUSION - - def __str__(self): - return self.name - def __init__( self, @@ -169,7 +169,7 @@ def translate_from_rpc(rpcPolygon): list(map(lambda elem: Point.translate_from_rpc(elem), rpcPolygon.points)), - Polygon.FenceType.translate_from_rpc(rpcPolygon.fence_type) + FenceType.translate_from_rpc(rpcPolygon.fence_type) ) def translate_to_rpc(self, rpcPolygon): @@ -197,6 +197,184 @@ def translate_to_rpc(self, rpcPolygon): +class Circle: + """ + Circular type. + + Parameters + ---------- + point : Point + Point defining the center + + radius : float + Radius of the circular fence + + fence_type : FenceType + Fence type + + """ + + + + def __init__( + self, + point, + radius, + fence_type): + """ Initializes the Circle object """ + self.point = point + self.radius = radius + self.fence_type = fence_type + + def __eq__(self, to_compare): + """ Checks if two Circle are the same """ + try: + # Try to compare - this likely fails when it is compared to a non + # Circle object + return \ + (self.point == to_compare.point) and \ + (self.radius == to_compare.radius) and \ + (self.fence_type == to_compare.fence_type) + + except AttributeError: + return False + + def __str__(self): + """ Circle in string representation """ + struct_repr = ", ".join([ + "point: " + str(self.point), + "radius: " + str(self.radius), + "fence_type: " + str(self.fence_type) + ]) + + return f"Circle: [{struct_repr}]" + + @staticmethod + def translate_from_rpc(rpcCircle): + """ Translates a gRPC struct to the SDK equivalent """ + return Circle( + + Point.translate_from_rpc(rpcCircle.point), + + + rpcCircle.radius, + + + FenceType.translate_from_rpc(rpcCircle.fence_type) + ) + + def translate_to_rpc(self, rpcCircle): + """ Translates this SDK object into its gRPC equivalent """ + + + + + self.point.translate_to_rpc(rpcCircle.point) + + + + + + rpcCircle.radius = self.radius + + + + + + rpcCircle.fence_type = self.fence_type.translate_to_rpc() + + + + + +class GeofenceData: + """ + Geofence data type. + + Parameters + ---------- + polygons : [Polygon] + Polygon(s) representing the geofence(s) + + circles : [Circle] + Circle(s) representing the geofence(s) + + """ + + + + def __init__( + self, + polygons, + circles): + """ Initializes the GeofenceData object """ + self.polygons = polygons + self.circles = circles + + def __eq__(self, to_compare): + """ Checks if two GeofenceData are the same """ + try: + # Try to compare - this likely fails when it is compared to a non + # GeofenceData object + return \ + (self.polygons == to_compare.polygons) and \ + (self.circles == to_compare.circles) + + except AttributeError: + return False + + def __str__(self): + """ GeofenceData in string representation """ + struct_repr = ", ".join([ + "polygons: " + str(self.polygons), + "circles: " + str(self.circles) + ]) + + return f"GeofenceData: [{struct_repr}]" + + @staticmethod + def translate_from_rpc(rpcGeofenceData): + """ Translates a gRPC struct to the SDK equivalent """ + return GeofenceData( + + list(map(lambda elem: Polygon.translate_from_rpc(elem), rpcGeofenceData.polygons)), + + + list(map(lambda elem: Circle.translate_from_rpc(elem), rpcGeofenceData.circles)) + ) + + def translate_to_rpc(self, rpcGeofenceData): + """ Translates this SDK object into its gRPC equivalent """ + + + + + rpc_elems_list = [] + for elem in self.polygons: + + rpc_elem = geofence_pb2.Polygon() + elem.translate_to_rpc(rpc_elem) + rpc_elems_list.append(rpc_elem) + + rpcGeofenceData.polygons.extend(rpc_elems_list) + + + + + + rpc_elems_list = [] + for elem in self.circles: + + rpc_elem = geofence_pb2.Circle() + elem.translate_to_rpc(rpc_elem) + rpc_elems_list.append(rpc_elem) + + rpcGeofenceData.circles.extend(rpc_elems_list) + + + + + class GeofenceResult: """ Result type. @@ -229,7 +407,7 @@ class Result(Enum): Error TOO_MANY_GEOFENCE_ITEMS - Too many Polygon objects in the geofence + Too many objects in the geofence BUSY Vehicle is busy @@ -388,17 +566,17 @@ def _extract_result(self, response): return GeofenceResult.translate_from_rpc(response.geofence_result) - async def upload_geofence(self, polygons): + async def upload_geofence(self, geofence_data): """ - Upload a geofence. + Upload geofences. - Polygons are uploaded to a drone. Once uploaded, the geofence will remain + Polygon and Circular geofences are uploaded to a drone. Once uploaded, the geofence will remain on the drone even if a connection is lost. Parameters ---------- - polygons : [Polygon] - Polygon(s) representing the geofence(s) + geofence_data : GeofenceData + Circle(s) and/or Polygon(s) representing the geofence(s) Raises ------ @@ -408,14 +586,7 @@ async def upload_geofence(self, polygons): request = geofence_pb2.UploadGeofenceRequest() - rpc_elems_list = [] - for elem in polygons: - - rpc_elem = geofence_pb2.Polygon() - elem.translate_to_rpc(rpc_elem) - rpc_elems_list.append(rpc_elem) - - request.polygons.extend(rpc_elems_list) + geofence_data.translate_to_rpc(request.geofence_data) response = await self._stub.UploadGeofence(request) @@ -424,7 +595,7 @@ async def upload_geofence(self, polygons): result = self._extract_result(response) if result.result != GeofenceResult.Result.SUCCESS: - raise GeofenceError(result, "upload_geofence()", polygons) + raise GeofenceError(result, "upload_geofence()", geofence_data) async def clear_geofence(self): diff --git a/mavsdk/geofence_pb2.py b/mavsdk/geofence_pb2.py index 67c3692a..8d355faa 100644 --- a/mavsdk/geofence_pb2.py +++ b/mavsdk/geofence_pb2.py @@ -2,6 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: geofence/geofence.proto """Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _message @@ -12,20 +13,26 @@ _sym_db = _symbol_database.Default() +from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17geofence/geofence.proto\x12\x13mavsdk.rpc.geofence\"4\n\x05Point\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\"\xb2\x01\n\x07Polygon\x12*\n\x06points\x18\x01 \x03(\x0b\x32\x1a.mavsdk.rpc.geofence.Point\x12:\n\nfence_type\x18\x02 \x01(\x0e\x32&.mavsdk.rpc.geofence.Polygon.FenceType\"?\n\tFenceType\x12\x18\n\x14\x46\x45NCE_TYPE_INCLUSION\x10\x00\x12\x18\n\x14\x46\x45NCE_TYPE_EXCLUSION\x10\x01\"G\n\x15UploadGeofenceRequest\x12.\n\x08polygons\x18\x01 \x03(\x0b\x32\x1c.mavsdk.rpc.geofence.Polygon\"V\n\x16UploadGeofenceResponse\x12<\n\x0fgeofence_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.geofence.GeofenceResult\"\x16\n\x14\x43learGeofenceRequest\"U\n\x15\x43learGeofenceResponse\x12<\n\x0fgeofence_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.geofence.GeofenceResult\"\xa1\x02\n\x0eGeofenceResult\x12:\n\x06result\x18\x01 \x01(\x0e\x32*.mavsdk.rpc.geofence.GeofenceResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xbe\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x10\n\x0cRESULT_ERROR\x10\x02\x12\"\n\x1eRESULT_TOO_MANY_GEOFENCE_ITEMS\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x12\n\x0eRESULT_TIMEOUT\x10\x05\x12\x1b\n\x17RESULT_INVALID_ARGUMENT\x10\x06\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x07\x32\xe8\x01\n\x0fGeofenceService\x12k\n\x0eUploadGeofence\x12*.mavsdk.rpc.geofence.UploadGeofenceRequest\x1a+.mavsdk.rpc.geofence.UploadGeofenceResponse\"\x00\x12h\n\rClearGeofence\x12).mavsdk.rpc.geofence.ClearGeofenceRequest\x1a*.mavsdk.rpc.geofence.ClearGeofenceResponse\"\x00\x42#\n\x12io.mavsdk.geofenceB\rGeofenceProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17geofence/geofence.proto\x12\x13mavsdk.rpc.geofence\x1a\x14mavsdk_options.proto\"4\n\x05Point\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\"i\n\x07Polygon\x12*\n\x06points\x18\x01 \x03(\x0b\x32\x1a.mavsdk.rpc.geofence.Point\x12\x32\n\nfence_type\x18\x02 \x01(\x0e\x32\x1e.mavsdk.rpc.geofence.FenceType\"\x80\x01\n\x06\x43ircle\x12)\n\x05point\x18\x01 \x01(\x0b\x32\x1a.mavsdk.rpc.geofence.Point\x12\x17\n\x06radius\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x32\n\nfence_type\x18\x03 \x01(\x0e\x32\x1e.mavsdk.rpc.geofence.FenceType\"l\n\x0cGeofenceData\x12.\n\x08polygons\x18\x01 \x03(\x0b\x32\x1c.mavsdk.rpc.geofence.Polygon\x12,\n\x07\x63ircles\x18\x02 \x03(\x0b\x32\x1b.mavsdk.rpc.geofence.Circle\"Q\n\x15UploadGeofenceRequest\x12\x38\n\rgeofence_data\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.geofence.GeofenceData\"V\n\x16UploadGeofenceResponse\x12<\n\x0fgeofence_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.geofence.GeofenceResult\"\x16\n\x14\x43learGeofenceRequest\"U\n\x15\x43learGeofenceResponse\x12<\n\x0fgeofence_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.geofence.GeofenceResult\"\xa1\x02\n\x0eGeofenceResult\x12:\n\x06result\x18\x01 \x01(\x0e\x32*.mavsdk.rpc.geofence.GeofenceResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xbe\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x10\n\x0cRESULT_ERROR\x10\x02\x12\"\n\x1eRESULT_TOO_MANY_GEOFENCE_ITEMS\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x12\n\x0eRESULT_TIMEOUT\x10\x05\x12\x1b\n\x17RESULT_INVALID_ARGUMENT\x10\x06\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x07*?\n\tFenceType\x12\x18\n\x14\x46\x45NCE_TYPE_INCLUSION\x10\x00\x12\x18\n\x14\x46\x45NCE_TYPE_EXCLUSION\x10\x01\x32\xe8\x01\n\x0fGeofenceService\x12k\n\x0eUploadGeofence\x12*.mavsdk.rpc.geofence.UploadGeofenceRequest\x1a+.mavsdk.rpc.geofence.UploadGeofenceResponse\"\x00\x12h\n\rClearGeofence\x12).mavsdk.rpc.geofence.ClearGeofenceRequest\x1a*.mavsdk.rpc.geofence.ClearGeofenceResponse\"\x00\x42#\n\x12io.mavsdk.geofenceB\rGeofenceProtob\x06proto3') +_FENCETYPE = DESCRIPTOR.enum_types_by_name['FenceType'] +FenceType = enum_type_wrapper.EnumTypeWrapper(_FENCETYPE) +FENCE_TYPE_INCLUSION = 0 +FENCE_TYPE_EXCLUSION = 1 _POINT = DESCRIPTOR.message_types_by_name['Point'] _POLYGON = DESCRIPTOR.message_types_by_name['Polygon'] +_CIRCLE = DESCRIPTOR.message_types_by_name['Circle'] +_GEOFENCEDATA = DESCRIPTOR.message_types_by_name['GeofenceData'] _UPLOADGEOFENCEREQUEST = DESCRIPTOR.message_types_by_name['UploadGeofenceRequest'] _UPLOADGEOFENCERESPONSE = DESCRIPTOR.message_types_by_name['UploadGeofenceResponse'] _CLEARGEOFENCEREQUEST = DESCRIPTOR.message_types_by_name['ClearGeofenceRequest'] _CLEARGEOFENCERESPONSE = DESCRIPTOR.message_types_by_name['ClearGeofenceResponse'] _GEOFENCERESULT = DESCRIPTOR.message_types_by_name['GeofenceResult'] -_POLYGON_FENCETYPE = _POLYGON.enum_types_by_name['FenceType'] _GEOFENCERESULT_RESULT = _GEOFENCERESULT.enum_types_by_name['Result'] Point = _reflection.GeneratedProtocolMessageType('Point', (_message.Message,), { 'DESCRIPTOR' : _POINT, @@ -41,6 +48,20 @@ }) _sym_db.RegisterMessage(Polygon) +Circle = _reflection.GeneratedProtocolMessageType('Circle', (_message.Message,), { + 'DESCRIPTOR' : _CIRCLE, + '__module__' : 'geofence.geofence_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.geofence.Circle) + }) +_sym_db.RegisterMessage(Circle) + +GeofenceData = _reflection.GeneratedProtocolMessageType('GeofenceData', (_message.Message,), { + 'DESCRIPTOR' : _GEOFENCEDATA, + '__module__' : 'geofence.geofence_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.geofence.GeofenceData) + }) +_sym_db.RegisterMessage(GeofenceData) + UploadGeofenceRequest = _reflection.GeneratedProtocolMessageType('UploadGeofenceRequest', (_message.Message,), { 'DESCRIPTOR' : _UPLOADGEOFENCEREQUEST, '__module__' : 'geofence.geofence_pb2' @@ -81,24 +102,30 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022io.mavsdk.geofenceB\rGeofenceProto' - _POINT._serialized_start=48 - _POINT._serialized_end=100 - _POLYGON._serialized_start=103 - _POLYGON._serialized_end=281 - _POLYGON_FENCETYPE._serialized_start=218 - _POLYGON_FENCETYPE._serialized_end=281 - _UPLOADGEOFENCEREQUEST._serialized_start=283 - _UPLOADGEOFENCEREQUEST._serialized_end=354 - _UPLOADGEOFENCERESPONSE._serialized_start=356 - _UPLOADGEOFENCERESPONSE._serialized_end=442 - _CLEARGEOFENCEREQUEST._serialized_start=444 - _CLEARGEOFENCEREQUEST._serialized_end=466 - _CLEARGEOFENCERESPONSE._serialized_start=468 - _CLEARGEOFENCERESPONSE._serialized_end=553 - _GEOFENCERESULT._serialized_start=556 - _GEOFENCERESULT._serialized_end=845 - _GEOFENCERESULT_RESULT._serialized_start=655 - _GEOFENCERESULT_RESULT._serialized_end=845 - _GEOFENCESERVICE._serialized_start=848 - _GEOFENCESERVICE._serialized_end=1080 + _CIRCLE.fields_by_name['radius']._options = None + _CIRCLE.fields_by_name['radius']._serialized_options = b'\202\265\030\003NaN' + _FENCETYPE._serialized_start=1046 + _FENCETYPE._serialized_end=1109 + _POINT._serialized_start=70 + _POINT._serialized_end=122 + _POLYGON._serialized_start=124 + _POLYGON._serialized_end=229 + _CIRCLE._serialized_start=232 + _CIRCLE._serialized_end=360 + _GEOFENCEDATA._serialized_start=362 + _GEOFENCEDATA._serialized_end=470 + _UPLOADGEOFENCEREQUEST._serialized_start=472 + _UPLOADGEOFENCEREQUEST._serialized_end=553 + _UPLOADGEOFENCERESPONSE._serialized_start=555 + _UPLOADGEOFENCERESPONSE._serialized_end=641 + _CLEARGEOFENCEREQUEST._serialized_start=643 + _CLEARGEOFENCEREQUEST._serialized_end=665 + _CLEARGEOFENCERESPONSE._serialized_start=667 + _CLEARGEOFENCERESPONSE._serialized_end=752 + _GEOFENCERESULT._serialized_start=755 + _GEOFENCERESULT._serialized_end=1044 + _GEOFENCERESULT_RESULT._serialized_start=854 + _GEOFENCERESULT_RESULT._serialized_end=1044 + _GEOFENCESERVICE._serialized_start=1112 + _GEOFENCESERVICE._serialized_end=1344 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/geofence_pb2_grpc.py b/mavsdk/geofence_pb2_grpc.py index 58e9e9a6..e8a2523b 100644 --- a/mavsdk/geofence_pb2_grpc.py +++ b/mavsdk/geofence_pb2_grpc.py @@ -33,9 +33,9 @@ class GeofenceServiceServicer(object): def UploadGeofence(self, request, context): """ - Upload a geofence. + Upload geofences. - Polygons are uploaded to a drone. Once uploaded, the geofence will remain + Polygon and Circular geofences are uploaded to a drone. Once uploaded, the geofence will remain on the drone even if a connection is lost. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) diff --git a/mavsdk/gimbal.py b/mavsdk/gimbal.py index 5a99c889..20ab16cc 100644 --- a/mavsdk/gimbal.py +++ b/mavsdk/gimbal.py @@ -16,7 +16,7 @@ class GimbalMode(Enum): Yaw follow will point the gimbal to the vehicle heading YAW_LOCK - Yaw lock will fix the gimbal poiting to an absolute direction + Yaw lock will fix the gimbal pointing to an absolute direction """ @@ -383,6 +383,44 @@ def _extract_result(self, response): return GimbalResult.translate_from_rpc(response.gimbal_result) + async def set_angles(self, roll_deg, pitch_deg, yaw_deg): + """ + Set gimbal roll, pitch and yaw angles. + + This sets the desired roll, pitch and yaw angles of a gimbal. + Will return when the command is accepted, however, it might + take the gimbal longer to actually be set to the new angles. + + Parameters + ---------- + roll_deg : float + Roll angle in degrees + + pitch_deg : float + Pitch angle in degrees (negative points down) + + yaw_deg : float + Yaw angle in degrees (positive is clock-wise, range: -180 to 180 or 0 to 360) + + Raises + ------ + GimbalError + If the request fails. The error contains the reason for the failure. + """ + + request = gimbal_pb2.SetAnglesRequest() + request.roll_deg = roll_deg + request.pitch_deg = pitch_deg + request.yaw_deg = yaw_deg + response = await self._stub.SetAngles(request) + + + result = self._extract_result(response) + + if result.result != GimbalResult.Result.SUCCESS: + raise GimbalError(result, "set_angles()", roll_deg, pitch_deg, yaw_deg) + + async def set_pitch_and_yaw(self, pitch_deg, yaw_deg): """ Set gimbal pitch and yaw angles. diff --git a/mavsdk/gimbal_pb2.py b/mavsdk/gimbal_pb2.py index da392727..a44d538a 100644 --- a/mavsdk/gimbal_pb2.py +++ b/mavsdk/gimbal_pb2.py @@ -15,7 +15,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13gimbal/gimbal.proto\x12\x11mavsdk.rpc.gimbal\";\n\x15SetPitchAndYawRequest\x12\x11\n\tpitch_deg\x18\x01 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x02 \x01(\x02\"P\n\x16SetPitchAndYawResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"Q\n\x1dSetPitchRateAndYawRateRequest\x12\x18\n\x10pitch_rate_deg_s\x18\x01 \x01(\x02\x12\x16\n\x0eyaw_rate_deg_s\x18\x02 \x01(\x02\"X\n\x1eSetPitchRateAndYawRateResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"D\n\x0eSetModeRequest\x12\x32\n\x0bgimbal_mode\x18\x01 \x01(\x0e\x32\x1d.mavsdk.rpc.gimbal.GimbalMode\"I\n\x0fSetModeResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"X\n\x15SetRoiLocationRequest\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\x12\x12\n\naltitude_m\x18\x03 \x01(\x02\"P\n\x16SetRoiLocationResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"J\n\x12TakeControlRequest\x12\x34\n\x0c\x63ontrol_mode\x18\x01 \x01(\x0e\x32\x1e.mavsdk.rpc.gimbal.ControlMode\"M\n\x13TakeControlResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"\x17\n\x15ReleaseControlRequest\"P\n\x16ReleaseControlResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"\x19\n\x17SubscribeControlRequest\"K\n\x0f\x43ontrolResponse\x12\x38\n\x0e\x63ontrol_status\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.gimbal.ControlStatus\"\xc7\x01\n\rControlStatus\x12\x34\n\x0c\x63ontrol_mode\x18\x01 \x01(\x0e\x32\x1e.mavsdk.rpc.gimbal.ControlMode\x12\x1d\n\x15sysid_primary_control\x18\x02 \x01(\x05\x12\x1e\n\x16\x63ompid_primary_control\x18\x03 \x01(\x05\x12\x1f\n\x17sysid_secondary_control\x18\x04 \x01(\x05\x12 \n\x18\x63ompid_secondary_control\x18\x05 \x01(\x05\"\xe1\x01\n\x0cGimbalResult\x12\x36\n\x06result\x18\x01 \x01(\x0e\x32&.mavsdk.rpc.gimbal.GimbalResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\x84\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x10\n\x0cRESULT_ERROR\x10\x02\x12\x12\n\x0eRESULT_TIMEOUT\x10\x03\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x04\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x05*B\n\nGimbalMode\x12\x1a\n\x16GIMBAL_MODE_YAW_FOLLOW\x10\x00\x12\x18\n\x14GIMBAL_MODE_YAW_LOCK\x10\x01*Z\n\x0b\x43ontrolMode\x12\x15\n\x11\x43ONTROL_MODE_NONE\x10\x00\x12\x18\n\x14\x43ONTROL_MODE_PRIMARY\x10\x01\x12\x1a\n\x16\x43ONTROL_MODE_SECONDARY\x10\x02\x32\xe7\x05\n\rGimbalService\x12g\n\x0eSetPitchAndYaw\x12(.mavsdk.rpc.gimbal.SetPitchAndYawRequest\x1a).mavsdk.rpc.gimbal.SetPitchAndYawResponse\"\x00\x12\x7f\n\x16SetPitchRateAndYawRate\x12\x30.mavsdk.rpc.gimbal.SetPitchRateAndYawRateRequest\x1a\x31.mavsdk.rpc.gimbal.SetPitchRateAndYawRateResponse\"\x00\x12R\n\x07SetMode\x12!.mavsdk.rpc.gimbal.SetModeRequest\x1a\".mavsdk.rpc.gimbal.SetModeResponse\"\x00\x12g\n\x0eSetRoiLocation\x12(.mavsdk.rpc.gimbal.SetRoiLocationRequest\x1a).mavsdk.rpc.gimbal.SetRoiLocationResponse\"\x00\x12^\n\x0bTakeControl\x12%.mavsdk.rpc.gimbal.TakeControlRequest\x1a&.mavsdk.rpc.gimbal.TakeControlResponse\"\x00\x12g\n\x0eReleaseControl\x12(.mavsdk.rpc.gimbal.ReleaseControlRequest\x1a).mavsdk.rpc.gimbal.ReleaseControlResponse\"\x00\x12\x66\n\x10SubscribeControl\x12*.mavsdk.rpc.gimbal.SubscribeControlRequest\x1a\".mavsdk.rpc.gimbal.ControlResponse\"\x00\x30\x01\x42\x1f\n\x10io.mavsdk.gimbalB\x0bGimbalProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13gimbal/gimbal.proto\x12\x11mavsdk.rpc.gimbal\"H\n\x10SetAnglesRequest\x12\x10\n\x08roll_deg\x18\x01 \x01(\x02\x12\x11\n\tpitch_deg\x18\x02 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x03 \x01(\x02\"K\n\x11SetAnglesResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\";\n\x15SetPitchAndYawRequest\x12\x11\n\tpitch_deg\x18\x01 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x02 \x01(\x02\"P\n\x16SetPitchAndYawResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"Q\n\x1dSetPitchRateAndYawRateRequest\x12\x18\n\x10pitch_rate_deg_s\x18\x01 \x01(\x02\x12\x16\n\x0eyaw_rate_deg_s\x18\x02 \x01(\x02\"X\n\x1eSetPitchRateAndYawRateResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"D\n\x0eSetModeRequest\x12\x32\n\x0bgimbal_mode\x18\x01 \x01(\x0e\x32\x1d.mavsdk.rpc.gimbal.GimbalMode\"I\n\x0fSetModeResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"X\n\x15SetRoiLocationRequest\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\x12\x12\n\naltitude_m\x18\x03 \x01(\x02\"P\n\x16SetRoiLocationResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"J\n\x12TakeControlRequest\x12\x34\n\x0c\x63ontrol_mode\x18\x01 \x01(\x0e\x32\x1e.mavsdk.rpc.gimbal.ControlMode\"M\n\x13TakeControlResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"\x17\n\x15ReleaseControlRequest\"P\n\x16ReleaseControlResponse\x12\x36\n\rgimbal_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.gimbal.GimbalResult\"\x19\n\x17SubscribeControlRequest\"K\n\x0f\x43ontrolResponse\x12\x38\n\x0e\x63ontrol_status\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.gimbal.ControlStatus\"\xc7\x01\n\rControlStatus\x12\x34\n\x0c\x63ontrol_mode\x18\x01 \x01(\x0e\x32\x1e.mavsdk.rpc.gimbal.ControlMode\x12\x1d\n\x15sysid_primary_control\x18\x02 \x01(\x05\x12\x1e\n\x16\x63ompid_primary_control\x18\x03 \x01(\x05\x12\x1f\n\x17sysid_secondary_control\x18\x04 \x01(\x05\x12 \n\x18\x63ompid_secondary_control\x18\x05 \x01(\x05\"\xe1\x01\n\x0cGimbalResult\x12\x36\n\x06result\x18\x01 \x01(\x0e\x32&.mavsdk.rpc.gimbal.GimbalResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\x84\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x10\n\x0cRESULT_ERROR\x10\x02\x12\x12\n\x0eRESULT_TIMEOUT\x10\x03\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x04\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x05*B\n\nGimbalMode\x12\x1a\n\x16GIMBAL_MODE_YAW_FOLLOW\x10\x00\x12\x18\n\x14GIMBAL_MODE_YAW_LOCK\x10\x01*Z\n\x0b\x43ontrolMode\x12\x15\n\x11\x43ONTROL_MODE_NONE\x10\x00\x12\x18\n\x14\x43ONTROL_MODE_PRIMARY\x10\x01\x12\x1a\n\x16\x43ONTROL_MODE_SECONDARY\x10\x02\x32\xc1\x06\n\rGimbalService\x12X\n\tSetAngles\x12#.mavsdk.rpc.gimbal.SetAnglesRequest\x1a$.mavsdk.rpc.gimbal.SetAnglesResponse\"\x00\x12g\n\x0eSetPitchAndYaw\x12(.mavsdk.rpc.gimbal.SetPitchAndYawRequest\x1a).mavsdk.rpc.gimbal.SetPitchAndYawResponse\"\x00\x12\x7f\n\x16SetPitchRateAndYawRate\x12\x30.mavsdk.rpc.gimbal.SetPitchRateAndYawRateRequest\x1a\x31.mavsdk.rpc.gimbal.SetPitchRateAndYawRateResponse\"\x00\x12R\n\x07SetMode\x12!.mavsdk.rpc.gimbal.SetModeRequest\x1a\".mavsdk.rpc.gimbal.SetModeResponse\"\x00\x12g\n\x0eSetRoiLocation\x12(.mavsdk.rpc.gimbal.SetRoiLocationRequest\x1a).mavsdk.rpc.gimbal.SetRoiLocationResponse\"\x00\x12^\n\x0bTakeControl\x12%.mavsdk.rpc.gimbal.TakeControlRequest\x1a&.mavsdk.rpc.gimbal.TakeControlResponse\"\x00\x12g\n\x0eReleaseControl\x12(.mavsdk.rpc.gimbal.ReleaseControlRequest\x1a).mavsdk.rpc.gimbal.ReleaseControlResponse\"\x00\x12\x66\n\x10SubscribeControl\x12*.mavsdk.rpc.gimbal.SubscribeControlRequest\x1a\".mavsdk.rpc.gimbal.ControlResponse\"\x00\x30\x01\x42\x1f\n\x10io.mavsdk.gimbalB\x0bGimbalProtob\x06proto3') _GIMBALMODE = DESCRIPTOR.enum_types_by_name['GimbalMode'] GimbalMode = enum_type_wrapper.EnumTypeWrapper(_GIMBALMODE) @@ -28,6 +28,8 @@ CONTROL_MODE_SECONDARY = 2 +_SETANGLESREQUEST = DESCRIPTOR.message_types_by_name['SetAnglesRequest'] +_SETANGLESRESPONSE = DESCRIPTOR.message_types_by_name['SetAnglesResponse'] _SETPITCHANDYAWREQUEST = DESCRIPTOR.message_types_by_name['SetPitchAndYawRequest'] _SETPITCHANDYAWRESPONSE = DESCRIPTOR.message_types_by_name['SetPitchAndYawResponse'] _SETPITCHRATEANDYAWRATEREQUEST = DESCRIPTOR.message_types_by_name['SetPitchRateAndYawRateRequest'] @@ -45,6 +47,20 @@ _CONTROLSTATUS = DESCRIPTOR.message_types_by_name['ControlStatus'] _GIMBALRESULT = DESCRIPTOR.message_types_by_name['GimbalResult'] _GIMBALRESULT_RESULT = _GIMBALRESULT.enum_types_by_name['Result'] +SetAnglesRequest = _reflection.GeneratedProtocolMessageType('SetAnglesRequest', (_message.Message,), { + 'DESCRIPTOR' : _SETANGLESREQUEST, + '__module__' : 'gimbal.gimbal_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.gimbal.SetAnglesRequest) + }) +_sym_db.RegisterMessage(SetAnglesRequest) + +SetAnglesResponse = _reflection.GeneratedProtocolMessageType('SetAnglesResponse', (_message.Message,), { + 'DESCRIPTOR' : _SETANGLESRESPONSE, + '__module__' : 'gimbal.gimbal_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.gimbal.SetAnglesResponse) + }) +_sym_db.RegisterMessage(SetAnglesResponse) + SetPitchAndYawRequest = _reflection.GeneratedProtocolMessageType('SetPitchAndYawRequest', (_message.Message,), { 'DESCRIPTOR' : _SETPITCHANDYAWREQUEST, '__module__' : 'gimbal.gimbal_pb2' @@ -162,44 +178,48 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\020io.mavsdk.gimbalB\013GimbalProto' - _GIMBALMODE._serialized_start=1471 - _GIMBALMODE._serialized_end=1537 - _CONTROLMODE._serialized_start=1539 - _CONTROLMODE._serialized_end=1629 - _SETPITCHANDYAWREQUEST._serialized_start=42 - _SETPITCHANDYAWREQUEST._serialized_end=101 - _SETPITCHANDYAWRESPONSE._serialized_start=103 - _SETPITCHANDYAWRESPONSE._serialized_end=183 - _SETPITCHRATEANDYAWRATEREQUEST._serialized_start=185 - _SETPITCHRATEANDYAWRATEREQUEST._serialized_end=266 - _SETPITCHRATEANDYAWRATERESPONSE._serialized_start=268 - _SETPITCHRATEANDYAWRATERESPONSE._serialized_end=356 - _SETMODEREQUEST._serialized_start=358 - _SETMODEREQUEST._serialized_end=426 - _SETMODERESPONSE._serialized_start=428 - _SETMODERESPONSE._serialized_end=501 - _SETROILOCATIONREQUEST._serialized_start=503 - _SETROILOCATIONREQUEST._serialized_end=591 - _SETROILOCATIONRESPONSE._serialized_start=593 - _SETROILOCATIONRESPONSE._serialized_end=673 - _TAKECONTROLREQUEST._serialized_start=675 - _TAKECONTROLREQUEST._serialized_end=749 - _TAKECONTROLRESPONSE._serialized_start=751 - _TAKECONTROLRESPONSE._serialized_end=828 - _RELEASECONTROLREQUEST._serialized_start=830 - _RELEASECONTROLREQUEST._serialized_end=853 - _RELEASECONTROLRESPONSE._serialized_start=855 - _RELEASECONTROLRESPONSE._serialized_end=935 - _SUBSCRIBECONTROLREQUEST._serialized_start=937 - _SUBSCRIBECONTROLREQUEST._serialized_end=962 - _CONTROLRESPONSE._serialized_start=964 - _CONTROLRESPONSE._serialized_end=1039 - _CONTROLSTATUS._serialized_start=1042 - _CONTROLSTATUS._serialized_end=1241 - _GIMBALRESULT._serialized_start=1244 - _GIMBALRESULT._serialized_end=1469 - _GIMBALRESULT_RESULT._serialized_start=1337 - _GIMBALRESULT_RESULT._serialized_end=1469 - _GIMBALSERVICE._serialized_start=1632 - _GIMBALSERVICE._serialized_end=2375 + _GIMBALMODE._serialized_start=1622 + _GIMBALMODE._serialized_end=1688 + _CONTROLMODE._serialized_start=1690 + _CONTROLMODE._serialized_end=1780 + _SETANGLESREQUEST._serialized_start=42 + _SETANGLESREQUEST._serialized_end=114 + _SETANGLESRESPONSE._serialized_start=116 + _SETANGLESRESPONSE._serialized_end=191 + _SETPITCHANDYAWREQUEST._serialized_start=193 + _SETPITCHANDYAWREQUEST._serialized_end=252 + _SETPITCHANDYAWRESPONSE._serialized_start=254 + _SETPITCHANDYAWRESPONSE._serialized_end=334 + _SETPITCHRATEANDYAWRATEREQUEST._serialized_start=336 + _SETPITCHRATEANDYAWRATEREQUEST._serialized_end=417 + _SETPITCHRATEANDYAWRATERESPONSE._serialized_start=419 + _SETPITCHRATEANDYAWRATERESPONSE._serialized_end=507 + _SETMODEREQUEST._serialized_start=509 + _SETMODEREQUEST._serialized_end=577 + _SETMODERESPONSE._serialized_start=579 + _SETMODERESPONSE._serialized_end=652 + _SETROILOCATIONREQUEST._serialized_start=654 + _SETROILOCATIONREQUEST._serialized_end=742 + _SETROILOCATIONRESPONSE._serialized_start=744 + _SETROILOCATIONRESPONSE._serialized_end=824 + _TAKECONTROLREQUEST._serialized_start=826 + _TAKECONTROLREQUEST._serialized_end=900 + _TAKECONTROLRESPONSE._serialized_start=902 + _TAKECONTROLRESPONSE._serialized_end=979 + _RELEASECONTROLREQUEST._serialized_start=981 + _RELEASECONTROLREQUEST._serialized_end=1004 + _RELEASECONTROLRESPONSE._serialized_start=1006 + _RELEASECONTROLRESPONSE._serialized_end=1086 + _SUBSCRIBECONTROLREQUEST._serialized_start=1088 + _SUBSCRIBECONTROLREQUEST._serialized_end=1113 + _CONTROLRESPONSE._serialized_start=1115 + _CONTROLRESPONSE._serialized_end=1190 + _CONTROLSTATUS._serialized_start=1193 + _CONTROLSTATUS._serialized_end=1392 + _GIMBALRESULT._serialized_start=1395 + _GIMBALRESULT._serialized_end=1620 + _GIMBALRESULT_RESULT._serialized_start=1488 + _GIMBALRESULT_RESULT._serialized_end=1620 + _GIMBALSERVICE._serialized_start=1783 + _GIMBALSERVICE._serialized_end=2616 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/gimbal_pb2_grpc.py b/mavsdk/gimbal_pb2_grpc.py index fdeadc26..dd9c54b1 100644 --- a/mavsdk/gimbal_pb2_grpc.py +++ b/mavsdk/gimbal_pb2_grpc.py @@ -15,6 +15,11 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ + self.SetAngles = channel.unary_unary( + '/mavsdk.rpc.gimbal.GimbalService/SetAngles', + request_serializer=gimbal_dot_gimbal__pb2.SetAnglesRequest.SerializeToString, + response_deserializer=gimbal_dot_gimbal__pb2.SetAnglesResponse.FromString, + ) self.SetPitchAndYaw = channel.unary_unary( '/mavsdk.rpc.gimbal.GimbalService/SetPitchAndYaw', request_serializer=gimbal_dot_gimbal__pb2.SetPitchAndYawRequest.SerializeToString, @@ -56,6 +61,19 @@ class GimbalServiceServicer(object): """Provide control over a gimbal. """ + def SetAngles(self, request, context): + """ + + Set gimbal roll, pitch and yaw angles. + + This sets the desired roll, pitch and yaw angles of a gimbal. + Will return when the command is accepted, however, it might + take the gimbal longer to actually be set to the new angles. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SetPitchAndYaw(self, request, context): """ @@ -149,6 +167,11 @@ def SubscribeControl(self, request, context): def add_GimbalServiceServicer_to_server(servicer, server): rpc_method_handlers = { + 'SetAngles': grpc.unary_unary_rpc_method_handler( + servicer.SetAngles, + request_deserializer=gimbal_dot_gimbal__pb2.SetAnglesRequest.FromString, + response_serializer=gimbal_dot_gimbal__pb2.SetAnglesResponse.SerializeToString, + ), 'SetPitchAndYaw': grpc.unary_unary_rpc_method_handler( servicer.SetPitchAndYaw, request_deserializer=gimbal_dot_gimbal__pb2.SetPitchAndYawRequest.FromString, @@ -195,6 +218,23 @@ class GimbalService(object): """Provide control over a gimbal. """ + @staticmethod + def SetAngles(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.gimbal.GimbalService/SetAngles', + gimbal_dot_gimbal__pb2.SetAnglesRequest.SerializeToString, + gimbal_dot_gimbal__pb2.SetAnglesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def SetPitchAndYaw(request, target, diff --git a/mavsdk/gripper.py b/mavsdk/gripper.py new file mode 100644 index 00000000..2c172cff --- /dev/null +++ b/mavsdk/gripper.py @@ -0,0 +1,279 @@ +# -*- coding: utf-8 -*- +# DO NOT EDIT! This file is auto-generated from +# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py +from ._base import AsyncBase +from . import gripper_pb2, gripper_pb2_grpc +from enum import Enum + + +class GripperAction(Enum): + """ + Gripper Actions. + + Available gripper actions are defined in mavlink under + https://mavlink.io/en/messages/common.html#GRIPPER_ACTIONS + + Values + ------ + RELEASE + Open the gripper to release the cargo + + GRAB + Close the gripper and grab onto cargo + + """ + + + RELEASE = 0 + GRAB = 1 + + def translate_to_rpc(self): + if self == GripperAction.RELEASE: + return gripper_pb2.GRIPPER_ACTION_RELEASE + if self == GripperAction.GRAB: + return gripper_pb2.GRIPPER_ACTION_GRAB + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == gripper_pb2.GRIPPER_ACTION_RELEASE: + return GripperAction.RELEASE + if rpc_enum_value == gripper_pb2.GRIPPER_ACTION_GRAB: + return GripperAction.GRAB + + def __str__(self): + return self.name + + +class GripperResult: + """ + Result type. + + Parameters + ---------- + result : Result + Result enum value + + result_str : std::string + Human-readable English string describing the result + + """ + + + + class Result(Enum): + """ + Possible results returned for gripper action requests. + + Values + ------ + UNKNOWN + Unknown result + + SUCCESS + Request was successful + + NO_SYSTEM + No system is connected + + BUSY + Temporarily rejected + + TIMEOUT + Request timed out + + UNSUPPORTED + Action not supported + + FAILED + Action failed + + """ + + + UNKNOWN = 0 + SUCCESS = 1 + NO_SYSTEM = 2 + BUSY = 3 + TIMEOUT = 4 + UNSUPPORTED = 5 + FAILED = 6 + + def translate_to_rpc(self): + if self == GripperResult.Result.UNKNOWN: + return gripper_pb2.GripperResult.RESULT_UNKNOWN + if self == GripperResult.Result.SUCCESS: + return gripper_pb2.GripperResult.RESULT_SUCCESS + if self == GripperResult.Result.NO_SYSTEM: + return gripper_pb2.GripperResult.RESULT_NO_SYSTEM + if self == GripperResult.Result.BUSY: + return gripper_pb2.GripperResult.RESULT_BUSY + if self == GripperResult.Result.TIMEOUT: + return gripper_pb2.GripperResult.RESULT_TIMEOUT + if self == GripperResult.Result.UNSUPPORTED: + return gripper_pb2.GripperResult.RESULT_UNSUPPORTED + if self == GripperResult.Result.FAILED: + return gripper_pb2.GripperResult.RESULT_FAILED + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == gripper_pb2.GripperResult.RESULT_UNKNOWN: + return GripperResult.Result.UNKNOWN + if rpc_enum_value == gripper_pb2.GripperResult.RESULT_SUCCESS: + return GripperResult.Result.SUCCESS + if rpc_enum_value == gripper_pb2.GripperResult.RESULT_NO_SYSTEM: + return GripperResult.Result.NO_SYSTEM + if rpc_enum_value == gripper_pb2.GripperResult.RESULT_BUSY: + return GripperResult.Result.BUSY + if rpc_enum_value == gripper_pb2.GripperResult.RESULT_TIMEOUT: + return GripperResult.Result.TIMEOUT + if rpc_enum_value == gripper_pb2.GripperResult.RESULT_UNSUPPORTED: + return GripperResult.Result.UNSUPPORTED + if rpc_enum_value == gripper_pb2.GripperResult.RESULT_FAILED: + return GripperResult.Result.FAILED + + def __str__(self): + return self.name + + + def __init__( + self, + result, + result_str): + """ Initializes the GripperResult object """ + self.result = result + self.result_str = result_str + + def __eq__(self, to_compare): + """ Checks if two GripperResult are the same """ + try: + # Try to compare - this likely fails when it is compared to a non + # GripperResult object + return \ + (self.result == to_compare.result) and \ + (self.result_str == to_compare.result_str) + + except AttributeError: + return False + + def __str__(self): + """ GripperResult in string representation """ + struct_repr = ", ".join([ + "result: " + str(self.result), + "result_str: " + str(self.result_str) + ]) + + return f"GripperResult: [{struct_repr}]" + + @staticmethod + def translate_from_rpc(rpcGripperResult): + """ Translates a gRPC struct to the SDK equivalent """ + return GripperResult( + + GripperResult.Result.translate_from_rpc(rpcGripperResult.result), + + + rpcGripperResult.result_str + ) + + def translate_to_rpc(self, rpcGripperResult): + """ Translates this SDK object into its gRPC equivalent """ + + + + + rpcGripperResult.result = self.result.translate_to_rpc() + + + + + + rpcGripperResult.result_str = self.result_str + + + + + + +class GripperError(Exception): + """ Raised when a GripperResult is a fail code """ + + def __init__(self, result, origin, *params): + self._result = result + self._origin = origin + self._params = params + + def __str__(self): + return f"{self._result.result}: '{self._result.result_str}'; origin: {self._origin}; params: {self._params}" + + +class Gripper(AsyncBase): + """ + Allows users to send gripper actions. + + Generated by dcsdkgen - MAVSDK Gripper API + """ + + # Plugin name + name = "Gripper" + + def _setup_stub(self, channel): + """ Setups the api stub """ + self._stub = gripper_pb2_grpc.GripperServiceStub(channel) + + + def _extract_result(self, response): + """ Returns the response status and description """ + return GripperResult.translate_from_rpc(response.gripper_result) + + + async def grab(self, instance): + """ + Gripper grab cargo. + + Parameters + ---------- + instance : uint32_t + + Raises + ------ + GripperError + If the request fails. The error contains the reason for the failure. + """ + + request = gripper_pb2.GrabRequest() + request.instance = instance + response = await self._stub.Grab(request) + + + result = self._extract_result(response) + + if result.result != GripperResult.Result.SUCCESS: + raise GripperError(result, "grab()", instance) + + + async def release(self, instance): + """ + Gripper release cargo. + + Parameters + ---------- + instance : uint32_t + + Raises + ------ + GripperError + If the request fails. The error contains the reason for the failure. + """ + + request = gripper_pb2.ReleaseRequest() + request.instance = instance + response = await self._stub.Release(request) + + + result = self._extract_result(response) + + if result.result != GripperResult.Result.SUCCESS: + raise GripperError(result, "release()", instance) + \ No newline at end of file diff --git a/mavsdk/gripper_pb2.py b/mavsdk/gripper_pb2.py new file mode 100644 index 00000000..bb0f77c5 --- /dev/null +++ b/mavsdk/gripper_pb2.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: gripper/gripper.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15gripper/gripper.proto\x12\x12mavsdk.rpc.gripper\"\x1f\n\x0bGrabRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\"I\n\x0cGrabResponse\x12\x39\n\x0egripper_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.gripper.GripperResult\"\"\n\x0eReleaseRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\"L\n\x0fReleaseResponse\x12\x39\n\x0egripper_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.gripper.GripperResult\"\xf6\x01\n\rGripperResult\x12\x38\n\x06result\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.gripper.GripperResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\x96\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x0f\n\x0bRESULT_BUSY\x10\x03\x12\x12\n\x0eRESULT_TIMEOUT\x10\x04\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x05\x12\x11\n\rRESULT_FAILED\x10\x06*D\n\rGripperAction\x12\x1a\n\x16GRIPPER_ACTION_RELEASE\x10\x00\x12\x17\n\x13GRIPPER_ACTION_GRAB\x10\x01\x32\xb3\x01\n\x0eGripperService\x12K\n\x04Grab\x12\x1f.mavsdk.rpc.gripper.GrabRequest\x1a .mavsdk.rpc.gripper.GrabResponse\"\x00\x12T\n\x07Release\x12\".mavsdk.rpc.gripper.ReleaseRequest\x1a#.mavsdk.rpc.gripper.ReleaseResponse\"\x00\x42!\n\x11io.mavsdk.gripperB\x0cGripperProtob\x06proto3') + +_GRIPPERACTION = DESCRIPTOR.enum_types_by_name['GripperAction'] +GripperAction = enum_type_wrapper.EnumTypeWrapper(_GRIPPERACTION) +GRIPPER_ACTION_RELEASE = 0 +GRIPPER_ACTION_GRAB = 1 + + +_GRABREQUEST = DESCRIPTOR.message_types_by_name['GrabRequest'] +_GRABRESPONSE = DESCRIPTOR.message_types_by_name['GrabResponse'] +_RELEASEREQUEST = DESCRIPTOR.message_types_by_name['ReleaseRequest'] +_RELEASERESPONSE = DESCRIPTOR.message_types_by_name['ReleaseResponse'] +_GRIPPERRESULT = DESCRIPTOR.message_types_by_name['GripperResult'] +_GRIPPERRESULT_RESULT = _GRIPPERRESULT.enum_types_by_name['Result'] +GrabRequest = _reflection.GeneratedProtocolMessageType('GrabRequest', (_message.Message,), { + 'DESCRIPTOR' : _GRABREQUEST, + '__module__' : 'gripper.gripper_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.gripper.GrabRequest) + }) +_sym_db.RegisterMessage(GrabRequest) + +GrabResponse = _reflection.GeneratedProtocolMessageType('GrabResponse', (_message.Message,), { + 'DESCRIPTOR' : _GRABRESPONSE, + '__module__' : 'gripper.gripper_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.gripper.GrabResponse) + }) +_sym_db.RegisterMessage(GrabResponse) + +ReleaseRequest = _reflection.GeneratedProtocolMessageType('ReleaseRequest', (_message.Message,), { + 'DESCRIPTOR' : _RELEASEREQUEST, + '__module__' : 'gripper.gripper_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.gripper.ReleaseRequest) + }) +_sym_db.RegisterMessage(ReleaseRequest) + +ReleaseResponse = _reflection.GeneratedProtocolMessageType('ReleaseResponse', (_message.Message,), { + 'DESCRIPTOR' : _RELEASERESPONSE, + '__module__' : 'gripper.gripper_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.gripper.ReleaseResponse) + }) +_sym_db.RegisterMessage(ReleaseResponse) + +GripperResult = _reflection.GeneratedProtocolMessageType('GripperResult', (_message.Message,), { + 'DESCRIPTOR' : _GRIPPERRESULT, + '__module__' : 'gripper.gripper_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.gripper.GripperResult) + }) +_sym_db.RegisterMessage(GripperResult) + +_GRIPPERSERVICE = DESCRIPTOR.services_by_name['GripperService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\021io.mavsdk.gripperB\014GripperProto' + _GRIPPERACTION._serialized_start=516 + _GRIPPERACTION._serialized_end=584 + _GRABREQUEST._serialized_start=45 + _GRABREQUEST._serialized_end=76 + _GRABRESPONSE._serialized_start=78 + _GRABRESPONSE._serialized_end=151 + _RELEASEREQUEST._serialized_start=153 + _RELEASEREQUEST._serialized_end=187 + _RELEASERESPONSE._serialized_start=189 + _RELEASERESPONSE._serialized_end=265 + _GRIPPERRESULT._serialized_start=268 + _GRIPPERRESULT._serialized_end=514 + _GRIPPERRESULT_RESULT._serialized_start=364 + _GRIPPERRESULT_RESULT._serialized_end=514 + _GRIPPERSERVICE._serialized_start=587 + _GRIPPERSERVICE._serialized_end=766 +# @@protoc_insertion_point(module_scope) diff --git a/mavsdk/gripper_pb2_grpc.py b/mavsdk/gripper_pb2_grpc.py new file mode 100644 index 00000000..4afe6f81 --- /dev/null +++ b/mavsdk/gripper_pb2_grpc.py @@ -0,0 +1,109 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import gripper_pb2 as gripper_dot_gripper__pb2 + + +class GripperServiceStub(object): + """ + Allows users to send gripper actions. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Grab = channel.unary_unary( + '/mavsdk.rpc.gripper.GripperService/Grab', + request_serializer=gripper_dot_gripper__pb2.GrabRequest.SerializeToString, + response_deserializer=gripper_dot_gripper__pb2.GrabResponse.FromString, + ) + self.Release = channel.unary_unary( + '/mavsdk.rpc.gripper.GripperService/Release', + request_serializer=gripper_dot_gripper__pb2.ReleaseRequest.SerializeToString, + response_deserializer=gripper_dot_gripper__pb2.ReleaseResponse.FromString, + ) + + +class GripperServiceServicer(object): + """ + Allows users to send gripper actions. + """ + + def Grab(self, request, context): + """ + Gripper grab cargo. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Release(self, request, context): + """ + Gripper release cargo. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_GripperServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Grab': grpc.unary_unary_rpc_method_handler( + servicer.Grab, + request_deserializer=gripper_dot_gripper__pb2.GrabRequest.FromString, + response_serializer=gripper_dot_gripper__pb2.GrabResponse.SerializeToString, + ), + 'Release': grpc.unary_unary_rpc_method_handler( + servicer.Release, + request_deserializer=gripper_dot_gripper__pb2.ReleaseRequest.FromString, + response_serializer=gripper_dot_gripper__pb2.ReleaseResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'mavsdk.rpc.gripper.GripperService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class GripperService(object): + """ + Allows users to send gripper actions. + """ + + @staticmethod + def Grab(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.gripper.GripperService/Grab', + gripper_dot_gripper__pb2.GrabRequest.SerializeToString, + gripper_dot_gripper__pb2.GrabResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Release(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.gripper.GripperService/Release', + gripper_dot_gripper__pb2.ReleaseRequest.SerializeToString, + gripper_dot_gripper__pb2.ReleaseResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/mavsdk/info.py b/mavsdk/info.py index eea05466..da4e693c 100644 --- a/mavsdk/info.py +++ b/mavsdk/info.py @@ -299,9 +299,80 @@ class Version: os_sw_git_hash : std::string Operating system software git hash + flight_sw_version_type : FlightSoftwareVersionType + Flight software version type + """ + + class FlightSoftwareVersionType(Enum): + """ + These values define the type of firmware/flight software release + + Values + ------ + UNKNOWN + Unknown type + + DEV + Development release + + ALPHA + Alpha release + + BETA + Beta release + + RC + Release candidate + + RELEASE + Official stable release + + """ + + + UNKNOWN = 0 + DEV = 1 + ALPHA = 2 + BETA = 3 + RC = 4 + RELEASE = 5 + + def translate_to_rpc(self): + if self == Version.FlightSoftwareVersionType.UNKNOWN: + return info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_UNKNOWN + if self == Version.FlightSoftwareVersionType.DEV: + return info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_DEV + if self == Version.FlightSoftwareVersionType.ALPHA: + return info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_ALPHA + if self == Version.FlightSoftwareVersionType.BETA: + return info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_BETA + if self == Version.FlightSoftwareVersionType.RC: + return info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_RC + if self == Version.FlightSoftwareVersionType.RELEASE: + return info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_RELEASE + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_UNKNOWN: + return Version.FlightSoftwareVersionType.UNKNOWN + if rpc_enum_value == info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_DEV: + return Version.FlightSoftwareVersionType.DEV + if rpc_enum_value == info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_ALPHA: + return Version.FlightSoftwareVersionType.ALPHA + if rpc_enum_value == info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_BETA: + return Version.FlightSoftwareVersionType.BETA + if rpc_enum_value == info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_RC: + return Version.FlightSoftwareVersionType.RC + if rpc_enum_value == info_pb2.Version.FLIGHT_SOFTWARE_VERSION_TYPE_RELEASE: + return Version.FlightSoftwareVersionType.RELEASE + + def __str__(self): + return self.name + def __init__( self, @@ -315,7 +386,8 @@ def __init__( os_sw_minor, os_sw_patch, flight_sw_git_hash, - os_sw_git_hash): + os_sw_git_hash, + flight_sw_version_type): """ Initializes the Version object """ self.flight_sw_major = flight_sw_major self.flight_sw_minor = flight_sw_minor @@ -328,6 +400,7 @@ def __init__( self.os_sw_patch = os_sw_patch self.flight_sw_git_hash = flight_sw_git_hash self.os_sw_git_hash = os_sw_git_hash + self.flight_sw_version_type = flight_sw_version_type def __eq__(self, to_compare): """ Checks if two Version are the same """ @@ -345,7 +418,8 @@ def __eq__(self, to_compare): (self.os_sw_minor == to_compare.os_sw_minor) and \ (self.os_sw_patch == to_compare.os_sw_patch) and \ (self.flight_sw_git_hash == to_compare.flight_sw_git_hash) and \ - (self.os_sw_git_hash == to_compare.os_sw_git_hash) + (self.os_sw_git_hash == to_compare.os_sw_git_hash) and \ + (self.flight_sw_version_type == to_compare.flight_sw_version_type) except AttributeError: return False @@ -363,7 +437,8 @@ def __str__(self): "os_sw_minor: " + str(self.os_sw_minor), "os_sw_patch: " + str(self.os_sw_patch), "flight_sw_git_hash: " + str(self.flight_sw_git_hash), - "os_sw_git_hash: " + str(self.os_sw_git_hash) + "os_sw_git_hash: " + str(self.os_sw_git_hash), + "flight_sw_version_type: " + str(self.flight_sw_version_type) ]) return f"Version: [{struct_repr}]" @@ -403,7 +478,10 @@ def translate_from_rpc(rpcVersion): rpcVersion.flight_sw_git_hash, - rpcVersion.os_sw_git_hash + rpcVersion.os_sw_git_hash, + + + Version.FlightSoftwareVersionType.translate_from_rpc(rpcVersion.flight_sw_version_type) ) def translate_to_rpc(self, rpcVersion): @@ -476,6 +554,12 @@ def translate_to_rpc(self, rpcVersion): + + + rpcVersion.flight_sw_version_type = self.flight_sw_version_type.translate_to_rpc() + + + class InfoResult: diff --git a/mavsdk/info_pb2.py b/mavsdk/info_pb2.py index efa74e8e..12cb4046 100644 --- a/mavsdk/info_pb2.py +++ b/mavsdk/info_pb2.py @@ -15,7 +15,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0finfo/info.proto\x12\x0fmavsdk.rpc.info\x1a\x14mavsdk_options.proto\"\x1d\n\x1bGetFlightInformationRequest\"\x82\x01\n\x1cGetFlightInformationResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x30\n\x0b\x66light_info\x18\x02 \x01(\x0b\x32\x1b.mavsdk.rpc.info.FlightInfo\"\x1a\n\x18GetIdentificationRequest\"\x86\x01\n\x19GetIdentificationResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x37\n\x0eidentification\x18\x02 \x01(\x0b\x32\x1f.mavsdk.rpc.info.Identification\"\x13\n\x11GetProductRequest\"q\n\x12GetProductResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12)\n\x07product\x18\x02 \x01(\x0b\x32\x18.mavsdk.rpc.info.Product\"\x13\n\x11GetVersionRequest\"q\n\x12GetVersionResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12)\n\x07version\x18\x02 \x01(\x0b\x32\x18.mavsdk.rpc.info.Version\"\x17\n\x15GetSpeedFactorRequest\"`\n\x16GetSpeedFactorResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x14\n\x0cspeed_factor\x18\x02 \x01(\x01\"6\n\nFlightInfo\x12\x14\n\x0ctime_boot_ms\x18\x01 \x01(\r\x12\x12\n\nflight_uid\x18\x02 \x01(\x04\":\n\x0eIdentification\x12\x14\n\x0chardware_uid\x18\x01 \x01(\t\x12\x12\n\nlegacy_uid\x18\x02 \x01(\x04\"[\n\x07Product\x12\x11\n\tvendor_id\x18\x01 \x01(\x05\x12\x13\n\x0bvendor_name\x18\x02 \x01(\t\x12\x12\n\nproduct_id\x18\x03 \x01(\x05\x12\x14\n\x0cproduct_name\x18\x04 \x01(\t\"\xa7\x02\n\x07Version\x12\x17\n\x0f\x66light_sw_major\x18\x01 \x01(\x05\x12\x17\n\x0f\x66light_sw_minor\x18\x02 \x01(\x05\x12\x17\n\x0f\x66light_sw_patch\x18\x03 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_major\x18\x04 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_minor\x18\x05 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_patch\x18\x06 \x01(\x05\x12\x13\n\x0bos_sw_major\x18\x07 \x01(\x05\x12\x13\n\x0bos_sw_minor\x18\x08 \x01(\x05\x12\x13\n\x0bos_sw_patch\x18\t \x01(\x05\x12\x1a\n\x12\x66light_sw_git_hash\x18\n \x01(\t\x12\x16\n\x0eos_sw_git_hash\x18\x0b \x01(\t\"\xc5\x01\n\nInfoResult\x12\x32\n\x06result\x18\x01 \x01(\x0e\x32\".mavsdk.rpc.info.InfoResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"o\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\'\n#RESULT_INFORMATION_NOT_RECEIVED_YET\x10\x02\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x03\x32\x9d\x04\n\x0bInfoService\x12y\n\x14GetFlightInformation\x12,.mavsdk.rpc.info.GetFlightInformationRequest\x1a-.mavsdk.rpc.info.GetFlightInformationResponse\"\x04\x80\xb5\x18\x01\x12p\n\x11GetIdentification\x12).mavsdk.rpc.info.GetIdentificationRequest\x1a*.mavsdk.rpc.info.GetIdentificationResponse\"\x04\x80\xb5\x18\x01\x12[\n\nGetProduct\x12\".mavsdk.rpc.info.GetProductRequest\x1a#.mavsdk.rpc.info.GetProductResponse\"\x04\x80\xb5\x18\x01\x12[\n\nGetVersion\x12\".mavsdk.rpc.info.GetVersionRequest\x1a#.mavsdk.rpc.info.GetVersionResponse\"\x04\x80\xb5\x18\x01\x12g\n\x0eGetSpeedFactor\x12&.mavsdk.rpc.info.GetSpeedFactorRequest\x1a\'.mavsdk.rpc.info.GetSpeedFactorResponse\"\x04\x80\xb5\x18\x01\x42\x1b\n\x0eio.mavsdk.infoB\tInfoProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0finfo/info.proto\x12\x0fmavsdk.rpc.info\x1a\x14mavsdk_options.proto\"\x1d\n\x1bGetFlightInformationRequest\"\x82\x01\n\x1cGetFlightInformationResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x30\n\x0b\x66light_info\x18\x02 \x01(\x0b\x32\x1b.mavsdk.rpc.info.FlightInfo\"\x1a\n\x18GetIdentificationRequest\"\x86\x01\n\x19GetIdentificationResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x37\n\x0eidentification\x18\x02 \x01(\x0b\x32\x1f.mavsdk.rpc.info.Identification\"\x13\n\x11GetProductRequest\"q\n\x12GetProductResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12)\n\x07product\x18\x02 \x01(\x0b\x32\x18.mavsdk.rpc.info.Product\"\x13\n\x11GetVersionRequest\"q\n\x12GetVersionResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12)\n\x07version\x18\x02 \x01(\x0b\x32\x18.mavsdk.rpc.info.Version\"\x17\n\x15GetSpeedFactorRequest\"`\n\x16GetSpeedFactorResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x14\n\x0cspeed_factor\x18\x02 \x01(\x01\"6\n\nFlightInfo\x12\x14\n\x0ctime_boot_ms\x18\x01 \x01(\r\x12\x12\n\nflight_uid\x18\x02 \x01(\x04\":\n\x0eIdentification\x12\x14\n\x0chardware_uid\x18\x01 \x01(\t\x12\x12\n\nlegacy_uid\x18\x02 \x01(\x04\"[\n\x07Product\x12\x11\n\tvendor_id\x18\x01 \x01(\x05\x12\x13\n\x0bvendor_name\x18\x02 \x01(\t\x12\x12\n\nproduct_id\x18\x03 \x01(\x05\x12\x14\n\x0cproduct_name\x18\x04 \x01(\t\"\x87\x05\n\x07Version\x12\x17\n\x0f\x66light_sw_major\x18\x01 \x01(\x05\x12\x17\n\x0f\x66light_sw_minor\x18\x02 \x01(\x05\x12\x17\n\x0f\x66light_sw_patch\x18\x03 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_major\x18\x04 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_minor\x18\x05 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_patch\x18\x06 \x01(\x05\x12\x13\n\x0bos_sw_major\x18\x07 \x01(\x05\x12\x13\n\x0bos_sw_minor\x18\x08 \x01(\x05\x12\x13\n\x0bos_sw_patch\x18\t \x01(\x05\x12\x1a\n\x12\x66light_sw_git_hash\x18\n \x01(\t\x12\x16\n\x0eos_sw_git_hash\x18\x0b \x01(\t\x12R\n\x16\x66light_sw_version_type\x18\x0c \x01(\x0e\x32\x32.mavsdk.rpc.info.Version.FlightSoftwareVersionType\"\x89\x02\n\x19\x46lightSoftwareVersionType\x12(\n$FLIGHT_SOFTWARE_VERSION_TYPE_UNKNOWN\x10\x00\x12$\n FLIGHT_SOFTWARE_VERSION_TYPE_DEV\x10\x01\x12&\n\"FLIGHT_SOFTWARE_VERSION_TYPE_ALPHA\x10\x02\x12%\n!FLIGHT_SOFTWARE_VERSION_TYPE_BETA\x10\x03\x12#\n\x1f\x46LIGHT_SOFTWARE_VERSION_TYPE_RC\x10\x04\x12(\n$FLIGHT_SOFTWARE_VERSION_TYPE_RELEASE\x10\x05\"\xc5\x01\n\nInfoResult\x12\x32\n\x06result\x18\x01 \x01(\x0e\x32\".mavsdk.rpc.info.InfoResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"o\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\'\n#RESULT_INFORMATION_NOT_RECEIVED_YET\x10\x02\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x03\x32\x9d\x04\n\x0bInfoService\x12y\n\x14GetFlightInformation\x12,.mavsdk.rpc.info.GetFlightInformationRequest\x1a-.mavsdk.rpc.info.GetFlightInformationResponse\"\x04\x80\xb5\x18\x01\x12p\n\x11GetIdentification\x12).mavsdk.rpc.info.GetIdentificationRequest\x1a*.mavsdk.rpc.info.GetIdentificationResponse\"\x04\x80\xb5\x18\x01\x12[\n\nGetProduct\x12\".mavsdk.rpc.info.GetProductRequest\x1a#.mavsdk.rpc.info.GetProductResponse\"\x04\x80\xb5\x18\x01\x12[\n\nGetVersion\x12\".mavsdk.rpc.info.GetVersionRequest\x1a#.mavsdk.rpc.info.GetVersionResponse\"\x04\x80\xb5\x18\x01\x12g\n\x0eGetSpeedFactor\x12&.mavsdk.rpc.info.GetSpeedFactorRequest\x1a\'.mavsdk.rpc.info.GetSpeedFactorResponse\"\x04\x80\xb5\x18\x01\x42\x1b\n\x0eio.mavsdk.infoB\tInfoProtob\x06proto3') @@ -34,6 +34,7 @@ _PRODUCT = DESCRIPTOR.message_types_by_name['Product'] _VERSION = DESCRIPTOR.message_types_by_name['Version'] _INFORESULT = DESCRIPTOR.message_types_by_name['InfoResult'] +_VERSION_FLIGHTSOFTWAREVERSIONTYPE = _VERSION.enum_types_by_name['FlightSoftwareVersionType'] _INFORESULT_RESULT = _INFORESULT.enum_types_by_name['Result'] GetFlightInformationRequest = _reflection.GeneratedProtocolMessageType('GetFlightInformationRequest', (_message.Message,), { 'DESCRIPTOR' : _GETFLIGHTINFORMATIONREQUEST, @@ -182,11 +183,13 @@ _PRODUCT._serialized_start=898 _PRODUCT._serialized_end=989 _VERSION._serialized_start=992 - _VERSION._serialized_end=1287 - _INFORESULT._serialized_start=1290 - _INFORESULT._serialized_end=1487 - _INFORESULT_RESULT._serialized_start=1376 - _INFORESULT_RESULT._serialized_end=1487 - _INFOSERVICE._serialized_start=1490 - _INFOSERVICE._serialized_end=2031 + _VERSION._serialized_end=1639 + _VERSION_FLIGHTSOFTWAREVERSIONTYPE._serialized_start=1374 + _VERSION_FLIGHTSOFTWAREVERSIONTYPE._serialized_end=1639 + _INFORESULT._serialized_start=1642 + _INFORESULT._serialized_end=1839 + _INFORESULT_RESULT._serialized_start=1728 + _INFORESULT_RESULT._serialized_end=1839 + _INFOSERVICE._serialized_start=1842 + _INFOSERVICE._serialized_end=2383 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/mission.py b/mavsdk/mission.py index 3140b305..9e407116 100644 --- a/mavsdk/mission.py +++ b/mavsdk/mission.py @@ -56,6 +56,9 @@ class MissionItem: camera_photo_distance_m : float Camera photo distance to use after this mission item (in meters) + vehicle_action : VehicleAction + Vehicle action to trigger at this mission item. + """ @@ -143,6 +146,66 @@ def translate_from_rpc(rpc_enum_value): def __str__(self): return self.name + + class VehicleAction(Enum): + """ + Possible vehicle actions at a mission item + + Values + ------ + NONE + No action + + TAKEOFF + Vehicle will takeoff and go to defined waypoint + + LAND + When a waypoint is reached vehicle will land at current position + + TRANSITION_TO_FW + When a waypoint is reached vehicle will transition to fixed-wing mode + + TRANSITION_TO_MC + When a waypoint is reached vehicle will transition to multi-copter mode + + """ + + + NONE = 0 + TAKEOFF = 1 + LAND = 2 + TRANSITION_TO_FW = 3 + TRANSITION_TO_MC = 4 + + def translate_to_rpc(self): + if self == MissionItem.VehicleAction.NONE: + return mission_pb2.MissionItem.VEHICLE_ACTION_NONE + if self == MissionItem.VehicleAction.TAKEOFF: + return mission_pb2.MissionItem.VEHICLE_ACTION_TAKEOFF + if self == MissionItem.VehicleAction.LAND: + return mission_pb2.MissionItem.VEHICLE_ACTION_LAND + if self == MissionItem.VehicleAction.TRANSITION_TO_FW: + return mission_pb2.MissionItem.VEHICLE_ACTION_TRANSITION_TO_FW + if self == MissionItem.VehicleAction.TRANSITION_TO_MC: + return mission_pb2.MissionItem.VEHICLE_ACTION_TRANSITION_TO_MC + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == mission_pb2.MissionItem.VEHICLE_ACTION_NONE: + return MissionItem.VehicleAction.NONE + if rpc_enum_value == mission_pb2.MissionItem.VEHICLE_ACTION_TAKEOFF: + return MissionItem.VehicleAction.TAKEOFF + if rpc_enum_value == mission_pb2.MissionItem.VEHICLE_ACTION_LAND: + return MissionItem.VehicleAction.LAND + if rpc_enum_value == mission_pb2.MissionItem.VEHICLE_ACTION_TRANSITION_TO_FW: + return MissionItem.VehicleAction.TRANSITION_TO_FW + if rpc_enum_value == mission_pb2.MissionItem.VEHICLE_ACTION_TRANSITION_TO_MC: + return MissionItem.VehicleAction.TRANSITION_TO_MC + + def __str__(self): + return self.name + def __init__( self, @@ -158,7 +221,8 @@ def __init__( camera_photo_interval_s, acceptance_radius_m, yaw_deg, - camera_photo_distance_m): + camera_photo_distance_m, + vehicle_action): """ Initializes the MissionItem object """ self.latitude_deg = latitude_deg self.longitude_deg = longitude_deg @@ -173,6 +237,7 @@ def __init__( self.acceptance_radius_m = acceptance_radius_m self.yaw_deg = yaw_deg self.camera_photo_distance_m = camera_photo_distance_m + self.vehicle_action = vehicle_action def __eq__(self, to_compare): """ Checks if two MissionItem are the same """ @@ -192,7 +257,8 @@ def __eq__(self, to_compare): (self.camera_photo_interval_s == to_compare.camera_photo_interval_s) and \ (self.acceptance_radius_m == to_compare.acceptance_radius_m) and \ (self.yaw_deg == to_compare.yaw_deg) and \ - (self.camera_photo_distance_m == to_compare.camera_photo_distance_m) + (self.camera_photo_distance_m == to_compare.camera_photo_distance_m) and \ + (self.vehicle_action == to_compare.vehicle_action) except AttributeError: return False @@ -212,7 +278,8 @@ def __str__(self): "camera_photo_interval_s: " + str(self.camera_photo_interval_s), "acceptance_radius_m: " + str(self.acceptance_radius_m), "yaw_deg: " + str(self.yaw_deg), - "camera_photo_distance_m: " + str(self.camera_photo_distance_m) + "camera_photo_distance_m: " + str(self.camera_photo_distance_m), + "vehicle_action: " + str(self.vehicle_action) ]) return f"MissionItem: [{struct_repr}]" @@ -258,7 +325,10 @@ def translate_from_rpc(rpcMissionItem): rpcMissionItem.yaw_deg, - rpcMissionItem.camera_photo_distance_m + rpcMissionItem.camera_photo_distance_m, + + + MissionItem.VehicleAction.translate_from_rpc(rpcMissionItem.vehicle_action) ) def translate_to_rpc(self, rpcMissionItem): @@ -343,6 +413,12 @@ def translate_to_rpc(self, rpcMissionItem): + + + rpcMissionItem.vehicle_action = self.vehicle_action.translate_to_rpc() + + + class MissionPlan: @@ -545,6 +621,15 @@ class Result(Enum): NEXT Intermediate message showing progress + DENIED + Request denied + + PROTOCOL_ERROR + There was a protocol error + + INT_MESSAGES_NOT_SUPPORTED + The system does not support the MISSION_INT protocol + """ @@ -561,6 +646,9 @@ class Result(Enum): TRANSFER_CANCELLED = 10 NO_SYSTEM = 11 NEXT = 12 + DENIED = 13 + PROTOCOL_ERROR = 14 + INT_MESSAGES_NOT_SUPPORTED = 15 def translate_to_rpc(self): if self == MissionResult.Result.UNKNOWN: @@ -589,6 +677,12 @@ def translate_to_rpc(self): return mission_pb2.MissionResult.RESULT_NO_SYSTEM if self == MissionResult.Result.NEXT: return mission_pb2.MissionResult.RESULT_NEXT + if self == MissionResult.Result.DENIED: + return mission_pb2.MissionResult.RESULT_DENIED + if self == MissionResult.Result.PROTOCOL_ERROR: + return mission_pb2.MissionResult.RESULT_PROTOCOL_ERROR + if self == MissionResult.Result.INT_MESSAGES_NOT_SUPPORTED: + return mission_pb2.MissionResult.RESULT_INT_MESSAGES_NOT_SUPPORTED @staticmethod def translate_from_rpc(rpc_enum_value): @@ -619,6 +713,12 @@ def translate_from_rpc(rpc_enum_value): return MissionResult.Result.NO_SYSTEM if rpc_enum_value == mission_pb2.MissionResult.RESULT_NEXT: return MissionResult.Result.NEXT + if rpc_enum_value == mission_pb2.MissionResult.RESULT_DENIED: + return MissionResult.Result.DENIED + if rpc_enum_value == mission_pb2.MissionResult.RESULT_PROTOCOL_ERROR: + return MissionResult.Result.PROTOCOL_ERROR + if rpc_enum_value == mission_pb2.MissionResult.RESULT_INT_MESSAGES_NOT_SUPPORTED: + return MissionResult.Result.INT_MESSAGES_NOT_SUPPORTED def __str__(self): return self.name diff --git a/mavsdk/mission_pb2.py b/mavsdk/mission_pb2.py index 3046c62d..1e713c15 100644 --- a/mavsdk/mission_pb2.py +++ b/mavsdk/mission_pb2.py @@ -15,7 +15,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15mission/mission.proto\x12\x12mavsdk.rpc.mission\x1a\x14mavsdk_options.proto\"M\n\x14UploadMissionRequest\x12\x35\n\x0cmission_plan\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.mission.MissionPlan\"R\n\x15UploadMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"b\n)SubscribeUploadMissionWithProgressRequest\x12\x35\n\x0cmission_plan\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.mission.MissionPlan\"\x97\x01\n!UploadMissionWithProgressResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\x12\x37\n\rprogress_data\x18\x02 \x01(\x0b\x32 .mavsdk.rpc.mission.ProgressData\"\x1c\n\x1a\x43\x61ncelMissionUploadRequest\"X\n\x1b\x43\x61ncelMissionUploadResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\x18\n\x16\x44ownloadMissionRequest\"\x8b\x01\n\x17\x44ownloadMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\x12\x35\n\x0cmission_plan\x18\x02 \x01(\x0b\x32\x1f.mavsdk.rpc.mission.MissionPlan\"-\n+SubscribeDownloadMissionWithProgressRequest\"\xa2\x01\n#DownloadMissionWithProgressResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\x12@\n\rprogress_data\x18\x02 \x01(\x0b\x32).mavsdk.rpc.mission.ProgressDataOrMission\"\x1e\n\x1c\x43\x61ncelMissionDownloadRequest\"Z\n\x1d\x43\x61ncelMissionDownloadResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\x15\n\x13StartMissionRequest\"Q\n\x14StartMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\x15\n\x13PauseMissionRequest\"Q\n\x14PauseMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\x15\n\x13\x43learMissionRequest\"Q\n\x14\x43learMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"-\n\x1cSetCurrentMissionItemRequest\x12\r\n\x05index\x18\x01 \x01(\x05\"Z\n\x1dSetCurrentMissionItemResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\x1a\n\x18IsMissionFinishedRequest\"k\n\x19IsMissionFinishedResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\x12\x13\n\x0bis_finished\x18\x02 \x01(\x08\"!\n\x1fSubscribeMissionProgressRequest\"X\n\x17MissionProgressResponse\x12=\n\x10mission_progress\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.mission.MissionProgress\"&\n$GetReturnToLaunchAfterMissionRequest\"r\n%GetReturnToLaunchAfterMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\x12\x0e\n\x06\x65nable\x18\x02 \x01(\x08\"6\n$SetReturnToLaunchAfterMissionRequest\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\"b\n%SetReturnToLaunchAfterMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\xbc\x06\n\x0bMissionItem\x12(\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x12\x82\xb5\x18\x03NaN\x89\xb5\x18H\xaf\xbc\x9a\xf2\xd7z>\x12)\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x12\x82\xb5\x18\x03NaN\x89\xb5\x18H\xaf\xbc\x9a\xf2\xd7z>\x12$\n\x13relative_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tspeed_m_s\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12!\n\x0eis_fly_through\x18\x05 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12,\n\x10gimbal_pitch_deg\x18\x06 \x01(\x02\x42\x12\x82\xb5\x18\x03NaN\x89\xb5\x18-C\x1c\xeb\xe2\x36\x1a?\x12*\n\x0egimbal_yaw_deg\x18\x07 \x01(\x02\x42\x12\x82\xb5\x18\x03NaN\x89\xb5\x18-C\x1c\xeb\xe2\x36\x1a?\x12\x43\n\rcamera_action\x18\x08 \x01(\x0e\x32,.mavsdk.rpc.mission.MissionItem.CameraAction\x12\x1e\n\rloiter_time_s\x18\t \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12(\n\x17\x63\x61mera_photo_interval_s\x18\n \x01(\x01\x42\x07\x82\xb5\x18\x03\x31.0\x12$\n\x13\x61\x63\x63\x65ptance_radius_m\x18\x0b \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x18\n\x07yaw_deg\x18\x0c \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12(\n\x17\x63\x61mera_photo_distance_m\x18\r \x01(\x02\x42\x07\x82\xb5\x18\x03NAN\"\x9f\x02\n\x0c\x43\x61meraAction\x12\x16\n\x12\x43\x41MERA_ACTION_NONE\x10\x00\x12\x1c\n\x18\x43\x41MERA_ACTION_TAKE_PHOTO\x10\x01\x12&\n\"CAMERA_ACTION_START_PHOTO_INTERVAL\x10\x02\x12%\n!CAMERA_ACTION_STOP_PHOTO_INTERVAL\x10\x03\x12\x1d\n\x19\x43\x41MERA_ACTION_START_VIDEO\x10\x04\x12\x1c\n\x18\x43\x41MERA_ACTION_STOP_VIDEO\x10\x05\x12&\n\"CAMERA_ACTION_START_PHOTO_DISTANCE\x10\x06\x12%\n!CAMERA_ACTION_STOP_PHOTO_DISTANCE\x10\x07\"E\n\x0bMissionPlan\x12\x36\n\rmission_items\x18\x01 \x03(\x0b\x32\x1f.mavsdk.rpc.mission.MissionItem\"1\n\x0fMissionProgress\x12\x0f\n\x07\x63urrent\x18\x01 \x01(\x05\x12\r\n\x05total\x18\x02 \x01(\x05\"\xaa\x03\n\rMissionResult\x12\x38\n\x06result\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.mission.MissionResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xca\x02\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x10\n\x0cRESULT_ERROR\x10\x02\x12!\n\x1dRESULT_TOO_MANY_MISSION_ITEMS\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x12\n\x0eRESULT_TIMEOUT\x10\x05\x12\x1b\n\x17RESULT_INVALID_ARGUMENT\x10\x06\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x07\x12\x1f\n\x1bRESULT_NO_MISSION_AVAILABLE\x10\x08\x12\"\n\x1eRESULT_UNSUPPORTED_MISSION_CMD\x10\x0b\x12\x1d\n\x19RESULT_TRANSFER_CANCELLED\x10\x0c\x12\x14\n\x10RESULT_NO_SYSTEM\x10\r\x12\x0f\n\x0bRESULT_NEXT\x10\x0e\")\n\x0cProgressData\x12\x19\n\x08progress\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\x9f\x01\n\x15ProgressDataOrMission\x12\x1f\n\x0chas_progress\x18\x01 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x19\n\x08progress\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x13\n\x0bhas_mission\x18\x03 \x01(\x08\x12\x35\n\x0cmission_plan\x18\x04 \x01(\x0b\x32\x1f.mavsdk.rpc.mission.MissionPlan2\xa5\x0e\n\x0eMissionService\x12\x66\n\rUploadMission\x12(.mavsdk.rpc.mission.UploadMissionRequest\x1a).mavsdk.rpc.mission.UploadMissionResponse\"\x00\x12\xa6\x01\n\"SubscribeUploadMissionWithProgress\x12=.mavsdk.rpc.mission.SubscribeUploadMissionWithProgressRequest\x1a\x35.mavsdk.rpc.mission.UploadMissionWithProgressResponse\"\x08\x80\xb5\x18\x00\x88\xb5\x18\x01\x30\x01\x12|\n\x13\x43\x61ncelMissionUpload\x12..mavsdk.rpc.mission.CancelMissionUploadRequest\x1a/.mavsdk.rpc.mission.CancelMissionUploadResponse\"\x04\x80\xb5\x18\x01\x12l\n\x0f\x44ownloadMission\x12*.mavsdk.rpc.mission.DownloadMissionRequest\x1a+.mavsdk.rpc.mission.DownloadMissionResponse\"\x00\x12\xac\x01\n$SubscribeDownloadMissionWithProgress\x12?.mavsdk.rpc.mission.SubscribeDownloadMissionWithProgressRequest\x1a\x37.mavsdk.rpc.mission.DownloadMissionWithProgressResponse\"\x08\x80\xb5\x18\x00\x88\xb5\x18\x01\x30\x01\x12\x82\x01\n\x15\x43\x61ncelMissionDownload\x12\x30.mavsdk.rpc.mission.CancelMissionDownloadRequest\x1a\x31.mavsdk.rpc.mission.CancelMissionDownloadResponse\"\x04\x80\xb5\x18\x01\x12\x63\n\x0cStartMission\x12\'.mavsdk.rpc.mission.StartMissionRequest\x1a(.mavsdk.rpc.mission.StartMissionResponse\"\x00\x12\x63\n\x0cPauseMission\x12\'.mavsdk.rpc.mission.PauseMissionRequest\x1a(.mavsdk.rpc.mission.PauseMissionResponse\"\x00\x12\x63\n\x0c\x43learMission\x12\'.mavsdk.rpc.mission.ClearMissionRequest\x1a(.mavsdk.rpc.mission.ClearMissionResponse\"\x00\x12~\n\x15SetCurrentMissionItem\x12\x30.mavsdk.rpc.mission.SetCurrentMissionItemRequest\x1a\x31.mavsdk.rpc.mission.SetCurrentMissionItemResponse\"\x00\x12v\n\x11IsMissionFinished\x12,.mavsdk.rpc.mission.IsMissionFinishedRequest\x1a-.mavsdk.rpc.mission.IsMissionFinishedResponse\"\x04\x80\xb5\x18\x01\x12\x80\x01\n\x18SubscribeMissionProgress\x12\x33.mavsdk.rpc.mission.SubscribeMissionProgressRequest\x1a+.mavsdk.rpc.mission.MissionProgressResponse\"\x00\x30\x01\x12\x9a\x01\n\x1dGetReturnToLaunchAfterMission\x12\x38.mavsdk.rpc.mission.GetReturnToLaunchAfterMissionRequest\x1a\x39.mavsdk.rpc.mission.GetReturnToLaunchAfterMissionResponse\"\x04\x80\xb5\x18\x01\x12\x9a\x01\n\x1dSetReturnToLaunchAfterMission\x12\x38.mavsdk.rpc.mission.SetReturnToLaunchAfterMissionRequest\x1a\x39.mavsdk.rpc.mission.SetReturnToLaunchAfterMissionResponse\"\x04\x80\xb5\x18\x01\x42!\n\x11io.mavsdk.missionB\x0cMissionProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15mission/mission.proto\x12\x12mavsdk.rpc.mission\x1a\x14mavsdk_options.proto\"M\n\x14UploadMissionRequest\x12\x35\n\x0cmission_plan\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.mission.MissionPlan\"R\n\x15UploadMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"b\n)SubscribeUploadMissionWithProgressRequest\x12\x35\n\x0cmission_plan\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.mission.MissionPlan\"\x97\x01\n!UploadMissionWithProgressResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\x12\x37\n\rprogress_data\x18\x02 \x01(\x0b\x32 .mavsdk.rpc.mission.ProgressData\"\x1c\n\x1a\x43\x61ncelMissionUploadRequest\"X\n\x1b\x43\x61ncelMissionUploadResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\x18\n\x16\x44ownloadMissionRequest\"\x8b\x01\n\x17\x44ownloadMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\x12\x35\n\x0cmission_plan\x18\x02 \x01(\x0b\x32\x1f.mavsdk.rpc.mission.MissionPlan\"-\n+SubscribeDownloadMissionWithProgressRequest\"\xa2\x01\n#DownloadMissionWithProgressResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\x12@\n\rprogress_data\x18\x02 \x01(\x0b\x32).mavsdk.rpc.mission.ProgressDataOrMission\"\x1e\n\x1c\x43\x61ncelMissionDownloadRequest\"Z\n\x1d\x43\x61ncelMissionDownloadResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\x15\n\x13StartMissionRequest\"Q\n\x14StartMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\x15\n\x13PauseMissionRequest\"Q\n\x14PauseMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\x15\n\x13\x43learMissionRequest\"Q\n\x14\x43learMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"-\n\x1cSetCurrentMissionItemRequest\x12\r\n\x05index\x18\x01 \x01(\x05\"Z\n\x1dSetCurrentMissionItemResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\x1a\n\x18IsMissionFinishedRequest\"k\n\x19IsMissionFinishedResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\x12\x13\n\x0bis_finished\x18\x02 \x01(\x08\"!\n\x1fSubscribeMissionProgressRequest\"X\n\x17MissionProgressResponse\x12=\n\x10mission_progress\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.mission.MissionProgress\"&\n$GetReturnToLaunchAfterMissionRequest\"r\n%GetReturnToLaunchAfterMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\x12\x0e\n\x06\x65nable\x18\x02 \x01(\x08\"6\n$SetReturnToLaunchAfterMissionRequest\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\"b\n%SetReturnToLaunchAfterMissionResponse\x12\x39\n\x0emission_result\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.mission.MissionResult\"\xad\x08\n\x0bMissionItem\x12(\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x12\x82\xb5\x18\x03NaN\x89\xb5\x18H\xaf\xbc\x9a\xf2\xd7z>\x12)\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x12\x82\xb5\x18\x03NaN\x89\xb5\x18H\xaf\xbc\x9a\xf2\xd7z>\x12$\n\x13relative_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tspeed_m_s\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12!\n\x0eis_fly_through\x18\x05 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12,\n\x10gimbal_pitch_deg\x18\x06 \x01(\x02\x42\x12\x82\xb5\x18\x03NaN\x89\xb5\x18-C\x1c\xeb\xe2\x36\x1a?\x12*\n\x0egimbal_yaw_deg\x18\x07 \x01(\x02\x42\x12\x82\xb5\x18\x03NaN\x89\xb5\x18-C\x1c\xeb\xe2\x36\x1a?\x12\x43\n\rcamera_action\x18\x08 \x01(\x0e\x32,.mavsdk.rpc.mission.MissionItem.CameraAction\x12\x1e\n\rloiter_time_s\x18\t \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12(\n\x17\x63\x61mera_photo_interval_s\x18\n \x01(\x01\x42\x07\x82\xb5\x18\x03\x31.0\x12$\n\x13\x61\x63\x63\x65ptance_radius_m\x18\x0b \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x18\n\x07yaw_deg\x18\x0c \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12(\n\x17\x63\x61mera_photo_distance_m\x18\r \x01(\x02\x42\x07\x82\xb5\x18\x03NAN\x12\x45\n\x0evehicle_action\x18\x0e \x01(\x0e\x32-.mavsdk.rpc.mission.MissionItem.VehicleAction\"\x9f\x02\n\x0c\x43\x61meraAction\x12\x16\n\x12\x43\x41MERA_ACTION_NONE\x10\x00\x12\x1c\n\x18\x43\x41MERA_ACTION_TAKE_PHOTO\x10\x01\x12&\n\"CAMERA_ACTION_START_PHOTO_INTERVAL\x10\x02\x12%\n!CAMERA_ACTION_STOP_PHOTO_INTERVAL\x10\x03\x12\x1d\n\x19\x43\x41MERA_ACTION_START_VIDEO\x10\x04\x12\x1c\n\x18\x43\x41MERA_ACTION_STOP_VIDEO\x10\x05\x12&\n\"CAMERA_ACTION_START_PHOTO_DISTANCE\x10\x06\x12%\n!CAMERA_ACTION_STOP_PHOTO_DISTANCE\x10\x07\"\xa7\x01\n\rVehicleAction\x12\x17\n\x13VEHICLE_ACTION_NONE\x10\x00\x12\x1a\n\x16VEHICLE_ACTION_TAKEOFF\x10\x01\x12\x17\n\x13VEHICLE_ACTION_LAND\x10\x02\x12#\n\x1fVEHICLE_ACTION_TRANSITION_TO_FW\x10\x03\x12#\n\x1fVEHICLE_ACTION_TRANSITION_TO_MC\x10\x04\"E\n\x0bMissionPlan\x12\x36\n\rmission_items\x18\x01 \x03(\x0b\x32\x1f.mavsdk.rpc.mission.MissionItem\"1\n\x0fMissionProgress\x12\x0f\n\x07\x63urrent\x18\x01 \x01(\x05\x12\r\n\x05total\x18\x02 \x01(\x05\"\xff\x03\n\rMissionResult\x12\x38\n\x06result\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.mission.MissionResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\x9f\x03\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x10\n\x0cRESULT_ERROR\x10\x02\x12!\n\x1dRESULT_TOO_MANY_MISSION_ITEMS\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x12\n\x0eRESULT_TIMEOUT\x10\x05\x12\x1b\n\x17RESULT_INVALID_ARGUMENT\x10\x06\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x07\x12\x1f\n\x1bRESULT_NO_MISSION_AVAILABLE\x10\x08\x12\"\n\x1eRESULT_UNSUPPORTED_MISSION_CMD\x10\x0b\x12\x1d\n\x19RESULT_TRANSFER_CANCELLED\x10\x0c\x12\x14\n\x10RESULT_NO_SYSTEM\x10\r\x12\x0f\n\x0bRESULT_NEXT\x10\x0e\x12\x11\n\rRESULT_DENIED\x10\x0f\x12\x19\n\x15RESULT_PROTOCOL_ERROR\x10\x10\x12%\n!RESULT_INT_MESSAGES_NOT_SUPPORTED\x10\x11\")\n\x0cProgressData\x12\x19\n\x08progress\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\x9f\x01\n\x15ProgressDataOrMission\x12\x1f\n\x0chas_progress\x18\x01 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x19\n\x08progress\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x13\n\x0bhas_mission\x18\x03 \x01(\x08\x12\x35\n\x0cmission_plan\x18\x04 \x01(\x0b\x32\x1f.mavsdk.rpc.mission.MissionPlan2\xa5\x0e\n\x0eMissionService\x12\x66\n\rUploadMission\x12(.mavsdk.rpc.mission.UploadMissionRequest\x1a).mavsdk.rpc.mission.UploadMissionResponse\"\x00\x12\xa6\x01\n\"SubscribeUploadMissionWithProgress\x12=.mavsdk.rpc.mission.SubscribeUploadMissionWithProgressRequest\x1a\x35.mavsdk.rpc.mission.UploadMissionWithProgressResponse\"\x08\x80\xb5\x18\x00\x88\xb5\x18\x01\x30\x01\x12|\n\x13\x43\x61ncelMissionUpload\x12..mavsdk.rpc.mission.CancelMissionUploadRequest\x1a/.mavsdk.rpc.mission.CancelMissionUploadResponse\"\x04\x80\xb5\x18\x01\x12l\n\x0f\x44ownloadMission\x12*.mavsdk.rpc.mission.DownloadMissionRequest\x1a+.mavsdk.rpc.mission.DownloadMissionResponse\"\x00\x12\xac\x01\n$SubscribeDownloadMissionWithProgress\x12?.mavsdk.rpc.mission.SubscribeDownloadMissionWithProgressRequest\x1a\x37.mavsdk.rpc.mission.DownloadMissionWithProgressResponse\"\x08\x80\xb5\x18\x00\x88\xb5\x18\x01\x30\x01\x12\x82\x01\n\x15\x43\x61ncelMissionDownload\x12\x30.mavsdk.rpc.mission.CancelMissionDownloadRequest\x1a\x31.mavsdk.rpc.mission.CancelMissionDownloadResponse\"\x04\x80\xb5\x18\x01\x12\x63\n\x0cStartMission\x12\'.mavsdk.rpc.mission.StartMissionRequest\x1a(.mavsdk.rpc.mission.StartMissionResponse\"\x00\x12\x63\n\x0cPauseMission\x12\'.mavsdk.rpc.mission.PauseMissionRequest\x1a(.mavsdk.rpc.mission.PauseMissionResponse\"\x00\x12\x63\n\x0c\x43learMission\x12\'.mavsdk.rpc.mission.ClearMissionRequest\x1a(.mavsdk.rpc.mission.ClearMissionResponse\"\x00\x12~\n\x15SetCurrentMissionItem\x12\x30.mavsdk.rpc.mission.SetCurrentMissionItemRequest\x1a\x31.mavsdk.rpc.mission.SetCurrentMissionItemResponse\"\x00\x12v\n\x11IsMissionFinished\x12,.mavsdk.rpc.mission.IsMissionFinishedRequest\x1a-.mavsdk.rpc.mission.IsMissionFinishedResponse\"\x04\x80\xb5\x18\x01\x12\x80\x01\n\x18SubscribeMissionProgress\x12\x33.mavsdk.rpc.mission.SubscribeMissionProgressRequest\x1a+.mavsdk.rpc.mission.MissionProgressResponse\"\x00\x30\x01\x12\x9a\x01\n\x1dGetReturnToLaunchAfterMission\x12\x38.mavsdk.rpc.mission.GetReturnToLaunchAfterMissionRequest\x1a\x39.mavsdk.rpc.mission.GetReturnToLaunchAfterMissionResponse\"\x04\x80\xb5\x18\x01\x12\x9a\x01\n\x1dSetReturnToLaunchAfterMission\x12\x38.mavsdk.rpc.mission.SetReturnToLaunchAfterMissionRequest\x1a\x39.mavsdk.rpc.mission.SetReturnToLaunchAfterMissionResponse\"\x04\x80\xb5\x18\x01\x42!\n\x11io.mavsdk.missionB\x0cMissionProtob\x06proto3') @@ -54,6 +54,7 @@ _PROGRESSDATA = DESCRIPTOR.message_types_by_name['ProgressData'] _PROGRESSDATAORMISSION = DESCRIPTOR.message_types_by_name['ProgressDataOrMission'] _MISSIONITEM_CAMERAACTION = _MISSIONITEM.enum_types_by_name['CameraAction'] +_MISSIONITEM_VEHICLEACTION = _MISSIONITEM.enum_types_by_name['VehicleAction'] _MISSIONRESULT_RESULT = _MISSIONRESULT.enum_types_by_name['Result'] UploadMissionRequest = _reflection.GeneratedProtocolMessageType('UploadMissionRequest', (_message.Message,), { 'DESCRIPTOR' : _UPLOADMISSIONREQUEST, @@ -399,21 +400,23 @@ _SETRETURNTOLAUNCHAFTERMISSIONRESPONSE._serialized_start=2039 _SETRETURNTOLAUNCHAFTERMISSIONRESPONSE._serialized_end=2137 _MISSIONITEM._serialized_start=2140 - _MISSIONITEM._serialized_end=2968 - _MISSIONITEM_CAMERAACTION._serialized_start=2681 - _MISSIONITEM_CAMERAACTION._serialized_end=2968 - _MISSIONPLAN._serialized_start=2970 - _MISSIONPLAN._serialized_end=3039 - _MISSIONPROGRESS._serialized_start=3041 - _MISSIONPROGRESS._serialized_end=3090 - _MISSIONRESULT._serialized_start=3093 - _MISSIONRESULT._serialized_end=3519 - _MISSIONRESULT_RESULT._serialized_start=3189 - _MISSIONRESULT_RESULT._serialized_end=3519 - _PROGRESSDATA._serialized_start=3521 - _PROGRESSDATA._serialized_end=3562 - _PROGRESSDATAORMISSION._serialized_start=3565 - _PROGRESSDATAORMISSION._serialized_end=3724 - _MISSIONSERVICE._serialized_start=3727 - _MISSIONSERVICE._serialized_end=5556 + _MISSIONITEM._serialized_end=3209 + _MISSIONITEM_CAMERAACTION._serialized_start=2752 + _MISSIONITEM_CAMERAACTION._serialized_end=3039 + _MISSIONITEM_VEHICLEACTION._serialized_start=3042 + _MISSIONITEM_VEHICLEACTION._serialized_end=3209 + _MISSIONPLAN._serialized_start=3211 + _MISSIONPLAN._serialized_end=3280 + _MISSIONPROGRESS._serialized_start=3282 + _MISSIONPROGRESS._serialized_end=3331 + _MISSIONRESULT._serialized_start=3334 + _MISSIONRESULT._serialized_end=3845 + _MISSIONRESULT_RESULT._serialized_start=3430 + _MISSIONRESULT_RESULT._serialized_end=3845 + _PROGRESSDATA._serialized_start=3847 + _PROGRESSDATA._serialized_end=3888 + _PROGRESSDATAORMISSION._serialized_start=3891 + _PROGRESSDATAORMISSION._serialized_end=4050 + _MISSIONSERVICE._serialized_start=4053 + _MISSIONSERVICE._serialized_end=5882 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/mission_raw.py b/mavsdk/mission_raw.py index f5e60c46..399c683b 100644 --- a/mavsdk/mission_raw.py +++ b/mavsdk/mission_raw.py @@ -502,6 +502,24 @@ class Result(Enum): NO_SYSTEM No system connected + DENIED + Request denied + + MISSION_TYPE_NOT_CONSISTENT + Mission type is not consistent + + INVALID_SEQUENCE + The mission item sequences are not increasing correctly + + CURRENT_INVALID + The current item is not set correctly + + PROTOCOL_ERROR + There was a protocol error + + INT_MESSAGES_NOT_SUPPORTED + The system does not support the MISSION_INT protocol + """ @@ -518,6 +536,12 @@ class Result(Enum): FAILED_TO_OPEN_QGC_PLAN = 10 FAILED_TO_PARSE_QGC_PLAN = 11 NO_SYSTEM = 12 + DENIED = 13 + MISSION_TYPE_NOT_CONSISTENT = 14 + INVALID_SEQUENCE = 15 + CURRENT_INVALID = 16 + PROTOCOL_ERROR = 17 + INT_MESSAGES_NOT_SUPPORTED = 18 def translate_to_rpc(self): if self == MissionRawResult.Result.UNKNOWN: @@ -546,6 +570,18 @@ def translate_to_rpc(self): return mission_raw_pb2.MissionRawResult.RESULT_FAILED_TO_PARSE_QGC_PLAN if self == MissionRawResult.Result.NO_SYSTEM: return mission_raw_pb2.MissionRawResult.RESULT_NO_SYSTEM + if self == MissionRawResult.Result.DENIED: + return mission_raw_pb2.MissionRawResult.RESULT_DENIED + if self == MissionRawResult.Result.MISSION_TYPE_NOT_CONSISTENT: + return mission_raw_pb2.MissionRawResult.RESULT_MISSION_TYPE_NOT_CONSISTENT + if self == MissionRawResult.Result.INVALID_SEQUENCE: + return mission_raw_pb2.MissionRawResult.RESULT_INVALID_SEQUENCE + if self == MissionRawResult.Result.CURRENT_INVALID: + return mission_raw_pb2.MissionRawResult.RESULT_CURRENT_INVALID + if self == MissionRawResult.Result.PROTOCOL_ERROR: + return mission_raw_pb2.MissionRawResult.RESULT_PROTOCOL_ERROR + if self == MissionRawResult.Result.INT_MESSAGES_NOT_SUPPORTED: + return mission_raw_pb2.MissionRawResult.RESULT_INT_MESSAGES_NOT_SUPPORTED @staticmethod def translate_from_rpc(rpc_enum_value): @@ -576,6 +612,18 @@ def translate_from_rpc(rpc_enum_value): return MissionRawResult.Result.FAILED_TO_PARSE_QGC_PLAN if rpc_enum_value == mission_raw_pb2.MissionRawResult.RESULT_NO_SYSTEM: return MissionRawResult.Result.NO_SYSTEM + if rpc_enum_value == mission_raw_pb2.MissionRawResult.RESULT_DENIED: + return MissionRawResult.Result.DENIED + if rpc_enum_value == mission_raw_pb2.MissionRawResult.RESULT_MISSION_TYPE_NOT_CONSISTENT: + return MissionRawResult.Result.MISSION_TYPE_NOT_CONSISTENT + if rpc_enum_value == mission_raw_pb2.MissionRawResult.RESULT_INVALID_SEQUENCE: + return MissionRawResult.Result.INVALID_SEQUENCE + if rpc_enum_value == mission_raw_pb2.MissionRawResult.RESULT_CURRENT_INVALID: + return MissionRawResult.Result.CURRENT_INVALID + if rpc_enum_value == mission_raw_pb2.MissionRawResult.RESULT_PROTOCOL_ERROR: + return MissionRawResult.Result.PROTOCOL_ERROR + if rpc_enum_value == mission_raw_pb2.MissionRawResult.RESULT_INT_MESSAGES_NOT_SUPPORTED: + return MissionRawResult.Result.INT_MESSAGES_NOT_SUPPORTED def __str__(self): return self.name @@ -711,6 +759,78 @@ async def upload_mission(self, mission_items): raise MissionRawError(result, "upload_mission()", mission_items) + async def upload_geofence(self, mission_items): + """ + Upload a list of geofence items to the system. + + Parameters + ---------- + mission_items : [MissionItem] + The mission items + + Raises + ------ + MissionRawError + If the request fails. The error contains the reason for the failure. + """ + + request = mission_raw_pb2.UploadGeofenceRequest() + + rpc_elems_list = [] + for elem in mission_items: + + rpc_elem = mission_raw_pb2.MissionItem() + elem.translate_to_rpc(rpc_elem) + rpc_elems_list.append(rpc_elem) + + request.mission_items.extend(rpc_elems_list) + + + response = await self._stub.UploadGeofence(request) + + + result = self._extract_result(response) + + if result.result != MissionRawResult.Result.SUCCESS: + raise MissionRawError(result, "upload_geofence()", mission_items) + + + async def upload_rally_points(self, mission_items): + """ + Upload a list of rally point items to the system. + + Parameters + ---------- + mission_items : [MissionItem] + The mission items + + Raises + ------ + MissionRawError + If the request fails. The error contains the reason for the failure. + """ + + request = mission_raw_pb2.UploadRallyPointsRequest() + + rpc_elems_list = [] + for elem in mission_items: + + rpc_elem = mission_raw_pb2.MissionItem() + elem.translate_to_rpc(rpc_elem) + rpc_elems_list.append(rpc_elem) + + request.mission_items.extend(rpc_elems_list) + + + response = await self._stub.UploadRallyPoints(request) + + + result = self._extract_result(response) + + if result.result != MissionRawResult.Result.SUCCESS: + raise MissionRawError(result, "upload_rally_points()", mission_items) + + async def cancel_mission_upload(self): """ Cancel an ongoing mission upload. @@ -935,7 +1055,7 @@ async def mission_changed(self): async def import_qgroundcontrol_mission(self, qgc_plan_path): """ - Import a QGroundControl missions in JSON .plan format. + Import a QGroundControl missions in JSON .plan format, from a file. Supported: - Waypoints @@ -974,4 +1094,47 @@ async def import_qgroundcontrol_mission(self, qgc_plan_path): return MissionImportData.translate_from_rpc(response.mission_import_data) + + + async def import_qgroundcontrol_mission_from_string(self, qgc_plan): + """ + Import a QGroundControl missions in JSON .plan format, from a string. + + Supported: + - Waypoints + - Survey + Not supported: + - Structure Scan + + Parameters + ---------- + qgc_plan : std::string + QGC plan as string + + Returns + ------- + mission_import_data : MissionImportData + The imported mission data + + Raises + ------ + MissionRawError + If the request fails. The error contains the reason for the failure. + """ + + request = mission_raw_pb2.ImportQgroundcontrolMissionFromStringRequest() + + + request.qgc_plan = qgc_plan + + response = await self._stub.ImportQgroundcontrolMissionFromString(request) + + + result = self._extract_result(response) + + if result.result != MissionRawResult.Result.SUCCESS: + raise MissionRawError(result, "import_qgroundcontrol_mission_from_string()", qgc_plan) + + + return MissionImportData.translate_from_rpc(response.mission_import_data) \ No newline at end of file diff --git a/mavsdk/mission_raw_pb2.py b/mavsdk/mission_raw_pb2.py index 4490a0b9..3f345dd2 100644 --- a/mavsdk/mission_raw_pb2.py +++ b/mavsdk/mission_raw_pb2.py @@ -15,12 +15,16 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dmission_raw/mission_raw.proto\x12\x16mavsdk.rpc.mission_raw\x1a\x14mavsdk_options.proto\"R\n\x14UploadMissionRequest\x12:\n\rmission_items\x18\x01 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\"]\n\x15UploadMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"\x1c\n\x1a\x43\x61ncelMissionUploadRequest\"c\n\x1b\x43\x61ncelMissionUploadResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"\x18\n\x16\x44ownloadMissionRequest\"\x9b\x01\n\x17\x44ownloadMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\x12:\n\rmission_items\x18\x02 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\"\x1e\n\x1c\x43\x61ncelMissionDownloadRequest\"e\n\x1d\x43\x61ncelMissionDownloadResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"\x15\n\x13StartMissionRequest\"\\\n\x14StartMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"\x15\n\x13PauseMissionRequest\"\\\n\x14PauseMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"\x15\n\x13\x43learMissionRequest\"\\\n\x14\x43learMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"-\n\x1cSetCurrentMissionItemRequest\x12\r\n\x05index\x18\x01 \x01(\x05\"e\n\x1dSetCurrentMissionItemResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"!\n\x1fSubscribeMissionProgressRequest\"\\\n\x17MissionProgressResponse\x12\x41\n\x10mission_progress\x18\x01 \x01(\x0b\x32\'.mavsdk.rpc.mission_raw.MissionProgress\" \n\x1eSubscribeMissionChangedRequest\"1\n\x16MissionChangedResponse\x12\x17\n\x0fmission_changed\x18\x01 \x01(\x08\";\n\"ImportQgroundcontrolMissionRequest\x12\x15\n\rqgc_plan_path\x18\x01 \x01(\t\"\xb3\x01\n#ImportQgroundcontrolMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\x12\x46\n\x13mission_import_data\x18\x02 \x01(\x0b\x32).mavsdk.rpc.mission_raw.MissionImportData\"1\n\x0fMissionProgress\x12\x0f\n\x07\x63urrent\x18\x01 \x01(\x05\x12\r\n\x05total\x18\x02 \x01(\x05\"\xd8\x01\n\x0bMissionItem\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\r\n\x05\x66rame\x18\x02 \x01(\r\x12\x0f\n\x07\x63ommand\x18\x03 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x04 \x01(\r\x12\x14\n\x0c\x61utocontinue\x18\x05 \x01(\r\x12\x0e\n\x06param1\x18\x06 \x01(\x02\x12\x0e\n\x06param2\x18\x07 \x01(\x02\x12\x0e\n\x06param3\x18\x08 \x01(\x02\x12\x0e\n\x06param4\x18\t \x01(\x02\x12\t\n\x01x\x18\n \x01(\x05\x12\t\n\x01y\x18\x0b \x01(\x05\x12\t\n\x01z\x18\x0c \x01(\x02\x12\x14\n\x0cmission_type\x18\r \x01(\r\"\xc6\x01\n\x11MissionImportData\x12:\n\rmission_items\x18\x01 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\x12;\n\x0egeofence_items\x18\x02 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\x12\x38\n\x0brally_items\x18\x03 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\"\xc8\x03\n\x10MissionRawResult\x12?\n\x06result\x18\x01 \x01(\x0e\x32/.mavsdk.rpc.mission_raw.MissionRawResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xde\x02\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x10\n\x0cRESULT_ERROR\x10\x02\x12!\n\x1dRESULT_TOO_MANY_MISSION_ITEMS\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x12\n\x0eRESULT_TIMEOUT\x10\x05\x12\x1b\n\x17RESULT_INVALID_ARGUMENT\x10\x06\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x07\x12\x1f\n\x1bRESULT_NO_MISSION_AVAILABLE\x10\x08\x12\x1d\n\x19RESULT_TRANSFER_CANCELLED\x10\t\x12\"\n\x1eRESULT_FAILED_TO_OPEN_QGC_PLAN\x10\n\x12#\n\x1fRESULT_FAILED_TO_PARSE_QGC_PLAN\x10\x0b\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x0c\x32\x93\x0b\n\x11MissionRawService\x12n\n\rUploadMission\x12,.mavsdk.rpc.mission_raw.UploadMissionRequest\x1a-.mavsdk.rpc.mission_raw.UploadMissionResponse\"\x00\x12\x84\x01\n\x13\x43\x61ncelMissionUpload\x12\x32.mavsdk.rpc.mission_raw.CancelMissionUploadRequest\x1a\x33.mavsdk.rpc.mission_raw.CancelMissionUploadResponse\"\x04\x80\xb5\x18\x01\x12t\n\x0f\x44ownloadMission\x12..mavsdk.rpc.mission_raw.DownloadMissionRequest\x1a/.mavsdk.rpc.mission_raw.DownloadMissionResponse\"\x00\x12\x8a\x01\n\x15\x43\x61ncelMissionDownload\x12\x34.mavsdk.rpc.mission_raw.CancelMissionDownloadRequest\x1a\x35.mavsdk.rpc.mission_raw.CancelMissionDownloadResponse\"\x04\x80\xb5\x18\x01\x12k\n\x0cStartMission\x12+.mavsdk.rpc.mission_raw.StartMissionRequest\x1a,.mavsdk.rpc.mission_raw.StartMissionResponse\"\x00\x12k\n\x0cPauseMission\x12+.mavsdk.rpc.mission_raw.PauseMissionRequest\x1a,.mavsdk.rpc.mission_raw.PauseMissionResponse\"\x00\x12k\n\x0c\x43learMission\x12+.mavsdk.rpc.mission_raw.ClearMissionRequest\x1a,.mavsdk.rpc.mission_raw.ClearMissionResponse\"\x00\x12\x86\x01\n\x15SetCurrentMissionItem\x12\x34.mavsdk.rpc.mission_raw.SetCurrentMissionItemRequest\x1a\x35.mavsdk.rpc.mission_raw.SetCurrentMissionItemResponse\"\x00\x12\x88\x01\n\x18SubscribeMissionProgress\x12\x37.mavsdk.rpc.mission_raw.SubscribeMissionProgressRequest\x1a/.mavsdk.rpc.mission_raw.MissionProgressResponse\"\x00\x30\x01\x12\x89\x01\n\x17SubscribeMissionChanged\x12\x36.mavsdk.rpc.mission_raw.SubscribeMissionChangedRequest\x1a..mavsdk.rpc.mission_raw.MissionChangedResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x9c\x01\n\x1bImportQgroundcontrolMission\x12:.mavsdk.rpc.mission_raw.ImportQgroundcontrolMissionRequest\x1a;.mavsdk.rpc.mission_raw.ImportQgroundcontrolMissionResponse\"\x04\x80\xb5\x18\x01\x42(\n\x15io.mavsdk.mission_rawB\x0fMissionRawProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dmission_raw/mission_raw.proto\x12\x16mavsdk.rpc.mission_raw\x1a\x14mavsdk_options.proto\"R\n\x14UploadMissionRequest\x12:\n\rmission_items\x18\x01 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\"]\n\x15UploadMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"S\n\x15UploadGeofenceRequest\x12:\n\rmission_items\x18\x01 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\"^\n\x16UploadGeofenceResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"V\n\x18UploadRallyPointsRequest\x12:\n\rmission_items\x18\x01 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\"a\n\x19UploadRallyPointsResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"\x1c\n\x1a\x43\x61ncelMissionUploadRequest\"c\n\x1b\x43\x61ncelMissionUploadResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"\x18\n\x16\x44ownloadMissionRequest\"\x9b\x01\n\x17\x44ownloadMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\x12:\n\rmission_items\x18\x02 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\"\x1e\n\x1c\x43\x61ncelMissionDownloadRequest\"e\n\x1d\x43\x61ncelMissionDownloadResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"\x15\n\x13StartMissionRequest\"\\\n\x14StartMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"\x15\n\x13PauseMissionRequest\"\\\n\x14PauseMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"\x15\n\x13\x43learMissionRequest\"\\\n\x14\x43learMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"-\n\x1cSetCurrentMissionItemRequest\x12\r\n\x05index\x18\x01 \x01(\x05\"e\n\x1dSetCurrentMissionItemResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\"!\n\x1fSubscribeMissionProgressRequest\"\\\n\x17MissionProgressResponse\x12\x41\n\x10mission_progress\x18\x01 \x01(\x0b\x32\'.mavsdk.rpc.mission_raw.MissionProgress\" \n\x1eSubscribeMissionChangedRequest\"1\n\x16MissionChangedResponse\x12\x17\n\x0fmission_changed\x18\x01 \x01(\x08\";\n\"ImportQgroundcontrolMissionRequest\x12\x15\n\rqgc_plan_path\x18\x01 \x01(\t\"\xb3\x01\n#ImportQgroundcontrolMissionResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\x12\x46\n\x13mission_import_data\x18\x02 \x01(\x0b\x32).mavsdk.rpc.mission_raw.MissionImportData\"@\n,ImportQgroundcontrolMissionFromStringRequest\x12\x10\n\x08qgc_plan\x18\x01 \x01(\t\"\xbd\x01\n-ImportQgroundcontrolMissionFromStringResponse\x12\x44\n\x12mission_raw_result\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.mission_raw.MissionRawResult\x12\x46\n\x13mission_import_data\x18\x02 \x01(\x0b\x32).mavsdk.rpc.mission_raw.MissionImportData\"1\n\x0fMissionProgress\x12\x0f\n\x07\x63urrent\x18\x01 \x01(\x05\x12\r\n\x05total\x18\x02 \x01(\x05\"\xd8\x01\n\x0bMissionItem\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\r\n\x05\x66rame\x18\x02 \x01(\r\x12\x0f\n\x07\x63ommand\x18\x03 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x04 \x01(\r\x12\x14\n\x0c\x61utocontinue\x18\x05 \x01(\r\x12\x0e\n\x06param1\x18\x06 \x01(\x02\x12\x0e\n\x06param2\x18\x07 \x01(\x02\x12\x0e\n\x06param3\x18\x08 \x01(\x02\x12\x0e\n\x06param4\x18\t \x01(\x02\x12\t\n\x01x\x18\n \x01(\x05\x12\t\n\x01y\x18\x0b \x01(\x05\x12\t\n\x01z\x18\x0c \x01(\x02\x12\x14\n\x0cmission_type\x18\r \x01(\r\"\xc6\x01\n\x11MissionImportData\x12:\n\rmission_items\x18\x01 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\x12;\n\x0egeofence_items\x18\x02 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\x12\x38\n\x0brally_items\x18\x03 \x03(\x0b\x32#.mavsdk.rpc.mission_raw.MissionItem\"\xfe\x04\n\x10MissionRawResult\x12?\n\x06result\x18\x01 \x01(\x0e\x32/.mavsdk.rpc.mission_raw.MissionRawResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\x94\x04\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x10\n\x0cRESULT_ERROR\x10\x02\x12!\n\x1dRESULT_TOO_MANY_MISSION_ITEMS\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x12\n\x0eRESULT_TIMEOUT\x10\x05\x12\x1b\n\x17RESULT_INVALID_ARGUMENT\x10\x06\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x07\x12\x1f\n\x1bRESULT_NO_MISSION_AVAILABLE\x10\x08\x12\x1d\n\x19RESULT_TRANSFER_CANCELLED\x10\t\x12\"\n\x1eRESULT_FAILED_TO_OPEN_QGC_PLAN\x10\n\x12#\n\x1fRESULT_FAILED_TO_PARSE_QGC_PLAN\x10\x0b\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x0c\x12\x11\n\rRESULT_DENIED\x10\r\x12&\n\"RESULT_MISSION_TYPE_NOT_CONSISTENT\x10\x0e\x12\x1b\n\x17RESULT_INVALID_SEQUENCE\x10\x0f\x12\x1a\n\x16RESULT_CURRENT_INVALID\x10\x10\x12\x19\n\x15RESULT_PROTOCOL_ERROR\x10\x11\x12%\n!RESULT_INT_MESSAGES_NOT_SUPPORTED\x10\x12\x32\xbf\x0e\n\x11MissionRawService\x12n\n\rUploadMission\x12,.mavsdk.rpc.mission_raw.UploadMissionRequest\x1a-.mavsdk.rpc.mission_raw.UploadMissionResponse\"\x00\x12q\n\x0eUploadGeofence\x12-.mavsdk.rpc.mission_raw.UploadGeofenceRequest\x1a..mavsdk.rpc.mission_raw.UploadGeofenceResponse\"\x00\x12z\n\x11UploadRallyPoints\x12\x30.mavsdk.rpc.mission_raw.UploadRallyPointsRequest\x1a\x31.mavsdk.rpc.mission_raw.UploadRallyPointsResponse\"\x00\x12\x84\x01\n\x13\x43\x61ncelMissionUpload\x12\x32.mavsdk.rpc.mission_raw.CancelMissionUploadRequest\x1a\x33.mavsdk.rpc.mission_raw.CancelMissionUploadResponse\"\x04\x80\xb5\x18\x01\x12t\n\x0f\x44ownloadMission\x12..mavsdk.rpc.mission_raw.DownloadMissionRequest\x1a/.mavsdk.rpc.mission_raw.DownloadMissionResponse\"\x00\x12\x8a\x01\n\x15\x43\x61ncelMissionDownload\x12\x34.mavsdk.rpc.mission_raw.CancelMissionDownloadRequest\x1a\x35.mavsdk.rpc.mission_raw.CancelMissionDownloadResponse\"\x04\x80\xb5\x18\x01\x12k\n\x0cStartMission\x12+.mavsdk.rpc.mission_raw.StartMissionRequest\x1a,.mavsdk.rpc.mission_raw.StartMissionResponse\"\x00\x12k\n\x0cPauseMission\x12+.mavsdk.rpc.mission_raw.PauseMissionRequest\x1a,.mavsdk.rpc.mission_raw.PauseMissionResponse\"\x00\x12k\n\x0c\x43learMission\x12+.mavsdk.rpc.mission_raw.ClearMissionRequest\x1a,.mavsdk.rpc.mission_raw.ClearMissionResponse\"\x00\x12\x86\x01\n\x15SetCurrentMissionItem\x12\x34.mavsdk.rpc.mission_raw.SetCurrentMissionItemRequest\x1a\x35.mavsdk.rpc.mission_raw.SetCurrentMissionItemResponse\"\x00\x12\x88\x01\n\x18SubscribeMissionProgress\x12\x37.mavsdk.rpc.mission_raw.SubscribeMissionProgressRequest\x1a/.mavsdk.rpc.mission_raw.MissionProgressResponse\"\x00\x30\x01\x12\x89\x01\n\x17SubscribeMissionChanged\x12\x36.mavsdk.rpc.mission_raw.SubscribeMissionChangedRequest\x1a..mavsdk.rpc.mission_raw.MissionChangedResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x9c\x01\n\x1bImportQgroundcontrolMission\x12:.mavsdk.rpc.mission_raw.ImportQgroundcontrolMissionRequest\x1a;.mavsdk.rpc.mission_raw.ImportQgroundcontrolMissionResponse\"\x04\x80\xb5\x18\x01\x12\xba\x01\n%ImportQgroundcontrolMissionFromString\x12\x44.mavsdk.rpc.mission_raw.ImportQgroundcontrolMissionFromStringRequest\x1a\x45.mavsdk.rpc.mission_raw.ImportQgroundcontrolMissionFromStringResponse\"\x04\x80\xb5\x18\x01\x42(\n\x15io.mavsdk.mission_rawB\x0fMissionRawProtob\x06proto3') _UPLOADMISSIONREQUEST = DESCRIPTOR.message_types_by_name['UploadMissionRequest'] _UPLOADMISSIONRESPONSE = DESCRIPTOR.message_types_by_name['UploadMissionResponse'] +_UPLOADGEOFENCEREQUEST = DESCRIPTOR.message_types_by_name['UploadGeofenceRequest'] +_UPLOADGEOFENCERESPONSE = DESCRIPTOR.message_types_by_name['UploadGeofenceResponse'] +_UPLOADRALLYPOINTSREQUEST = DESCRIPTOR.message_types_by_name['UploadRallyPointsRequest'] +_UPLOADRALLYPOINTSRESPONSE = DESCRIPTOR.message_types_by_name['UploadRallyPointsResponse'] _CANCELMISSIONUPLOADREQUEST = DESCRIPTOR.message_types_by_name['CancelMissionUploadRequest'] _CANCELMISSIONUPLOADRESPONSE = DESCRIPTOR.message_types_by_name['CancelMissionUploadResponse'] _DOWNLOADMISSIONREQUEST = DESCRIPTOR.message_types_by_name['DownloadMissionRequest'] @@ -41,6 +45,8 @@ _MISSIONCHANGEDRESPONSE = DESCRIPTOR.message_types_by_name['MissionChangedResponse'] _IMPORTQGROUNDCONTROLMISSIONREQUEST = DESCRIPTOR.message_types_by_name['ImportQgroundcontrolMissionRequest'] _IMPORTQGROUNDCONTROLMISSIONRESPONSE = DESCRIPTOR.message_types_by_name['ImportQgroundcontrolMissionResponse'] +_IMPORTQGROUNDCONTROLMISSIONFROMSTRINGREQUEST = DESCRIPTOR.message_types_by_name['ImportQgroundcontrolMissionFromStringRequest'] +_IMPORTQGROUNDCONTROLMISSIONFROMSTRINGRESPONSE = DESCRIPTOR.message_types_by_name['ImportQgroundcontrolMissionFromStringResponse'] _MISSIONPROGRESS = DESCRIPTOR.message_types_by_name['MissionProgress'] _MISSIONITEM = DESCRIPTOR.message_types_by_name['MissionItem'] _MISSIONIMPORTDATA = DESCRIPTOR.message_types_by_name['MissionImportData'] @@ -60,6 +66,34 @@ }) _sym_db.RegisterMessage(UploadMissionResponse) +UploadGeofenceRequest = _reflection.GeneratedProtocolMessageType('UploadGeofenceRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPLOADGEOFENCEREQUEST, + '__module__' : 'mission_raw.mission_raw_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.mission_raw.UploadGeofenceRequest) + }) +_sym_db.RegisterMessage(UploadGeofenceRequest) + +UploadGeofenceResponse = _reflection.GeneratedProtocolMessageType('UploadGeofenceResponse', (_message.Message,), { + 'DESCRIPTOR' : _UPLOADGEOFENCERESPONSE, + '__module__' : 'mission_raw.mission_raw_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.mission_raw.UploadGeofenceResponse) + }) +_sym_db.RegisterMessage(UploadGeofenceResponse) + +UploadRallyPointsRequest = _reflection.GeneratedProtocolMessageType('UploadRallyPointsRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPLOADRALLYPOINTSREQUEST, + '__module__' : 'mission_raw.mission_raw_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.mission_raw.UploadRallyPointsRequest) + }) +_sym_db.RegisterMessage(UploadRallyPointsRequest) + +UploadRallyPointsResponse = _reflection.GeneratedProtocolMessageType('UploadRallyPointsResponse', (_message.Message,), { + 'DESCRIPTOR' : _UPLOADRALLYPOINTSRESPONSE, + '__module__' : 'mission_raw.mission_raw_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.mission_raw.UploadRallyPointsResponse) + }) +_sym_db.RegisterMessage(UploadRallyPointsResponse) + CancelMissionUploadRequest = _reflection.GeneratedProtocolMessageType('CancelMissionUploadRequest', (_message.Message,), { 'DESCRIPTOR' : _CANCELMISSIONUPLOADREQUEST, '__module__' : 'mission_raw.mission_raw_pb2' @@ -200,6 +234,20 @@ }) _sym_db.RegisterMessage(ImportQgroundcontrolMissionResponse) +ImportQgroundcontrolMissionFromStringRequest = _reflection.GeneratedProtocolMessageType('ImportQgroundcontrolMissionFromStringRequest', (_message.Message,), { + 'DESCRIPTOR' : _IMPORTQGROUNDCONTROLMISSIONFROMSTRINGREQUEST, + '__module__' : 'mission_raw.mission_raw_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.mission_raw.ImportQgroundcontrolMissionFromStringRequest) + }) +_sym_db.RegisterMessage(ImportQgroundcontrolMissionFromStringRequest) + +ImportQgroundcontrolMissionFromStringResponse = _reflection.GeneratedProtocolMessageType('ImportQgroundcontrolMissionFromStringResponse', (_message.Message,), { + 'DESCRIPTOR' : _IMPORTQGROUNDCONTROLMISSIONFROMSTRINGRESPONSE, + '__module__' : 'mission_raw.mission_raw_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.mission_raw.ImportQgroundcontrolMissionFromStringResponse) + }) +_sym_db.RegisterMessage(ImportQgroundcontrolMissionFromStringResponse) + MissionProgress = _reflection.GeneratedProtocolMessageType('MissionProgress', (_message.Message,), { 'DESCRIPTOR' : _MISSIONPROGRESS, '__module__' : 'mission_raw.mission_raw_pb2' @@ -241,60 +289,74 @@ _MISSIONRAWSERVICE.methods_by_name['SubscribeMissionChanged']._serialized_options = b'\200\265\030\000' _MISSIONRAWSERVICE.methods_by_name['ImportQgroundcontrolMission']._options = None _MISSIONRAWSERVICE.methods_by_name['ImportQgroundcontrolMission']._serialized_options = b'\200\265\030\001' + _MISSIONRAWSERVICE.methods_by_name['ImportQgroundcontrolMissionFromString']._options = None + _MISSIONRAWSERVICE.methods_by_name['ImportQgroundcontrolMissionFromString']._serialized_options = b'\200\265\030\001' _UPLOADMISSIONREQUEST._serialized_start=79 _UPLOADMISSIONREQUEST._serialized_end=161 _UPLOADMISSIONRESPONSE._serialized_start=163 _UPLOADMISSIONRESPONSE._serialized_end=256 - _CANCELMISSIONUPLOADREQUEST._serialized_start=258 - _CANCELMISSIONUPLOADREQUEST._serialized_end=286 - _CANCELMISSIONUPLOADRESPONSE._serialized_start=288 - _CANCELMISSIONUPLOADRESPONSE._serialized_end=387 - _DOWNLOADMISSIONREQUEST._serialized_start=389 - _DOWNLOADMISSIONREQUEST._serialized_end=413 - _DOWNLOADMISSIONRESPONSE._serialized_start=416 - _DOWNLOADMISSIONRESPONSE._serialized_end=571 - _CANCELMISSIONDOWNLOADREQUEST._serialized_start=573 - _CANCELMISSIONDOWNLOADREQUEST._serialized_end=603 - _CANCELMISSIONDOWNLOADRESPONSE._serialized_start=605 - _CANCELMISSIONDOWNLOADRESPONSE._serialized_end=706 - _STARTMISSIONREQUEST._serialized_start=708 - _STARTMISSIONREQUEST._serialized_end=729 - _STARTMISSIONRESPONSE._serialized_start=731 - _STARTMISSIONRESPONSE._serialized_end=823 - _PAUSEMISSIONREQUEST._serialized_start=825 - _PAUSEMISSIONREQUEST._serialized_end=846 - _PAUSEMISSIONRESPONSE._serialized_start=848 - _PAUSEMISSIONRESPONSE._serialized_end=940 - _CLEARMISSIONREQUEST._serialized_start=942 - _CLEARMISSIONREQUEST._serialized_end=963 - _CLEARMISSIONRESPONSE._serialized_start=965 - _CLEARMISSIONRESPONSE._serialized_end=1057 - _SETCURRENTMISSIONITEMREQUEST._serialized_start=1059 - _SETCURRENTMISSIONITEMREQUEST._serialized_end=1104 - _SETCURRENTMISSIONITEMRESPONSE._serialized_start=1106 - _SETCURRENTMISSIONITEMRESPONSE._serialized_end=1207 - _SUBSCRIBEMISSIONPROGRESSREQUEST._serialized_start=1209 - _SUBSCRIBEMISSIONPROGRESSREQUEST._serialized_end=1242 - _MISSIONPROGRESSRESPONSE._serialized_start=1244 - _MISSIONPROGRESSRESPONSE._serialized_end=1336 - _SUBSCRIBEMISSIONCHANGEDREQUEST._serialized_start=1338 - _SUBSCRIBEMISSIONCHANGEDREQUEST._serialized_end=1370 - _MISSIONCHANGEDRESPONSE._serialized_start=1372 - _MISSIONCHANGEDRESPONSE._serialized_end=1421 - _IMPORTQGROUNDCONTROLMISSIONREQUEST._serialized_start=1423 - _IMPORTQGROUNDCONTROLMISSIONREQUEST._serialized_end=1482 - _IMPORTQGROUNDCONTROLMISSIONRESPONSE._serialized_start=1485 - _IMPORTQGROUNDCONTROLMISSIONRESPONSE._serialized_end=1664 - _MISSIONPROGRESS._serialized_start=1666 - _MISSIONPROGRESS._serialized_end=1715 - _MISSIONITEM._serialized_start=1718 - _MISSIONITEM._serialized_end=1934 - _MISSIONIMPORTDATA._serialized_start=1937 - _MISSIONIMPORTDATA._serialized_end=2135 - _MISSIONRAWRESULT._serialized_start=2138 - _MISSIONRAWRESULT._serialized_end=2594 - _MISSIONRAWRESULT_RESULT._serialized_start=2244 - _MISSIONRAWRESULT_RESULT._serialized_end=2594 - _MISSIONRAWSERVICE._serialized_start=2597 - _MISSIONRAWSERVICE._serialized_end=4024 + _UPLOADGEOFENCEREQUEST._serialized_start=258 + _UPLOADGEOFENCEREQUEST._serialized_end=341 + _UPLOADGEOFENCERESPONSE._serialized_start=343 + _UPLOADGEOFENCERESPONSE._serialized_end=437 + _UPLOADRALLYPOINTSREQUEST._serialized_start=439 + _UPLOADRALLYPOINTSREQUEST._serialized_end=525 + _UPLOADRALLYPOINTSRESPONSE._serialized_start=527 + _UPLOADRALLYPOINTSRESPONSE._serialized_end=624 + _CANCELMISSIONUPLOADREQUEST._serialized_start=626 + _CANCELMISSIONUPLOADREQUEST._serialized_end=654 + _CANCELMISSIONUPLOADRESPONSE._serialized_start=656 + _CANCELMISSIONUPLOADRESPONSE._serialized_end=755 + _DOWNLOADMISSIONREQUEST._serialized_start=757 + _DOWNLOADMISSIONREQUEST._serialized_end=781 + _DOWNLOADMISSIONRESPONSE._serialized_start=784 + _DOWNLOADMISSIONRESPONSE._serialized_end=939 + _CANCELMISSIONDOWNLOADREQUEST._serialized_start=941 + _CANCELMISSIONDOWNLOADREQUEST._serialized_end=971 + _CANCELMISSIONDOWNLOADRESPONSE._serialized_start=973 + _CANCELMISSIONDOWNLOADRESPONSE._serialized_end=1074 + _STARTMISSIONREQUEST._serialized_start=1076 + _STARTMISSIONREQUEST._serialized_end=1097 + _STARTMISSIONRESPONSE._serialized_start=1099 + _STARTMISSIONRESPONSE._serialized_end=1191 + _PAUSEMISSIONREQUEST._serialized_start=1193 + _PAUSEMISSIONREQUEST._serialized_end=1214 + _PAUSEMISSIONRESPONSE._serialized_start=1216 + _PAUSEMISSIONRESPONSE._serialized_end=1308 + _CLEARMISSIONREQUEST._serialized_start=1310 + _CLEARMISSIONREQUEST._serialized_end=1331 + _CLEARMISSIONRESPONSE._serialized_start=1333 + _CLEARMISSIONRESPONSE._serialized_end=1425 + _SETCURRENTMISSIONITEMREQUEST._serialized_start=1427 + _SETCURRENTMISSIONITEMREQUEST._serialized_end=1472 + _SETCURRENTMISSIONITEMRESPONSE._serialized_start=1474 + _SETCURRENTMISSIONITEMRESPONSE._serialized_end=1575 + _SUBSCRIBEMISSIONPROGRESSREQUEST._serialized_start=1577 + _SUBSCRIBEMISSIONPROGRESSREQUEST._serialized_end=1610 + _MISSIONPROGRESSRESPONSE._serialized_start=1612 + _MISSIONPROGRESSRESPONSE._serialized_end=1704 + _SUBSCRIBEMISSIONCHANGEDREQUEST._serialized_start=1706 + _SUBSCRIBEMISSIONCHANGEDREQUEST._serialized_end=1738 + _MISSIONCHANGEDRESPONSE._serialized_start=1740 + _MISSIONCHANGEDRESPONSE._serialized_end=1789 + _IMPORTQGROUNDCONTROLMISSIONREQUEST._serialized_start=1791 + _IMPORTQGROUNDCONTROLMISSIONREQUEST._serialized_end=1850 + _IMPORTQGROUNDCONTROLMISSIONRESPONSE._serialized_start=1853 + _IMPORTQGROUNDCONTROLMISSIONRESPONSE._serialized_end=2032 + _IMPORTQGROUNDCONTROLMISSIONFROMSTRINGREQUEST._serialized_start=2034 + _IMPORTQGROUNDCONTROLMISSIONFROMSTRINGREQUEST._serialized_end=2098 + _IMPORTQGROUNDCONTROLMISSIONFROMSTRINGRESPONSE._serialized_start=2101 + _IMPORTQGROUNDCONTROLMISSIONFROMSTRINGRESPONSE._serialized_end=2290 + _MISSIONPROGRESS._serialized_start=2292 + _MISSIONPROGRESS._serialized_end=2341 + _MISSIONITEM._serialized_start=2344 + _MISSIONITEM._serialized_end=2560 + _MISSIONIMPORTDATA._serialized_start=2563 + _MISSIONIMPORTDATA._serialized_end=2761 + _MISSIONRAWRESULT._serialized_start=2764 + _MISSIONRAWRESULT._serialized_end=3402 + _MISSIONRAWRESULT_RESULT._serialized_start=2870 + _MISSIONRAWRESULT_RESULT._serialized_end=3402 + _MISSIONRAWSERVICE._serialized_start=3405 + _MISSIONRAWSERVICE._serialized_end=5260 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/mission_raw_pb2_grpc.py b/mavsdk/mission_raw_pb2_grpc.py index 1d82b029..b8707faf 100644 --- a/mavsdk/mission_raw_pb2_grpc.py +++ b/mavsdk/mission_raw_pb2_grpc.py @@ -20,6 +20,16 @@ def __init__(self, channel): request_serializer=mission__raw_dot_mission__raw__pb2.UploadMissionRequest.SerializeToString, response_deserializer=mission__raw_dot_mission__raw__pb2.UploadMissionResponse.FromString, ) + self.UploadGeofence = channel.unary_unary( + '/mavsdk.rpc.mission_raw.MissionRawService/UploadGeofence', + request_serializer=mission__raw_dot_mission__raw__pb2.UploadGeofenceRequest.SerializeToString, + response_deserializer=mission__raw_dot_mission__raw__pb2.UploadGeofenceResponse.FromString, + ) + self.UploadRallyPoints = channel.unary_unary( + '/mavsdk.rpc.mission_raw.MissionRawService/UploadRallyPoints', + request_serializer=mission__raw_dot_mission__raw__pb2.UploadRallyPointsRequest.SerializeToString, + response_deserializer=mission__raw_dot_mission__raw__pb2.UploadRallyPointsResponse.FromString, + ) self.CancelMissionUpload = channel.unary_unary( '/mavsdk.rpc.mission_raw.MissionRawService/CancelMissionUpload', request_serializer=mission__raw_dot_mission__raw__pb2.CancelMissionUploadRequest.SerializeToString, @@ -70,6 +80,11 @@ def __init__(self, channel): request_serializer=mission__raw_dot_mission__raw__pb2.ImportQgroundcontrolMissionRequest.SerializeToString, response_deserializer=mission__raw_dot_mission__raw__pb2.ImportQgroundcontrolMissionResponse.FromString, ) + self.ImportQgroundcontrolMissionFromString = channel.unary_unary( + '/mavsdk.rpc.mission_raw.MissionRawService/ImportQgroundcontrolMissionFromString', + request_serializer=mission__raw_dot_mission__raw__pb2.ImportQgroundcontrolMissionFromStringRequest.SerializeToString, + response_deserializer=mission__raw_dot_mission__raw__pb2.ImportQgroundcontrolMissionFromStringResponse.FromString, + ) class MissionRawServiceServicer(object): @@ -87,6 +102,22 @@ def UploadMission(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def UploadGeofence(self, request, context): + """ + Upload a list of geofence items to the system. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UploadRallyPoints(self, request, context): + """ + Upload a list of rally point items to the system. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def CancelMissionUpload(self, request, context): """ Cancel an ongoing mission upload. @@ -176,7 +207,21 @@ def SubscribeMissionChanged(self, request, context): def ImportQgroundcontrolMission(self, request, context): """ - Import a QGroundControl missions in JSON .plan format. + Import a QGroundControl missions in JSON .plan format, from a file. + + Supported: + - Waypoints + - Survey + Not supported: + - Structure Scan + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ImportQgroundcontrolMissionFromString(self, request, context): + """ + Import a QGroundControl missions in JSON .plan format, from a string. Supported: - Waypoints @@ -196,6 +241,16 @@ def add_MissionRawServiceServicer_to_server(servicer, server): request_deserializer=mission__raw_dot_mission__raw__pb2.UploadMissionRequest.FromString, response_serializer=mission__raw_dot_mission__raw__pb2.UploadMissionResponse.SerializeToString, ), + 'UploadGeofence': grpc.unary_unary_rpc_method_handler( + servicer.UploadGeofence, + request_deserializer=mission__raw_dot_mission__raw__pb2.UploadGeofenceRequest.FromString, + response_serializer=mission__raw_dot_mission__raw__pb2.UploadGeofenceResponse.SerializeToString, + ), + 'UploadRallyPoints': grpc.unary_unary_rpc_method_handler( + servicer.UploadRallyPoints, + request_deserializer=mission__raw_dot_mission__raw__pb2.UploadRallyPointsRequest.FromString, + response_serializer=mission__raw_dot_mission__raw__pb2.UploadRallyPointsResponse.SerializeToString, + ), 'CancelMissionUpload': grpc.unary_unary_rpc_method_handler( servicer.CancelMissionUpload, request_deserializer=mission__raw_dot_mission__raw__pb2.CancelMissionUploadRequest.FromString, @@ -246,6 +301,11 @@ def add_MissionRawServiceServicer_to_server(servicer, server): request_deserializer=mission__raw_dot_mission__raw__pb2.ImportQgroundcontrolMissionRequest.FromString, response_serializer=mission__raw_dot_mission__raw__pb2.ImportQgroundcontrolMissionResponse.SerializeToString, ), + 'ImportQgroundcontrolMissionFromString': grpc.unary_unary_rpc_method_handler( + servicer.ImportQgroundcontrolMissionFromString, + request_deserializer=mission__raw_dot_mission__raw__pb2.ImportQgroundcontrolMissionFromStringRequest.FromString, + response_serializer=mission__raw_dot_mission__raw__pb2.ImportQgroundcontrolMissionFromStringResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.mission_raw.MissionRawService', rpc_method_handlers) @@ -274,6 +334,40 @@ def UploadMission(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def UploadGeofence(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.mission_raw.MissionRawService/UploadGeofence', + mission__raw_dot_mission__raw__pb2.UploadGeofenceRequest.SerializeToString, + mission__raw_dot_mission__raw__pb2.UploadGeofenceResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UploadRallyPoints(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.mission_raw.MissionRawService/UploadRallyPoints', + mission__raw_dot_mission__raw__pb2.UploadRallyPointsRequest.SerializeToString, + mission__raw_dot_mission__raw__pb2.UploadRallyPointsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def CancelMissionUpload(request, target, @@ -443,3 +537,20 @@ def ImportQgroundcontrolMission(request, mission__raw_dot_mission__raw__pb2.ImportQgroundcontrolMissionResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ImportQgroundcontrolMissionFromString(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.mission_raw.MissionRawService/ImportQgroundcontrolMissionFromString', + mission__raw_dot_mission__raw__pb2.ImportQgroundcontrolMissionFromStringRequest.SerializeToString, + mission__raw_dot_mission__raw__pb2.ImportQgroundcontrolMissionFromStringResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/mavsdk/offboard.py b/mavsdk/offboard.py index c3bbaf04..02a0cbc6 100644 --- a/mavsdk/offboard.py +++ b/mavsdk/offboard.py @@ -181,7 +181,7 @@ class ActuatorControl: One group support eight controls. - Up to 16 actuator controls can be set. To ignore an output group, set all it conrols to NaN. + Up to 16 actuator controls can be set. To ignore an output group, set all it controls to NaN. If one or more controls in group is not NaN, then all NaN controls will sent as zero. The first 8 actuator controls internally map to control group 0, the latter 8 actuator controls map to control group 1. Depending on what controls are set (instead of NaN) 1 or 2 @@ -482,7 +482,7 @@ class PositionGlobalYaw: Yaw in degrees (0 North, positive is clock-wise looking from above) altitude_type : AltitudeType - altitude type for this position + altitude type for this position """ @@ -977,6 +977,9 @@ class Result(Enum): NO_SETPOINT_SET Cannot start without setpoint set + FAILED + Request failed + """ @@ -988,6 +991,7 @@ class Result(Enum): COMMAND_DENIED = 5 TIMEOUT = 6 NO_SETPOINT_SET = 7 + FAILED = 8 def translate_to_rpc(self): if self == OffboardResult.Result.UNKNOWN: @@ -1006,6 +1010,8 @@ def translate_to_rpc(self): return offboard_pb2.OffboardResult.RESULT_TIMEOUT if self == OffboardResult.Result.NO_SETPOINT_SET: return offboard_pb2.OffboardResult.RESULT_NO_SETPOINT_SET + if self == OffboardResult.Result.FAILED: + return offboard_pb2.OffboardResult.RESULT_FAILED @staticmethod def translate_from_rpc(rpc_enum_value): @@ -1026,6 +1032,8 @@ def translate_from_rpc(rpc_enum_value): return OffboardResult.Result.TIMEOUT if rpc_enum_value == offboard_pb2.OffboardResult.RESULT_NO_SETPOINT_SET: return OffboardResult.Result.NO_SETPOINT_SET + if rpc_enum_value == offboard_pb2.OffboardResult.RESULT_FAILED: + return OffboardResult.Result.FAILED def __str__(self): return self.name @@ -1437,6 +1445,49 @@ async def set_position_velocity_ned(self, position_ned_yaw, velocity_ned_yaw): raise OffboardError(result, "set_position_velocity_ned()", position_ned_yaw, velocity_ned_yaw) + async def set_position_velocity_acceleration_ned(self, position_ned_yaw, velocity_ned_yaw, acceleration_ned): + """ + Set the position, velocity and acceleration in NED coordinates, with velocity and acceleration used as feed-forward. + + Parameters + ---------- + position_ned_yaw : PositionNedYaw + Position and yaw + + velocity_ned_yaw : VelocityNedYaw + Velocity and yaw + + acceleration_ned : AccelerationNed + Acceleration + + Raises + ------ + OffboardError + If the request fails. The error contains the reason for the failure. + """ + + request = offboard_pb2.SetPositionVelocityAccelerationNedRequest() + + position_ned_yaw.translate_to_rpc(request.position_ned_yaw) + + + + velocity_ned_yaw.translate_to_rpc(request.velocity_ned_yaw) + + + + acceleration_ned.translate_to_rpc(request.acceleration_ned) + + + response = await self._stub.SetPositionVelocityAccelerationNed(request) + + + result = self._extract_result(response) + + if result.result != OffboardResult.Result.SUCCESS: + raise OffboardError(result, "set_position_velocity_acceleration_ned()", position_ned_yaw, velocity_ned_yaw, acceleration_ned) + + async def set_acceleration_ned(self, acceleration_ned): """ Set the acceleration in NED coordinates. diff --git a/mavsdk/offboard_pb2.py b/mavsdk/offboard_pb2.py index 3b8777d3..14f1df44 100644 --- a/mavsdk/offboard_pb2.py +++ b/mavsdk/offboard_pb2.py @@ -15,7 +15,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17offboard/offboard.proto\x12\x13mavsdk.rpc.offboard\x1a\x14mavsdk_options.proto\"\x0e\n\x0cStartRequest\"M\n\rStartResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"\r\n\x0bStopRequest\"L\n\x0cStopResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"\x11\n\x0fIsActiveRequest\"%\n\x10IsActiveResponse\x12\x11\n\tis_active\x18\x01 \x01(\x08\"E\n\x12SetAttitudeRequest\x12/\n\x08\x61ttitude\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.offboard.Attitude\"S\n\x13SetAttitudeResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"[\n\x19SetActuatorControlRequest\x12>\n\x10\x61\x63tuator_control\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.offboard.ActuatorControl\"Z\n\x1aSetActuatorControlResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"R\n\x16SetAttitudeRateRequest\x12\x38\n\rattitude_rate\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.offboard.AttitudeRate\"W\n\x17SetAttitudeRateResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"V\n\x15SetPositionNedRequest\x12=\n\x10position_ned_yaw\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.PositionNedYaw\"V\n\x16SetPositionNedResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"_\n\x18SetPositionGlobalRequest\x12\x43\n\x13position_global_yaw\x18\x01 \x01(\x0b\x32&.mavsdk.rpc.offboard.PositionGlobalYaw\"Y\n\x19SetPositionGlobalResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"c\n\x16SetVelocityBodyRequest\x12I\n\x16velocity_body_yawspeed\x18\x01 \x01(\x0b\x32).mavsdk.rpc.offboard.VelocityBodyYawspeed\"W\n\x17SetVelocityBodyResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"V\n\x15SetVelocityNedRequest\x12=\n\x10velocity_ned_yaw\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.VelocityNedYaw\"V\n\x16SetVelocityNedResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"\x9d\x01\n\x1dSetPositionVelocityNedRequest\x12=\n\x10position_ned_yaw\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.PositionNedYaw\x12=\n\x10velocity_ned_yaw\x18\x02 \x01(\x0b\x32#.mavsdk.rpc.offboard.VelocityNedYaw\"^\n\x1eSetPositionVelocityNedResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"[\n\x19SetAccelerationNedRequest\x12>\n\x10\x61\x63\x63\x65leration_ned\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.offboard.AccelerationNed\"Z\n\x1aSetAccelerationNedResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"V\n\x08\x41ttitude\x12\x10\n\x08roll_deg\x18\x01 \x01(\x02\x12\x11\n\tpitch_deg\x18\x02 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x03 \x01(\x02\x12\x14\n\x0cthrust_value\x18\x04 \x01(\x02\"(\n\x14\x41\x63tuatorControlGroup\x12\x10\n\x08\x63ontrols\x18\x01 \x03(\x02\"L\n\x0f\x41\x63tuatorControl\x12\x39\n\x06groups\x18\x01 \x03(\x0b\x32).mavsdk.rpc.offboard.ActuatorControlGroup\"`\n\x0c\x41ttitudeRate\x12\x12\n\nroll_deg_s\x18\x01 \x01(\x02\x12\x13\n\x0bpitch_deg_s\x18\x02 \x01(\x02\x12\x11\n\tyaw_deg_s\x18\x03 \x01(\x02\x12\x14\n\x0cthrust_value\x18\x04 \x01(\x02\"R\n\x0ePositionNedYaw\x12\x0f\n\x07north_m\x18\x01 \x01(\x02\x12\x0e\n\x06\x65\x61st_m\x18\x02 \x01(\x02\x12\x0e\n\x06\x64own_m\x18\x03 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x04 \x01(\x02\"\xfc\x01\n\x11PositionGlobalYaw\x12\x0f\n\x07lat_deg\x18\x01 \x01(\x01\x12\x0f\n\x07lon_deg\x18\x02 \x01(\x01\x12\r\n\x05\x61lt_m\x18\x03 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x04 \x01(\x02\x12J\n\raltitude_type\x18\x05 \x01(\x0e\x32\x33.mavsdk.rpc.offboard.PositionGlobalYaw.AltitudeType\"Y\n\x0c\x41ltitudeType\x12\x1a\n\x16\x41LTITUDE_TYPE_REL_HOME\x10\x00\x12\x16\n\x12\x41LTITUDE_TYPE_AMSL\x10\x01\x12\x15\n\x11\x41LTITUDE_TYPE_AGL\x10\x02\"h\n\x14VelocityBodyYawspeed\x12\x13\n\x0b\x66orward_m_s\x18\x01 \x01(\x02\x12\x11\n\tright_m_s\x18\x02 \x01(\x02\x12\x10\n\x08\x64own_m_s\x18\x03 \x01(\x02\x12\x16\n\x0eyawspeed_deg_s\x18\x04 \x01(\x02\"X\n\x0eVelocityNedYaw\x12\x11\n\tnorth_m_s\x18\x01 \x01(\x02\x12\x10\n\x08\x65\x61st_m_s\x18\x02 \x01(\x02\x12\x10\n\x08\x64own_m_s\x18\x03 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x04 \x01(\x02\"K\n\x0f\x41\x63\x63\x65lerationNed\x12\x12\n\nnorth_m_s2\x18\x01 \x01(\x02\x12\x11\n\teast_m_s2\x18\x02 \x01(\x02\x12\x11\n\tdown_m_s2\x18\x03 \x01(\x02\"\xa2\x02\n\x0eOffboardResult\x12:\n\x06result\x18\x01 \x01(\x0e\x32*.mavsdk.rpc.offboard.OffboardResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xbf\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x1a\n\x16RESULT_NO_SETPOINT_SET\x10\x07\x32\xc1\n\n\x0fOffboardService\x12P\n\x05Start\x12!.mavsdk.rpc.offboard.StartRequest\x1a\".mavsdk.rpc.offboard.StartResponse\"\x00\x12M\n\x04Stop\x12 .mavsdk.rpc.offboard.StopRequest\x1a!.mavsdk.rpc.offboard.StopResponse\"\x00\x12]\n\x08IsActive\x12$.mavsdk.rpc.offboard.IsActiveRequest\x1a%.mavsdk.rpc.offboard.IsActiveResponse\"\x04\x80\xb5\x18\x01\x12\x66\n\x0bSetAttitude\x12\'.mavsdk.rpc.offboard.SetAttitudeRequest\x1a(.mavsdk.rpc.offboard.SetAttitudeResponse\"\x04\x80\xb5\x18\x01\x12{\n\x12SetActuatorControl\x12..mavsdk.rpc.offboard.SetActuatorControlRequest\x1a/.mavsdk.rpc.offboard.SetActuatorControlResponse\"\x04\x80\xb5\x18\x01\x12r\n\x0fSetAttitudeRate\x12+.mavsdk.rpc.offboard.SetAttitudeRateRequest\x1a,.mavsdk.rpc.offboard.SetAttitudeRateResponse\"\x04\x80\xb5\x18\x01\x12o\n\x0eSetPositionNed\x12*.mavsdk.rpc.offboard.SetPositionNedRequest\x1a+.mavsdk.rpc.offboard.SetPositionNedResponse\"\x04\x80\xb5\x18\x01\x12x\n\x11SetPositionGlobal\x12-.mavsdk.rpc.offboard.SetPositionGlobalRequest\x1a..mavsdk.rpc.offboard.SetPositionGlobalResponse\"\x04\x80\xb5\x18\x01\x12r\n\x0fSetVelocityBody\x12+.mavsdk.rpc.offboard.SetVelocityBodyRequest\x1a,.mavsdk.rpc.offboard.SetVelocityBodyResponse\"\x04\x80\xb5\x18\x01\x12o\n\x0eSetVelocityNed\x12*.mavsdk.rpc.offboard.SetVelocityNedRequest\x1a+.mavsdk.rpc.offboard.SetVelocityNedResponse\"\x04\x80\xb5\x18\x01\x12\x87\x01\n\x16SetPositionVelocityNed\x12\x32.mavsdk.rpc.offboard.SetPositionVelocityNedRequest\x1a\x33.mavsdk.rpc.offboard.SetPositionVelocityNedResponse\"\x04\x80\xb5\x18\x01\x12{\n\x12SetAccelerationNed\x12..mavsdk.rpc.offboard.SetAccelerationNedRequest\x1a/.mavsdk.rpc.offboard.SetAccelerationNedResponse\"\x04\x80\xb5\x18\x01\x42#\n\x12io.mavsdk.offboardB\rOffboardProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17offboard/offboard.proto\x12\x13mavsdk.rpc.offboard\x1a\x14mavsdk_options.proto\"\x0e\n\x0cStartRequest\"M\n\rStartResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"\r\n\x0bStopRequest\"L\n\x0cStopResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"\x11\n\x0fIsActiveRequest\"%\n\x10IsActiveResponse\x12\x11\n\tis_active\x18\x01 \x01(\x08\"E\n\x12SetAttitudeRequest\x12/\n\x08\x61ttitude\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.offboard.Attitude\"S\n\x13SetAttitudeResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"[\n\x19SetActuatorControlRequest\x12>\n\x10\x61\x63tuator_control\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.offboard.ActuatorControl\"Z\n\x1aSetActuatorControlResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"R\n\x16SetAttitudeRateRequest\x12\x38\n\rattitude_rate\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.offboard.AttitudeRate\"W\n\x17SetAttitudeRateResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"V\n\x15SetPositionNedRequest\x12=\n\x10position_ned_yaw\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.PositionNedYaw\"V\n\x16SetPositionNedResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"_\n\x18SetPositionGlobalRequest\x12\x43\n\x13position_global_yaw\x18\x01 \x01(\x0b\x32&.mavsdk.rpc.offboard.PositionGlobalYaw\"Y\n\x19SetPositionGlobalResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"c\n\x16SetVelocityBodyRequest\x12I\n\x16velocity_body_yawspeed\x18\x01 \x01(\x0b\x32).mavsdk.rpc.offboard.VelocityBodyYawspeed\"W\n\x17SetVelocityBodyResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"V\n\x15SetVelocityNedRequest\x12=\n\x10velocity_ned_yaw\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.VelocityNedYaw\"V\n\x16SetVelocityNedResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"\x9d\x01\n\x1dSetPositionVelocityNedRequest\x12=\n\x10position_ned_yaw\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.PositionNedYaw\x12=\n\x10velocity_ned_yaw\x18\x02 \x01(\x0b\x32#.mavsdk.rpc.offboard.VelocityNedYaw\"\xe9\x01\n)SetPositionVelocityAccelerationNedRequest\x12=\n\x10position_ned_yaw\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.PositionNedYaw\x12=\n\x10velocity_ned_yaw\x18\x02 \x01(\x0b\x32#.mavsdk.rpc.offboard.VelocityNedYaw\x12>\n\x10\x61\x63\x63\x65leration_ned\x18\x03 \x01(\x0b\x32$.mavsdk.rpc.offboard.AccelerationNed\"^\n\x1eSetPositionVelocityNedResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"j\n*SetPositionVelocityAccelerationNedResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"[\n\x19SetAccelerationNedRequest\x12>\n\x10\x61\x63\x63\x65leration_ned\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.offboard.AccelerationNed\"Z\n\x1aSetAccelerationNedResponse\x12<\n\x0foffboard_result\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.offboard.OffboardResult\"V\n\x08\x41ttitude\x12\x10\n\x08roll_deg\x18\x01 \x01(\x02\x12\x11\n\tpitch_deg\x18\x02 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x03 \x01(\x02\x12\x14\n\x0cthrust_value\x18\x04 \x01(\x02\"(\n\x14\x41\x63tuatorControlGroup\x12\x10\n\x08\x63ontrols\x18\x01 \x03(\x02\"L\n\x0f\x41\x63tuatorControl\x12\x39\n\x06groups\x18\x01 \x03(\x0b\x32).mavsdk.rpc.offboard.ActuatorControlGroup\"`\n\x0c\x41ttitudeRate\x12\x12\n\nroll_deg_s\x18\x01 \x01(\x02\x12\x13\n\x0bpitch_deg_s\x18\x02 \x01(\x02\x12\x11\n\tyaw_deg_s\x18\x03 \x01(\x02\x12\x14\n\x0cthrust_value\x18\x04 \x01(\x02\"R\n\x0ePositionNedYaw\x12\x0f\n\x07north_m\x18\x01 \x01(\x02\x12\x0e\n\x06\x65\x61st_m\x18\x02 \x01(\x02\x12\x0e\n\x06\x64own_m\x18\x03 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x04 \x01(\x02\"\xfc\x01\n\x11PositionGlobalYaw\x12\x0f\n\x07lat_deg\x18\x01 \x01(\x01\x12\x0f\n\x07lon_deg\x18\x02 \x01(\x01\x12\r\n\x05\x61lt_m\x18\x03 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x04 \x01(\x02\x12J\n\raltitude_type\x18\x05 \x01(\x0e\x32\x33.mavsdk.rpc.offboard.PositionGlobalYaw.AltitudeType\"Y\n\x0c\x41ltitudeType\x12\x1a\n\x16\x41LTITUDE_TYPE_REL_HOME\x10\x00\x12\x16\n\x12\x41LTITUDE_TYPE_AMSL\x10\x01\x12\x15\n\x11\x41LTITUDE_TYPE_AGL\x10\x02\"h\n\x14VelocityBodyYawspeed\x12\x13\n\x0b\x66orward_m_s\x18\x01 \x01(\x02\x12\x11\n\tright_m_s\x18\x02 \x01(\x02\x12\x10\n\x08\x64own_m_s\x18\x03 \x01(\x02\x12\x16\n\x0eyawspeed_deg_s\x18\x04 \x01(\x02\"X\n\x0eVelocityNedYaw\x12\x11\n\tnorth_m_s\x18\x01 \x01(\x02\x12\x10\n\x08\x65\x61st_m_s\x18\x02 \x01(\x02\x12\x10\n\x08\x64own_m_s\x18\x03 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x04 \x01(\x02\"K\n\x0f\x41\x63\x63\x65lerationNed\x12\x12\n\nnorth_m_s2\x18\x01 \x01(\x02\x12\x11\n\teast_m_s2\x18\x02 \x01(\x02\x12\x11\n\tdown_m_s2\x18\x03 \x01(\x02\"\xb5\x02\n\x0eOffboardResult\x12:\n\x06result\x18\x01 \x01(\x0e\x32*.mavsdk.rpc.offboard.OffboardResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xd2\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x1a\n\x16RESULT_NO_SETPOINT_SET\x10\x07\x12\x11\n\rRESULT_FAILED\x10\x08\x32\xef\x0b\n\x0fOffboardService\x12P\n\x05Start\x12!.mavsdk.rpc.offboard.StartRequest\x1a\".mavsdk.rpc.offboard.StartResponse\"\x00\x12M\n\x04Stop\x12 .mavsdk.rpc.offboard.StopRequest\x1a!.mavsdk.rpc.offboard.StopResponse\"\x00\x12]\n\x08IsActive\x12$.mavsdk.rpc.offboard.IsActiveRequest\x1a%.mavsdk.rpc.offboard.IsActiveResponse\"\x04\x80\xb5\x18\x01\x12\x66\n\x0bSetAttitude\x12\'.mavsdk.rpc.offboard.SetAttitudeRequest\x1a(.mavsdk.rpc.offboard.SetAttitudeResponse\"\x04\x80\xb5\x18\x01\x12{\n\x12SetActuatorControl\x12..mavsdk.rpc.offboard.SetActuatorControlRequest\x1a/.mavsdk.rpc.offboard.SetActuatorControlResponse\"\x04\x80\xb5\x18\x01\x12r\n\x0fSetAttitudeRate\x12+.mavsdk.rpc.offboard.SetAttitudeRateRequest\x1a,.mavsdk.rpc.offboard.SetAttitudeRateResponse\"\x04\x80\xb5\x18\x01\x12o\n\x0eSetPositionNed\x12*.mavsdk.rpc.offboard.SetPositionNedRequest\x1a+.mavsdk.rpc.offboard.SetPositionNedResponse\"\x04\x80\xb5\x18\x01\x12x\n\x11SetPositionGlobal\x12-.mavsdk.rpc.offboard.SetPositionGlobalRequest\x1a..mavsdk.rpc.offboard.SetPositionGlobalResponse\"\x04\x80\xb5\x18\x01\x12r\n\x0fSetVelocityBody\x12+.mavsdk.rpc.offboard.SetVelocityBodyRequest\x1a,.mavsdk.rpc.offboard.SetVelocityBodyResponse\"\x04\x80\xb5\x18\x01\x12o\n\x0eSetVelocityNed\x12*.mavsdk.rpc.offboard.SetVelocityNedRequest\x1a+.mavsdk.rpc.offboard.SetVelocityNedResponse\"\x04\x80\xb5\x18\x01\x12\x87\x01\n\x16SetPositionVelocityNed\x12\x32.mavsdk.rpc.offboard.SetPositionVelocityNedRequest\x1a\x33.mavsdk.rpc.offboard.SetPositionVelocityNedResponse\"\x04\x80\xb5\x18\x01\x12\xab\x01\n\"SetPositionVelocityAccelerationNed\x12>.mavsdk.rpc.offboard.SetPositionVelocityAccelerationNedRequest\x1a?.mavsdk.rpc.offboard.SetPositionVelocityAccelerationNedResponse\"\x04\x80\xb5\x18\x01\x12{\n\x12SetAccelerationNed\x12..mavsdk.rpc.offboard.SetAccelerationNedRequest\x1a/.mavsdk.rpc.offboard.SetAccelerationNedResponse\"\x04\x80\xb5\x18\x01\x42#\n\x12io.mavsdk.offboardB\rOffboardProtob\x06proto3') @@ -40,7 +40,9 @@ _SETVELOCITYNEDREQUEST = DESCRIPTOR.message_types_by_name['SetVelocityNedRequest'] _SETVELOCITYNEDRESPONSE = DESCRIPTOR.message_types_by_name['SetVelocityNedResponse'] _SETPOSITIONVELOCITYNEDREQUEST = DESCRIPTOR.message_types_by_name['SetPositionVelocityNedRequest'] +_SETPOSITIONVELOCITYACCELERATIONNEDREQUEST = DESCRIPTOR.message_types_by_name['SetPositionVelocityAccelerationNedRequest'] _SETPOSITIONVELOCITYNEDRESPONSE = DESCRIPTOR.message_types_by_name['SetPositionVelocityNedResponse'] +_SETPOSITIONVELOCITYACCELERATIONNEDRESPONSE = DESCRIPTOR.message_types_by_name['SetPositionVelocityAccelerationNedResponse'] _SETACCELERATIONNEDREQUEST = DESCRIPTOR.message_types_by_name['SetAccelerationNedRequest'] _SETACCELERATIONNEDRESPONSE = DESCRIPTOR.message_types_by_name['SetAccelerationNedResponse'] _ATTITUDE = DESCRIPTOR.message_types_by_name['Attitude'] @@ -202,6 +204,13 @@ }) _sym_db.RegisterMessage(SetPositionVelocityNedRequest) +SetPositionVelocityAccelerationNedRequest = _reflection.GeneratedProtocolMessageType('SetPositionVelocityAccelerationNedRequest', (_message.Message,), { + 'DESCRIPTOR' : _SETPOSITIONVELOCITYACCELERATIONNEDREQUEST, + '__module__' : 'offboard.offboard_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.offboard.SetPositionVelocityAccelerationNedRequest) + }) +_sym_db.RegisterMessage(SetPositionVelocityAccelerationNedRequest) + SetPositionVelocityNedResponse = _reflection.GeneratedProtocolMessageType('SetPositionVelocityNedResponse', (_message.Message,), { 'DESCRIPTOR' : _SETPOSITIONVELOCITYNEDRESPONSE, '__module__' : 'offboard.offboard_pb2' @@ -209,6 +218,13 @@ }) _sym_db.RegisterMessage(SetPositionVelocityNedResponse) +SetPositionVelocityAccelerationNedResponse = _reflection.GeneratedProtocolMessageType('SetPositionVelocityAccelerationNedResponse', (_message.Message,), { + 'DESCRIPTOR' : _SETPOSITIONVELOCITYACCELERATIONNEDRESPONSE, + '__module__' : 'offboard.offboard_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.offboard.SetPositionVelocityAccelerationNedResponse) + }) +_sym_db.RegisterMessage(SetPositionVelocityAccelerationNedResponse) + SetAccelerationNedRequest = _reflection.GeneratedProtocolMessageType('SetAccelerationNedRequest', (_message.Message,), { 'DESCRIPTOR' : _SETACCELERATIONNEDREQUEST, '__module__' : 'offboard.offboard_pb2' @@ -316,6 +332,8 @@ _OFFBOARDSERVICE.methods_by_name['SetVelocityNed']._serialized_options = b'\200\265\030\001' _OFFBOARDSERVICE.methods_by_name['SetPositionVelocityNed']._options = None _OFFBOARDSERVICE.methods_by_name['SetPositionVelocityNed']._serialized_options = b'\200\265\030\001' + _OFFBOARDSERVICE.methods_by_name['SetPositionVelocityAccelerationNed']._options = None + _OFFBOARDSERVICE.methods_by_name['SetPositionVelocityAccelerationNed']._serialized_options = b'\200\265\030\001' _OFFBOARDSERVICE.methods_by_name['SetAccelerationNed']._options = None _OFFBOARDSERVICE.methods_by_name['SetAccelerationNed']._serialized_options = b'\200\265\030\001' _STARTREQUEST._serialized_start=70 @@ -360,36 +378,40 @@ _SETVELOCITYNEDRESPONSE._serialized_end=1558 _SETPOSITIONVELOCITYNEDREQUEST._serialized_start=1561 _SETPOSITIONVELOCITYNEDREQUEST._serialized_end=1718 - _SETPOSITIONVELOCITYNEDRESPONSE._serialized_start=1720 - _SETPOSITIONVELOCITYNEDRESPONSE._serialized_end=1814 - _SETACCELERATIONNEDREQUEST._serialized_start=1816 - _SETACCELERATIONNEDREQUEST._serialized_end=1907 - _SETACCELERATIONNEDRESPONSE._serialized_start=1909 - _SETACCELERATIONNEDRESPONSE._serialized_end=1999 - _ATTITUDE._serialized_start=2001 - _ATTITUDE._serialized_end=2087 - _ACTUATORCONTROLGROUP._serialized_start=2089 - _ACTUATORCONTROLGROUP._serialized_end=2129 - _ACTUATORCONTROL._serialized_start=2131 - _ACTUATORCONTROL._serialized_end=2207 - _ATTITUDERATE._serialized_start=2209 - _ATTITUDERATE._serialized_end=2305 - _POSITIONNEDYAW._serialized_start=2307 - _POSITIONNEDYAW._serialized_end=2389 - _POSITIONGLOBALYAW._serialized_start=2392 - _POSITIONGLOBALYAW._serialized_end=2644 - _POSITIONGLOBALYAW_ALTITUDETYPE._serialized_start=2555 - _POSITIONGLOBALYAW_ALTITUDETYPE._serialized_end=2644 - _VELOCITYBODYYAWSPEED._serialized_start=2646 - _VELOCITYBODYYAWSPEED._serialized_end=2750 - _VELOCITYNEDYAW._serialized_start=2752 - _VELOCITYNEDYAW._serialized_end=2840 - _ACCELERATIONNED._serialized_start=2842 - _ACCELERATIONNED._serialized_end=2917 - _OFFBOARDRESULT._serialized_start=2920 - _OFFBOARDRESULT._serialized_end=3210 - _OFFBOARDRESULT_RESULT._serialized_start=3019 - _OFFBOARDRESULT_RESULT._serialized_end=3210 - _OFFBOARDSERVICE._serialized_start=3213 - _OFFBOARDSERVICE._serialized_end=4558 + _SETPOSITIONVELOCITYACCELERATIONNEDREQUEST._serialized_start=1721 + _SETPOSITIONVELOCITYACCELERATIONNEDREQUEST._serialized_end=1954 + _SETPOSITIONVELOCITYNEDRESPONSE._serialized_start=1956 + _SETPOSITIONVELOCITYNEDRESPONSE._serialized_end=2050 + _SETPOSITIONVELOCITYACCELERATIONNEDRESPONSE._serialized_start=2052 + _SETPOSITIONVELOCITYACCELERATIONNEDRESPONSE._serialized_end=2158 + _SETACCELERATIONNEDREQUEST._serialized_start=2160 + _SETACCELERATIONNEDREQUEST._serialized_end=2251 + _SETACCELERATIONNEDRESPONSE._serialized_start=2253 + _SETACCELERATIONNEDRESPONSE._serialized_end=2343 + _ATTITUDE._serialized_start=2345 + _ATTITUDE._serialized_end=2431 + _ACTUATORCONTROLGROUP._serialized_start=2433 + _ACTUATORCONTROLGROUP._serialized_end=2473 + _ACTUATORCONTROL._serialized_start=2475 + _ACTUATORCONTROL._serialized_end=2551 + _ATTITUDERATE._serialized_start=2553 + _ATTITUDERATE._serialized_end=2649 + _POSITIONNEDYAW._serialized_start=2651 + _POSITIONNEDYAW._serialized_end=2733 + _POSITIONGLOBALYAW._serialized_start=2736 + _POSITIONGLOBALYAW._serialized_end=2988 + _POSITIONGLOBALYAW_ALTITUDETYPE._serialized_start=2899 + _POSITIONGLOBALYAW_ALTITUDETYPE._serialized_end=2988 + _VELOCITYBODYYAWSPEED._serialized_start=2990 + _VELOCITYBODYYAWSPEED._serialized_end=3094 + _VELOCITYNEDYAW._serialized_start=3096 + _VELOCITYNEDYAW._serialized_end=3184 + _ACCELERATIONNED._serialized_start=3186 + _ACCELERATIONNED._serialized_end=3261 + _OFFBOARDRESULT._serialized_start=3264 + _OFFBOARDRESULT._serialized_end=3573 + _OFFBOARDRESULT_RESULT._serialized_start=3363 + _OFFBOARDRESULT_RESULT._serialized_end=3573 + _OFFBOARDSERVICE._serialized_start=3576 + _OFFBOARDSERVICE._serialized_end=5095 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/offboard_pb2_grpc.py b/mavsdk/offboard_pb2_grpc.py index 835eaa42..c51447d6 100644 --- a/mavsdk/offboard_pb2_grpc.py +++ b/mavsdk/offboard_pb2_grpc.py @@ -78,6 +78,11 @@ def __init__(self, channel): request_serializer=offboard_dot_offboard__pb2.SetPositionVelocityNedRequest.SerializeToString, response_deserializer=offboard_dot_offboard__pb2.SetPositionVelocityNedResponse.FromString, ) + self.SetPositionVelocityAccelerationNed = channel.unary_unary( + '/mavsdk.rpc.offboard.OffboardService/SetPositionVelocityAccelerationNed', + request_serializer=offboard_dot_offboard__pb2.SetPositionVelocityAccelerationNedRequest.SerializeToString, + response_deserializer=offboard_dot_offboard__pb2.SetPositionVelocityAccelerationNedResponse.FromString, + ) self.SetAccelerationNed = channel.unary_unary( '/mavsdk.rpc.offboard.OffboardService/SetAccelerationNed', request_serializer=offboard_dot_offboard__pb2.SetAccelerationNedRequest.SerializeToString, @@ -193,6 +198,14 @@ def SetPositionVelocityNed(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def SetPositionVelocityAccelerationNed(self, request, context): + """ + Set the position, velocity and acceleration in NED coordinates, with velocity and acceleration used as feed-forward. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SetAccelerationNed(self, request, context): """ Set the acceleration in NED coordinates. @@ -259,6 +272,11 @@ def add_OffboardServiceServicer_to_server(servicer, server): request_deserializer=offboard_dot_offboard__pb2.SetPositionVelocityNedRequest.FromString, response_serializer=offboard_dot_offboard__pb2.SetPositionVelocityNedResponse.SerializeToString, ), + 'SetPositionVelocityAccelerationNed': grpc.unary_unary_rpc_method_handler( + servicer.SetPositionVelocityAccelerationNed, + request_deserializer=offboard_dot_offboard__pb2.SetPositionVelocityAccelerationNedRequest.FromString, + response_serializer=offboard_dot_offboard__pb2.SetPositionVelocityAccelerationNedResponse.SerializeToString, + ), 'SetAccelerationNed': grpc.unary_unary_rpc_method_handler( servicer.SetAccelerationNed, request_deserializer=offboard_dot_offboard__pb2.SetAccelerationNedRequest.FromString, @@ -470,6 +488,23 @@ def SetPositionVelocityNed(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def SetPositionVelocityAccelerationNed(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.offboard.OffboardService/SetPositionVelocityAccelerationNed', + offboard_dot_offboard__pb2.SetPositionVelocityAccelerationNedRequest.SerializeToString, + offboard_dot_offboard__pb2.SetPositionVelocityAccelerationNedResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def SetAccelerationNed(request, target, diff --git a/mavsdk/param.py b/mavsdk/param.py index 945af501..ff90f71e 100644 --- a/mavsdk/param.py +++ b/mavsdk/param.py @@ -6,6 +6,42 @@ from enum import Enum +class ProtocolVersion(Enum): + """ + Parameter version + + Values + ------ + V1 + Original v1 version + + EXT + Extended param version + + """ + + + V1 = 0 + EXT = 1 + + def translate_to_rpc(self): + if self == ProtocolVersion.V1: + return param_pb2.PROTOCOL_VERSION_V1 + if self == ProtocolVersion.EXT: + return param_pb2.PROTOCOL_VERSION_EXT + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == param_pb2.PROTOCOL_VERSION_V1: + return ProtocolVersion.V1 + if rpc_enum_value == param_pb2.PROTOCOL_VERSION_EXT: + return ProtocolVersion.EXT + + def __str__(self): + return self.name + + class IntParam: """ Type for integer parameters. @@ -385,6 +421,9 @@ class Result(Enum): PARAM_VALUE_TOO_LONG Param value too long (> 128) + FAILED + Operation failed. + """ @@ -396,6 +435,7 @@ class Result(Enum): PARAM_NAME_TOO_LONG = 5 NO_SYSTEM = 6 PARAM_VALUE_TOO_LONG = 7 + FAILED = 8 def translate_to_rpc(self): if self == ParamResult.Result.UNKNOWN: @@ -414,6 +454,8 @@ def translate_to_rpc(self): return param_pb2.ParamResult.RESULT_NO_SYSTEM if self == ParamResult.Result.PARAM_VALUE_TOO_LONG: return param_pb2.ParamResult.RESULT_PARAM_VALUE_TOO_LONG + if self == ParamResult.Result.FAILED: + return param_pb2.ParamResult.RESULT_FAILED @staticmethod def translate_from_rpc(rpc_enum_value): @@ -434,6 +476,8 @@ def translate_from_rpc(rpc_enum_value): return ParamResult.Result.NO_SYSTEM if rpc_enum_value == param_pb2.ParamResult.RESULT_PARAM_VALUE_TOO_LONG: return ParamResult.Result.PARAM_VALUE_TOO_LONG + if rpc_enum_value == param_pb2.ParamResult.RESULT_FAILED: + return ParamResult.Result.FAILED def __str__(self): return self.name @@ -761,4 +805,39 @@ async def get_all_params(self): return AllParams.translate_from_rpc(response.params) - \ No newline at end of file + + + async def select_component(self, component_id, protocol_version): + """ + Select component ID of parameter component to talk to and param protocol version. + + Default is the autopilot component (1), and Version (0). + + Parameters + ---------- + component_id : int32_t + MAVLink component Id of component to select + + protocol_version : ProtocolVersion + Protocol version + + Raises + ------ + ParamError + If the request fails. The error contains the reason for the failure. + """ + + request = param_pb2.SelectComponentRequest() + request.component_id = component_id + + request.protocol_version = protocol_version.translate_to_rpc() + + + response = await self._stub.SelectComponent(request) + + + result = self._extract_result(response) + + if result.result != ParamResult.Result.SUCCESS: + raise ParamError(result, "select_component()", component_id, protocol_version) + \ No newline at end of file diff --git a/mavsdk/param_pb2.py b/mavsdk/param_pb2.py index 56096215..18837ece 100644 --- a/mavsdk/param_pb2.py +++ b/mavsdk/param_pb2.py @@ -2,6 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: param/param.proto """Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _message @@ -15,8 +16,12 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11param/param.proto\x12\x10mavsdk.rpc.param\x1a\x14mavsdk_options.proto\"\"\n\x12GetParamIntRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"Y\n\x13GetParamIntResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\x12\r\n\x05value\x18\x02 \x01(\x05\"1\n\x12SetParamIntRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05\"J\n\x13SetParamIntResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\"$\n\x14GetParamFloatRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"[\n\x15GetParamFloatResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\x12\r\n\x05value\x18\x02 \x01(\x02\"3\n\x14SetParamFloatRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02\"L\n\x15SetParamFloatResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\"%\n\x15GetParamCustomRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\\\n\x16GetParamCustomResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\x12\r\n\x05value\x18\x02 \x01(\t\"4\n\x15SetParamCustomRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"M\n\x16SetParamCustomResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\"\x15\n\x13GetAllParamsRequest\"C\n\x14GetAllParamsResponse\x12+\n\x06params\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.param.AllParams\"\'\n\x08IntParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05\")\n\nFloatParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02\"*\n\x0b\x43ustomParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\xa5\x01\n\tAllParams\x12.\n\nint_params\x18\x01 \x03(\x0b\x32\x1a.mavsdk.rpc.param.IntParam\x12\x32\n\x0c\x66loat_params\x18\x02 \x03(\x0b\x32\x1c.mavsdk.rpc.param.FloatParam\x12\x34\n\rcustom_params\x18\x03 \x03(\x0b\x32\x1d.mavsdk.rpc.param.CustomParam\"\xa9\x02\n\x0bParamResult\x12\x34\n\x06result\x18\x01 \x01(\x0e\x32$.mavsdk.rpc.param.ParamResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xcf\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x12\n\x0eRESULT_TIMEOUT\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x15\n\x11RESULT_WRONG_TYPE\x10\x04\x12\x1e\n\x1aRESULT_PARAM_NAME_TOO_LONG\x10\x05\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x06\x12\x1f\n\x1bRESULT_PARAM_VALUE_TOO_LONG\x10\x07\x32\xdd\x05\n\x0cParamService\x12`\n\x0bGetParamInt\x12$.mavsdk.rpc.param.GetParamIntRequest\x1a%.mavsdk.rpc.param.GetParamIntResponse\"\x04\x80\xb5\x18\x01\x12`\n\x0bSetParamInt\x12$.mavsdk.rpc.param.SetParamIntRequest\x1a%.mavsdk.rpc.param.SetParamIntResponse\"\x04\x80\xb5\x18\x01\x12\x66\n\rGetParamFloat\x12&.mavsdk.rpc.param.GetParamFloatRequest\x1a\'.mavsdk.rpc.param.GetParamFloatResponse\"\x04\x80\xb5\x18\x01\x12\x66\n\rSetParamFloat\x12&.mavsdk.rpc.param.SetParamFloatRequest\x1a\'.mavsdk.rpc.param.SetParamFloatResponse\"\x04\x80\xb5\x18\x01\x12i\n\x0eGetParamCustom\x12\'.mavsdk.rpc.param.GetParamCustomRequest\x1a(.mavsdk.rpc.param.GetParamCustomResponse\"\x04\x80\xb5\x18\x01\x12i\n\x0eSetParamCustom\x12\'.mavsdk.rpc.param.SetParamCustomRequest\x1a(.mavsdk.rpc.param.SetParamCustomResponse\"\x04\x80\xb5\x18\x01\x12\x63\n\x0cGetAllParams\x12%.mavsdk.rpc.param.GetAllParamsRequest\x1a&.mavsdk.rpc.param.GetAllParamsResponse\"\x04\x80\xb5\x18\x01\x42\x1d\n\x0fio.mavsdk.paramB\nParamProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11param/param.proto\x12\x10mavsdk.rpc.param\x1a\x14mavsdk_options.proto\"\"\n\x12GetParamIntRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"Y\n\x13GetParamIntResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\x12\r\n\x05value\x18\x02 \x01(\x05\"1\n\x12SetParamIntRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05\"J\n\x13SetParamIntResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\"$\n\x14GetParamFloatRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"[\n\x15GetParamFloatResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\x12\r\n\x05value\x18\x02 \x01(\x02\"3\n\x14SetParamFloatRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02\"L\n\x15SetParamFloatResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\"%\n\x15GetParamCustomRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\\\n\x16GetParamCustomResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\x12\r\n\x05value\x18\x02 \x01(\t\"4\n\x15SetParamCustomRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"M\n\x16SetParamCustomResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\"\x15\n\x13GetAllParamsRequest\"C\n\x14GetAllParamsResponse\x12+\n\x06params\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.param.AllParams\"N\n\x17SelectComponentResponse\x12\x33\n\x0cparam_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.param.ParamResult\"k\n\x16SelectComponentRequest\x12\x14\n\x0c\x63omponent_id\x18\x01 \x01(\x05\x12;\n\x10protocol_version\x18\x02 \x01(\x0e\x32!.mavsdk.rpc.param.ProtocolVersion\"\'\n\x08IntParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05\")\n\nFloatParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02\"*\n\x0b\x43ustomParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\xa5\x01\n\tAllParams\x12.\n\nint_params\x18\x01 \x03(\x0b\x32\x1a.mavsdk.rpc.param.IntParam\x12\x32\n\x0c\x66loat_params\x18\x02 \x03(\x0b\x32\x1c.mavsdk.rpc.param.FloatParam\x12\x34\n\rcustom_params\x18\x03 \x03(\x0b\x32\x1d.mavsdk.rpc.param.CustomParam\"\xbc\x02\n\x0bParamResult\x12\x34\n\x06result\x18\x01 \x01(\x0e\x32$.mavsdk.rpc.param.ParamResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xe2\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x12\n\x0eRESULT_TIMEOUT\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x15\n\x11RESULT_WRONG_TYPE\x10\x04\x12\x1e\n\x1aRESULT_PARAM_NAME_TOO_LONG\x10\x05\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x06\x12\x1f\n\x1bRESULT_PARAM_VALUE_TOO_LONG\x10\x07\x12\x11\n\rRESULT_FAILED\x10\x08*D\n\x0fProtocolVersion\x12\x17\n\x13PROTOCOL_VERSION_V1\x10\x00\x12\x18\n\x14PROTOCOL_VERSION_EXT\x10\x01\x32\xcb\x06\n\x0cParamService\x12`\n\x0bGetParamInt\x12$.mavsdk.rpc.param.GetParamIntRequest\x1a%.mavsdk.rpc.param.GetParamIntResponse\"\x04\x80\xb5\x18\x01\x12`\n\x0bSetParamInt\x12$.mavsdk.rpc.param.SetParamIntRequest\x1a%.mavsdk.rpc.param.SetParamIntResponse\"\x04\x80\xb5\x18\x01\x12\x66\n\rGetParamFloat\x12&.mavsdk.rpc.param.GetParamFloatRequest\x1a\'.mavsdk.rpc.param.GetParamFloatResponse\"\x04\x80\xb5\x18\x01\x12\x66\n\rSetParamFloat\x12&.mavsdk.rpc.param.SetParamFloatRequest\x1a\'.mavsdk.rpc.param.SetParamFloatResponse\"\x04\x80\xb5\x18\x01\x12i\n\x0eGetParamCustom\x12\'.mavsdk.rpc.param.GetParamCustomRequest\x1a(.mavsdk.rpc.param.GetParamCustomResponse\"\x04\x80\xb5\x18\x01\x12i\n\x0eSetParamCustom\x12\'.mavsdk.rpc.param.SetParamCustomRequest\x1a(.mavsdk.rpc.param.SetParamCustomResponse\"\x04\x80\xb5\x18\x01\x12\x63\n\x0cGetAllParams\x12%.mavsdk.rpc.param.GetAllParamsRequest\x1a&.mavsdk.rpc.param.GetAllParamsResponse\"\x04\x80\xb5\x18\x01\x12l\n\x0fSelectComponent\x12(.mavsdk.rpc.param.SelectComponentRequest\x1a).mavsdk.rpc.param.SelectComponentResponse\"\x04\x80\xb5\x18\x01\x42\x1d\n\x0fio.mavsdk.paramB\nParamProtob\x06proto3') +_PROTOCOLVERSION = DESCRIPTOR.enum_types_by_name['ProtocolVersion'] +ProtocolVersion = enum_type_wrapper.EnumTypeWrapper(_PROTOCOLVERSION) +PROTOCOL_VERSION_V1 = 0 +PROTOCOL_VERSION_EXT = 1 _GETPARAMINTREQUEST = DESCRIPTOR.message_types_by_name['GetParamIntRequest'] @@ -33,6 +38,8 @@ _SETPARAMCUSTOMRESPONSE = DESCRIPTOR.message_types_by_name['SetParamCustomResponse'] _GETALLPARAMSREQUEST = DESCRIPTOR.message_types_by_name['GetAllParamsRequest'] _GETALLPARAMSRESPONSE = DESCRIPTOR.message_types_by_name['GetAllParamsResponse'] +_SELECTCOMPONENTRESPONSE = DESCRIPTOR.message_types_by_name['SelectComponentResponse'] +_SELECTCOMPONENTREQUEST = DESCRIPTOR.message_types_by_name['SelectComponentRequest'] _INTPARAM = DESCRIPTOR.message_types_by_name['IntParam'] _FLOATPARAM = DESCRIPTOR.message_types_by_name['FloatParam'] _CUSTOMPARAM = DESCRIPTOR.message_types_by_name['CustomParam'] @@ -137,6 +144,20 @@ }) _sym_db.RegisterMessage(GetAllParamsResponse) +SelectComponentResponse = _reflection.GeneratedProtocolMessageType('SelectComponentResponse', (_message.Message,), { + 'DESCRIPTOR' : _SELECTCOMPONENTRESPONSE, + '__module__' : 'param.param_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.param.SelectComponentResponse) + }) +_sym_db.RegisterMessage(SelectComponentResponse) + +SelectComponentRequest = _reflection.GeneratedProtocolMessageType('SelectComponentRequest', (_message.Message,), { + 'DESCRIPTOR' : _SELECTCOMPONENTREQUEST, + '__module__' : 'param.param_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.param.SelectComponentRequest) + }) +_sym_db.RegisterMessage(SelectComponentRequest) + IntParam = _reflection.GeneratedProtocolMessageType('IntParam', (_message.Message,), { 'DESCRIPTOR' : _INTPARAM, '__module__' : 'param.param_pb2' @@ -191,6 +212,10 @@ _PARAMSERVICE.methods_by_name['SetParamCustom']._serialized_options = b'\200\265\030\001' _PARAMSERVICE.methods_by_name['GetAllParams']._options = None _PARAMSERVICE.methods_by_name['GetAllParams']._serialized_options = b'\200\265\030\001' + _PARAMSERVICE.methods_by_name['SelectComponent']._options = None + _PARAMSERVICE.methods_by_name['SelectComponent']._serialized_options = b'\200\265\030\001' + _PROTOCOLVERSION._serialized_start=1739 + _PROTOCOLVERSION._serialized_end=1807 _GETPARAMINTREQUEST._serialized_start=61 _GETPARAMINTREQUEST._serialized_end=95 _GETPARAMINTRESPONSE._serialized_start=97 @@ -219,18 +244,22 @@ _GETALLPARAMSREQUEST._serialized_end=864 _GETALLPARAMSRESPONSE._serialized_start=866 _GETALLPARAMSRESPONSE._serialized_end=933 - _INTPARAM._serialized_start=935 - _INTPARAM._serialized_end=974 - _FLOATPARAM._serialized_start=976 - _FLOATPARAM._serialized_end=1017 - _CUSTOMPARAM._serialized_start=1019 - _CUSTOMPARAM._serialized_end=1061 - _ALLPARAMS._serialized_start=1064 - _ALLPARAMS._serialized_end=1229 - _PARAMRESULT._serialized_start=1232 - _PARAMRESULT._serialized_end=1529 - _PARAMRESULT_RESULT._serialized_start=1322 - _PARAMRESULT_RESULT._serialized_end=1529 - _PARAMSERVICE._serialized_start=1532 - _PARAMSERVICE._serialized_end=2265 + _SELECTCOMPONENTRESPONSE._serialized_start=935 + _SELECTCOMPONENTRESPONSE._serialized_end=1013 + _SELECTCOMPONENTREQUEST._serialized_start=1015 + _SELECTCOMPONENTREQUEST._serialized_end=1122 + _INTPARAM._serialized_start=1124 + _INTPARAM._serialized_end=1163 + _FLOATPARAM._serialized_start=1165 + _FLOATPARAM._serialized_end=1206 + _CUSTOMPARAM._serialized_start=1208 + _CUSTOMPARAM._serialized_end=1250 + _ALLPARAMS._serialized_start=1253 + _ALLPARAMS._serialized_end=1418 + _PARAMRESULT._serialized_start=1421 + _PARAMRESULT._serialized_end=1737 + _PARAMRESULT_RESULT._serialized_start=1511 + _PARAMRESULT_RESULT._serialized_end=1737 + _PARAMSERVICE._serialized_start=1810 + _PARAMSERVICE._serialized_end=2653 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/param_pb2_grpc.py b/mavsdk/param_pb2_grpc.py index 2fef8c95..766208a5 100644 --- a/mavsdk/param_pb2_grpc.py +++ b/mavsdk/param_pb2_grpc.py @@ -50,6 +50,11 @@ def __init__(self, channel): request_serializer=param_dot_param__pb2.GetAllParamsRequest.SerializeToString, response_deserializer=param_dot_param__pb2.GetAllParamsResponse.FromString, ) + self.SelectComponent = channel.unary_unary( + '/mavsdk.rpc.param.ParamService/SelectComponent', + request_serializer=param_dot_param__pb2.SelectComponentRequest.SerializeToString, + response_deserializer=param_dot_param__pb2.SelectComponentResponse.FromString, + ) class ParamServiceServicer(object): @@ -124,6 +129,16 @@ def GetAllParams(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def SelectComponent(self, request, context): + """ + Select component ID of parameter component to talk to and param protocol version. + + Default is the autopilot component (1), and Version (0). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_ParamServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -162,6 +177,11 @@ def add_ParamServiceServicer_to_server(servicer, server): request_deserializer=param_dot_param__pb2.GetAllParamsRequest.FromString, response_serializer=param_dot_param__pb2.GetAllParamsResponse.SerializeToString, ), + 'SelectComponent': grpc.unary_unary_rpc_method_handler( + servicer.SelectComponent, + request_deserializer=param_dot_param__pb2.SelectComponentRequest.FromString, + response_serializer=param_dot_param__pb2.SelectComponentResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.param.ParamService', rpc_method_handlers) @@ -291,3 +311,20 @@ def GetAllParams(request, param_dot_param__pb2.GetAllParamsResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SelectComponent(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.param.ParamService/SelectComponent', + param_dot_param__pb2.SelectComponentRequest.SerializeToString, + param_dot_param__pb2.SelectComponentResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/mavsdk/param_server.py b/mavsdk/param_server.py index 5dac9e4c..d8b08cd7 100644 --- a/mavsdk/param_server.py +++ b/mavsdk/param_server.py @@ -753,4 +753,76 @@ async def retrieve_all_params(self): return AllParams.translate_from_rpc(response.params) - \ No newline at end of file + + + async def changed_param_int(self): + """ + Subscribe to changed int param. + + Yields + ------- + param : IntParam + Param that changed + + + """ + + request = param_server_pb2.SubscribeChangedParamIntRequest() + changed_param_int_stream = self._stub.SubscribeChangedParamInt(request) + + try: + async for response in changed_param_int_stream: + + + + yield IntParam.translate_from_rpc(response.param) + finally: + changed_param_int_stream.cancel() + + async def changed_param_float(self): + """ + Subscribe to changed float param. + + Yields + ------- + param : FloatParam + Param that changed + + + """ + + request = param_server_pb2.SubscribeChangedParamFloatRequest() + changed_param_float_stream = self._stub.SubscribeChangedParamFloat(request) + + try: + async for response in changed_param_float_stream: + + + + yield FloatParam.translate_from_rpc(response.param) + finally: + changed_param_float_stream.cancel() + + async def changed_param_custom(self): + """ + Subscribe to changed custom param. + + Yields + ------- + param : CustomParam + Param that changed + + + """ + + request = param_server_pb2.SubscribeChangedParamCustomRequest() + changed_param_custom_stream = self._stub.SubscribeChangedParamCustom(request) + + try: + async for response in changed_param_custom_stream: + + + + yield CustomParam.translate_from_rpc(response.param) + finally: + changed_param_custom_stream.cancel() \ No newline at end of file diff --git a/mavsdk/param_server_pb2.py b/mavsdk/param_server_pb2.py index 9edd3c6b..1d3bddd7 100644 --- a/mavsdk/param_server_pb2.py +++ b/mavsdk/param_server_pb2.py @@ -15,7 +15,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fparam_server/param_server.proto\x12\x17mavsdk.rpc.param_server\x1a\x14mavsdk_options.proto\"\'\n\x17RetrieveParamIntRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"r\n\x18RetrieveParamIntResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\x12\r\n\x05value\x18\x02 \x01(\x05\"5\n\x16ProvideParamIntRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05\"b\n\x17ProvideParamIntResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\")\n\x19RetrieveParamFloatRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"t\n\x1aRetrieveParamFloatResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\x12\r\n\x05value\x18\x02 \x01(\x02\"7\n\x18ProvideParamFloatRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02\"d\n\x19ProvideParamFloatResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\"*\n\x1aRetrieveParamCustomRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"u\n\x1bRetrieveParamCustomResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\x12\r\n\x05value\x18\x02 \x01(\t\"8\n\x19ProvideParamCustomRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"e\n\x1aProvideParamCustomResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\"\x1a\n\x18RetrieveAllParamsRequest\"O\n\x19RetrieveAllParamsResponse\x12\x32\n\x06params\x18\x01 \x01(\x0b\x32\".mavsdk.rpc.param_server.AllParams\"\'\n\x08IntParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05\")\n\nFloatParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02\"*\n\x0b\x43ustomParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\xba\x01\n\tAllParams\x12\x35\n\nint_params\x18\x01 \x03(\x0b\x32!.mavsdk.rpc.param_server.IntParam\x12\x39\n\x0c\x66loat_params\x18\x02 \x03(\x0b\x32#.mavsdk.rpc.param_server.FloatParam\x12;\n\rcustom_params\x18\x03 \x03(\x0b\x32$.mavsdk.rpc.param_server.CustomParam\"\xa1\x02\n\x11ParamServerResult\x12\x41\n\x06result\x18\x01 \x01(\x0e\x32\x31.mavsdk.rpc.param_server.ParamServerResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xb4\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NOT_FOUND\x10\x02\x12\x15\n\x11RESULT_WRONG_TYPE\x10\x03\x12\x1e\n\x1aRESULT_PARAM_NAME_TOO_LONG\x10\x04\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x05\x12\x1f\n\x1bRESULT_PARAM_VALUE_TOO_LONG\x10\x06\x32\xaa\x07\n\x12ParamServerService\x12}\n\x10RetrieveParamInt\x12\x30.mavsdk.rpc.param_server.RetrieveParamIntRequest\x1a\x31.mavsdk.rpc.param_server.RetrieveParamIntResponse\"\x04\x80\xb5\x18\x01\x12z\n\x0fProvideParamInt\x12/.mavsdk.rpc.param_server.ProvideParamIntRequest\x1a\x30.mavsdk.rpc.param_server.ProvideParamIntResponse\"\x04\x80\xb5\x18\x01\x12\x83\x01\n\x12RetrieveParamFloat\x12\x32.mavsdk.rpc.param_server.RetrieveParamFloatRequest\x1a\x33.mavsdk.rpc.param_server.RetrieveParamFloatResponse\"\x04\x80\xb5\x18\x01\x12\x80\x01\n\x11ProvideParamFloat\x12\x31.mavsdk.rpc.param_server.ProvideParamFloatRequest\x1a\x32.mavsdk.rpc.param_server.ProvideParamFloatResponse\"\x04\x80\xb5\x18\x01\x12\x86\x01\n\x13RetrieveParamCustom\x12\x33.mavsdk.rpc.param_server.RetrieveParamCustomRequest\x1a\x34.mavsdk.rpc.param_server.RetrieveParamCustomResponse\"\x04\x80\xb5\x18\x01\x12\x83\x01\n\x12ProvideParamCustom\x12\x32.mavsdk.rpc.param_server.ProvideParamCustomRequest\x1a\x33.mavsdk.rpc.param_server.ProvideParamCustomResponse\"\x04\x80\xb5\x18\x01\x12\x80\x01\n\x11RetrieveAllParams\x12\x31.mavsdk.rpc.param_server.RetrieveAllParamsRequest\x1a\x32.mavsdk.rpc.param_server.RetrieveAllParamsResponse\"\x04\x80\xb5\x18\x01\x42*\n\x16io.mavsdk.param_serverB\x10ParamServerProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fparam_server/param_server.proto\x12\x17mavsdk.rpc.param_server\x1a\x14mavsdk_options.proto\"\'\n\x17RetrieveParamIntRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"r\n\x18RetrieveParamIntResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\x12\r\n\x05value\x18\x02 \x01(\x05\"5\n\x16ProvideParamIntRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05\"b\n\x17ProvideParamIntResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\")\n\x19RetrieveParamFloatRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"t\n\x1aRetrieveParamFloatResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\x12\r\n\x05value\x18\x02 \x01(\x02\"7\n\x18ProvideParamFloatRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02\"d\n\x19ProvideParamFloatResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\"*\n\x1aRetrieveParamCustomRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"u\n\x1bRetrieveParamCustomResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\x12\r\n\x05value\x18\x02 \x01(\t\"8\n\x19ProvideParamCustomRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"e\n\x1aProvideParamCustomResponse\x12G\n\x13param_server_result\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.param_server.ParamServerResult\"\x1a\n\x18RetrieveAllParamsRequest\"O\n\x19RetrieveAllParamsResponse\x12\x32\n\x06params\x18\x01 \x01(\x0b\x32\".mavsdk.rpc.param_server.AllParams\"!\n\x1fSubscribeChangedParamIntRequest\"K\n\x17\x43hangedParamIntResponse\x12\x30\n\x05param\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.param_server.IntParam\"#\n!SubscribeChangedParamFloatRequest\"O\n\x19\x43hangedParamFloatResponse\x12\x32\n\x05param\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.param_server.FloatParam\"$\n\"SubscribeChangedParamCustomRequest\"Q\n\x1a\x43hangedParamCustomResponse\x12\x33\n\x05param\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.param_server.CustomParam\"\'\n\x08IntParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05\")\n\nFloatParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02\"*\n\x0b\x43ustomParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\xba\x01\n\tAllParams\x12\x35\n\nint_params\x18\x01 \x03(\x0b\x32!.mavsdk.rpc.param_server.IntParam\x12\x39\n\x0c\x66loat_params\x18\x02 \x03(\x0b\x32#.mavsdk.rpc.param_server.FloatParam\x12;\n\rcustom_params\x18\x03 \x03(\x0b\x32$.mavsdk.rpc.param_server.CustomParam\"\xa1\x02\n\x11ParamServerResult\x12\x41\n\x06result\x18\x01 \x01(\x0e\x32\x31.mavsdk.rpc.param_server.ParamServerResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xb4\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NOT_FOUND\x10\x02\x12\x15\n\x11RESULT_WRONG_TYPE\x10\x03\x12\x1e\n\x1aRESULT_PARAM_NAME_TOO_LONG\x10\x04\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x05\x12\x1f\n\x1bRESULT_PARAM_VALUE_TOO_LONG\x10\x06\x32\xec\n\n\x12ParamServerService\x12}\n\x10RetrieveParamInt\x12\x30.mavsdk.rpc.param_server.RetrieveParamIntRequest\x1a\x31.mavsdk.rpc.param_server.RetrieveParamIntResponse\"\x04\x80\xb5\x18\x01\x12z\n\x0fProvideParamInt\x12/.mavsdk.rpc.param_server.ProvideParamIntRequest\x1a\x30.mavsdk.rpc.param_server.ProvideParamIntResponse\"\x04\x80\xb5\x18\x01\x12\x83\x01\n\x12RetrieveParamFloat\x12\x32.mavsdk.rpc.param_server.RetrieveParamFloatRequest\x1a\x33.mavsdk.rpc.param_server.RetrieveParamFloatResponse\"\x04\x80\xb5\x18\x01\x12\x80\x01\n\x11ProvideParamFloat\x12\x31.mavsdk.rpc.param_server.ProvideParamFloatRequest\x1a\x32.mavsdk.rpc.param_server.ProvideParamFloatResponse\"\x04\x80\xb5\x18\x01\x12\x86\x01\n\x13RetrieveParamCustom\x12\x33.mavsdk.rpc.param_server.RetrieveParamCustomRequest\x1a\x34.mavsdk.rpc.param_server.RetrieveParamCustomResponse\"\x04\x80\xb5\x18\x01\x12\x83\x01\n\x12ProvideParamCustom\x12\x32.mavsdk.rpc.param_server.ProvideParamCustomRequest\x1a\x33.mavsdk.rpc.param_server.ProvideParamCustomResponse\"\x04\x80\xb5\x18\x01\x12\x80\x01\n\x11RetrieveAllParams\x12\x31.mavsdk.rpc.param_server.RetrieveAllParamsRequest\x1a\x32.mavsdk.rpc.param_server.RetrieveAllParamsResponse\"\x04\x80\xb5\x18\x01\x12\x8e\x01\n\x18SubscribeChangedParamInt\x12\x38.mavsdk.rpc.param_server.SubscribeChangedParamIntRequest\x1a\x30.mavsdk.rpc.param_server.ChangedParamIntResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x94\x01\n\x1aSubscribeChangedParamFloat\x12:.mavsdk.rpc.param_server.SubscribeChangedParamFloatRequest\x1a\x32.mavsdk.rpc.param_server.ChangedParamFloatResponse\"\x04\x80\xb5\x18\x00\x30\x01\x12\x97\x01\n\x1bSubscribeChangedParamCustom\x12;.mavsdk.rpc.param_server.SubscribeChangedParamCustomRequest\x1a\x33.mavsdk.rpc.param_server.ChangedParamCustomResponse\"\x04\x80\xb5\x18\x00\x30\x01\x42*\n\x16io.mavsdk.param_serverB\x10ParamServerProtob\x06proto3') @@ -33,6 +33,12 @@ _PROVIDEPARAMCUSTOMRESPONSE = DESCRIPTOR.message_types_by_name['ProvideParamCustomResponse'] _RETRIEVEALLPARAMSREQUEST = DESCRIPTOR.message_types_by_name['RetrieveAllParamsRequest'] _RETRIEVEALLPARAMSRESPONSE = DESCRIPTOR.message_types_by_name['RetrieveAllParamsResponse'] +_SUBSCRIBECHANGEDPARAMINTREQUEST = DESCRIPTOR.message_types_by_name['SubscribeChangedParamIntRequest'] +_CHANGEDPARAMINTRESPONSE = DESCRIPTOR.message_types_by_name['ChangedParamIntResponse'] +_SUBSCRIBECHANGEDPARAMFLOATREQUEST = DESCRIPTOR.message_types_by_name['SubscribeChangedParamFloatRequest'] +_CHANGEDPARAMFLOATRESPONSE = DESCRIPTOR.message_types_by_name['ChangedParamFloatResponse'] +_SUBSCRIBECHANGEDPARAMCUSTOMREQUEST = DESCRIPTOR.message_types_by_name['SubscribeChangedParamCustomRequest'] +_CHANGEDPARAMCUSTOMRESPONSE = DESCRIPTOR.message_types_by_name['ChangedParamCustomResponse'] _INTPARAM = DESCRIPTOR.message_types_by_name['IntParam'] _FLOATPARAM = DESCRIPTOR.message_types_by_name['FloatParam'] _CUSTOMPARAM = DESCRIPTOR.message_types_by_name['CustomParam'] @@ -137,6 +143,48 @@ }) _sym_db.RegisterMessage(RetrieveAllParamsResponse) +SubscribeChangedParamIntRequest = _reflection.GeneratedProtocolMessageType('SubscribeChangedParamIntRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBECHANGEDPARAMINTREQUEST, + '__module__' : 'param_server.param_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.param_server.SubscribeChangedParamIntRequest) + }) +_sym_db.RegisterMessage(SubscribeChangedParamIntRequest) + +ChangedParamIntResponse = _reflection.GeneratedProtocolMessageType('ChangedParamIntResponse', (_message.Message,), { + 'DESCRIPTOR' : _CHANGEDPARAMINTRESPONSE, + '__module__' : 'param_server.param_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.param_server.ChangedParamIntResponse) + }) +_sym_db.RegisterMessage(ChangedParamIntResponse) + +SubscribeChangedParamFloatRequest = _reflection.GeneratedProtocolMessageType('SubscribeChangedParamFloatRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBECHANGEDPARAMFLOATREQUEST, + '__module__' : 'param_server.param_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.param_server.SubscribeChangedParamFloatRequest) + }) +_sym_db.RegisterMessage(SubscribeChangedParamFloatRequest) + +ChangedParamFloatResponse = _reflection.GeneratedProtocolMessageType('ChangedParamFloatResponse', (_message.Message,), { + 'DESCRIPTOR' : _CHANGEDPARAMFLOATRESPONSE, + '__module__' : 'param_server.param_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.param_server.ChangedParamFloatResponse) + }) +_sym_db.RegisterMessage(ChangedParamFloatResponse) + +SubscribeChangedParamCustomRequest = _reflection.GeneratedProtocolMessageType('SubscribeChangedParamCustomRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBECHANGEDPARAMCUSTOMREQUEST, + '__module__' : 'param_server.param_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.param_server.SubscribeChangedParamCustomRequest) + }) +_sym_db.RegisterMessage(SubscribeChangedParamCustomRequest) + +ChangedParamCustomResponse = _reflection.GeneratedProtocolMessageType('ChangedParamCustomResponse', (_message.Message,), { + 'DESCRIPTOR' : _CHANGEDPARAMCUSTOMRESPONSE, + '__module__' : 'param_server.param_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.param_server.ChangedParamCustomResponse) + }) +_sym_db.RegisterMessage(ChangedParamCustomResponse) + IntParam = _reflection.GeneratedProtocolMessageType('IntParam', (_message.Message,), { 'DESCRIPTOR' : _INTPARAM, '__module__' : 'param_server.param_server_pb2' @@ -191,6 +239,12 @@ _PARAMSERVERSERVICE.methods_by_name['ProvideParamCustom']._serialized_options = b'\200\265\030\001' _PARAMSERVERSERVICE.methods_by_name['RetrieveAllParams']._options = None _PARAMSERVERSERVICE.methods_by_name['RetrieveAllParams']._serialized_options = b'\200\265\030\001' + _PARAMSERVERSERVICE.methods_by_name['SubscribeChangedParamInt']._options = None + _PARAMSERVERSERVICE.methods_by_name['SubscribeChangedParamInt']._serialized_options = b'\200\265\030\000' + _PARAMSERVERSERVICE.methods_by_name['SubscribeChangedParamFloat']._options = None + _PARAMSERVERSERVICE.methods_by_name['SubscribeChangedParamFloat']._serialized_options = b'\200\265\030\000' + _PARAMSERVERSERVICE.methods_by_name['SubscribeChangedParamCustom']._options = None + _PARAMSERVERSERVICE.methods_by_name['SubscribeChangedParamCustom']._serialized_options = b'\200\265\030\000' _RETRIEVEPARAMINTREQUEST._serialized_start=82 _RETRIEVEPARAMINTREQUEST._serialized_end=121 _RETRIEVEPARAMINTRESPONSE._serialized_start=123 @@ -219,18 +273,30 @@ _RETRIEVEALLPARAMSREQUEST._serialized_end=1064 _RETRIEVEALLPARAMSRESPONSE._serialized_start=1066 _RETRIEVEALLPARAMSRESPONSE._serialized_end=1145 - _INTPARAM._serialized_start=1147 - _INTPARAM._serialized_end=1186 - _FLOATPARAM._serialized_start=1188 - _FLOATPARAM._serialized_end=1229 - _CUSTOMPARAM._serialized_start=1231 - _CUSTOMPARAM._serialized_end=1273 - _ALLPARAMS._serialized_start=1276 - _ALLPARAMS._serialized_end=1462 - _PARAMSERVERRESULT._serialized_start=1465 - _PARAMSERVERRESULT._serialized_end=1754 - _PARAMSERVERRESULT_RESULT._serialized_start=1574 - _PARAMSERVERRESULT_RESULT._serialized_end=1754 - _PARAMSERVERSERVICE._serialized_start=1757 - _PARAMSERVERSERVICE._serialized_end=2695 + _SUBSCRIBECHANGEDPARAMINTREQUEST._serialized_start=1147 + _SUBSCRIBECHANGEDPARAMINTREQUEST._serialized_end=1180 + _CHANGEDPARAMINTRESPONSE._serialized_start=1182 + _CHANGEDPARAMINTRESPONSE._serialized_end=1257 + _SUBSCRIBECHANGEDPARAMFLOATREQUEST._serialized_start=1259 + _SUBSCRIBECHANGEDPARAMFLOATREQUEST._serialized_end=1294 + _CHANGEDPARAMFLOATRESPONSE._serialized_start=1296 + _CHANGEDPARAMFLOATRESPONSE._serialized_end=1375 + _SUBSCRIBECHANGEDPARAMCUSTOMREQUEST._serialized_start=1377 + _SUBSCRIBECHANGEDPARAMCUSTOMREQUEST._serialized_end=1413 + _CHANGEDPARAMCUSTOMRESPONSE._serialized_start=1415 + _CHANGEDPARAMCUSTOMRESPONSE._serialized_end=1496 + _INTPARAM._serialized_start=1498 + _INTPARAM._serialized_end=1537 + _FLOATPARAM._serialized_start=1539 + _FLOATPARAM._serialized_end=1580 + _CUSTOMPARAM._serialized_start=1582 + _CUSTOMPARAM._serialized_end=1624 + _ALLPARAMS._serialized_start=1627 + _ALLPARAMS._serialized_end=1813 + _PARAMSERVERRESULT._serialized_start=1816 + _PARAMSERVERRESULT._serialized_end=2105 + _PARAMSERVERRESULT_RESULT._serialized_start=1925 + _PARAMSERVERRESULT_RESULT._serialized_end=2105 + _PARAMSERVERSERVICE._serialized_start=2108 + _PARAMSERVERSERVICE._serialized_end=3496 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/param_server_pb2_grpc.py b/mavsdk/param_server_pb2_grpc.py index d7721b0d..2fc5cd96 100644 --- a/mavsdk/param_server_pb2_grpc.py +++ b/mavsdk/param_server_pb2_grpc.py @@ -50,6 +50,21 @@ def __init__(self, channel): request_serializer=param__server_dot_param__server__pb2.RetrieveAllParamsRequest.SerializeToString, response_deserializer=param__server_dot_param__server__pb2.RetrieveAllParamsResponse.FromString, ) + self.SubscribeChangedParamInt = channel.unary_stream( + '/mavsdk.rpc.param_server.ParamServerService/SubscribeChangedParamInt', + request_serializer=param__server_dot_param__server__pb2.SubscribeChangedParamIntRequest.SerializeToString, + response_deserializer=param__server_dot_param__server__pb2.ChangedParamIntResponse.FromString, + ) + self.SubscribeChangedParamFloat = channel.unary_stream( + '/mavsdk.rpc.param_server.ParamServerService/SubscribeChangedParamFloat', + request_serializer=param__server_dot_param__server__pb2.SubscribeChangedParamFloatRequest.SerializeToString, + response_deserializer=param__server_dot_param__server__pb2.ChangedParamFloatResponse.FromString, + ) + self.SubscribeChangedParamCustom = channel.unary_stream( + '/mavsdk.rpc.param_server.ParamServerService/SubscribeChangedParamCustom', + request_serializer=param__server_dot_param__server__pb2.SubscribeChangedParamCustomRequest.SerializeToString, + response_deserializer=param__server_dot_param__server__pb2.ChangedParamCustomResponse.FromString, + ) class ParamServerServiceServicer(object): @@ -124,6 +139,27 @@ def RetrieveAllParams(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def SubscribeChangedParamInt(self, request, context): + """Subscribe to changed int param. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SubscribeChangedParamFloat(self, request, context): + """Subscribe to changed float param. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SubscribeChangedParamCustom(self, request, context): + """Subscribe to changed custom param. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_ParamServerServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -162,6 +198,21 @@ def add_ParamServerServiceServicer_to_server(servicer, server): request_deserializer=param__server_dot_param__server__pb2.RetrieveAllParamsRequest.FromString, response_serializer=param__server_dot_param__server__pb2.RetrieveAllParamsResponse.SerializeToString, ), + 'SubscribeChangedParamInt': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeChangedParamInt, + request_deserializer=param__server_dot_param__server__pb2.SubscribeChangedParamIntRequest.FromString, + response_serializer=param__server_dot_param__server__pb2.ChangedParamIntResponse.SerializeToString, + ), + 'SubscribeChangedParamFloat': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeChangedParamFloat, + request_deserializer=param__server_dot_param__server__pb2.SubscribeChangedParamFloatRequest.FromString, + response_serializer=param__server_dot_param__server__pb2.ChangedParamFloatResponse.SerializeToString, + ), + 'SubscribeChangedParamCustom': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeChangedParamCustom, + request_deserializer=param__server_dot_param__server__pb2.SubscribeChangedParamCustomRequest.FromString, + response_serializer=param__server_dot_param__server__pb2.ChangedParamCustomResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.param_server.ParamServerService', rpc_method_handlers) @@ -291,3 +342,54 @@ def RetrieveAllParams(request, param__server_dot_param__server__pb2.RetrieveAllParamsResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeChangedParamInt(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.param_server.ParamServerService/SubscribeChangedParamInt', + param__server_dot_param__server__pb2.SubscribeChangedParamIntRequest.SerializeToString, + param__server_dot_param__server__pb2.ChangedParamIntResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeChangedParamFloat(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.param_server.ParamServerService/SubscribeChangedParamFloat', + param__server_dot_param__server__pb2.SubscribeChangedParamFloatRequest.SerializeToString, + param__server_dot_param__server__pb2.ChangedParamFloatResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeChangedParamCustom(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.param_server.ParamServerService/SubscribeChangedParamCustom', + param__server_dot_param__server__pb2.SubscribeChangedParamCustomRequest.SerializeToString, + param__server_dot_param__server__pb2.ChangedParamCustomResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/mavsdk/source/plugins/ftp_server.rst b/mavsdk/source/plugins/ftp_server.rst new file mode 100644 index 00000000..f7ee2923 --- /dev/null +++ b/mavsdk/source/plugins/ftp_server.rst @@ -0,0 +1,8 @@ +FtpServer +==== + +.. automodule:: mavsdk.ftp_server + :members: + :undoc-members: + :show-inheritance: + :exclude-members: translate_from_rpc, translate_to_rpc \ No newline at end of file diff --git a/mavsdk/source/plugins/gripper.rst b/mavsdk/source/plugins/gripper.rst new file mode 100644 index 00000000..2d2fd111 --- /dev/null +++ b/mavsdk/source/plugins/gripper.rst @@ -0,0 +1,8 @@ +Gripper +==== + +.. automodule:: mavsdk.gripper + :members: + :undoc-members: + :show-inheritance: + :exclude-members: translate_from_rpc, translate_to_rpc \ No newline at end of file diff --git a/mavsdk/source/plugins/index.rst b/mavsdk/source/plugins/index.rst index d2a8708d..afe682c2 100644 --- a/mavsdk/source/plugins/index.rst +++ b/mavsdk/source/plugins/index.rst @@ -35,3 +35,6 @@ Plugins tune camera_server rtk + ftp_server + gripper + winch diff --git a/mavsdk/source/plugins/winch.rst b/mavsdk/source/plugins/winch.rst new file mode 100644 index 00000000..d61ed448 --- /dev/null +++ b/mavsdk/source/plugins/winch.rst @@ -0,0 +1,8 @@ +Winch +==== + +.. automodule:: mavsdk.winch + :members: + :undoc-members: + :show-inheritance: + :exclude-members: translate_from_rpc, translate_to_rpc \ No newline at end of file diff --git a/mavsdk/telemetry.py b/mavsdk/telemetry.py index b33339f1..784d9d45 100644 --- a/mavsdk/telemetry.py +++ b/mavsdk/telemetry.py @@ -1275,11 +1275,20 @@ class Battery: id : uint32_t Battery ID, for systems with multiple batteries + temperature_degc : float + Temperature of the battery in degrees Celsius. NAN for unknown temperature + voltage_v : float Voltage in volts + current_battery_a : float + Battery current in Amps, NAN if autopilot does not measure the current + + capacity_consumed_ah : float + Consumed charge in Amp hours, NAN if autopilot does not provide consumption estimate + remaining_percent : float - Estimated battery remaining (range: 0.0 to 1.0) + Estimated battery remaining (range: 0 to 100) """ @@ -1288,11 +1297,17 @@ class Battery: def __init__( self, id, + temperature_degc, voltage_v, + current_battery_a, + capacity_consumed_ah, remaining_percent): """ Initializes the Battery object """ self.id = id + self.temperature_degc = temperature_degc self.voltage_v = voltage_v + self.current_battery_a = current_battery_a + self.capacity_consumed_ah = capacity_consumed_ah self.remaining_percent = remaining_percent def __eq__(self, to_compare): @@ -1302,7 +1317,10 @@ def __eq__(self, to_compare): # Battery object return \ (self.id == to_compare.id) and \ + (self.temperature_degc == to_compare.temperature_degc) and \ (self.voltage_v == to_compare.voltage_v) and \ + (self.current_battery_a == to_compare.current_battery_a) and \ + (self.capacity_consumed_ah == to_compare.capacity_consumed_ah) and \ (self.remaining_percent == to_compare.remaining_percent) except AttributeError: @@ -1312,7 +1330,10 @@ def __str__(self): """ Battery in string representation """ struct_repr = ", ".join([ "id: " + str(self.id), + "temperature_degc: " + str(self.temperature_degc), "voltage_v: " + str(self.voltage_v), + "current_battery_a: " + str(self.current_battery_a), + "capacity_consumed_ah: " + str(self.capacity_consumed_ah), "remaining_percent: " + str(self.remaining_percent) ]) @@ -1326,9 +1347,18 @@ def translate_from_rpc(rpcBattery): rpcBattery.id, + rpcBattery.temperature_degc, + + rpcBattery.voltage_v, + rpcBattery.current_battery_a, + + + rpcBattery.capacity_consumed_ah, + + rpcBattery.remaining_percent ) @@ -1344,12 +1374,30 @@ def translate_to_rpc(self, rpcBattery): + rpcBattery.temperature_degc = self.temperature_degc + + + + + rpcBattery.voltage_v = self.voltage_v + rpcBattery.current_battery_a = self.current_battery_a + + + + + + rpcBattery.capacity_consumed_ah = self.capacity_consumed_ah + + + + + rpcBattery.remaining_percent = self.remaining_percent @@ -2320,6 +2368,9 @@ class DistanceSensor: current_distance_m : float Current distance reading, NaN if unknown. + orientation : EulerAngle + Sensor Orientation reading. + """ @@ -2328,11 +2379,13 @@ def __init__( self, minimum_distance_m, maximum_distance_m, - current_distance_m): + current_distance_m, + orientation): """ Initializes the DistanceSensor object """ self.minimum_distance_m = minimum_distance_m self.maximum_distance_m = maximum_distance_m self.current_distance_m = current_distance_m + self.orientation = orientation def __eq__(self, to_compare): """ Checks if two DistanceSensor are the same """ @@ -2342,7 +2395,8 @@ def __eq__(self, to_compare): return \ (self.minimum_distance_m == to_compare.minimum_distance_m) and \ (self.maximum_distance_m == to_compare.maximum_distance_m) and \ - (self.current_distance_m == to_compare.current_distance_m) + (self.current_distance_m == to_compare.current_distance_m) and \ + (self.orientation == to_compare.orientation) except AttributeError: return False @@ -2352,7 +2406,8 @@ def __str__(self): struct_repr = ", ".join([ "minimum_distance_m: " + str(self.minimum_distance_m), "maximum_distance_m: " + str(self.maximum_distance_m), - "current_distance_m: " + str(self.current_distance_m) + "current_distance_m: " + str(self.current_distance_m), + "orientation: " + str(self.orientation) ]) return f"DistanceSensor: [{struct_repr}]" @@ -2368,7 +2423,10 @@ def translate_from_rpc(rpcDistanceSensor): rpcDistanceSensor.maximum_distance_m, - rpcDistanceSensor.current_distance_m + rpcDistanceSensor.current_distance_m, + + + EulerAngle.translate_from_rpc(rpcDistanceSensor.orientation) ) def translate_to_rpc(self, rpcDistanceSensor): @@ -2393,6 +2451,12 @@ def translate_to_rpc(self, rpcDistanceSensor): + + + self.orientation.translate_to_rpc(rpcDistanceSensor.orientation) + + + class ScaledPressure: @@ -3433,6 +3497,144 @@ def translate_to_rpc(self, rpcGpsGlobalOrigin): +class Altitude: + """ + Altitude message type + + Parameters + ---------- + altitude_monotonic_m : float + Altitude in meters is initialized on system boot and monotonic + + altitude_amsl_m : float + Altitude AMSL (above mean sea level) in meters + + altitude_local_m : float + Local altitude in meters + + altitude_relative_m : float + Altitude above home position in meters + + altitude_terrain_m : float + Altitude above terrain in meters + + bottom_clearance_m : float + This is not the altitude, but the clear space below the system according to the fused clearance estimate in meters. + + """ + + + + def __init__( + self, + altitude_monotonic_m, + altitude_amsl_m, + altitude_local_m, + altitude_relative_m, + altitude_terrain_m, + bottom_clearance_m): + """ Initializes the Altitude object """ + self.altitude_monotonic_m = altitude_monotonic_m + self.altitude_amsl_m = altitude_amsl_m + self.altitude_local_m = altitude_local_m + self.altitude_relative_m = altitude_relative_m + self.altitude_terrain_m = altitude_terrain_m + self.bottom_clearance_m = bottom_clearance_m + + def __eq__(self, to_compare): + """ Checks if two Altitude are the same """ + try: + # Try to compare - this likely fails when it is compared to a non + # Altitude object + return \ + (self.altitude_monotonic_m == to_compare.altitude_monotonic_m) and \ + (self.altitude_amsl_m == to_compare.altitude_amsl_m) and \ + (self.altitude_local_m == to_compare.altitude_local_m) and \ + (self.altitude_relative_m == to_compare.altitude_relative_m) and \ + (self.altitude_terrain_m == to_compare.altitude_terrain_m) and \ + (self.bottom_clearance_m == to_compare.bottom_clearance_m) + + except AttributeError: + return False + + def __str__(self): + """ Altitude in string representation """ + struct_repr = ", ".join([ + "altitude_monotonic_m: " + str(self.altitude_monotonic_m), + "altitude_amsl_m: " + str(self.altitude_amsl_m), + "altitude_local_m: " + str(self.altitude_local_m), + "altitude_relative_m: " + str(self.altitude_relative_m), + "altitude_terrain_m: " + str(self.altitude_terrain_m), + "bottom_clearance_m: " + str(self.bottom_clearance_m) + ]) + + return f"Altitude: [{struct_repr}]" + + @staticmethod + def translate_from_rpc(rpcAltitude): + """ Translates a gRPC struct to the SDK equivalent """ + return Altitude( + + rpcAltitude.altitude_monotonic_m, + + + rpcAltitude.altitude_amsl_m, + + + rpcAltitude.altitude_local_m, + + + rpcAltitude.altitude_relative_m, + + + rpcAltitude.altitude_terrain_m, + + + rpcAltitude.bottom_clearance_m + ) + + def translate_to_rpc(self, rpcAltitude): + """ Translates this SDK object into its gRPC equivalent """ + + + + + rpcAltitude.altitude_monotonic_m = self.altitude_monotonic_m + + + + + + rpcAltitude.altitude_amsl_m = self.altitude_amsl_m + + + + + + rpcAltitude.altitude_local_m = self.altitude_local_m + + + + + + rpcAltitude.altitude_relative_m = self.altitude_relative_m + + + + + + rpcAltitude.altitude_terrain_m = self.altitude_terrain_m + + + + + + rpcAltitude.bottom_clearance_m = self.bottom_clearance_m + + + + + class TelemetryResult: """ Result type. @@ -4417,6 +4619,30 @@ async def heading(self): finally: heading_stream.cancel() + async def altitude(self): + """ + Subscribe to 'Altitude' updates. + + Yields + ------- + altitude : Altitude + The next altitude + + + """ + + request = telemetry_pb2.SubscribeAltitudeRequest() + altitude_stream = self._stub.SubscribeAltitude(request) + + try: + async for response in altitude_stream: + + + + yield Altitude.translate_from_rpc(response.altitude) + finally: + altitude_stream.cancel() + async def set_rate_position(self, rate_hz): """ Set rate to 'position' updates. @@ -4547,9 +4773,35 @@ async def set_rate_vtol_state(self, rate_hz): raise TelemetryError(result, "set_rate_vtol_state()", rate_hz) - async def set_rate_attitude(self, rate_hz): + async def set_rate_attitude_quaternion(self, rate_hz): + """ + Set rate to 'attitude euler angle' updates. + + Parameters + ---------- + rate_hz : double + The requested rate (in Hertz) + + Raises + ------ + TelemetryError + If the request fails. The error contains the reason for the failure. + """ + + request = telemetry_pb2.SetRateAttitudeQuaternionRequest() + request.rate_hz = rate_hz + response = await self._stub.SetRateAttitudeQuaternion(request) + + + result = self._extract_result(response) + + if result.result != TelemetryResult.Result.SUCCESS: + raise TelemetryError(result, "set_rate_attitude_quaternion()", rate_hz) + + + async def set_rate_attitude_euler(self, rate_hz): """ - Set rate to 'attitude' updates. + Set rate to 'attitude quaternion' updates. Parameters ---------- @@ -4562,15 +4814,15 @@ async def set_rate_attitude(self, rate_hz): If the request fails. The error contains the reason for the failure. """ - request = telemetry_pb2.SetRateAttitudeRequest() + request = telemetry_pb2.SetRateAttitudeEulerRequest() request.rate_hz = rate_hz - response = await self._stub.SetRateAttitude(request) + response = await self._stub.SetRateAttitudeEuler(request) result = self._extract_result(response) if result.result != TelemetryResult.Result.SUCCESS: - raise TelemetryError(result, "set_rate_attitude()", rate_hz) + raise TelemetryError(result, "set_rate_attitude_euler()", rate_hz) async def set_rate_camera_attitude(self, rate_hz): @@ -4989,6 +5241,32 @@ async def set_rate_distance_sensor(self, rate_hz): raise TelemetryError(result, "set_rate_distance_sensor()", rate_hz) + async def set_rate_altitude(self, rate_hz): + """ + Set rate to 'Altitude' updates. + + Parameters + ---------- + rate_hz : double + The requested rate (in Hertz) + + Raises + ------ + TelemetryError + If the request fails. The error contains the reason for the failure. + """ + + request = telemetry_pb2.SetRateAltitudeRequest() + request.rate_hz = rate_hz + response = await self._stub.SetRateAltitude(request) + + + result = self._extract_result(response) + + if result.result != TelemetryResult.Result.SUCCESS: + raise TelemetryError(result, "set_rate_altitude()", rate_hz) + + async def get_gps_global_origin(self): """ Get the GPS location of where the estimator has been initialized. diff --git a/mavsdk/telemetry_pb2.py b/mavsdk/telemetry_pb2.py index 2fb4cec3..448ceb10 100644 --- a/mavsdk/telemetry_pb2.py +++ b/mavsdk/telemetry_pb2.py @@ -16,7 +16,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19telemetry/telemetry.proto\x12\x14mavsdk.rpc.telemetry\x1a\x14mavsdk_options.proto\"\x1a\n\x18SubscribePositionRequest\"D\n\x10PositionResponse\x12\x30\n\x08position\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.telemetry.Position\"\x16\n\x14SubscribeHomeRequest\"<\n\x0cHomeResponse\x12,\n\x04home\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.telemetry.Position\"\x17\n\x15SubscribeInAirRequest\"\"\n\rInAirResponse\x12\x11\n\tis_in_air\x18\x01 \x01(\x08\"\x1d\n\x1bSubscribeLandedStateRequest\"N\n\x13LandedStateResponse\x12\x37\n\x0clanded_state\x18\x01 \x01(\x0e\x32!.mavsdk.rpc.telemetry.LandedState\"\x17\n\x15SubscribeArmedRequest\"!\n\rArmedResponse\x12\x10\n\x08is_armed\x18\x01 \x01(\x08\"\x1b\n\x19SubscribeVtolStateRequest\"H\n\x11VtolStateResponse\x12\x33\n\nvtol_state\x18\x01 \x01(\x0e\x32\x1f.mavsdk.rpc.telemetry.VtolState\"$\n\"SubscribeAttitudeQuaternionRequest\"[\n\x1a\x41ttitudeQuaternionResponse\x12=\n\x13\x61ttitude_quaternion\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry.Quaternion\"\x1f\n\x1dSubscribeAttitudeEulerRequest\"Q\n\x15\x41ttitudeEulerResponse\x12\x38\n\x0e\x61ttitude_euler\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry.EulerAngle\"-\n+SubscribeAttitudeAngularVelocityBodyRequest\"x\n#AttitudeAngularVelocityBodyResponse\x12Q\n\x1e\x61ttitude_angular_velocity_body\x18\x01 \x01(\x0b\x32).mavsdk.rpc.telemetry.AngularVelocityBody\"*\n(SubscribeCameraAttitudeQuaternionRequest\"a\n CameraAttitudeQuaternionResponse\x12=\n\x13\x61ttitude_quaternion\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry.Quaternion\"%\n#SubscribeCameraAttitudeEulerRequest\"W\n\x1b\x43\x61meraAttitudeEulerResponse\x12\x38\n\x0e\x61ttitude_euler\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry.EulerAngle\"\x1d\n\x1bSubscribeVelocityNedRequest\"N\n\x13VelocityNedResponse\x12\x37\n\x0cvelocity_ned\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.telemetry.VelocityNed\"\x19\n\x17SubscribeGpsInfoRequest\"B\n\x0fGpsInfoResponse\x12/\n\x08gps_info\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.telemetry.GpsInfo\"\x18\n\x16SubscribeRawGpsRequest\"?\n\x0eRawGpsResponse\x12-\n\x07raw_gps\x18\x01 \x01(\x0b\x32\x1c.mavsdk.rpc.telemetry.RawGps\"\x19\n\x17SubscribeBatteryRequest\"A\n\x0f\x42\x61tteryResponse\x12.\n\x07\x62\x61ttery\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.telemetry.Battery\"\x1c\n\x1aSubscribeFlightModeRequest\"K\n\x12\x46lightModeResponse\x12\x35\n\x0b\x66light_mode\x18\x01 \x01(\x0e\x32 .mavsdk.rpc.telemetry.FlightMode\"\x18\n\x16SubscribeHealthRequest\">\n\x0eHealthResponse\x12,\n\x06health\x18\x01 \x01(\x0b\x32\x1c.mavsdk.rpc.telemetry.Health\"\x1a\n\x18SubscribeRcStatusRequest\"E\n\x10RcStatusResponse\x12\x31\n\trc_status\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.telemetry.RcStatus\"\x1c\n\x1aSubscribeStatusTextRequest\"K\n\x12StatusTextResponse\x12\x35\n\x0bstatus_text\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry.StatusText\"\'\n%SubscribeActuatorControlTargetRequest\"m\n\x1d\x41\x63tuatorControlTargetResponse\x12L\n\x17\x61\x63tuator_control_target\x18\x01 \x01(\x0b\x32+.mavsdk.rpc.telemetry.ActuatorControlTarget\"&\n$SubscribeActuatorOutputStatusRequest\"j\n\x1c\x41\x63tuatorOutputStatusResponse\x12J\n\x16\x61\x63tuator_output_status\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.telemetry.ActuatorOutputStatus\"\x1a\n\x18SubscribeOdometryRequest\"D\n\x10OdometryResponse\x12\x30\n\x08odometry\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.telemetry.Odometry\"%\n#SubscribePositionVelocityNedRequest\"g\n\x1bPositionVelocityNedResponse\x12H\n\x15position_velocity_ned\x18\x01 \x01(\x0b\x32).mavsdk.rpc.telemetry.PositionVelocityNed\"\x1d\n\x1bSubscribeGroundTruthRequest\"N\n\x13GroundTruthResponse\x12\x37\n\x0cground_truth\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.telemetry.GroundTruth\"\"\n SubscribeFixedwingMetricsRequest\"]\n\x18\x46ixedwingMetricsResponse\x12\x41\n\x11\x66ixedwing_metrics\x18\x01 \x01(\x0b\x32&.mavsdk.rpc.telemetry.FixedwingMetrics\"\x15\n\x13SubscribeImuRequest\"5\n\x0bImuResponse\x12&\n\x03imu\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.telemetry.Imu\"\x1b\n\x19SubscribeScaledImuRequest\";\n\x11ScaledImuResponse\x12&\n\x03imu\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.telemetry.Imu\"\x18\n\x16SubscribeRawImuRequest\"8\n\x0eRawImuResponse\x12&\n\x03imu\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.telemetry.Imu\"\x1d\n\x1bSubscribeHealthAllOkRequest\"/\n\x13HealthAllOkResponse\x12\x18\n\x10is_health_all_ok\x18\x01 \x01(\x08\"\x1f\n\x1dSubscribeUnixEpochTimeRequest\"(\n\x15UnixEpochTimeResponse\x12\x0f\n\x07time_us\x18\x01 \x01(\x04\" \n\x1eSubscribeDistanceSensorRequest\"W\n\x16\x44istanceSensorResponse\x12=\n\x0f\x64istance_sensor\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.telemetry.DistanceSensor\" \n\x1eSubscribeScaledPressureRequest\"W\n\x16ScaledPressureResponse\x12=\n\x0fscaled_pressure\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.telemetry.ScaledPressure\"\x19\n\x17SubscribeHeadingRequest\"E\n\x0fHeadingResponse\x12\x32\n\x0bheading_deg\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.telemetry.Heading\")\n\x16SetRatePositionRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Z\n\x17SetRatePositionResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"%\n\x12SetRateHomeRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"V\n\x13SetRateHomeResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"&\n\x13SetRateInAirRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"W\n\x14SetRateInAirResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\",\n\x19SetRateLandedStateRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"]\n\x1aSetRateLandedStateResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"*\n\x17SetRateVtolStateRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"[\n\x18SetRateVtolStateResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\")\n\x16SetRateAttitudeRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Z\n\x17SetRateAttitudeResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"<\n)SetRateAttitudeAngularVelocityBodyRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"m\n*SetRateAttitudeAngularVelocityBodyResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"9\n&SetRateCameraAttitudeQuaternionRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"j\n\'SetRateCameraAttitudeQuaternionResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"/\n\x1cSetRateCameraAttitudeRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"`\n\x1dSetRateCameraAttitudeResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\",\n\x19SetRateVelocityNedRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"]\n\x1aSetRateVelocityNedResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"(\n\x15SetRateGpsInfoRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Y\n\x16SetRateGpsInfoResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"\'\n\x14SetRateRawGpsRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"(\n\x15SetRateBatteryRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Y\n\x16SetRateBatteryResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\")\n\x16SetRateRcStatusRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Z\n\x17SetRateRcStatusResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"6\n#SetRateActuatorControlTargetRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"g\n$SetRateActuatorControlTargetResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"5\n\"SetRateActuatorOutputStatusRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"f\n#SetRateActuatorOutputStatusResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\")\n\x16SetRateOdometryRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Z\n\x17SetRateOdometryResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"4\n!SetRatePositionVelocityNedRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"e\n\"SetRatePositionVelocityNedResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\",\n\x19SetRateGroundTruthRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"]\n\x1aSetRateGroundTruthResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"1\n\x1eSetRateFixedwingMetricsRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"b\n\x1fSetRateFixedwingMetricsResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"$\n\x11SetRateImuRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"U\n\x12SetRateImuResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"*\n\x17SetRateScaledImuRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"[\n\x18SetRateScaledImuResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"\'\n\x14SetRateRawImuRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"X\n\x15SetRateRawImuResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\".\n\x1bSetRateUnixEpochTimeRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"_\n\x1cSetRateUnixEpochTimeResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"/\n\x1cSetRateDistanceSensorRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"`\n\x1dSetRateDistanceSensorResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"\x1b\n\x19GetGpsGlobalOriginRequest\"\x9f\x01\n\x1aGetGpsGlobalOriginResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\x12@\n\x11gps_global_origin\x18\x02 \x01(\x0b\x32%.mavsdk.rpc.telemetry.GpsGlobalOrigin\"\x95\x01\n\x08Position\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13relative_altitude_m\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\'\n\x07Heading\x12\x1c\n\x0bheading_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\"r\n\nQuaternion\x12\x12\n\x01w\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01x\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01y\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01z\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x05 \x01(\x04\"s\n\nEulerAngle\x12\x19\n\x08roll_deg\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tpitch_deg\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x18\n\x07yaw_deg\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x04 \x01(\x04\"l\n\x13\x41ngularVelocityBody\x12\x1b\n\nroll_rad_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bpitch_rad_s\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tyaw_rad_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"Y\n\x07GpsInfo\x12\x1d\n\x0enum_satellites\x18\x01 \x01(\x05\x42\x05\x82\xb5\x18\x01\x30\x12/\n\x08\x66ix_type\x18\x02 \x01(\x0e\x32\x1d.mavsdk.rpc.telemetry.FixType\"\xdf\x02\n\x06RawGps\x12\x14\n\x0ctimestamp_us\x18\x01 \x01(\x04\x12\x14\n\x0clatitude_deg\x18\x02 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x03 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x04 \x01(\x02\x12\x0c\n\x04hdop\x18\x05 \x01(\x02\x12\x0c\n\x04vdop\x18\x06 \x01(\x02\x12\x14\n\x0cvelocity_m_s\x18\x07 \x01(\x02\x12\x0f\n\x07\x63og_deg\x18\x08 \x01(\x02\x12\x1c\n\x14\x61ltitude_ellipsoid_m\x18\t \x01(\x02\x12 \n\x18horizontal_uncertainty_m\x18\n \x01(\x02\x12\x1e\n\x16vertical_uncertainty_m\x18\x0b \x01(\x02\x12 \n\x18velocity_uncertainty_m_s\x18\x0c \x01(\x02\x12\x1f\n\x17heading_uncertainty_deg\x18\r \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x0e \x01(\x02\"\\\n\x07\x42\x61ttery\x12\x11\n\x02id\x18\x03 \x01(\rB\x05\x82\xb5\x18\x01\x30\x12\x1a\n\tvoltage_v\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\"\n\x11remaining_percent\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\xb9\x02\n\x06Health\x12.\n\x1bis_gyrometer_calibration_ok\x18\x01 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x32\n\x1fis_accelerometer_calibration_ok\x18\x02 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x31\n\x1eis_magnetometer_calibration_ok\x18\x03 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\'\n\x14is_local_position_ok\x18\x05 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12(\n\x15is_global_position_ok\x18\x06 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12&\n\x13is_home_position_ok\x18\x07 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x1d\n\nis_armable\x18\x08 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\"|\n\x08RcStatus\x12%\n\x12was_available_once\x18\x01 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x1f\n\x0cis_available\x18\x02 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12(\n\x17signal_strength_percent\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"N\n\nStatusText\x12\x32\n\x04type\x18\x01 \x01(\x0e\x32$.mavsdk.rpc.telemetry.StatusTextType\x12\x0c\n\x04text\x18\x02 \x01(\t\"?\n\x15\x41\x63tuatorControlTarget\x12\x14\n\x05group\x18\x01 \x01(\x05\x42\x05\x82\xb5\x18\x01\x30\x12\x10\n\x08\x63ontrols\x18\x02 \x03(\x02\"?\n\x14\x41\x63tuatorOutputStatus\x12\x15\n\x06\x61\x63tive\x18\x01 \x01(\rB\x05\x82\xb5\x18\x01\x30\x12\x10\n\x08\x61\x63tuator\x18\x02 \x03(\x02\"\'\n\nCovariance\x12\x19\n\x11\x63ovariance_matrix\x18\x01 \x03(\x02\";\n\x0cVelocityBody\x12\r\n\x05x_m_s\x18\x01 \x01(\x02\x12\r\n\x05y_m_s\x18\x02 \x01(\x02\x12\r\n\x05z_m_s\x18\x03 \x01(\x02\"5\n\x0cPositionBody\x12\x0b\n\x03x_m\x18\x01 \x01(\x02\x12\x0b\n\x03y_m\x18\x02 \x01(\x02\x12\x0b\n\x03z_m\x18\x03 \x01(\x02\"\xec\x04\n\x08Odometry\x12\x11\n\ttime_usec\x18\x01 \x01(\x04\x12\x39\n\x08\x66rame_id\x18\x02 \x01(\x0e\x32\'.mavsdk.rpc.telemetry.Odometry.MavFrame\x12?\n\x0e\x63hild_frame_id\x18\x03 \x01(\x0e\x32\'.mavsdk.rpc.telemetry.Odometry.MavFrame\x12\x39\n\rposition_body\x18\x04 \x01(\x0b\x32\".mavsdk.rpc.telemetry.PositionBody\x12+\n\x01q\x18\x05 \x01(\x0b\x32 .mavsdk.rpc.telemetry.Quaternion\x12\x39\n\rvelocity_body\x18\x06 \x01(\x0b\x32\".mavsdk.rpc.telemetry.VelocityBody\x12H\n\x15\x61ngular_velocity_body\x18\x07 \x01(\x0b\x32).mavsdk.rpc.telemetry.AngularVelocityBody\x12\x39\n\x0fpose_covariance\x18\x08 \x01(\x0b\x32 .mavsdk.rpc.telemetry.Covariance\x12=\n\x13velocity_covariance\x18\t \x01(\x0b\x32 .mavsdk.rpc.telemetry.Covariance\"j\n\x08MavFrame\x12\x13\n\x0fMAV_FRAME_UNDEF\x10\x00\x12\x16\n\x12MAV_FRAME_BODY_NED\x10\x08\x12\x18\n\x14MAV_FRAME_VISION_NED\x10\x10\x12\x17\n\x13MAV_FRAME_ESTIM_NED\x10\x12\"\x7f\n\x0e\x44istanceSensor\x12#\n\x12minimum_distance_m\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12#\n\x12maximum_distance_m\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12#\n\x12\x63urrent_distance_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\xb0\x01\n\x0eScaledPressure\x12\x14\n\x0ctimestamp_us\x18\x01 \x01(\x04\x12\x1d\n\x15\x61\x62solute_pressure_hpa\x18\x02 \x01(\x02\x12!\n\x19\x64ifferential_pressure_hpa\x18\x03 \x01(\x02\x12\x17\n\x0ftemperature_deg\x18\x04 \x01(\x02\x12-\n%differential_pressure_temperature_deg\x18\x05 \x01(\x02\"Y\n\x0bPositionNed\x12\x18\n\x07north_m\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x17\n\x06\x65\x61st_m\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x17\n\x06\x64own_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"D\n\x0bVelocityNed\x12\x11\n\tnorth_m_s\x18\x01 \x01(\x02\x12\x10\n\x08\x65\x61st_m_s\x18\x02 \x01(\x02\x12\x10\n\x08\x64own_m_s\x18\x03 \x01(\x02\"\x7f\n\x13PositionVelocityNed\x12\x33\n\x08position\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.telemetry.PositionNed\x12\x33\n\x08velocity\x18\x02 \x01(\x0b\x32!.mavsdk.rpc.telemetry.VelocityNed\"r\n\x0bGroundTruth\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"x\n\x10\x46ixedwingMetrics\x12\x1d\n\x0c\x61irspeed_m_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13throttle_percentage\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1f\n\x0e\x63limb_rate_m_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"i\n\x0f\x41\x63\x63\x65lerationFrd\x12\x1d\n\x0c\x66orward_m_s2\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\nright_m_s2\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tdown_m_s2\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"o\n\x12\x41ngularVelocityFrd\x12\x1e\n\rforward_rad_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bright_rad_s\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\ndown_rad_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"m\n\x10MagneticFieldFrd\x12\x1e\n\rforward_gauss\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bright_gauss\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\ndown_gauss\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\x8b\x02\n\x03Imu\x12?\n\x10\x61\x63\x63\x65leration_frd\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.AccelerationFrd\x12\x46\n\x14\x61ngular_velocity_frd\x18\x02 \x01(\x0b\x32(.mavsdk.rpc.telemetry.AngularVelocityFrd\x12\x42\n\x12magnetic_field_frd\x18\x03 \x01(\x0b\x32&.mavsdk.rpc.telemetry.MagneticFieldFrd\x12!\n\x10temperature_degc\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x05 \x01(\x04\"m\n\x0fGpsGlobalOrigin\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\naltitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\xa1\x02\n\x0fTelemetryResult\x12<\n\x06result\x18\x01 \x01(\x0e\x32,.mavsdk.rpc.telemetry.TelemetryResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xbb\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x07*\xa4\x01\n\x07\x46ixType\x12\x13\n\x0f\x46IX_TYPE_NO_GPS\x10\x00\x12\x13\n\x0f\x46IX_TYPE_NO_FIX\x10\x01\x12\x13\n\x0f\x46IX_TYPE_FIX_2D\x10\x02\x12\x13\n\x0f\x46IX_TYPE_FIX_3D\x10\x03\x12\x15\n\x11\x46IX_TYPE_FIX_DGPS\x10\x04\x12\x16\n\x12\x46IX_TYPE_RTK_FLOAT\x10\x05\x12\x16\n\x12\x46IX_TYPE_RTK_FIXED\x10\x06*\x86\x03\n\nFlightMode\x12\x17\n\x13\x46LIGHT_MODE_UNKNOWN\x10\x00\x12\x15\n\x11\x46LIGHT_MODE_READY\x10\x01\x12\x17\n\x13\x46LIGHT_MODE_TAKEOFF\x10\x02\x12\x14\n\x10\x46LIGHT_MODE_HOLD\x10\x03\x12\x17\n\x13\x46LIGHT_MODE_MISSION\x10\x04\x12 \n\x1c\x46LIGHT_MODE_RETURN_TO_LAUNCH\x10\x05\x12\x14\n\x10\x46LIGHT_MODE_LAND\x10\x06\x12\x18\n\x14\x46LIGHT_MODE_OFFBOARD\x10\x07\x12\x19\n\x15\x46LIGHT_MODE_FOLLOW_ME\x10\x08\x12\x16\n\x12\x46LIGHT_MODE_MANUAL\x10\t\x12\x16\n\x12\x46LIGHT_MODE_ALTCTL\x10\n\x12\x16\n\x12\x46LIGHT_MODE_POSCTL\x10\x0b\x12\x14\n\x10\x46LIGHT_MODE_ACRO\x10\x0c\x12\x1a\n\x16\x46LIGHT_MODE_STABILIZED\x10\r\x12\x19\n\x15\x46LIGHT_MODE_RATTITUDE\x10\x0e*\xf9\x01\n\x0eStatusTextType\x12\x1a\n\x16STATUS_TEXT_TYPE_DEBUG\x10\x00\x12\x19\n\x15STATUS_TEXT_TYPE_INFO\x10\x01\x12\x1b\n\x17STATUS_TEXT_TYPE_NOTICE\x10\x02\x12\x1c\n\x18STATUS_TEXT_TYPE_WARNING\x10\x03\x12\x1a\n\x16STATUS_TEXT_TYPE_ERROR\x10\x04\x12\x1d\n\x19STATUS_TEXT_TYPE_CRITICAL\x10\x05\x12\x1a\n\x16STATUS_TEXT_TYPE_ALERT\x10\x06\x12\x1e\n\x1aSTATUS_TEXT_TYPE_EMERGENCY\x10\x07*\x93\x01\n\x0bLandedState\x12\x18\n\x14LANDED_STATE_UNKNOWN\x10\x00\x12\x1a\n\x16LANDED_STATE_ON_GROUND\x10\x01\x12\x17\n\x13LANDED_STATE_IN_AIR\x10\x02\x12\x1b\n\x17LANDED_STATE_TAKING_OFF\x10\x03\x12\x18\n\x14LANDED_STATE_LANDING\x10\x04*\x8d\x01\n\tVtolState\x12\x18\n\x14VTOL_STATE_UNDEFINED\x10\x00\x12\x1f\n\x1bVTOL_STATE_TRANSITION_TO_FW\x10\x01\x12\x1f\n\x1bVTOL_STATE_TRANSITION_TO_MC\x10\x02\x12\x11\n\rVTOL_STATE_MC\x10\x03\x12\x11\n\rVTOL_STATE_FW\x10\x04\x32\xfe\x35\n\x10TelemetryService\x12o\n\x11SubscribePosition\x12..mavsdk.rpc.telemetry.SubscribePositionRequest\x1a&.mavsdk.rpc.telemetry.PositionResponse\"\x00\x30\x01\x12\x63\n\rSubscribeHome\x12*.mavsdk.rpc.telemetry.SubscribeHomeRequest\x1a\".mavsdk.rpc.telemetry.HomeResponse\"\x00\x30\x01\x12\x66\n\x0eSubscribeInAir\x12+.mavsdk.rpc.telemetry.SubscribeInAirRequest\x1a#.mavsdk.rpc.telemetry.InAirResponse\"\x00\x30\x01\x12x\n\x14SubscribeLandedState\x12\x31.mavsdk.rpc.telemetry.SubscribeLandedStateRequest\x1a).mavsdk.rpc.telemetry.LandedStateResponse\"\x00\x30\x01\x12\x66\n\x0eSubscribeArmed\x12+.mavsdk.rpc.telemetry.SubscribeArmedRequest\x1a#.mavsdk.rpc.telemetry.ArmedResponse\"\x00\x30\x01\x12r\n\x12SubscribeVtolState\x12/.mavsdk.rpc.telemetry.SubscribeVtolStateRequest\x1a\'.mavsdk.rpc.telemetry.VtolStateResponse\"\x00\x30\x01\x12\x8d\x01\n\x1bSubscribeAttitudeQuaternion\x12\x38.mavsdk.rpc.telemetry.SubscribeAttitudeQuaternionRequest\x1a\x30.mavsdk.rpc.telemetry.AttitudeQuaternionResponse\"\x00\x30\x01\x12~\n\x16SubscribeAttitudeEuler\x12\x33.mavsdk.rpc.telemetry.SubscribeAttitudeEulerRequest\x1a+.mavsdk.rpc.telemetry.AttitudeEulerResponse\"\x00\x30\x01\x12\xa8\x01\n$SubscribeAttitudeAngularVelocityBody\x12\x41.mavsdk.rpc.telemetry.SubscribeAttitudeAngularVelocityBodyRequest\x1a\x39.mavsdk.rpc.telemetry.AttitudeAngularVelocityBodyResponse\"\x00\x30\x01\x12\x9f\x01\n!SubscribeCameraAttitudeQuaternion\x12>.mavsdk.rpc.telemetry.SubscribeCameraAttitudeQuaternionRequest\x1a\x36.mavsdk.rpc.telemetry.CameraAttitudeQuaternionResponse\"\x00\x30\x01\x12\x90\x01\n\x1cSubscribeCameraAttitudeEuler\x12\x39.mavsdk.rpc.telemetry.SubscribeCameraAttitudeEulerRequest\x1a\x31.mavsdk.rpc.telemetry.CameraAttitudeEulerResponse\"\x00\x30\x01\x12x\n\x14SubscribeVelocityNed\x12\x31.mavsdk.rpc.telemetry.SubscribeVelocityNedRequest\x1a).mavsdk.rpc.telemetry.VelocityNedResponse\"\x00\x30\x01\x12l\n\x10SubscribeGpsInfo\x12-.mavsdk.rpc.telemetry.SubscribeGpsInfoRequest\x1a%.mavsdk.rpc.telemetry.GpsInfoResponse\"\x00\x30\x01\x12i\n\x0fSubscribeRawGps\x12,.mavsdk.rpc.telemetry.SubscribeRawGpsRequest\x1a$.mavsdk.rpc.telemetry.RawGpsResponse\"\x00\x30\x01\x12l\n\x10SubscribeBattery\x12-.mavsdk.rpc.telemetry.SubscribeBatteryRequest\x1a%.mavsdk.rpc.telemetry.BatteryResponse\"\x00\x30\x01\x12u\n\x13SubscribeFlightMode\x12\x30.mavsdk.rpc.telemetry.SubscribeFlightModeRequest\x1a(.mavsdk.rpc.telemetry.FlightModeResponse\"\x00\x30\x01\x12i\n\x0fSubscribeHealth\x12,.mavsdk.rpc.telemetry.SubscribeHealthRequest\x1a$.mavsdk.rpc.telemetry.HealthResponse\"\x00\x30\x01\x12o\n\x11SubscribeRcStatus\x12..mavsdk.rpc.telemetry.SubscribeRcStatusRequest\x1a&.mavsdk.rpc.telemetry.RcStatusResponse\"\x00\x30\x01\x12u\n\x13SubscribeStatusText\x12\x30.mavsdk.rpc.telemetry.SubscribeStatusTextRequest\x1a(.mavsdk.rpc.telemetry.StatusTextResponse\"\x00\x30\x01\x12\x96\x01\n\x1eSubscribeActuatorControlTarget\x12;.mavsdk.rpc.telemetry.SubscribeActuatorControlTargetRequest\x1a\x33.mavsdk.rpc.telemetry.ActuatorControlTargetResponse\"\x00\x30\x01\x12\x93\x01\n\x1dSubscribeActuatorOutputStatus\x12:.mavsdk.rpc.telemetry.SubscribeActuatorOutputStatusRequest\x1a\x32.mavsdk.rpc.telemetry.ActuatorOutputStatusResponse\"\x00\x30\x01\x12o\n\x11SubscribeOdometry\x12..mavsdk.rpc.telemetry.SubscribeOdometryRequest\x1a&.mavsdk.rpc.telemetry.OdometryResponse\"\x00\x30\x01\x12\x90\x01\n\x1cSubscribePositionVelocityNed\x12\x39.mavsdk.rpc.telemetry.SubscribePositionVelocityNedRequest\x1a\x31.mavsdk.rpc.telemetry.PositionVelocityNedResponse\"\x00\x30\x01\x12x\n\x14SubscribeGroundTruth\x12\x31.mavsdk.rpc.telemetry.SubscribeGroundTruthRequest\x1a).mavsdk.rpc.telemetry.GroundTruthResponse\"\x00\x30\x01\x12\x87\x01\n\x19SubscribeFixedwingMetrics\x12\x36.mavsdk.rpc.telemetry.SubscribeFixedwingMetricsRequest\x1a..mavsdk.rpc.telemetry.FixedwingMetricsResponse\"\x00\x30\x01\x12`\n\x0cSubscribeImu\x12).mavsdk.rpc.telemetry.SubscribeImuRequest\x1a!.mavsdk.rpc.telemetry.ImuResponse\"\x00\x30\x01\x12r\n\x12SubscribeScaledImu\x12/.mavsdk.rpc.telemetry.SubscribeScaledImuRequest\x1a\'.mavsdk.rpc.telemetry.ScaledImuResponse\"\x00\x30\x01\x12i\n\x0fSubscribeRawImu\x12,.mavsdk.rpc.telemetry.SubscribeRawImuRequest\x1a$.mavsdk.rpc.telemetry.RawImuResponse\"\x00\x30\x01\x12x\n\x14SubscribeHealthAllOk\x12\x31.mavsdk.rpc.telemetry.SubscribeHealthAllOkRequest\x1a).mavsdk.rpc.telemetry.HealthAllOkResponse\"\x00\x30\x01\x12~\n\x16SubscribeUnixEpochTime\x12\x33.mavsdk.rpc.telemetry.SubscribeUnixEpochTimeRequest\x1a+.mavsdk.rpc.telemetry.UnixEpochTimeResponse\"\x00\x30\x01\x12\x81\x01\n\x17SubscribeDistanceSensor\x12\x34.mavsdk.rpc.telemetry.SubscribeDistanceSensorRequest\x1a,.mavsdk.rpc.telemetry.DistanceSensorResponse\"\x00\x30\x01\x12\x81\x01\n\x17SubscribeScaledPressure\x12\x34.mavsdk.rpc.telemetry.SubscribeScaledPressureRequest\x1a,.mavsdk.rpc.telemetry.ScaledPressureResponse\"\x00\x30\x01\x12l\n\x10SubscribeHeading\x12-.mavsdk.rpc.telemetry.SubscribeHeadingRequest\x1a%.mavsdk.rpc.telemetry.HeadingResponse\"\x00\x30\x01\x12p\n\x0fSetRatePosition\x12,.mavsdk.rpc.telemetry.SetRatePositionRequest\x1a-.mavsdk.rpc.telemetry.SetRatePositionResponse\"\x00\x12\x64\n\x0bSetRateHome\x12(.mavsdk.rpc.telemetry.SetRateHomeRequest\x1a).mavsdk.rpc.telemetry.SetRateHomeResponse\"\x00\x12g\n\x0cSetRateInAir\x12).mavsdk.rpc.telemetry.SetRateInAirRequest\x1a*.mavsdk.rpc.telemetry.SetRateInAirResponse\"\x00\x12y\n\x12SetRateLandedState\x12/.mavsdk.rpc.telemetry.SetRateLandedStateRequest\x1a\x30.mavsdk.rpc.telemetry.SetRateLandedStateResponse\"\x00\x12s\n\x10SetRateVtolState\x12-.mavsdk.rpc.telemetry.SetRateVtolStateRequest\x1a..mavsdk.rpc.telemetry.SetRateVtolStateResponse\"\x00\x12p\n\x0fSetRateAttitude\x12,.mavsdk.rpc.telemetry.SetRateAttitudeRequest\x1a-.mavsdk.rpc.telemetry.SetRateAttitudeResponse\"\x00\x12\x82\x01\n\x15SetRateCameraAttitude\x12\x32.mavsdk.rpc.telemetry.SetRateCameraAttitudeRequest\x1a\x33.mavsdk.rpc.telemetry.SetRateCameraAttitudeResponse\"\x00\x12y\n\x12SetRateVelocityNed\x12/.mavsdk.rpc.telemetry.SetRateVelocityNedRequest\x1a\x30.mavsdk.rpc.telemetry.SetRateVelocityNedResponse\"\x00\x12m\n\x0eSetRateGpsInfo\x12+.mavsdk.rpc.telemetry.SetRateGpsInfoRequest\x1a,.mavsdk.rpc.telemetry.SetRateGpsInfoResponse\"\x00\x12m\n\x0eSetRateBattery\x12+.mavsdk.rpc.telemetry.SetRateBatteryRequest\x1a,.mavsdk.rpc.telemetry.SetRateBatteryResponse\"\x00\x12p\n\x0fSetRateRcStatus\x12,.mavsdk.rpc.telemetry.SetRateRcStatusRequest\x1a-.mavsdk.rpc.telemetry.SetRateRcStatusResponse\"\x00\x12\x97\x01\n\x1cSetRateActuatorControlTarget\x12\x39.mavsdk.rpc.telemetry.SetRateActuatorControlTargetRequest\x1a:.mavsdk.rpc.telemetry.SetRateActuatorControlTargetResponse\"\x00\x12\x94\x01\n\x1bSetRateActuatorOutputStatus\x12\x38.mavsdk.rpc.telemetry.SetRateActuatorOutputStatusRequest\x1a\x39.mavsdk.rpc.telemetry.SetRateActuatorOutputStatusResponse\"\x00\x12p\n\x0fSetRateOdometry\x12,.mavsdk.rpc.telemetry.SetRateOdometryRequest\x1a-.mavsdk.rpc.telemetry.SetRateOdometryResponse\"\x00\x12\x91\x01\n\x1aSetRatePositionVelocityNed\x12\x37.mavsdk.rpc.telemetry.SetRatePositionVelocityNedRequest\x1a\x38.mavsdk.rpc.telemetry.SetRatePositionVelocityNedResponse\"\x00\x12y\n\x12SetRateGroundTruth\x12/.mavsdk.rpc.telemetry.SetRateGroundTruthRequest\x1a\x30.mavsdk.rpc.telemetry.SetRateGroundTruthResponse\"\x00\x12\x88\x01\n\x17SetRateFixedwingMetrics\x12\x34.mavsdk.rpc.telemetry.SetRateFixedwingMetricsRequest\x1a\x35.mavsdk.rpc.telemetry.SetRateFixedwingMetricsResponse\"\x00\x12\x61\n\nSetRateImu\x12\'.mavsdk.rpc.telemetry.SetRateImuRequest\x1a(.mavsdk.rpc.telemetry.SetRateImuResponse\"\x00\x12s\n\x10SetRateScaledImu\x12-.mavsdk.rpc.telemetry.SetRateScaledImuRequest\x1a..mavsdk.rpc.telemetry.SetRateScaledImuResponse\"\x00\x12j\n\rSetRateRawImu\x12*.mavsdk.rpc.telemetry.SetRateRawImuRequest\x1a+.mavsdk.rpc.telemetry.SetRateRawImuResponse\"\x00\x12\x7f\n\x14SetRateUnixEpochTime\x12\x31.mavsdk.rpc.telemetry.SetRateUnixEpochTimeRequest\x1a\x32.mavsdk.rpc.telemetry.SetRateUnixEpochTimeResponse\"\x00\x12\x82\x01\n\x15SetRateDistanceSensor\x12\x32.mavsdk.rpc.telemetry.SetRateDistanceSensorRequest\x1a\x33.mavsdk.rpc.telemetry.SetRateDistanceSensorResponse\"\x00\x12y\n\x12GetGpsGlobalOrigin\x12/.mavsdk.rpc.telemetry.GetGpsGlobalOriginRequest\x1a\x30.mavsdk.rpc.telemetry.GetGpsGlobalOriginResponse\"\x00\x42%\n\x13io.mavsdk.telemetryB\x0eTelemetryProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19telemetry/telemetry.proto\x12\x14mavsdk.rpc.telemetry\x1a\x14mavsdk_options.proto\"\x1a\n\x18SubscribePositionRequest\"D\n\x10PositionResponse\x12\x30\n\x08position\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.telemetry.Position\"\x16\n\x14SubscribeHomeRequest\"<\n\x0cHomeResponse\x12,\n\x04home\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.telemetry.Position\"\x17\n\x15SubscribeInAirRequest\"\"\n\rInAirResponse\x12\x11\n\tis_in_air\x18\x01 \x01(\x08\"\x1d\n\x1bSubscribeLandedStateRequest\"N\n\x13LandedStateResponse\x12\x37\n\x0clanded_state\x18\x01 \x01(\x0e\x32!.mavsdk.rpc.telemetry.LandedState\"\x17\n\x15SubscribeArmedRequest\"!\n\rArmedResponse\x12\x10\n\x08is_armed\x18\x01 \x01(\x08\"\x1b\n\x19SubscribeVtolStateRequest\"H\n\x11VtolStateResponse\x12\x33\n\nvtol_state\x18\x01 \x01(\x0e\x32\x1f.mavsdk.rpc.telemetry.VtolState\"$\n\"SubscribeAttitudeQuaternionRequest\"[\n\x1a\x41ttitudeQuaternionResponse\x12=\n\x13\x61ttitude_quaternion\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry.Quaternion\"\x1f\n\x1dSubscribeAttitudeEulerRequest\"Q\n\x15\x41ttitudeEulerResponse\x12\x38\n\x0e\x61ttitude_euler\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry.EulerAngle\"-\n+SubscribeAttitudeAngularVelocityBodyRequest\"x\n#AttitudeAngularVelocityBodyResponse\x12Q\n\x1e\x61ttitude_angular_velocity_body\x18\x01 \x01(\x0b\x32).mavsdk.rpc.telemetry.AngularVelocityBody\"*\n(SubscribeCameraAttitudeQuaternionRequest\"a\n CameraAttitudeQuaternionResponse\x12=\n\x13\x61ttitude_quaternion\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry.Quaternion\"%\n#SubscribeCameraAttitudeEulerRequest\"W\n\x1b\x43\x61meraAttitudeEulerResponse\x12\x38\n\x0e\x61ttitude_euler\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry.EulerAngle\"\x1d\n\x1bSubscribeVelocityNedRequest\"N\n\x13VelocityNedResponse\x12\x37\n\x0cvelocity_ned\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.telemetry.VelocityNed\"\x19\n\x17SubscribeGpsInfoRequest\"B\n\x0fGpsInfoResponse\x12/\n\x08gps_info\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.telemetry.GpsInfo\"\x18\n\x16SubscribeRawGpsRequest\"?\n\x0eRawGpsResponse\x12-\n\x07raw_gps\x18\x01 \x01(\x0b\x32\x1c.mavsdk.rpc.telemetry.RawGps\"\x19\n\x17SubscribeBatteryRequest\"A\n\x0f\x42\x61tteryResponse\x12.\n\x07\x62\x61ttery\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.telemetry.Battery\"\x1c\n\x1aSubscribeFlightModeRequest\"K\n\x12\x46lightModeResponse\x12\x35\n\x0b\x66light_mode\x18\x01 \x01(\x0e\x32 .mavsdk.rpc.telemetry.FlightMode\"\x18\n\x16SubscribeHealthRequest\">\n\x0eHealthResponse\x12,\n\x06health\x18\x01 \x01(\x0b\x32\x1c.mavsdk.rpc.telemetry.Health\"\x1a\n\x18SubscribeRcStatusRequest\"E\n\x10RcStatusResponse\x12\x31\n\trc_status\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.telemetry.RcStatus\"\x1c\n\x1aSubscribeStatusTextRequest\"K\n\x12StatusTextResponse\x12\x35\n\x0bstatus_text\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry.StatusText\"\'\n%SubscribeActuatorControlTargetRequest\"m\n\x1d\x41\x63tuatorControlTargetResponse\x12L\n\x17\x61\x63tuator_control_target\x18\x01 \x01(\x0b\x32+.mavsdk.rpc.telemetry.ActuatorControlTarget\"&\n$SubscribeActuatorOutputStatusRequest\"j\n\x1c\x41\x63tuatorOutputStatusResponse\x12J\n\x16\x61\x63tuator_output_status\x18\x01 \x01(\x0b\x32*.mavsdk.rpc.telemetry.ActuatorOutputStatus\"\x1a\n\x18SubscribeOdometryRequest\"D\n\x10OdometryResponse\x12\x30\n\x08odometry\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.telemetry.Odometry\"%\n#SubscribePositionVelocityNedRequest\"g\n\x1bPositionVelocityNedResponse\x12H\n\x15position_velocity_ned\x18\x01 \x01(\x0b\x32).mavsdk.rpc.telemetry.PositionVelocityNed\"\x1d\n\x1bSubscribeGroundTruthRequest\"N\n\x13GroundTruthResponse\x12\x37\n\x0cground_truth\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.telemetry.GroundTruth\"\"\n SubscribeFixedwingMetricsRequest\"]\n\x18\x46ixedwingMetricsResponse\x12\x41\n\x11\x66ixedwing_metrics\x18\x01 \x01(\x0b\x32&.mavsdk.rpc.telemetry.FixedwingMetrics\"\x15\n\x13SubscribeImuRequest\"5\n\x0bImuResponse\x12&\n\x03imu\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.telemetry.Imu\"\x1b\n\x19SubscribeScaledImuRequest\";\n\x11ScaledImuResponse\x12&\n\x03imu\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.telemetry.Imu\"\x18\n\x16SubscribeRawImuRequest\"8\n\x0eRawImuResponse\x12&\n\x03imu\x18\x01 \x01(\x0b\x32\x19.mavsdk.rpc.telemetry.Imu\"\x1d\n\x1bSubscribeHealthAllOkRequest\"/\n\x13HealthAllOkResponse\x12\x18\n\x10is_health_all_ok\x18\x01 \x01(\x08\"\x1f\n\x1dSubscribeUnixEpochTimeRequest\"(\n\x15UnixEpochTimeResponse\x12\x0f\n\x07time_us\x18\x01 \x01(\x04\" \n\x1eSubscribeDistanceSensorRequest\"W\n\x16\x44istanceSensorResponse\x12=\n\x0f\x64istance_sensor\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.telemetry.DistanceSensor\" \n\x1eSubscribeScaledPressureRequest\"W\n\x16ScaledPressureResponse\x12=\n\x0fscaled_pressure\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.telemetry.ScaledPressure\"\x19\n\x17SubscribeHeadingRequest\"E\n\x0fHeadingResponse\x12\x32\n\x0bheading_deg\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.telemetry.Heading\"\x1a\n\x18SubscribeAltitudeRequest\"D\n\x10\x41ltitudeResponse\x12\x30\n\x08\x61ltitude\x18\x01 \x01(\x0b\x32\x1e.mavsdk.rpc.telemetry.Altitude\")\n\x16SetRatePositionRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Z\n\x17SetRatePositionResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"%\n\x12SetRateHomeRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"V\n\x13SetRateHomeResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"&\n\x13SetRateInAirRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"W\n\x14SetRateInAirResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\",\n\x19SetRateLandedStateRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"]\n\x1aSetRateLandedStateResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"*\n\x17SetRateVtolStateRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"[\n\x18SetRateVtolStateResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\".\n\x1bSetRateAttitudeEulerRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"_\n\x1cSetRateAttitudeEulerResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"3\n SetRateAttitudeQuaternionRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"d\n!SetRateAttitudeQuaternionResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"<\n)SetRateAttitudeAngularVelocityBodyRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"m\n*SetRateAttitudeAngularVelocityBodyResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"9\n&SetRateCameraAttitudeQuaternionRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"j\n\'SetRateCameraAttitudeQuaternionResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"/\n\x1cSetRateCameraAttitudeRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"`\n\x1dSetRateCameraAttitudeResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\",\n\x19SetRateVelocityNedRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"]\n\x1aSetRateVelocityNedResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"(\n\x15SetRateGpsInfoRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Y\n\x16SetRateGpsInfoResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"\'\n\x14SetRateRawGpsRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"(\n\x15SetRateBatteryRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Y\n\x16SetRateBatteryResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\")\n\x16SetRateRcStatusRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Z\n\x17SetRateRcStatusResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"6\n#SetRateActuatorControlTargetRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"g\n$SetRateActuatorControlTargetResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"5\n\"SetRateActuatorOutputStatusRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"f\n#SetRateActuatorOutputStatusResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\")\n\x16SetRateOdometryRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Z\n\x17SetRateOdometryResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"4\n!SetRatePositionVelocityNedRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"e\n\"SetRatePositionVelocityNedResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\",\n\x19SetRateGroundTruthRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"]\n\x1aSetRateGroundTruthResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"1\n\x1eSetRateFixedwingMetricsRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"b\n\x1fSetRateFixedwingMetricsResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"$\n\x11SetRateImuRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"U\n\x12SetRateImuResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"*\n\x17SetRateScaledImuRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"[\n\x18SetRateScaledImuResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"\'\n\x14SetRateRawImuRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"X\n\x15SetRateRawImuResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\".\n\x1bSetRateUnixEpochTimeRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"_\n\x1cSetRateUnixEpochTimeResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"/\n\x1cSetRateDistanceSensorRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"`\n\x1dSetRateDistanceSensorResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"\x1b\n\x19GetGpsGlobalOriginRequest\"\x9f\x01\n\x1aGetGpsGlobalOriginResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\x12@\n\x11gps_global_origin\x18\x02 \x01(\x0b\x32%.mavsdk.rpc.telemetry.GpsGlobalOrigin\")\n\x16SetRateAltitudeRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"Z\n\x17SetRateAltitudeResponse\x12?\n\x10telemetry_result\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.TelemetryResult\"\x95\x01\n\x08Position\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13relative_altitude_m\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\'\n\x07Heading\x12\x1c\n\x0bheading_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\"r\n\nQuaternion\x12\x12\n\x01w\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01x\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01y\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01z\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x05 \x01(\x04\"s\n\nEulerAngle\x12\x19\n\x08roll_deg\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tpitch_deg\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x18\n\x07yaw_deg\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x04 \x01(\x04\"l\n\x13\x41ngularVelocityBody\x12\x1b\n\nroll_rad_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bpitch_rad_s\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tyaw_rad_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"Y\n\x07GpsInfo\x12\x1d\n\x0enum_satellites\x18\x01 \x01(\x05\x42\x05\x82\xb5\x18\x01\x30\x12/\n\x08\x66ix_type\x18\x02 \x01(\x0e\x32\x1d.mavsdk.rpc.telemetry.FixType\"\xdf\x02\n\x06RawGps\x12\x14\n\x0ctimestamp_us\x18\x01 \x01(\x04\x12\x14\n\x0clatitude_deg\x18\x02 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x03 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x04 \x01(\x02\x12\x0c\n\x04hdop\x18\x05 \x01(\x02\x12\x0c\n\x04vdop\x18\x06 \x01(\x02\x12\x14\n\x0cvelocity_m_s\x18\x07 \x01(\x02\x12\x0f\n\x07\x63og_deg\x18\x08 \x01(\x02\x12\x1c\n\x14\x61ltitude_ellipsoid_m\x18\t \x01(\x02\x12 \n\x18horizontal_uncertainty_m\x18\n \x01(\x02\x12\x1e\n\x16vertical_uncertainty_m\x18\x0b \x01(\x02\x12 \n\x18velocity_uncertainty_m_s\x18\x0c \x01(\x02\x12\x1f\n\x17heading_uncertainty_deg\x18\r \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x0e \x01(\x02\"\xca\x01\n\x07\x42\x61ttery\x12\x11\n\x02id\x18\x01 \x01(\rB\x05\x82\xb5\x18\x01\x30\x12!\n\x10temperature_degc\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tvoltage_v\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\"\n\x11\x63urrent_battery_a\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12%\n\x14\x63\x61pacity_consumed_ah\x18\x05 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\"\n\x11remaining_percent\x18\x06 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\xb9\x02\n\x06Health\x12.\n\x1bis_gyrometer_calibration_ok\x18\x01 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x32\n\x1fis_accelerometer_calibration_ok\x18\x02 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x31\n\x1eis_magnetometer_calibration_ok\x18\x03 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\'\n\x14is_local_position_ok\x18\x05 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12(\n\x15is_global_position_ok\x18\x06 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12&\n\x13is_home_position_ok\x18\x07 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x1d\n\nis_armable\x18\x08 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\"|\n\x08RcStatus\x12%\n\x12was_available_once\x18\x01 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x1f\n\x0cis_available\x18\x02 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12(\n\x17signal_strength_percent\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"N\n\nStatusText\x12\x32\n\x04type\x18\x01 \x01(\x0e\x32$.mavsdk.rpc.telemetry.StatusTextType\x12\x0c\n\x04text\x18\x02 \x01(\t\"?\n\x15\x41\x63tuatorControlTarget\x12\x14\n\x05group\x18\x01 \x01(\x05\x42\x05\x82\xb5\x18\x01\x30\x12\x10\n\x08\x63ontrols\x18\x02 \x03(\x02\"?\n\x14\x41\x63tuatorOutputStatus\x12\x15\n\x06\x61\x63tive\x18\x01 \x01(\rB\x05\x82\xb5\x18\x01\x30\x12\x10\n\x08\x61\x63tuator\x18\x02 \x03(\x02\"\'\n\nCovariance\x12\x19\n\x11\x63ovariance_matrix\x18\x01 \x03(\x02\";\n\x0cVelocityBody\x12\r\n\x05x_m_s\x18\x01 \x01(\x02\x12\r\n\x05y_m_s\x18\x02 \x01(\x02\x12\r\n\x05z_m_s\x18\x03 \x01(\x02\"5\n\x0cPositionBody\x12\x0b\n\x03x_m\x18\x01 \x01(\x02\x12\x0b\n\x03y_m\x18\x02 \x01(\x02\x12\x0b\n\x03z_m\x18\x03 \x01(\x02\"\xec\x04\n\x08Odometry\x12\x11\n\ttime_usec\x18\x01 \x01(\x04\x12\x39\n\x08\x66rame_id\x18\x02 \x01(\x0e\x32\'.mavsdk.rpc.telemetry.Odometry.MavFrame\x12?\n\x0e\x63hild_frame_id\x18\x03 \x01(\x0e\x32\'.mavsdk.rpc.telemetry.Odometry.MavFrame\x12\x39\n\rposition_body\x18\x04 \x01(\x0b\x32\".mavsdk.rpc.telemetry.PositionBody\x12+\n\x01q\x18\x05 \x01(\x0b\x32 .mavsdk.rpc.telemetry.Quaternion\x12\x39\n\rvelocity_body\x18\x06 \x01(\x0b\x32\".mavsdk.rpc.telemetry.VelocityBody\x12H\n\x15\x61ngular_velocity_body\x18\x07 \x01(\x0b\x32).mavsdk.rpc.telemetry.AngularVelocityBody\x12\x39\n\x0fpose_covariance\x18\x08 \x01(\x0b\x32 .mavsdk.rpc.telemetry.Covariance\x12=\n\x13velocity_covariance\x18\t \x01(\x0b\x32 .mavsdk.rpc.telemetry.Covariance\"j\n\x08MavFrame\x12\x13\n\x0fMAV_FRAME_UNDEF\x10\x00\x12\x16\n\x12MAV_FRAME_BODY_NED\x10\x08\x12\x18\n\x14MAV_FRAME_VISION_NED\x10\x10\x12\x17\n\x13MAV_FRAME_ESTIM_NED\x10\x12\"\xb6\x01\n\x0e\x44istanceSensor\x12#\n\x12minimum_distance_m\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12#\n\x12maximum_distance_m\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12#\n\x12\x63urrent_distance_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x35\n\x0borientation\x18\x04 \x01(\x0b\x32 .mavsdk.rpc.telemetry.EulerAngle\"\xb0\x01\n\x0eScaledPressure\x12\x14\n\x0ctimestamp_us\x18\x01 \x01(\x04\x12\x1d\n\x15\x61\x62solute_pressure_hpa\x18\x02 \x01(\x02\x12!\n\x19\x64ifferential_pressure_hpa\x18\x03 \x01(\x02\x12\x17\n\x0ftemperature_deg\x18\x04 \x01(\x02\x12-\n%differential_pressure_temperature_deg\x18\x05 \x01(\x02\"Y\n\x0bPositionNed\x12\x18\n\x07north_m\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x17\n\x06\x65\x61st_m\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x17\n\x06\x64own_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"D\n\x0bVelocityNed\x12\x11\n\tnorth_m_s\x18\x01 \x01(\x02\x12\x10\n\x08\x65\x61st_m_s\x18\x02 \x01(\x02\x12\x10\n\x08\x64own_m_s\x18\x03 \x01(\x02\"\x7f\n\x13PositionVelocityNed\x12\x33\n\x08position\x18\x01 \x01(\x0b\x32!.mavsdk.rpc.telemetry.PositionNed\x12\x33\n\x08velocity\x18\x02 \x01(\x0b\x32!.mavsdk.rpc.telemetry.VelocityNed\"r\n\x0bGroundTruth\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"x\n\x10\x46ixedwingMetrics\x12\x1d\n\x0c\x61irspeed_m_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13throttle_percentage\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1f\n\x0e\x63limb_rate_m_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"i\n\x0f\x41\x63\x63\x65lerationFrd\x12\x1d\n\x0c\x66orward_m_s2\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\nright_m_s2\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tdown_m_s2\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"o\n\x12\x41ngularVelocityFrd\x12\x1e\n\rforward_rad_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bright_rad_s\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\ndown_rad_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"m\n\x10MagneticFieldFrd\x12\x1e\n\rforward_gauss\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bright_gauss\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\ndown_gauss\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\x8b\x02\n\x03Imu\x12?\n\x10\x61\x63\x63\x65leration_frd\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry.AccelerationFrd\x12\x46\n\x14\x61ngular_velocity_frd\x18\x02 \x01(\x0b\x32(.mavsdk.rpc.telemetry.AngularVelocityFrd\x12\x42\n\x12magnetic_field_frd\x18\x03 \x01(\x0b\x32&.mavsdk.rpc.telemetry.MagneticFieldFrd\x12!\n\x10temperature_degc\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x05 \x01(\x04\"m\n\x0fGpsGlobalOrigin\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\naltitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\xe6\x01\n\x08\x41ltitude\x12%\n\x14\x61ltitude_monotonic_m\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12 \n\x0f\x61ltitude_amsl_m\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12!\n\x10\x61ltitude_local_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61ltitude_relative_m\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12#\n\x12\x61ltitude_terrain_m\x18\x05 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12#\n\x12\x62ottom_clearance_m\x18\x06 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\xa1\x02\n\x0fTelemetryResult\x12<\n\x06result\x18\x01 \x01(\x0e\x32,.mavsdk.rpc.telemetry.TelemetryResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xbb\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x07*\xa4\x01\n\x07\x46ixType\x12\x13\n\x0f\x46IX_TYPE_NO_GPS\x10\x00\x12\x13\n\x0f\x46IX_TYPE_NO_FIX\x10\x01\x12\x13\n\x0f\x46IX_TYPE_FIX_2D\x10\x02\x12\x13\n\x0f\x46IX_TYPE_FIX_3D\x10\x03\x12\x15\n\x11\x46IX_TYPE_FIX_DGPS\x10\x04\x12\x16\n\x12\x46IX_TYPE_RTK_FLOAT\x10\x05\x12\x16\n\x12\x46IX_TYPE_RTK_FIXED\x10\x06*\x86\x03\n\nFlightMode\x12\x17\n\x13\x46LIGHT_MODE_UNKNOWN\x10\x00\x12\x15\n\x11\x46LIGHT_MODE_READY\x10\x01\x12\x17\n\x13\x46LIGHT_MODE_TAKEOFF\x10\x02\x12\x14\n\x10\x46LIGHT_MODE_HOLD\x10\x03\x12\x17\n\x13\x46LIGHT_MODE_MISSION\x10\x04\x12 \n\x1c\x46LIGHT_MODE_RETURN_TO_LAUNCH\x10\x05\x12\x14\n\x10\x46LIGHT_MODE_LAND\x10\x06\x12\x18\n\x14\x46LIGHT_MODE_OFFBOARD\x10\x07\x12\x19\n\x15\x46LIGHT_MODE_FOLLOW_ME\x10\x08\x12\x16\n\x12\x46LIGHT_MODE_MANUAL\x10\t\x12\x16\n\x12\x46LIGHT_MODE_ALTCTL\x10\n\x12\x16\n\x12\x46LIGHT_MODE_POSCTL\x10\x0b\x12\x14\n\x10\x46LIGHT_MODE_ACRO\x10\x0c\x12\x1a\n\x16\x46LIGHT_MODE_STABILIZED\x10\r\x12\x19\n\x15\x46LIGHT_MODE_RATTITUDE\x10\x0e*\xf9\x01\n\x0eStatusTextType\x12\x1a\n\x16STATUS_TEXT_TYPE_DEBUG\x10\x00\x12\x19\n\x15STATUS_TEXT_TYPE_INFO\x10\x01\x12\x1b\n\x17STATUS_TEXT_TYPE_NOTICE\x10\x02\x12\x1c\n\x18STATUS_TEXT_TYPE_WARNING\x10\x03\x12\x1a\n\x16STATUS_TEXT_TYPE_ERROR\x10\x04\x12\x1d\n\x19STATUS_TEXT_TYPE_CRITICAL\x10\x05\x12\x1a\n\x16STATUS_TEXT_TYPE_ALERT\x10\x06\x12\x1e\n\x1aSTATUS_TEXT_TYPE_EMERGENCY\x10\x07*\x93\x01\n\x0bLandedState\x12\x18\n\x14LANDED_STATE_UNKNOWN\x10\x00\x12\x1a\n\x16LANDED_STATE_ON_GROUND\x10\x01\x12\x17\n\x13LANDED_STATE_IN_AIR\x10\x02\x12\x1b\n\x17LANDED_STATE_TAKING_OFF\x10\x03\x12\x18\n\x14LANDED_STATE_LANDING\x10\x04*\x8d\x01\n\tVtolState\x12\x18\n\x14VTOL_STATE_UNDEFINED\x10\x00\x12\x1f\n\x1bVTOL_STATE_TRANSITION_TO_FW\x10\x01\x12\x1f\n\x1bVTOL_STATE_TRANSITION_TO_MC\x10\x02\x12\x11\n\rVTOL_STATE_MC\x10\x03\x12\x11\n\rVTOL_STATE_FW\x10\x04\x32\x81\x39\n\x10TelemetryService\x12o\n\x11SubscribePosition\x12..mavsdk.rpc.telemetry.SubscribePositionRequest\x1a&.mavsdk.rpc.telemetry.PositionResponse\"\x00\x30\x01\x12\x63\n\rSubscribeHome\x12*.mavsdk.rpc.telemetry.SubscribeHomeRequest\x1a\".mavsdk.rpc.telemetry.HomeResponse\"\x00\x30\x01\x12\x66\n\x0eSubscribeInAir\x12+.mavsdk.rpc.telemetry.SubscribeInAirRequest\x1a#.mavsdk.rpc.telemetry.InAirResponse\"\x00\x30\x01\x12x\n\x14SubscribeLandedState\x12\x31.mavsdk.rpc.telemetry.SubscribeLandedStateRequest\x1a).mavsdk.rpc.telemetry.LandedStateResponse\"\x00\x30\x01\x12\x66\n\x0eSubscribeArmed\x12+.mavsdk.rpc.telemetry.SubscribeArmedRequest\x1a#.mavsdk.rpc.telemetry.ArmedResponse\"\x00\x30\x01\x12r\n\x12SubscribeVtolState\x12/.mavsdk.rpc.telemetry.SubscribeVtolStateRequest\x1a\'.mavsdk.rpc.telemetry.VtolStateResponse\"\x00\x30\x01\x12\x8d\x01\n\x1bSubscribeAttitudeQuaternion\x12\x38.mavsdk.rpc.telemetry.SubscribeAttitudeQuaternionRequest\x1a\x30.mavsdk.rpc.telemetry.AttitudeQuaternionResponse\"\x00\x30\x01\x12~\n\x16SubscribeAttitudeEuler\x12\x33.mavsdk.rpc.telemetry.SubscribeAttitudeEulerRequest\x1a+.mavsdk.rpc.telemetry.AttitudeEulerResponse\"\x00\x30\x01\x12\xa8\x01\n$SubscribeAttitudeAngularVelocityBody\x12\x41.mavsdk.rpc.telemetry.SubscribeAttitudeAngularVelocityBodyRequest\x1a\x39.mavsdk.rpc.telemetry.AttitudeAngularVelocityBodyResponse\"\x00\x30\x01\x12\x9f\x01\n!SubscribeCameraAttitudeQuaternion\x12>.mavsdk.rpc.telemetry.SubscribeCameraAttitudeQuaternionRequest\x1a\x36.mavsdk.rpc.telemetry.CameraAttitudeQuaternionResponse\"\x00\x30\x01\x12\x90\x01\n\x1cSubscribeCameraAttitudeEuler\x12\x39.mavsdk.rpc.telemetry.SubscribeCameraAttitudeEulerRequest\x1a\x31.mavsdk.rpc.telemetry.CameraAttitudeEulerResponse\"\x00\x30\x01\x12x\n\x14SubscribeVelocityNed\x12\x31.mavsdk.rpc.telemetry.SubscribeVelocityNedRequest\x1a).mavsdk.rpc.telemetry.VelocityNedResponse\"\x00\x30\x01\x12l\n\x10SubscribeGpsInfo\x12-.mavsdk.rpc.telemetry.SubscribeGpsInfoRequest\x1a%.mavsdk.rpc.telemetry.GpsInfoResponse\"\x00\x30\x01\x12i\n\x0fSubscribeRawGps\x12,.mavsdk.rpc.telemetry.SubscribeRawGpsRequest\x1a$.mavsdk.rpc.telemetry.RawGpsResponse\"\x00\x30\x01\x12l\n\x10SubscribeBattery\x12-.mavsdk.rpc.telemetry.SubscribeBatteryRequest\x1a%.mavsdk.rpc.telemetry.BatteryResponse\"\x00\x30\x01\x12u\n\x13SubscribeFlightMode\x12\x30.mavsdk.rpc.telemetry.SubscribeFlightModeRequest\x1a(.mavsdk.rpc.telemetry.FlightModeResponse\"\x00\x30\x01\x12i\n\x0fSubscribeHealth\x12,.mavsdk.rpc.telemetry.SubscribeHealthRequest\x1a$.mavsdk.rpc.telemetry.HealthResponse\"\x00\x30\x01\x12o\n\x11SubscribeRcStatus\x12..mavsdk.rpc.telemetry.SubscribeRcStatusRequest\x1a&.mavsdk.rpc.telemetry.RcStatusResponse\"\x00\x30\x01\x12u\n\x13SubscribeStatusText\x12\x30.mavsdk.rpc.telemetry.SubscribeStatusTextRequest\x1a(.mavsdk.rpc.telemetry.StatusTextResponse\"\x00\x30\x01\x12\x96\x01\n\x1eSubscribeActuatorControlTarget\x12;.mavsdk.rpc.telemetry.SubscribeActuatorControlTargetRequest\x1a\x33.mavsdk.rpc.telemetry.ActuatorControlTargetResponse\"\x00\x30\x01\x12\x93\x01\n\x1dSubscribeActuatorOutputStatus\x12:.mavsdk.rpc.telemetry.SubscribeActuatorOutputStatusRequest\x1a\x32.mavsdk.rpc.telemetry.ActuatorOutputStatusResponse\"\x00\x30\x01\x12o\n\x11SubscribeOdometry\x12..mavsdk.rpc.telemetry.SubscribeOdometryRequest\x1a&.mavsdk.rpc.telemetry.OdometryResponse\"\x00\x30\x01\x12\x90\x01\n\x1cSubscribePositionVelocityNed\x12\x39.mavsdk.rpc.telemetry.SubscribePositionVelocityNedRequest\x1a\x31.mavsdk.rpc.telemetry.PositionVelocityNedResponse\"\x00\x30\x01\x12x\n\x14SubscribeGroundTruth\x12\x31.mavsdk.rpc.telemetry.SubscribeGroundTruthRequest\x1a).mavsdk.rpc.telemetry.GroundTruthResponse\"\x00\x30\x01\x12\x87\x01\n\x19SubscribeFixedwingMetrics\x12\x36.mavsdk.rpc.telemetry.SubscribeFixedwingMetricsRequest\x1a..mavsdk.rpc.telemetry.FixedwingMetricsResponse\"\x00\x30\x01\x12`\n\x0cSubscribeImu\x12).mavsdk.rpc.telemetry.SubscribeImuRequest\x1a!.mavsdk.rpc.telemetry.ImuResponse\"\x00\x30\x01\x12r\n\x12SubscribeScaledImu\x12/.mavsdk.rpc.telemetry.SubscribeScaledImuRequest\x1a\'.mavsdk.rpc.telemetry.ScaledImuResponse\"\x00\x30\x01\x12i\n\x0fSubscribeRawImu\x12,.mavsdk.rpc.telemetry.SubscribeRawImuRequest\x1a$.mavsdk.rpc.telemetry.RawImuResponse\"\x00\x30\x01\x12x\n\x14SubscribeHealthAllOk\x12\x31.mavsdk.rpc.telemetry.SubscribeHealthAllOkRequest\x1a).mavsdk.rpc.telemetry.HealthAllOkResponse\"\x00\x30\x01\x12~\n\x16SubscribeUnixEpochTime\x12\x33.mavsdk.rpc.telemetry.SubscribeUnixEpochTimeRequest\x1a+.mavsdk.rpc.telemetry.UnixEpochTimeResponse\"\x00\x30\x01\x12\x81\x01\n\x17SubscribeDistanceSensor\x12\x34.mavsdk.rpc.telemetry.SubscribeDistanceSensorRequest\x1a,.mavsdk.rpc.telemetry.DistanceSensorResponse\"\x00\x30\x01\x12\x81\x01\n\x17SubscribeScaledPressure\x12\x34.mavsdk.rpc.telemetry.SubscribeScaledPressureRequest\x1a,.mavsdk.rpc.telemetry.ScaledPressureResponse\"\x00\x30\x01\x12l\n\x10SubscribeHeading\x12-.mavsdk.rpc.telemetry.SubscribeHeadingRequest\x1a%.mavsdk.rpc.telemetry.HeadingResponse\"\x00\x30\x01\x12o\n\x11SubscribeAltitude\x12..mavsdk.rpc.telemetry.SubscribeAltitudeRequest\x1a&.mavsdk.rpc.telemetry.AltitudeResponse\"\x00\x30\x01\x12p\n\x0fSetRatePosition\x12,.mavsdk.rpc.telemetry.SetRatePositionRequest\x1a-.mavsdk.rpc.telemetry.SetRatePositionResponse\"\x00\x12\x64\n\x0bSetRateHome\x12(.mavsdk.rpc.telemetry.SetRateHomeRequest\x1a).mavsdk.rpc.telemetry.SetRateHomeResponse\"\x00\x12g\n\x0cSetRateInAir\x12).mavsdk.rpc.telemetry.SetRateInAirRequest\x1a*.mavsdk.rpc.telemetry.SetRateInAirResponse\"\x00\x12y\n\x12SetRateLandedState\x12/.mavsdk.rpc.telemetry.SetRateLandedStateRequest\x1a\x30.mavsdk.rpc.telemetry.SetRateLandedStateResponse\"\x00\x12s\n\x10SetRateVtolState\x12-.mavsdk.rpc.telemetry.SetRateVtolStateRequest\x1a..mavsdk.rpc.telemetry.SetRateVtolStateResponse\"\x00\x12\x8e\x01\n\x19SetRateAttitudeQuaternion\x12\x36.mavsdk.rpc.telemetry.SetRateAttitudeQuaternionRequest\x1a\x37.mavsdk.rpc.telemetry.SetRateAttitudeQuaternionResponse\"\x00\x12\x7f\n\x14SetRateAttitudeEuler\x12\x31.mavsdk.rpc.telemetry.SetRateAttitudeEulerRequest\x1a\x32.mavsdk.rpc.telemetry.SetRateAttitudeEulerResponse\"\x00\x12\x82\x01\n\x15SetRateCameraAttitude\x12\x32.mavsdk.rpc.telemetry.SetRateCameraAttitudeRequest\x1a\x33.mavsdk.rpc.telemetry.SetRateCameraAttitudeResponse\"\x00\x12y\n\x12SetRateVelocityNed\x12/.mavsdk.rpc.telemetry.SetRateVelocityNedRequest\x1a\x30.mavsdk.rpc.telemetry.SetRateVelocityNedResponse\"\x00\x12m\n\x0eSetRateGpsInfo\x12+.mavsdk.rpc.telemetry.SetRateGpsInfoRequest\x1a,.mavsdk.rpc.telemetry.SetRateGpsInfoResponse\"\x00\x12m\n\x0eSetRateBattery\x12+.mavsdk.rpc.telemetry.SetRateBatteryRequest\x1a,.mavsdk.rpc.telemetry.SetRateBatteryResponse\"\x00\x12p\n\x0fSetRateRcStatus\x12,.mavsdk.rpc.telemetry.SetRateRcStatusRequest\x1a-.mavsdk.rpc.telemetry.SetRateRcStatusResponse\"\x00\x12\x97\x01\n\x1cSetRateActuatorControlTarget\x12\x39.mavsdk.rpc.telemetry.SetRateActuatorControlTargetRequest\x1a:.mavsdk.rpc.telemetry.SetRateActuatorControlTargetResponse\"\x00\x12\x94\x01\n\x1bSetRateActuatorOutputStatus\x12\x38.mavsdk.rpc.telemetry.SetRateActuatorOutputStatusRequest\x1a\x39.mavsdk.rpc.telemetry.SetRateActuatorOutputStatusResponse\"\x00\x12p\n\x0fSetRateOdometry\x12,.mavsdk.rpc.telemetry.SetRateOdometryRequest\x1a-.mavsdk.rpc.telemetry.SetRateOdometryResponse\"\x00\x12\x91\x01\n\x1aSetRatePositionVelocityNed\x12\x37.mavsdk.rpc.telemetry.SetRatePositionVelocityNedRequest\x1a\x38.mavsdk.rpc.telemetry.SetRatePositionVelocityNedResponse\"\x00\x12y\n\x12SetRateGroundTruth\x12/.mavsdk.rpc.telemetry.SetRateGroundTruthRequest\x1a\x30.mavsdk.rpc.telemetry.SetRateGroundTruthResponse\"\x00\x12\x88\x01\n\x17SetRateFixedwingMetrics\x12\x34.mavsdk.rpc.telemetry.SetRateFixedwingMetricsRequest\x1a\x35.mavsdk.rpc.telemetry.SetRateFixedwingMetricsResponse\"\x00\x12\x61\n\nSetRateImu\x12\'.mavsdk.rpc.telemetry.SetRateImuRequest\x1a(.mavsdk.rpc.telemetry.SetRateImuResponse\"\x00\x12s\n\x10SetRateScaledImu\x12-.mavsdk.rpc.telemetry.SetRateScaledImuRequest\x1a..mavsdk.rpc.telemetry.SetRateScaledImuResponse\"\x00\x12j\n\rSetRateRawImu\x12*.mavsdk.rpc.telemetry.SetRateRawImuRequest\x1a+.mavsdk.rpc.telemetry.SetRateRawImuResponse\"\x00\x12\x7f\n\x14SetRateUnixEpochTime\x12\x31.mavsdk.rpc.telemetry.SetRateUnixEpochTimeRequest\x1a\x32.mavsdk.rpc.telemetry.SetRateUnixEpochTimeResponse\"\x00\x12\x82\x01\n\x15SetRateDistanceSensor\x12\x32.mavsdk.rpc.telemetry.SetRateDistanceSensorRequest\x1a\x33.mavsdk.rpc.telemetry.SetRateDistanceSensorResponse\"\x00\x12p\n\x0fSetRateAltitude\x12,.mavsdk.rpc.telemetry.SetRateAltitudeRequest\x1a-.mavsdk.rpc.telemetry.SetRateAltitudeResponse\"\x00\x12y\n\x12GetGpsGlobalOrigin\x12/.mavsdk.rpc.telemetry.GetGpsGlobalOriginRequest\x1a\x30.mavsdk.rpc.telemetry.GetGpsGlobalOriginResponse\"\x00\x42%\n\x13io.mavsdk.telemetryB\x0eTelemetryProtob\x06proto3') _FIXTYPE = DESCRIPTOR.enum_types_by_name['FixType'] FixType = enum_type_wrapper.EnumTypeWrapper(_FIXTYPE) @@ -136,6 +136,8 @@ _SCALEDPRESSURERESPONSE = DESCRIPTOR.message_types_by_name['ScaledPressureResponse'] _SUBSCRIBEHEADINGREQUEST = DESCRIPTOR.message_types_by_name['SubscribeHeadingRequest'] _HEADINGRESPONSE = DESCRIPTOR.message_types_by_name['HeadingResponse'] +_SUBSCRIBEALTITUDEREQUEST = DESCRIPTOR.message_types_by_name['SubscribeAltitudeRequest'] +_ALTITUDERESPONSE = DESCRIPTOR.message_types_by_name['AltitudeResponse'] _SETRATEPOSITIONREQUEST = DESCRIPTOR.message_types_by_name['SetRatePositionRequest'] _SETRATEPOSITIONRESPONSE = DESCRIPTOR.message_types_by_name['SetRatePositionResponse'] _SETRATEHOMEREQUEST = DESCRIPTOR.message_types_by_name['SetRateHomeRequest'] @@ -146,8 +148,10 @@ _SETRATELANDEDSTATERESPONSE = DESCRIPTOR.message_types_by_name['SetRateLandedStateResponse'] _SETRATEVTOLSTATEREQUEST = DESCRIPTOR.message_types_by_name['SetRateVtolStateRequest'] _SETRATEVTOLSTATERESPONSE = DESCRIPTOR.message_types_by_name['SetRateVtolStateResponse'] -_SETRATEATTITUDEREQUEST = DESCRIPTOR.message_types_by_name['SetRateAttitudeRequest'] -_SETRATEATTITUDERESPONSE = DESCRIPTOR.message_types_by_name['SetRateAttitudeResponse'] +_SETRATEATTITUDEEULERREQUEST = DESCRIPTOR.message_types_by_name['SetRateAttitudeEulerRequest'] +_SETRATEATTITUDEEULERRESPONSE = DESCRIPTOR.message_types_by_name['SetRateAttitudeEulerResponse'] +_SETRATEATTITUDEQUATERNIONREQUEST = DESCRIPTOR.message_types_by_name['SetRateAttitudeQuaternionRequest'] +_SETRATEATTITUDEQUATERNIONRESPONSE = DESCRIPTOR.message_types_by_name['SetRateAttitudeQuaternionResponse'] _SETRATEATTITUDEANGULARVELOCITYBODYREQUEST = DESCRIPTOR.message_types_by_name['SetRateAttitudeAngularVelocityBodyRequest'] _SETRATEATTITUDEANGULARVELOCITYBODYRESPONSE = DESCRIPTOR.message_types_by_name['SetRateAttitudeAngularVelocityBodyResponse'] _SETRATECAMERAATTITUDEQUATERNIONREQUEST = DESCRIPTOR.message_types_by_name['SetRateCameraAttitudeQuaternionRequest'] @@ -187,6 +191,8 @@ _SETRATEDISTANCESENSORRESPONSE = DESCRIPTOR.message_types_by_name['SetRateDistanceSensorResponse'] _GETGPSGLOBALORIGINREQUEST = DESCRIPTOR.message_types_by_name['GetGpsGlobalOriginRequest'] _GETGPSGLOBALORIGINRESPONSE = DESCRIPTOR.message_types_by_name['GetGpsGlobalOriginResponse'] +_SETRATEALTITUDEREQUEST = DESCRIPTOR.message_types_by_name['SetRateAltitudeRequest'] +_SETRATEALTITUDERESPONSE = DESCRIPTOR.message_types_by_name['SetRateAltitudeResponse'] _POSITION = DESCRIPTOR.message_types_by_name['Position'] _HEADING = DESCRIPTOR.message_types_by_name['Heading'] _QUATERNION = DESCRIPTOR.message_types_by_name['Quaternion'] @@ -216,6 +222,7 @@ _MAGNETICFIELDFRD = DESCRIPTOR.message_types_by_name['MagneticFieldFrd'] _IMU = DESCRIPTOR.message_types_by_name['Imu'] _GPSGLOBALORIGIN = DESCRIPTOR.message_types_by_name['GpsGlobalOrigin'] +_ALTITUDE = DESCRIPTOR.message_types_by_name['Altitude'] _TELEMETRYRESULT = DESCRIPTOR.message_types_by_name['TelemetryResult'] _ODOMETRY_MAVFRAME = _ODOMETRY.enum_types_by_name['MavFrame'] _TELEMETRYRESULT_RESULT = _TELEMETRYRESULT.enum_types_by_name['Result'] @@ -681,6 +688,20 @@ }) _sym_db.RegisterMessage(HeadingResponse) +SubscribeAltitudeRequest = _reflection.GeneratedProtocolMessageType('SubscribeAltitudeRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBEALTITUDEREQUEST, + '__module__' : 'telemetry.telemetry_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry.SubscribeAltitudeRequest) + }) +_sym_db.RegisterMessage(SubscribeAltitudeRequest) + +AltitudeResponse = _reflection.GeneratedProtocolMessageType('AltitudeResponse', (_message.Message,), { + 'DESCRIPTOR' : _ALTITUDERESPONSE, + '__module__' : 'telemetry.telemetry_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry.AltitudeResponse) + }) +_sym_db.RegisterMessage(AltitudeResponse) + SetRatePositionRequest = _reflection.GeneratedProtocolMessageType('SetRatePositionRequest', (_message.Message,), { 'DESCRIPTOR' : _SETRATEPOSITIONREQUEST, '__module__' : 'telemetry.telemetry_pb2' @@ -751,19 +772,33 @@ }) _sym_db.RegisterMessage(SetRateVtolStateResponse) -SetRateAttitudeRequest = _reflection.GeneratedProtocolMessageType('SetRateAttitudeRequest', (_message.Message,), { - 'DESCRIPTOR' : _SETRATEATTITUDEREQUEST, +SetRateAttitudeEulerRequest = _reflection.GeneratedProtocolMessageType('SetRateAttitudeEulerRequest', (_message.Message,), { + 'DESCRIPTOR' : _SETRATEATTITUDEEULERREQUEST, '__module__' : 'telemetry.telemetry_pb2' - # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry.SetRateAttitudeRequest) + # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry.SetRateAttitudeEulerRequest) }) -_sym_db.RegisterMessage(SetRateAttitudeRequest) +_sym_db.RegisterMessage(SetRateAttitudeEulerRequest) -SetRateAttitudeResponse = _reflection.GeneratedProtocolMessageType('SetRateAttitudeResponse', (_message.Message,), { - 'DESCRIPTOR' : _SETRATEATTITUDERESPONSE, +SetRateAttitudeEulerResponse = _reflection.GeneratedProtocolMessageType('SetRateAttitudeEulerResponse', (_message.Message,), { + 'DESCRIPTOR' : _SETRATEATTITUDEEULERRESPONSE, '__module__' : 'telemetry.telemetry_pb2' - # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry.SetRateAttitudeResponse) + # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry.SetRateAttitudeEulerResponse) }) -_sym_db.RegisterMessage(SetRateAttitudeResponse) +_sym_db.RegisterMessage(SetRateAttitudeEulerResponse) + +SetRateAttitudeQuaternionRequest = _reflection.GeneratedProtocolMessageType('SetRateAttitudeQuaternionRequest', (_message.Message,), { + 'DESCRIPTOR' : _SETRATEATTITUDEQUATERNIONREQUEST, + '__module__' : 'telemetry.telemetry_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry.SetRateAttitudeQuaternionRequest) + }) +_sym_db.RegisterMessage(SetRateAttitudeQuaternionRequest) + +SetRateAttitudeQuaternionResponse = _reflection.GeneratedProtocolMessageType('SetRateAttitudeQuaternionResponse', (_message.Message,), { + 'DESCRIPTOR' : _SETRATEATTITUDEQUATERNIONRESPONSE, + '__module__' : 'telemetry.telemetry_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry.SetRateAttitudeQuaternionResponse) + }) +_sym_db.RegisterMessage(SetRateAttitudeQuaternionResponse) SetRateAttitudeAngularVelocityBodyRequest = _reflection.GeneratedProtocolMessageType('SetRateAttitudeAngularVelocityBodyRequest', (_message.Message,), { 'DESCRIPTOR' : _SETRATEATTITUDEANGULARVELOCITYBODYREQUEST, @@ -1038,6 +1073,20 @@ }) _sym_db.RegisterMessage(GetGpsGlobalOriginResponse) +SetRateAltitudeRequest = _reflection.GeneratedProtocolMessageType('SetRateAltitudeRequest', (_message.Message,), { + 'DESCRIPTOR' : _SETRATEALTITUDEREQUEST, + '__module__' : 'telemetry.telemetry_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry.SetRateAltitudeRequest) + }) +_sym_db.RegisterMessage(SetRateAltitudeRequest) + +SetRateAltitudeResponse = _reflection.GeneratedProtocolMessageType('SetRateAltitudeResponse', (_message.Message,), { + 'DESCRIPTOR' : _SETRATEALTITUDERESPONSE, + '__module__' : 'telemetry.telemetry_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry.SetRateAltitudeResponse) + }) +_sym_db.RegisterMessage(SetRateAltitudeResponse) + Position = _reflection.GeneratedProtocolMessageType('Position', (_message.Message,), { 'DESCRIPTOR' : _POSITION, '__module__' : 'telemetry.telemetry_pb2' @@ -1241,6 +1290,13 @@ }) _sym_db.RegisterMessage(GpsGlobalOrigin) +Altitude = _reflection.GeneratedProtocolMessageType('Altitude', (_message.Message,), { + 'DESCRIPTOR' : _ALTITUDE, + '__module__' : 'telemetry.telemetry_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry.Altitude) + }) +_sym_db.RegisterMessage(Altitude) + TelemetryResult = _reflection.GeneratedProtocolMessageType('TelemetryResult', (_message.Message,), { 'DESCRIPTOR' : _TELEMETRYRESULT, '__module__' : 'telemetry.telemetry_pb2' @@ -1287,8 +1343,14 @@ _GPSINFO.fields_by_name['num_satellites']._serialized_options = b'\202\265\030\0010' _BATTERY.fields_by_name['id']._options = None _BATTERY.fields_by_name['id']._serialized_options = b'\202\265\030\0010' + _BATTERY.fields_by_name['temperature_degc']._options = None + _BATTERY.fields_by_name['temperature_degc']._serialized_options = b'\202\265\030\003NaN' _BATTERY.fields_by_name['voltage_v']._options = None _BATTERY.fields_by_name['voltage_v']._serialized_options = b'\202\265\030\003NaN' + _BATTERY.fields_by_name['current_battery_a']._options = None + _BATTERY.fields_by_name['current_battery_a']._serialized_options = b'\202\265\030\003NaN' + _BATTERY.fields_by_name['capacity_consumed_ah']._options = None + _BATTERY.fields_by_name['capacity_consumed_ah']._serialized_options = b'\202\265\030\003NaN' _BATTERY.fields_by_name['remaining_percent']._options = None _BATTERY.fields_by_name['remaining_percent']._serialized_options = b'\202\265\030\003NaN' _HEALTH.fields_by_name['is_gyrometer_calibration_ok']._options = None @@ -1365,16 +1427,28 @@ _GPSGLOBALORIGIN.fields_by_name['longitude_deg']._serialized_options = b'\202\265\030\003NaN' _GPSGLOBALORIGIN.fields_by_name['altitude_m']._options = None _GPSGLOBALORIGIN.fields_by_name['altitude_m']._serialized_options = b'\202\265\030\003NaN' - _FIXTYPE._serialized_start=11610 - _FIXTYPE._serialized_end=11774 - _FLIGHTMODE._serialized_start=11777 - _FLIGHTMODE._serialized_end=12167 - _STATUSTEXTTYPE._serialized_start=12170 - _STATUSTEXTTYPE._serialized_end=12419 - _LANDEDSTATE._serialized_start=12422 - _LANDEDSTATE._serialized_end=12569 - _VTOLSTATE._serialized_start=12572 - _VTOLSTATE._serialized_end=12713 + _ALTITUDE.fields_by_name['altitude_monotonic_m']._options = None + _ALTITUDE.fields_by_name['altitude_monotonic_m']._serialized_options = b'\202\265\030\003NaN' + _ALTITUDE.fields_by_name['altitude_amsl_m']._options = None + _ALTITUDE.fields_by_name['altitude_amsl_m']._serialized_options = b'\202\265\030\003NaN' + _ALTITUDE.fields_by_name['altitude_local_m']._options = None + _ALTITUDE.fields_by_name['altitude_local_m']._serialized_options = b'\202\265\030\003NaN' + _ALTITUDE.fields_by_name['altitude_relative_m']._options = None + _ALTITUDE.fields_by_name['altitude_relative_m']._serialized_options = b'\202\265\030\003NaN' + _ALTITUDE.fields_by_name['altitude_terrain_m']._options = None + _ALTITUDE.fields_by_name['altitude_terrain_m']._serialized_options = b'\202\265\030\003NaN' + _ALTITUDE.fields_by_name['bottom_clearance_m']._options = None + _ALTITUDE.fields_by_name['bottom_clearance_m']._serialized_options = b'\202\265\030\003NaN' + _FIXTYPE._serialized_start=12408 + _FIXTYPE._serialized_end=12572 + _FLIGHTMODE._serialized_start=12575 + _FLIGHTMODE._serialized_end=12965 + _STATUSTEXTTYPE._serialized_start=12968 + _STATUSTEXTTYPE._serialized_end=13217 + _LANDEDSTATE._serialized_start=13220 + _LANDEDSTATE._serialized_end=13367 + _VTOLSTATE._serialized_start=13370 + _VTOLSTATE._serialized_end=13511 _SUBSCRIBEPOSITIONREQUEST._serialized_start=73 _SUBSCRIBEPOSITIONREQUEST._serialized_end=99 _POSITIONRESPONSE._serialized_start=101 @@ -1507,172 +1581,186 @@ _SUBSCRIBEHEADINGREQUEST._serialized_end=3535 _HEADINGRESPONSE._serialized_start=3537 _HEADINGRESPONSE._serialized_end=3606 - _SETRATEPOSITIONREQUEST._serialized_start=3608 - _SETRATEPOSITIONREQUEST._serialized_end=3649 - _SETRATEPOSITIONRESPONSE._serialized_start=3651 - _SETRATEPOSITIONRESPONSE._serialized_end=3741 - _SETRATEHOMEREQUEST._serialized_start=3743 - _SETRATEHOMEREQUEST._serialized_end=3780 - _SETRATEHOMERESPONSE._serialized_start=3782 - _SETRATEHOMERESPONSE._serialized_end=3868 - _SETRATEINAIRREQUEST._serialized_start=3870 - _SETRATEINAIRREQUEST._serialized_end=3908 - _SETRATEINAIRRESPONSE._serialized_start=3910 - _SETRATEINAIRRESPONSE._serialized_end=3997 - _SETRATELANDEDSTATEREQUEST._serialized_start=3999 - _SETRATELANDEDSTATEREQUEST._serialized_end=4043 - _SETRATELANDEDSTATERESPONSE._serialized_start=4045 - _SETRATELANDEDSTATERESPONSE._serialized_end=4138 - _SETRATEVTOLSTATEREQUEST._serialized_start=4140 - _SETRATEVTOLSTATEREQUEST._serialized_end=4182 - _SETRATEVTOLSTATERESPONSE._serialized_start=4184 - _SETRATEVTOLSTATERESPONSE._serialized_end=4275 - _SETRATEATTITUDEREQUEST._serialized_start=4277 - _SETRATEATTITUDEREQUEST._serialized_end=4318 - _SETRATEATTITUDERESPONSE._serialized_start=4320 - _SETRATEATTITUDERESPONSE._serialized_end=4410 - _SETRATEATTITUDEANGULARVELOCITYBODYREQUEST._serialized_start=4412 - _SETRATEATTITUDEANGULARVELOCITYBODYREQUEST._serialized_end=4472 - _SETRATEATTITUDEANGULARVELOCITYBODYRESPONSE._serialized_start=4474 - _SETRATEATTITUDEANGULARVELOCITYBODYRESPONSE._serialized_end=4583 - _SETRATECAMERAATTITUDEQUATERNIONREQUEST._serialized_start=4585 - _SETRATECAMERAATTITUDEQUATERNIONREQUEST._serialized_end=4642 - _SETRATECAMERAATTITUDEQUATERNIONRESPONSE._serialized_start=4644 - _SETRATECAMERAATTITUDEQUATERNIONRESPONSE._serialized_end=4750 - _SETRATECAMERAATTITUDEREQUEST._serialized_start=4752 - _SETRATECAMERAATTITUDEREQUEST._serialized_end=4799 - _SETRATECAMERAATTITUDERESPONSE._serialized_start=4801 - _SETRATECAMERAATTITUDERESPONSE._serialized_end=4897 - _SETRATEVELOCITYNEDREQUEST._serialized_start=4899 - _SETRATEVELOCITYNEDREQUEST._serialized_end=4943 - _SETRATEVELOCITYNEDRESPONSE._serialized_start=4945 - _SETRATEVELOCITYNEDRESPONSE._serialized_end=5038 - _SETRATEGPSINFOREQUEST._serialized_start=5040 - _SETRATEGPSINFOREQUEST._serialized_end=5080 - _SETRATEGPSINFORESPONSE._serialized_start=5082 - _SETRATEGPSINFORESPONSE._serialized_end=5171 - _SETRATERAWGPSREQUEST._serialized_start=5173 - _SETRATERAWGPSREQUEST._serialized_end=5212 - _SETRATEBATTERYREQUEST._serialized_start=5214 - _SETRATEBATTERYREQUEST._serialized_end=5254 - _SETRATEBATTERYRESPONSE._serialized_start=5256 - _SETRATEBATTERYRESPONSE._serialized_end=5345 - _SETRATERCSTATUSREQUEST._serialized_start=5347 - _SETRATERCSTATUSREQUEST._serialized_end=5388 - _SETRATERCSTATUSRESPONSE._serialized_start=5390 - _SETRATERCSTATUSRESPONSE._serialized_end=5480 - _SETRATEACTUATORCONTROLTARGETREQUEST._serialized_start=5482 - _SETRATEACTUATORCONTROLTARGETREQUEST._serialized_end=5536 - _SETRATEACTUATORCONTROLTARGETRESPONSE._serialized_start=5538 - _SETRATEACTUATORCONTROLTARGETRESPONSE._serialized_end=5641 - _SETRATEACTUATOROUTPUTSTATUSREQUEST._serialized_start=5643 - _SETRATEACTUATOROUTPUTSTATUSREQUEST._serialized_end=5696 - _SETRATEACTUATOROUTPUTSTATUSRESPONSE._serialized_start=5698 - _SETRATEACTUATOROUTPUTSTATUSRESPONSE._serialized_end=5800 - _SETRATEODOMETRYREQUEST._serialized_start=5802 - _SETRATEODOMETRYREQUEST._serialized_end=5843 - _SETRATEODOMETRYRESPONSE._serialized_start=5845 - _SETRATEODOMETRYRESPONSE._serialized_end=5935 - _SETRATEPOSITIONVELOCITYNEDREQUEST._serialized_start=5937 - _SETRATEPOSITIONVELOCITYNEDREQUEST._serialized_end=5989 - _SETRATEPOSITIONVELOCITYNEDRESPONSE._serialized_start=5991 - _SETRATEPOSITIONVELOCITYNEDRESPONSE._serialized_end=6092 - _SETRATEGROUNDTRUTHREQUEST._serialized_start=6094 - _SETRATEGROUNDTRUTHREQUEST._serialized_end=6138 - _SETRATEGROUNDTRUTHRESPONSE._serialized_start=6140 - _SETRATEGROUNDTRUTHRESPONSE._serialized_end=6233 - _SETRATEFIXEDWINGMETRICSREQUEST._serialized_start=6235 - _SETRATEFIXEDWINGMETRICSREQUEST._serialized_end=6284 - _SETRATEFIXEDWINGMETRICSRESPONSE._serialized_start=6286 - _SETRATEFIXEDWINGMETRICSRESPONSE._serialized_end=6384 - _SETRATEIMUREQUEST._serialized_start=6386 - _SETRATEIMUREQUEST._serialized_end=6422 - _SETRATEIMURESPONSE._serialized_start=6424 - _SETRATEIMURESPONSE._serialized_end=6509 - _SETRATESCALEDIMUREQUEST._serialized_start=6511 - _SETRATESCALEDIMUREQUEST._serialized_end=6553 - _SETRATESCALEDIMURESPONSE._serialized_start=6555 - _SETRATESCALEDIMURESPONSE._serialized_end=6646 - _SETRATERAWIMUREQUEST._serialized_start=6648 - _SETRATERAWIMUREQUEST._serialized_end=6687 - _SETRATERAWIMURESPONSE._serialized_start=6689 - _SETRATERAWIMURESPONSE._serialized_end=6777 - _SETRATEUNIXEPOCHTIMEREQUEST._serialized_start=6779 - _SETRATEUNIXEPOCHTIMEREQUEST._serialized_end=6825 - _SETRATEUNIXEPOCHTIMERESPONSE._serialized_start=6827 - _SETRATEUNIXEPOCHTIMERESPONSE._serialized_end=6922 - _SETRATEDISTANCESENSORREQUEST._serialized_start=6924 - _SETRATEDISTANCESENSORREQUEST._serialized_end=6971 - _SETRATEDISTANCESENSORRESPONSE._serialized_start=6973 - _SETRATEDISTANCESENSORRESPONSE._serialized_end=7069 - _GETGPSGLOBALORIGINREQUEST._serialized_start=7071 - _GETGPSGLOBALORIGINREQUEST._serialized_end=7098 - _GETGPSGLOBALORIGINRESPONSE._serialized_start=7101 - _GETGPSGLOBALORIGINRESPONSE._serialized_end=7260 - _POSITION._serialized_start=7263 - _POSITION._serialized_end=7412 - _HEADING._serialized_start=7414 - _HEADING._serialized_end=7453 - _QUATERNION._serialized_start=7455 - _QUATERNION._serialized_end=7569 - _EULERANGLE._serialized_start=7571 - _EULERANGLE._serialized_end=7686 - _ANGULARVELOCITYBODY._serialized_start=7688 - _ANGULARVELOCITYBODY._serialized_end=7796 - _GPSINFO._serialized_start=7798 - _GPSINFO._serialized_end=7887 - _RAWGPS._serialized_start=7890 - _RAWGPS._serialized_end=8241 - _BATTERY._serialized_start=8243 - _BATTERY._serialized_end=8335 - _HEALTH._serialized_start=8338 - _HEALTH._serialized_end=8651 - _RCSTATUS._serialized_start=8653 - _RCSTATUS._serialized_end=8777 - _STATUSTEXT._serialized_start=8779 - _STATUSTEXT._serialized_end=8857 - _ACTUATORCONTROLTARGET._serialized_start=8859 - _ACTUATORCONTROLTARGET._serialized_end=8922 - _ACTUATOROUTPUTSTATUS._serialized_start=8924 - _ACTUATOROUTPUTSTATUS._serialized_end=8987 - _COVARIANCE._serialized_start=8989 - _COVARIANCE._serialized_end=9028 - _VELOCITYBODY._serialized_start=9030 - _VELOCITYBODY._serialized_end=9089 - _POSITIONBODY._serialized_start=9091 - _POSITIONBODY._serialized_end=9144 - _ODOMETRY._serialized_start=9147 - _ODOMETRY._serialized_end=9767 - _ODOMETRY_MAVFRAME._serialized_start=9661 - _ODOMETRY_MAVFRAME._serialized_end=9767 - _DISTANCESENSOR._serialized_start=9769 - _DISTANCESENSOR._serialized_end=9896 - _SCALEDPRESSURE._serialized_start=9899 - _SCALEDPRESSURE._serialized_end=10075 - _POSITIONNED._serialized_start=10077 - _POSITIONNED._serialized_end=10166 - _VELOCITYNED._serialized_start=10168 - _VELOCITYNED._serialized_end=10236 - _POSITIONVELOCITYNED._serialized_start=10238 - _POSITIONVELOCITYNED._serialized_end=10365 - _GROUNDTRUTH._serialized_start=10367 - _GROUNDTRUTH._serialized_end=10481 - _FIXEDWINGMETRICS._serialized_start=10483 - _FIXEDWINGMETRICS._serialized_end=10603 - _ACCELERATIONFRD._serialized_start=10605 - _ACCELERATIONFRD._serialized_end=10710 - _ANGULARVELOCITYFRD._serialized_start=10712 - _ANGULARVELOCITYFRD._serialized_end=10823 - _MAGNETICFIELDFRD._serialized_start=10825 - _MAGNETICFIELDFRD._serialized_end=10934 - _IMU._serialized_start=10937 - _IMU._serialized_end=11204 - _GPSGLOBALORIGIN._serialized_start=11206 - _GPSGLOBALORIGIN._serialized_end=11315 - _TELEMETRYRESULT._serialized_start=11318 - _TELEMETRYRESULT._serialized_end=11607 - _TELEMETRYRESULT_RESULT._serialized_start=11420 - _TELEMETRYRESULT_RESULT._serialized_end=11607 - _TELEMETRYSERVICE._serialized_start=12716 - _TELEMETRYSERVICE._serialized_end=19626 + _SUBSCRIBEALTITUDEREQUEST._serialized_start=3608 + _SUBSCRIBEALTITUDEREQUEST._serialized_end=3634 + _ALTITUDERESPONSE._serialized_start=3636 + _ALTITUDERESPONSE._serialized_end=3704 + _SETRATEPOSITIONREQUEST._serialized_start=3706 + _SETRATEPOSITIONREQUEST._serialized_end=3747 + _SETRATEPOSITIONRESPONSE._serialized_start=3749 + _SETRATEPOSITIONRESPONSE._serialized_end=3839 + _SETRATEHOMEREQUEST._serialized_start=3841 + _SETRATEHOMEREQUEST._serialized_end=3878 + _SETRATEHOMERESPONSE._serialized_start=3880 + _SETRATEHOMERESPONSE._serialized_end=3966 + _SETRATEINAIRREQUEST._serialized_start=3968 + _SETRATEINAIRREQUEST._serialized_end=4006 + _SETRATEINAIRRESPONSE._serialized_start=4008 + _SETRATEINAIRRESPONSE._serialized_end=4095 + _SETRATELANDEDSTATEREQUEST._serialized_start=4097 + _SETRATELANDEDSTATEREQUEST._serialized_end=4141 + _SETRATELANDEDSTATERESPONSE._serialized_start=4143 + _SETRATELANDEDSTATERESPONSE._serialized_end=4236 + _SETRATEVTOLSTATEREQUEST._serialized_start=4238 + _SETRATEVTOLSTATEREQUEST._serialized_end=4280 + _SETRATEVTOLSTATERESPONSE._serialized_start=4282 + _SETRATEVTOLSTATERESPONSE._serialized_end=4373 + _SETRATEATTITUDEEULERREQUEST._serialized_start=4375 + _SETRATEATTITUDEEULERREQUEST._serialized_end=4421 + _SETRATEATTITUDEEULERRESPONSE._serialized_start=4423 + _SETRATEATTITUDEEULERRESPONSE._serialized_end=4518 + _SETRATEATTITUDEQUATERNIONREQUEST._serialized_start=4520 + _SETRATEATTITUDEQUATERNIONREQUEST._serialized_end=4571 + _SETRATEATTITUDEQUATERNIONRESPONSE._serialized_start=4573 + _SETRATEATTITUDEQUATERNIONRESPONSE._serialized_end=4673 + _SETRATEATTITUDEANGULARVELOCITYBODYREQUEST._serialized_start=4675 + _SETRATEATTITUDEANGULARVELOCITYBODYREQUEST._serialized_end=4735 + _SETRATEATTITUDEANGULARVELOCITYBODYRESPONSE._serialized_start=4737 + _SETRATEATTITUDEANGULARVELOCITYBODYRESPONSE._serialized_end=4846 + _SETRATECAMERAATTITUDEQUATERNIONREQUEST._serialized_start=4848 + _SETRATECAMERAATTITUDEQUATERNIONREQUEST._serialized_end=4905 + _SETRATECAMERAATTITUDEQUATERNIONRESPONSE._serialized_start=4907 + _SETRATECAMERAATTITUDEQUATERNIONRESPONSE._serialized_end=5013 + _SETRATECAMERAATTITUDEREQUEST._serialized_start=5015 + _SETRATECAMERAATTITUDEREQUEST._serialized_end=5062 + _SETRATECAMERAATTITUDERESPONSE._serialized_start=5064 + _SETRATECAMERAATTITUDERESPONSE._serialized_end=5160 + _SETRATEVELOCITYNEDREQUEST._serialized_start=5162 + _SETRATEVELOCITYNEDREQUEST._serialized_end=5206 + _SETRATEVELOCITYNEDRESPONSE._serialized_start=5208 + _SETRATEVELOCITYNEDRESPONSE._serialized_end=5301 + _SETRATEGPSINFOREQUEST._serialized_start=5303 + _SETRATEGPSINFOREQUEST._serialized_end=5343 + _SETRATEGPSINFORESPONSE._serialized_start=5345 + _SETRATEGPSINFORESPONSE._serialized_end=5434 + _SETRATERAWGPSREQUEST._serialized_start=5436 + _SETRATERAWGPSREQUEST._serialized_end=5475 + _SETRATEBATTERYREQUEST._serialized_start=5477 + _SETRATEBATTERYREQUEST._serialized_end=5517 + _SETRATEBATTERYRESPONSE._serialized_start=5519 + _SETRATEBATTERYRESPONSE._serialized_end=5608 + _SETRATERCSTATUSREQUEST._serialized_start=5610 + _SETRATERCSTATUSREQUEST._serialized_end=5651 + _SETRATERCSTATUSRESPONSE._serialized_start=5653 + _SETRATERCSTATUSRESPONSE._serialized_end=5743 + _SETRATEACTUATORCONTROLTARGETREQUEST._serialized_start=5745 + _SETRATEACTUATORCONTROLTARGETREQUEST._serialized_end=5799 + _SETRATEACTUATORCONTROLTARGETRESPONSE._serialized_start=5801 + _SETRATEACTUATORCONTROLTARGETRESPONSE._serialized_end=5904 + _SETRATEACTUATOROUTPUTSTATUSREQUEST._serialized_start=5906 + _SETRATEACTUATOROUTPUTSTATUSREQUEST._serialized_end=5959 + _SETRATEACTUATOROUTPUTSTATUSRESPONSE._serialized_start=5961 + _SETRATEACTUATOROUTPUTSTATUSRESPONSE._serialized_end=6063 + _SETRATEODOMETRYREQUEST._serialized_start=6065 + _SETRATEODOMETRYREQUEST._serialized_end=6106 + _SETRATEODOMETRYRESPONSE._serialized_start=6108 + _SETRATEODOMETRYRESPONSE._serialized_end=6198 + _SETRATEPOSITIONVELOCITYNEDREQUEST._serialized_start=6200 + _SETRATEPOSITIONVELOCITYNEDREQUEST._serialized_end=6252 + _SETRATEPOSITIONVELOCITYNEDRESPONSE._serialized_start=6254 + _SETRATEPOSITIONVELOCITYNEDRESPONSE._serialized_end=6355 + _SETRATEGROUNDTRUTHREQUEST._serialized_start=6357 + _SETRATEGROUNDTRUTHREQUEST._serialized_end=6401 + _SETRATEGROUNDTRUTHRESPONSE._serialized_start=6403 + _SETRATEGROUNDTRUTHRESPONSE._serialized_end=6496 + _SETRATEFIXEDWINGMETRICSREQUEST._serialized_start=6498 + _SETRATEFIXEDWINGMETRICSREQUEST._serialized_end=6547 + _SETRATEFIXEDWINGMETRICSRESPONSE._serialized_start=6549 + _SETRATEFIXEDWINGMETRICSRESPONSE._serialized_end=6647 + _SETRATEIMUREQUEST._serialized_start=6649 + _SETRATEIMUREQUEST._serialized_end=6685 + _SETRATEIMURESPONSE._serialized_start=6687 + _SETRATEIMURESPONSE._serialized_end=6772 + _SETRATESCALEDIMUREQUEST._serialized_start=6774 + _SETRATESCALEDIMUREQUEST._serialized_end=6816 + _SETRATESCALEDIMURESPONSE._serialized_start=6818 + _SETRATESCALEDIMURESPONSE._serialized_end=6909 + _SETRATERAWIMUREQUEST._serialized_start=6911 + _SETRATERAWIMUREQUEST._serialized_end=6950 + _SETRATERAWIMURESPONSE._serialized_start=6952 + _SETRATERAWIMURESPONSE._serialized_end=7040 + _SETRATEUNIXEPOCHTIMEREQUEST._serialized_start=7042 + _SETRATEUNIXEPOCHTIMEREQUEST._serialized_end=7088 + _SETRATEUNIXEPOCHTIMERESPONSE._serialized_start=7090 + _SETRATEUNIXEPOCHTIMERESPONSE._serialized_end=7185 + _SETRATEDISTANCESENSORREQUEST._serialized_start=7187 + _SETRATEDISTANCESENSORREQUEST._serialized_end=7234 + _SETRATEDISTANCESENSORRESPONSE._serialized_start=7236 + _SETRATEDISTANCESENSORRESPONSE._serialized_end=7332 + _GETGPSGLOBALORIGINREQUEST._serialized_start=7334 + _GETGPSGLOBALORIGINREQUEST._serialized_end=7361 + _GETGPSGLOBALORIGINRESPONSE._serialized_start=7364 + _GETGPSGLOBALORIGINRESPONSE._serialized_end=7523 + _SETRATEALTITUDEREQUEST._serialized_start=7525 + _SETRATEALTITUDEREQUEST._serialized_end=7566 + _SETRATEALTITUDERESPONSE._serialized_start=7568 + _SETRATEALTITUDERESPONSE._serialized_end=7658 + _POSITION._serialized_start=7661 + _POSITION._serialized_end=7810 + _HEADING._serialized_start=7812 + _HEADING._serialized_end=7851 + _QUATERNION._serialized_start=7853 + _QUATERNION._serialized_end=7967 + _EULERANGLE._serialized_start=7969 + _EULERANGLE._serialized_end=8084 + _ANGULARVELOCITYBODY._serialized_start=8086 + _ANGULARVELOCITYBODY._serialized_end=8194 + _GPSINFO._serialized_start=8196 + _GPSINFO._serialized_end=8285 + _RAWGPS._serialized_start=8288 + _RAWGPS._serialized_end=8639 + _BATTERY._serialized_start=8642 + _BATTERY._serialized_end=8844 + _HEALTH._serialized_start=8847 + _HEALTH._serialized_end=9160 + _RCSTATUS._serialized_start=9162 + _RCSTATUS._serialized_end=9286 + _STATUSTEXT._serialized_start=9288 + _STATUSTEXT._serialized_end=9366 + _ACTUATORCONTROLTARGET._serialized_start=9368 + _ACTUATORCONTROLTARGET._serialized_end=9431 + _ACTUATOROUTPUTSTATUS._serialized_start=9433 + _ACTUATOROUTPUTSTATUS._serialized_end=9496 + _COVARIANCE._serialized_start=9498 + _COVARIANCE._serialized_end=9537 + _VELOCITYBODY._serialized_start=9539 + _VELOCITYBODY._serialized_end=9598 + _POSITIONBODY._serialized_start=9600 + _POSITIONBODY._serialized_end=9653 + _ODOMETRY._serialized_start=9656 + _ODOMETRY._serialized_end=10276 + _ODOMETRY_MAVFRAME._serialized_start=10170 + _ODOMETRY_MAVFRAME._serialized_end=10276 + _DISTANCESENSOR._serialized_start=10279 + _DISTANCESENSOR._serialized_end=10461 + _SCALEDPRESSURE._serialized_start=10464 + _SCALEDPRESSURE._serialized_end=10640 + _POSITIONNED._serialized_start=10642 + _POSITIONNED._serialized_end=10731 + _VELOCITYNED._serialized_start=10733 + _VELOCITYNED._serialized_end=10801 + _POSITIONVELOCITYNED._serialized_start=10803 + _POSITIONVELOCITYNED._serialized_end=10930 + _GROUNDTRUTH._serialized_start=10932 + _GROUNDTRUTH._serialized_end=11046 + _FIXEDWINGMETRICS._serialized_start=11048 + _FIXEDWINGMETRICS._serialized_end=11168 + _ACCELERATIONFRD._serialized_start=11170 + _ACCELERATIONFRD._serialized_end=11275 + _ANGULARVELOCITYFRD._serialized_start=11277 + _ANGULARVELOCITYFRD._serialized_end=11388 + _MAGNETICFIELDFRD._serialized_start=11390 + _MAGNETICFIELDFRD._serialized_end=11499 + _IMU._serialized_start=11502 + _IMU._serialized_end=11769 + _GPSGLOBALORIGIN._serialized_start=11771 + _GPSGLOBALORIGIN._serialized_end=11880 + _ALTITUDE._serialized_start=11883 + _ALTITUDE._serialized_end=12113 + _TELEMETRYRESULT._serialized_start=12116 + _TELEMETRYRESULT._serialized_end=12405 + _TELEMETRYRESULT_RESULT._serialized_start=12218 + _TELEMETRYRESULT_RESULT._serialized_end=12405 + _TELEMETRYSERVICE._serialized_start=13514 + _TELEMETRYSERVICE._serialized_end=20811 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/telemetry_pb2_grpc.py b/mavsdk/telemetry_pb2_grpc.py index 62a18aec..1d08f4e4 100644 --- a/mavsdk/telemetry_pb2_grpc.py +++ b/mavsdk/telemetry_pb2_grpc.py @@ -182,6 +182,11 @@ def __init__(self, channel): request_serializer=telemetry_dot_telemetry__pb2.SubscribeHeadingRequest.SerializeToString, response_deserializer=telemetry_dot_telemetry__pb2.HeadingResponse.FromString, ) + self.SubscribeAltitude = channel.unary_stream( + '/mavsdk.rpc.telemetry.TelemetryService/SubscribeAltitude', + request_serializer=telemetry_dot_telemetry__pb2.SubscribeAltitudeRequest.SerializeToString, + response_deserializer=telemetry_dot_telemetry__pb2.AltitudeResponse.FromString, + ) self.SetRatePosition = channel.unary_unary( '/mavsdk.rpc.telemetry.TelemetryService/SetRatePosition', request_serializer=telemetry_dot_telemetry__pb2.SetRatePositionRequest.SerializeToString, @@ -207,10 +212,15 @@ def __init__(self, channel): request_serializer=telemetry_dot_telemetry__pb2.SetRateVtolStateRequest.SerializeToString, response_deserializer=telemetry_dot_telemetry__pb2.SetRateVtolStateResponse.FromString, ) - self.SetRateAttitude = channel.unary_unary( - '/mavsdk.rpc.telemetry.TelemetryService/SetRateAttitude', - request_serializer=telemetry_dot_telemetry__pb2.SetRateAttitudeRequest.SerializeToString, - response_deserializer=telemetry_dot_telemetry__pb2.SetRateAttitudeResponse.FromString, + self.SetRateAttitudeQuaternion = channel.unary_unary( + '/mavsdk.rpc.telemetry.TelemetryService/SetRateAttitudeQuaternion', + request_serializer=telemetry_dot_telemetry__pb2.SetRateAttitudeQuaternionRequest.SerializeToString, + response_deserializer=telemetry_dot_telemetry__pb2.SetRateAttitudeQuaternionResponse.FromString, + ) + self.SetRateAttitudeEuler = channel.unary_unary( + '/mavsdk.rpc.telemetry.TelemetryService/SetRateAttitudeEuler', + request_serializer=telemetry_dot_telemetry__pb2.SetRateAttitudeEulerRequest.SerializeToString, + response_deserializer=telemetry_dot_telemetry__pb2.SetRateAttitudeEulerResponse.FromString, ) self.SetRateCameraAttitude = channel.unary_unary( '/mavsdk.rpc.telemetry.TelemetryService/SetRateCameraAttitude', @@ -292,6 +302,11 @@ def __init__(self, channel): request_serializer=telemetry_dot_telemetry__pb2.SetRateDistanceSensorRequest.SerializeToString, response_deserializer=telemetry_dot_telemetry__pb2.SetRateDistanceSensorResponse.FromString, ) + self.SetRateAltitude = channel.unary_unary( + '/mavsdk.rpc.telemetry.TelemetryService/SetRateAltitude', + request_serializer=telemetry_dot_telemetry__pb2.SetRateAltitudeRequest.SerializeToString, + response_deserializer=telemetry_dot_telemetry__pb2.SetRateAltitudeResponse.FromString, + ) self.GetGpsGlobalOrigin = channel.unary_unary( '/mavsdk.rpc.telemetry.TelemetryService/GetGpsGlobalOrigin', request_serializer=telemetry_dot_telemetry__pb2.GetGpsGlobalOriginRequest.SerializeToString, @@ -536,6 +551,13 @@ def SubscribeHeading(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def SubscribeAltitude(self, request, context): + """Subscribe to 'Altitude' updates. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SetRatePosition(self, request, context): """Set rate to 'position' updates. """ @@ -571,8 +593,15 @@ def SetRateVtolState(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def SetRateAttitude(self, request, context): - """Set rate to 'attitude' updates. + def SetRateAttitudeQuaternion(self, request, context): + """Set rate to 'attitude euler angle' updates. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetRateAttitudeEuler(self, request, context): + """Set rate to 'attitude quaternion' updates. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -690,6 +719,13 @@ def SetRateDistanceSensor(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def SetRateAltitude(self, request, context): + """Set rate to 'Altitude' updates. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetGpsGlobalOrigin(self, request, context): """Get the GPS location of where the estimator has been initialized. """ @@ -865,6 +901,11 @@ def add_TelemetryServiceServicer_to_server(servicer, server): request_deserializer=telemetry_dot_telemetry__pb2.SubscribeHeadingRequest.FromString, response_serializer=telemetry_dot_telemetry__pb2.HeadingResponse.SerializeToString, ), + 'SubscribeAltitude': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeAltitude, + request_deserializer=telemetry_dot_telemetry__pb2.SubscribeAltitudeRequest.FromString, + response_serializer=telemetry_dot_telemetry__pb2.AltitudeResponse.SerializeToString, + ), 'SetRatePosition': grpc.unary_unary_rpc_method_handler( servicer.SetRatePosition, request_deserializer=telemetry_dot_telemetry__pb2.SetRatePositionRequest.FromString, @@ -890,10 +931,15 @@ def add_TelemetryServiceServicer_to_server(servicer, server): request_deserializer=telemetry_dot_telemetry__pb2.SetRateVtolStateRequest.FromString, response_serializer=telemetry_dot_telemetry__pb2.SetRateVtolStateResponse.SerializeToString, ), - 'SetRateAttitude': grpc.unary_unary_rpc_method_handler( - servicer.SetRateAttitude, - request_deserializer=telemetry_dot_telemetry__pb2.SetRateAttitudeRequest.FromString, - response_serializer=telemetry_dot_telemetry__pb2.SetRateAttitudeResponse.SerializeToString, + 'SetRateAttitudeQuaternion': grpc.unary_unary_rpc_method_handler( + servicer.SetRateAttitudeQuaternion, + request_deserializer=telemetry_dot_telemetry__pb2.SetRateAttitudeQuaternionRequest.FromString, + response_serializer=telemetry_dot_telemetry__pb2.SetRateAttitudeQuaternionResponse.SerializeToString, + ), + 'SetRateAttitudeEuler': grpc.unary_unary_rpc_method_handler( + servicer.SetRateAttitudeEuler, + request_deserializer=telemetry_dot_telemetry__pb2.SetRateAttitudeEulerRequest.FromString, + response_serializer=telemetry_dot_telemetry__pb2.SetRateAttitudeEulerResponse.SerializeToString, ), 'SetRateCameraAttitude': grpc.unary_unary_rpc_method_handler( servicer.SetRateCameraAttitude, @@ -975,6 +1021,11 @@ def add_TelemetryServiceServicer_to_server(servicer, server): request_deserializer=telemetry_dot_telemetry__pb2.SetRateDistanceSensorRequest.FromString, response_serializer=telemetry_dot_telemetry__pb2.SetRateDistanceSensorResponse.SerializeToString, ), + 'SetRateAltitude': grpc.unary_unary_rpc_method_handler( + servicer.SetRateAltitude, + request_deserializer=telemetry_dot_telemetry__pb2.SetRateAltitudeRequest.FromString, + response_serializer=telemetry_dot_telemetry__pb2.SetRateAltitudeResponse.SerializeToString, + ), 'GetGpsGlobalOrigin': grpc.unary_unary_rpc_method_handler( servicer.GetGpsGlobalOrigin, request_deserializer=telemetry_dot_telemetry__pb2.GetGpsGlobalOriginRequest.FromString, @@ -1554,6 +1605,23 @@ def SubscribeHeading(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def SubscribeAltitude(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.telemetry.TelemetryService/SubscribeAltitude', + telemetry_dot_telemetry__pb2.SubscribeAltitudeRequest.SerializeToString, + telemetry_dot_telemetry__pb2.AltitudeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def SetRatePosition(request, target, @@ -1640,7 +1708,24 @@ def SetRateVtolState(request, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def SetRateAttitude(request, + def SetRateAttitudeQuaternion(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.telemetry.TelemetryService/SetRateAttitudeQuaternion', + telemetry_dot_telemetry__pb2.SetRateAttitudeQuaternionRequest.SerializeToString, + telemetry_dot_telemetry__pb2.SetRateAttitudeQuaternionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetRateAttitudeEuler(request, target, options=(), channel_credentials=None, @@ -1650,9 +1735,9 @@ def SetRateAttitude(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.telemetry.TelemetryService/SetRateAttitude', - telemetry_dot_telemetry__pb2.SetRateAttitudeRequest.SerializeToString, - telemetry_dot_telemetry__pb2.SetRateAttitudeResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.telemetry.TelemetryService/SetRateAttitudeEuler', + telemetry_dot_telemetry__pb2.SetRateAttitudeEulerRequest.SerializeToString, + telemetry_dot_telemetry__pb2.SetRateAttitudeEulerResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -1928,6 +2013,23 @@ def SetRateDistanceSensor(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def SetRateAltitude(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.telemetry.TelemetryService/SetRateAltitude', + telemetry_dot_telemetry__pb2.SetRateAltitudeRequest.SerializeToString, + telemetry_dot_telemetry__pb2.SetRateAltitudeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def GetGpsGlobalOrigin(request, target, diff --git a/mavsdk/telemetry_server.py b/mavsdk/telemetry_server.py index 10101dcd..575b84cb 100644 --- a/mavsdk/telemetry_server.py +++ b/mavsdk/telemetry_server.py @@ -3665,4 +3665,33 @@ async def publish_unix_epoch_time(self, time_us): if result.result != TelemetryServerResult.Result.SUCCESS: raise TelemetryServerError(result, "publish_unix_epoch_time()", time_us) + + + async def publish_distance_sensor(self, distance_sensor): + """ + Publish to "distance sensor" updates. + + Parameters + ---------- + distance_sensor : DistanceSensor + The next 'Distance Sensor' status + + Raises + ------ + TelemetryServerError + If the request fails. The error contains the reason for the failure. + """ + + request = telemetry_server_pb2.PublishDistanceSensorRequest() + + distance_sensor.translate_to_rpc(request.distance_sensor) + + + response = await self._stub.PublishDistanceSensor(request) + + + result = self._extract_result(response) + + if result.result != TelemetryServerResult.Result.SUCCESS: + raise TelemetryServerError(result, "publish_distance_sensor()", distance_sensor) \ No newline at end of file diff --git a/mavsdk/telemetry_server_pb2.py b/mavsdk/telemetry_server_pb2.py index 92daaa29..d50c99c8 100644 --- a/mavsdk/telemetry_server_pb2.py +++ b/mavsdk/telemetry_server_pb2.py @@ -16,7 +16,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'telemetry_server/telemetry_server.proto\x12\x1bmavsdk.rpc.telemetry_server\x1a\x14mavsdk_options.proto\"\xc8\x01\n\x16PublishPositionRequest\x12\x37\n\x08position\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry_server.Position\x12>\n\x0cvelocity_ned\x18\x02 \x01(\x0b\x32(.mavsdk.rpc.telemetry_server.VelocityNed\x12\x35\n\x07heading\x18\x03 \x01(\x0b\x32$.mavsdk.rpc.telemetry_server.Heading\"I\n\x12PublishHomeRequest\x12\x33\n\x04home\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry_server.Position\"\xbf\x01\n\x17PublishSysStatusRequest\x12\x35\n\x07\x62\x61ttery\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.telemetry_server.Battery\x12\x1a\n\x12rc_receiver_status\x18\x02 \x01(\x08\x12\x13\n\x0bgyro_status\x18\x03 \x01(\x08\x12\x14\n\x0c\x61\x63\x63\x65l_status\x18\x04 \x01(\x08\x12\x12\n\nmag_status\x18\x05 \x01(\x08\x12\x12\n\ngps_status\x18\x06 \x01(\x08\"\x9c\x01\n\x1ePublishExtendedSysStateRequest\x12:\n\nvtol_state\x18\x01 \x01(\x0e\x32&.mavsdk.rpc.telemetry_server.VtolState\x12>\n\x0clanded_state\x18\x02 \x01(\x0e\x32(.mavsdk.rpc.telemetry_server.LandedState\"(\n\x13PublishInAirRequest\x12\x11\n\tis_in_air\x18\x01 \x01(\x08\"[\n\x19PublishLandedStateRequest\x12>\n\x0clanded_state\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.telemetry_server.LandedState\"\x84\x01\n\x14PublishRawGpsRequest\x12\x34\n\x07raw_gps\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.telemetry_server.RawGps\x12\x36\n\x08gps_info\x18\x02 \x01(\x0b\x32$.mavsdk.rpc.telemetry_server.GpsInfo\"N\n\x15PublishBatteryRequest\x12\x35\n\x07\x62\x61ttery\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.telemetry_server.Battery\"R\n\x16PublishRcStatusRequest\x12\x38\n\trc_status\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry_server.RcStatus\"X\n\x18PublishStatusTextRequest\x12<\n\x0bstatus_text\x18\x01 \x01(\x0b\x32\'.mavsdk.rpc.telemetry_server.StatusText\"Q\n\x16PublishOdometryRequest\x12\x37\n\x08odometry\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry_server.Odometry\"t\n!PublishPositionVelocityNedRequest\x12O\n\x15position_velocity_ned\x18\x01 \x01(\x0b\x32\x30.mavsdk.rpc.telemetry_server.PositionVelocityNed\"[\n\x19PublishGroundTruthRequest\x12>\n\x0cground_truth\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.telemetry_server.GroundTruth\"B\n\x11PublishImuRequest\x12-\n\x03imu\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry_server.Imu\"H\n\x17PublishScaledImuRequest\x12-\n\x03imu\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry_server.Imu\"E\n\x14PublishRawImuRequest\x12-\n\x03imu\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry_server.Imu\".\n\x1bPublishUnixEpochTimeRequest\x12\x0f\n\x07time_us\x18\x01 \x01(\x04\"n\n\x17PublishPositionResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"j\n\x13PublishHomeResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"o\n\x18PublishSysStatusResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"v\n\x1fPublishExtendedSysStateResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"l\n\x15PublishRawGpsResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"m\n\x16PublishBatteryResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"p\n\x19PublishStatusTextResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"n\n\x17PublishOdometryResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"y\n\"PublishPositionVelocityNedResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"q\n\x1aPublishGroundTruthResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"i\n\x12PublishImuResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"o\n\x18PublishScaledImuResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"l\n\x15PublishRawImuResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"s\n\x1cPublishUnixEpochTimeResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"\x95\x01\n\x08Position\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13relative_altitude_m\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\'\n\x07Heading\x12\x1c\n\x0bheading_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\"r\n\nQuaternion\x12\x12\n\x01w\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01x\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01y\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01z\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x05 \x01(\x04\"s\n\nEulerAngle\x12\x19\n\x08roll_deg\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tpitch_deg\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x18\n\x07yaw_deg\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x04 \x01(\x04\"l\n\x13\x41ngularVelocityBody\x12\x1b\n\nroll_rad_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bpitch_rad_s\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tyaw_rad_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"`\n\x07GpsInfo\x12\x1d\n\x0enum_satellites\x18\x01 \x01(\x05\x42\x05\x82\xb5\x18\x01\x30\x12\x36\n\x08\x66ix_type\x18\x02 \x01(\x0e\x32$.mavsdk.rpc.telemetry_server.FixType\"\xdf\x02\n\x06RawGps\x12\x14\n\x0ctimestamp_us\x18\x01 \x01(\x04\x12\x14\n\x0clatitude_deg\x18\x02 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x03 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x04 \x01(\x02\x12\x0c\n\x04hdop\x18\x05 \x01(\x02\x12\x0c\n\x04vdop\x18\x06 \x01(\x02\x12\x14\n\x0cvelocity_m_s\x18\x07 \x01(\x02\x12\x0f\n\x07\x63og_deg\x18\x08 \x01(\x02\x12\x1c\n\x14\x61ltitude_ellipsoid_m\x18\t \x01(\x02\x12 \n\x18horizontal_uncertainty_m\x18\n \x01(\x02\x12\x1e\n\x16vertical_uncertainty_m\x18\x0b \x01(\x02\x12 \n\x18velocity_uncertainty_m_s\x18\x0c \x01(\x02\x12\x1f\n\x17heading_uncertainty_deg\x18\r \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x0e \x01(\x02\"I\n\x07\x42\x61ttery\x12\x1a\n\tvoltage_v\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\"\n\x11remaining_percent\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"|\n\x08RcStatus\x12%\n\x12was_available_once\x18\x01 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x1f\n\x0cis_available\x18\x02 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12(\n\x17signal_strength_percent\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"U\n\nStatusText\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.mavsdk.rpc.telemetry_server.StatusTextType\x12\x0c\n\x04text\x18\x02 \x01(\t\"?\n\x15\x41\x63tuatorControlTarget\x12\x14\n\x05group\x18\x01 \x01(\x05\x42\x05\x82\xb5\x18\x01\x30\x12\x10\n\x08\x63ontrols\x18\x02 \x03(\x02\"?\n\x14\x41\x63tuatorOutputStatus\x12\x15\n\x06\x61\x63tive\x18\x01 \x01(\rB\x05\x82\xb5\x18\x01\x30\x12\x10\n\x08\x61\x63tuator\x18\x02 \x03(\x02\"\'\n\nCovariance\x12\x19\n\x11\x63ovariance_matrix\x18\x01 \x03(\x02\";\n\x0cVelocityBody\x12\r\n\x05x_m_s\x18\x01 \x01(\x02\x12\r\n\x05y_m_s\x18\x02 \x01(\x02\x12\r\n\x05z_m_s\x18\x03 \x01(\x02\"5\n\x0cPositionBody\x12\x0b\n\x03x_m\x18\x01 \x01(\x02\x12\x0b\n\x03y_m\x18\x02 \x01(\x02\x12\x0b\n\x03z_m\x18\x03 \x01(\x02\"\xa4\x05\n\x08Odometry\x12\x11\n\ttime_usec\x18\x01 \x01(\x04\x12@\n\x08\x66rame_id\x18\x02 \x01(\x0e\x32..mavsdk.rpc.telemetry_server.Odometry.MavFrame\x12\x46\n\x0e\x63hild_frame_id\x18\x03 \x01(\x0e\x32..mavsdk.rpc.telemetry_server.Odometry.MavFrame\x12@\n\rposition_body\x18\x04 \x01(\x0b\x32).mavsdk.rpc.telemetry_server.PositionBody\x12\x32\n\x01q\x18\x05 \x01(\x0b\x32\'.mavsdk.rpc.telemetry_server.Quaternion\x12@\n\rvelocity_body\x18\x06 \x01(\x0b\x32).mavsdk.rpc.telemetry_server.VelocityBody\x12O\n\x15\x61ngular_velocity_body\x18\x07 \x01(\x0b\x32\x30.mavsdk.rpc.telemetry_server.AngularVelocityBody\x12@\n\x0fpose_covariance\x18\x08 \x01(\x0b\x32\'.mavsdk.rpc.telemetry_server.Covariance\x12\x44\n\x13velocity_covariance\x18\t \x01(\x0b\x32\'.mavsdk.rpc.telemetry_server.Covariance\"j\n\x08MavFrame\x12\x13\n\x0fMAV_FRAME_UNDEF\x10\x00\x12\x16\n\x12MAV_FRAME_BODY_NED\x10\x08\x12\x18\n\x14MAV_FRAME_VISION_NED\x10\x10\x12\x17\n\x13MAV_FRAME_ESTIM_NED\x10\x12\"\x7f\n\x0e\x44istanceSensor\x12#\n\x12minimum_distance_m\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12#\n\x12maximum_distance_m\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12#\n\x12\x63urrent_distance_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\xb0\x01\n\x0eScaledPressure\x12\x14\n\x0ctimestamp_us\x18\x01 \x01(\x04\x12\x1d\n\x15\x61\x62solute_pressure_hpa\x18\x02 \x01(\x02\x12!\n\x19\x64ifferential_pressure_hpa\x18\x03 \x01(\x02\x12\x17\n\x0ftemperature_deg\x18\x04 \x01(\x02\x12-\n%differential_pressure_temperature_deg\x18\x05 \x01(\x02\"Y\n\x0bPositionNed\x12\x18\n\x07north_m\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x17\n\x06\x65\x61st_m\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x17\n\x06\x64own_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"D\n\x0bVelocityNed\x12\x11\n\tnorth_m_s\x18\x01 \x01(\x02\x12\x10\n\x08\x65\x61st_m_s\x18\x02 \x01(\x02\x12\x10\n\x08\x64own_m_s\x18\x03 \x01(\x02\"\x8d\x01\n\x13PositionVelocityNed\x12:\n\x08position\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.telemetry_server.PositionNed\x12:\n\x08velocity\x18\x02 \x01(\x0b\x32(.mavsdk.rpc.telemetry_server.VelocityNed\"r\n\x0bGroundTruth\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"x\n\x10\x46ixedwingMetrics\x12\x1d\n\x0c\x61irspeed_m_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13throttle_percentage\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1f\n\x0e\x63limb_rate_m_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"i\n\x0f\x41\x63\x63\x65lerationFrd\x12\x1d\n\x0c\x66orward_m_s2\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\nright_m_s2\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tdown_m_s2\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"o\n\x12\x41ngularVelocityFrd\x12\x1e\n\rforward_rad_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bright_rad_s\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\ndown_rad_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"m\n\x10MagneticFieldFrd\x12\x1e\n\rforward_gauss\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bright_gauss\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\ndown_gauss\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\xa0\x02\n\x03Imu\x12\x46\n\x10\x61\x63\x63\x65leration_frd\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.telemetry_server.AccelerationFrd\x12M\n\x14\x61ngular_velocity_frd\x18\x02 \x01(\x0b\x32/.mavsdk.rpc.telemetry_server.AngularVelocityFrd\x12I\n\x12magnetic_field_frd\x18\x03 \x01(\x0b\x32-.mavsdk.rpc.telemetry_server.MagneticFieldFrd\x12!\n\x10temperature_degc\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x05 \x01(\x04\"\xb4\x02\n\x15TelemetryServerResult\x12I\n\x06result\x18\x01 \x01(\x0e\x32\x39.mavsdk.rpc.telemetry_server.TelemetryServerResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xbb\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x07*\xa4\x01\n\x07\x46ixType\x12\x13\n\x0f\x46IX_TYPE_NO_GPS\x10\x00\x12\x13\n\x0f\x46IX_TYPE_NO_FIX\x10\x01\x12\x13\n\x0f\x46IX_TYPE_FIX_2D\x10\x02\x12\x13\n\x0f\x46IX_TYPE_FIX_3D\x10\x03\x12\x15\n\x11\x46IX_TYPE_FIX_DGPS\x10\x04\x12\x16\n\x12\x46IX_TYPE_RTK_FLOAT\x10\x05\x12\x16\n\x12\x46IX_TYPE_RTK_FIXED\x10\x06*\x8d\x01\n\tVtolState\x12\x18\n\x14VTOL_STATE_UNDEFINED\x10\x00\x12\x1f\n\x1bVTOL_STATE_TRANSITION_TO_FW\x10\x01\x12\x1f\n\x1bVTOL_STATE_TRANSITION_TO_MC\x10\x02\x12\x11\n\rVTOL_STATE_MC\x10\x03\x12\x11\n\rVTOL_STATE_FW\x10\x04*\xf9\x01\n\x0eStatusTextType\x12\x1a\n\x16STATUS_TEXT_TYPE_DEBUG\x10\x00\x12\x19\n\x15STATUS_TEXT_TYPE_INFO\x10\x01\x12\x1b\n\x17STATUS_TEXT_TYPE_NOTICE\x10\x02\x12\x1c\n\x18STATUS_TEXT_TYPE_WARNING\x10\x03\x12\x1a\n\x16STATUS_TEXT_TYPE_ERROR\x10\x04\x12\x1d\n\x19STATUS_TEXT_TYPE_CRITICAL\x10\x05\x12\x1a\n\x16STATUS_TEXT_TYPE_ALERT\x10\x06\x12\x1e\n\x1aSTATUS_TEXT_TYPE_EMERGENCY\x10\x07*\x93\x01\n\x0bLandedState\x12\x18\n\x14LANDED_STATE_UNKNOWN\x10\x00\x12\x1a\n\x16LANDED_STATE_ON_GROUND\x10\x01\x12\x17\n\x13LANDED_STATE_IN_AIR\x10\x02\x12\x1b\n\x17LANDED_STATE_TAKING_OFF\x10\x03\x12\x18\n\x14LANDED_STATE_LANDING\x10\x04\x32\x8c\x0f\n\x16TelemetryServerService\x12\x82\x01\n\x0fPublishPosition\x12\x33.mavsdk.rpc.telemetry_server.PublishPositionRequest\x1a\x34.mavsdk.rpc.telemetry_server.PublishPositionResponse\"\x04\x80\xb5\x18\x01\x12v\n\x0bPublishHome\x12/.mavsdk.rpc.telemetry_server.PublishHomeRequest\x1a\x30.mavsdk.rpc.telemetry_server.PublishHomeResponse\"\x04\x80\xb5\x18\x01\x12\x85\x01\n\x10PublishSysStatus\x12\x34.mavsdk.rpc.telemetry_server.PublishSysStatusRequest\x1a\x35.mavsdk.rpc.telemetry_server.PublishSysStatusResponse\"\x04\x80\xb5\x18\x01\x12\x9a\x01\n\x17PublishExtendedSysState\x12;.mavsdk.rpc.telemetry_server.PublishExtendedSysStateRequest\x1a<.mavsdk.rpc.telemetry_server.PublishExtendedSysStateResponse\"\x04\x80\xb5\x18\x01\x12|\n\rPublishRawGps\x12\x31.mavsdk.rpc.telemetry_server.PublishRawGpsRequest\x1a\x32.mavsdk.rpc.telemetry_server.PublishRawGpsResponse\"\x04\x80\xb5\x18\x01\x12\x7f\n\x0ePublishBattery\x12\x32.mavsdk.rpc.telemetry_server.PublishBatteryRequest\x1a\x33.mavsdk.rpc.telemetry_server.PublishBatteryResponse\"\x04\x80\xb5\x18\x01\x12\x88\x01\n\x11PublishStatusText\x12\x35.mavsdk.rpc.telemetry_server.PublishStatusTextRequest\x1a\x36.mavsdk.rpc.telemetry_server.PublishStatusTextResponse\"\x04\x80\xb5\x18\x01\x12\x82\x01\n\x0fPublishOdometry\x12\x33.mavsdk.rpc.telemetry_server.PublishOdometryRequest\x1a\x34.mavsdk.rpc.telemetry_server.PublishOdometryResponse\"\x04\x80\xb5\x18\x01\x12\xa3\x01\n\x1aPublishPositionVelocityNed\x12>.mavsdk.rpc.telemetry_server.PublishPositionVelocityNedRequest\x1a?.mavsdk.rpc.telemetry_server.PublishPositionVelocityNedResponse\"\x04\x80\xb5\x18\x01\x12\x8b\x01\n\x12PublishGroundTruth\x12\x36.mavsdk.rpc.telemetry_server.PublishGroundTruthRequest\x1a\x37.mavsdk.rpc.telemetry_server.PublishGroundTruthResponse\"\x04\x80\xb5\x18\x01\x12s\n\nPublishImu\x12..mavsdk.rpc.telemetry_server.PublishImuRequest\x1a/.mavsdk.rpc.telemetry_server.PublishImuResponse\"\x04\x80\xb5\x18\x01\x12\x85\x01\n\x10PublishScaledImu\x12\x34.mavsdk.rpc.telemetry_server.PublishScaledImuRequest\x1a\x35.mavsdk.rpc.telemetry_server.PublishScaledImuResponse\"\x04\x80\xb5\x18\x01\x12|\n\rPublishRawImu\x12\x31.mavsdk.rpc.telemetry_server.PublishRawImuRequest\x1a\x32.mavsdk.rpc.telemetry_server.PublishRawImuResponse\"\x04\x80\xb5\x18\x01\x12\x91\x01\n\x14PublishUnixEpochTime\x12\x38.mavsdk.rpc.telemetry_server.PublishUnixEpochTimeRequest\x1a\x39.mavsdk.rpc.telemetry_server.PublishUnixEpochTimeResponse\"\x04\x80\xb5\x18\x01\x42\x32\n\x1aio.mavsdk.telemetry_serverB\x14TelemetryServerProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'telemetry_server/telemetry_server.proto\x12\x1bmavsdk.rpc.telemetry_server\x1a\x14mavsdk_options.proto\"\xc8\x01\n\x16PublishPositionRequest\x12\x37\n\x08position\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry_server.Position\x12>\n\x0cvelocity_ned\x18\x02 \x01(\x0b\x32(.mavsdk.rpc.telemetry_server.VelocityNed\x12\x35\n\x07heading\x18\x03 \x01(\x0b\x32$.mavsdk.rpc.telemetry_server.Heading\"I\n\x12PublishHomeRequest\x12\x33\n\x04home\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry_server.Position\"\xbf\x01\n\x17PublishSysStatusRequest\x12\x35\n\x07\x62\x61ttery\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.telemetry_server.Battery\x12\x1a\n\x12rc_receiver_status\x18\x02 \x01(\x08\x12\x13\n\x0bgyro_status\x18\x03 \x01(\x08\x12\x14\n\x0c\x61\x63\x63\x65l_status\x18\x04 \x01(\x08\x12\x12\n\nmag_status\x18\x05 \x01(\x08\x12\x12\n\ngps_status\x18\x06 \x01(\x08\"\x9c\x01\n\x1ePublishExtendedSysStateRequest\x12:\n\nvtol_state\x18\x01 \x01(\x0e\x32&.mavsdk.rpc.telemetry_server.VtolState\x12>\n\x0clanded_state\x18\x02 \x01(\x0e\x32(.mavsdk.rpc.telemetry_server.LandedState\"(\n\x13PublishInAirRequest\x12\x11\n\tis_in_air\x18\x01 \x01(\x08\"[\n\x19PublishLandedStateRequest\x12>\n\x0clanded_state\x18\x01 \x01(\x0e\x32(.mavsdk.rpc.telemetry_server.LandedState\"\x84\x01\n\x14PublishRawGpsRequest\x12\x34\n\x07raw_gps\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.telemetry_server.RawGps\x12\x36\n\x08gps_info\x18\x02 \x01(\x0b\x32$.mavsdk.rpc.telemetry_server.GpsInfo\"N\n\x15PublishBatteryRequest\x12\x35\n\x07\x62\x61ttery\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.telemetry_server.Battery\"R\n\x16PublishRcStatusRequest\x12\x38\n\trc_status\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry_server.RcStatus\"X\n\x18PublishStatusTextRequest\x12<\n\x0bstatus_text\x18\x01 \x01(\x0b\x32\'.mavsdk.rpc.telemetry_server.StatusText\"Q\n\x16PublishOdometryRequest\x12\x37\n\x08odometry\x18\x01 \x01(\x0b\x32%.mavsdk.rpc.telemetry_server.Odometry\"t\n!PublishPositionVelocityNedRequest\x12O\n\x15position_velocity_ned\x18\x01 \x01(\x0b\x32\x30.mavsdk.rpc.telemetry_server.PositionVelocityNed\"[\n\x19PublishGroundTruthRequest\x12>\n\x0cground_truth\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.telemetry_server.GroundTruth\"B\n\x11PublishImuRequest\x12-\n\x03imu\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry_server.Imu\"H\n\x17PublishScaledImuRequest\x12-\n\x03imu\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry_server.Imu\"E\n\x14PublishRawImuRequest\x12-\n\x03imu\x18\x01 \x01(\x0b\x32 .mavsdk.rpc.telemetry_server.Imu\".\n\x1bPublishUnixEpochTimeRequest\x12\x0f\n\x07time_us\x18\x01 \x01(\x04\"d\n\x1cPublishDistanceSensorRequest\x12\x44\n\x0f\x64istance_sensor\x18\x01 \x01(\x0b\x32+.mavsdk.rpc.telemetry_server.DistanceSensor\"n\n\x17PublishPositionResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"j\n\x13PublishHomeResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"o\n\x18PublishSysStatusResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"v\n\x1fPublishExtendedSysStateResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"l\n\x15PublishRawGpsResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"m\n\x16PublishBatteryResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"p\n\x19PublishStatusTextResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"n\n\x17PublishOdometryResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"y\n\"PublishPositionVelocityNedResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"q\n\x1aPublishGroundTruthResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"i\n\x12PublishImuResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"o\n\x18PublishScaledImuResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"l\n\x15PublishRawImuResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"s\n\x1cPublishUnixEpochTimeResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"t\n\x1dPublishDistanceSensorResponse\x12S\n\x17telemetry_server_result\x18\x01 \x01(\x0b\x32\x32.mavsdk.rpc.telemetry_server.TelemetryServerResult\"\x95\x01\n\x08Position\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13relative_altitude_m\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\'\n\x07Heading\x12\x1c\n\x0bheading_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\"r\n\nQuaternion\x12\x12\n\x01w\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01x\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01y\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x12\n\x01z\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x05 \x01(\x04\"s\n\nEulerAngle\x12\x19\n\x08roll_deg\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tpitch_deg\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x18\n\x07yaw_deg\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x04 \x01(\x04\"l\n\x13\x41ngularVelocityBody\x12\x1b\n\nroll_rad_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bpitch_rad_s\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tyaw_rad_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"`\n\x07GpsInfo\x12\x1d\n\x0enum_satellites\x18\x01 \x01(\x05\x42\x05\x82\xb5\x18\x01\x30\x12\x36\n\x08\x66ix_type\x18\x02 \x01(\x0e\x32$.mavsdk.rpc.telemetry_server.FixType\"\xdf\x02\n\x06RawGps\x12\x14\n\x0ctimestamp_us\x18\x01 \x01(\x04\x12\x14\n\x0clatitude_deg\x18\x02 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x03 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x04 \x01(\x02\x12\x0c\n\x04hdop\x18\x05 \x01(\x02\x12\x0c\n\x04vdop\x18\x06 \x01(\x02\x12\x14\n\x0cvelocity_m_s\x18\x07 \x01(\x02\x12\x0f\n\x07\x63og_deg\x18\x08 \x01(\x02\x12\x1c\n\x14\x61ltitude_ellipsoid_m\x18\t \x01(\x02\x12 \n\x18horizontal_uncertainty_m\x18\n \x01(\x02\x12\x1e\n\x16vertical_uncertainty_m\x18\x0b \x01(\x02\x12 \n\x18velocity_uncertainty_m_s\x18\x0c \x01(\x02\x12\x1f\n\x17heading_uncertainty_deg\x18\r \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x0e \x01(\x02\"I\n\x07\x42\x61ttery\x12\x1a\n\tvoltage_v\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\"\n\x11remaining_percent\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"|\n\x08RcStatus\x12%\n\x12was_available_once\x18\x01 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12\x1f\n\x0cis_available\x18\x02 \x01(\x08\x42\t\x82\xb5\x18\x05\x66\x61lse\x12(\n\x17signal_strength_percent\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"U\n\nStatusText\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.mavsdk.rpc.telemetry_server.StatusTextType\x12\x0c\n\x04text\x18\x02 \x01(\t\"?\n\x15\x41\x63tuatorControlTarget\x12\x14\n\x05group\x18\x01 \x01(\x05\x42\x05\x82\xb5\x18\x01\x30\x12\x10\n\x08\x63ontrols\x18\x02 \x03(\x02\"?\n\x14\x41\x63tuatorOutputStatus\x12\x15\n\x06\x61\x63tive\x18\x01 \x01(\rB\x05\x82\xb5\x18\x01\x30\x12\x10\n\x08\x61\x63tuator\x18\x02 \x03(\x02\"\'\n\nCovariance\x12\x19\n\x11\x63ovariance_matrix\x18\x01 \x03(\x02\";\n\x0cVelocityBody\x12\r\n\x05x_m_s\x18\x01 \x01(\x02\x12\r\n\x05y_m_s\x18\x02 \x01(\x02\x12\r\n\x05z_m_s\x18\x03 \x01(\x02\"5\n\x0cPositionBody\x12\x0b\n\x03x_m\x18\x01 \x01(\x02\x12\x0b\n\x03y_m\x18\x02 \x01(\x02\x12\x0b\n\x03z_m\x18\x03 \x01(\x02\"\xa4\x05\n\x08Odometry\x12\x11\n\ttime_usec\x18\x01 \x01(\x04\x12@\n\x08\x66rame_id\x18\x02 \x01(\x0e\x32..mavsdk.rpc.telemetry_server.Odometry.MavFrame\x12\x46\n\x0e\x63hild_frame_id\x18\x03 \x01(\x0e\x32..mavsdk.rpc.telemetry_server.Odometry.MavFrame\x12@\n\rposition_body\x18\x04 \x01(\x0b\x32).mavsdk.rpc.telemetry_server.PositionBody\x12\x32\n\x01q\x18\x05 \x01(\x0b\x32\'.mavsdk.rpc.telemetry_server.Quaternion\x12@\n\rvelocity_body\x18\x06 \x01(\x0b\x32).mavsdk.rpc.telemetry_server.VelocityBody\x12O\n\x15\x61ngular_velocity_body\x18\x07 \x01(\x0b\x32\x30.mavsdk.rpc.telemetry_server.AngularVelocityBody\x12@\n\x0fpose_covariance\x18\x08 \x01(\x0b\x32\'.mavsdk.rpc.telemetry_server.Covariance\x12\x44\n\x13velocity_covariance\x18\t \x01(\x0b\x32\'.mavsdk.rpc.telemetry_server.Covariance\"j\n\x08MavFrame\x12\x13\n\x0fMAV_FRAME_UNDEF\x10\x00\x12\x16\n\x12MAV_FRAME_BODY_NED\x10\x08\x12\x18\n\x14MAV_FRAME_VISION_NED\x10\x10\x12\x17\n\x13MAV_FRAME_ESTIM_NED\x10\x12\"\x7f\n\x0e\x44istanceSensor\x12#\n\x12minimum_distance_m\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12#\n\x12maximum_distance_m\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12#\n\x12\x63urrent_distance_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\xb0\x01\n\x0eScaledPressure\x12\x14\n\x0ctimestamp_us\x18\x01 \x01(\x04\x12\x1d\n\x15\x61\x62solute_pressure_hpa\x18\x02 \x01(\x02\x12!\n\x19\x64ifferential_pressure_hpa\x18\x03 \x01(\x02\x12\x17\n\x0ftemperature_deg\x18\x04 \x01(\x02\x12-\n%differential_pressure_temperature_deg\x18\x05 \x01(\x02\"Y\n\x0bPositionNed\x12\x18\n\x07north_m\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x17\n\x06\x65\x61st_m\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x17\n\x06\x64own_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"D\n\x0bVelocityNed\x12\x11\n\tnorth_m_s\x18\x01 \x01(\x02\x12\x10\n\x08\x65\x61st_m_s\x18\x02 \x01(\x02\x12\x10\n\x08\x64own_m_s\x18\x03 \x01(\x02\"\x8d\x01\n\x13PositionVelocityNed\x12:\n\x08position\x18\x01 \x01(\x0b\x32(.mavsdk.rpc.telemetry_server.PositionNed\x12:\n\x08velocity\x18\x02 \x01(\x0b\x32(.mavsdk.rpc.telemetry_server.VelocityNed\"r\n\x0bGroundTruth\x12\x1d\n\x0clatitude_deg\x18\x01 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x02 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"x\n\x10\x46ixedwingMetrics\x12\x1d\n\x0c\x61irspeed_m_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13throttle_percentage\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1f\n\x0e\x63limb_rate_m_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"i\n\x0f\x41\x63\x63\x65lerationFrd\x12\x1d\n\x0c\x66orward_m_s2\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\nright_m_s2\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1a\n\tdown_m_s2\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"o\n\x12\x41ngularVelocityFrd\x12\x1e\n\rforward_rad_s\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bright_rad_s\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\ndown_rad_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"m\n\x10MagneticFieldFrd\x12\x1e\n\rforward_gauss\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1c\n\x0bright_gauss\x18\x02 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x1b\n\ndown_gauss\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"\xa0\x02\n\x03Imu\x12\x46\n\x10\x61\x63\x63\x65leration_frd\x18\x01 \x01(\x0b\x32,.mavsdk.rpc.telemetry_server.AccelerationFrd\x12M\n\x14\x61ngular_velocity_frd\x18\x02 \x01(\x0b\x32/.mavsdk.rpc.telemetry_server.AngularVelocityFrd\x12I\n\x12magnetic_field_frd\x18\x03 \x01(\x0b\x32-.mavsdk.rpc.telemetry_server.MagneticFieldFrd\x12!\n\x10temperature_degc\x18\x04 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\x12\x14\n\x0ctimestamp_us\x18\x05 \x01(\x04\"\xb4\x02\n\x15TelemetryServerResult\x12I\n\x06result\x18\x01 \x01(\x0e\x32\x39.mavsdk.rpc.telemetry_server.TelemetryServerResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xbb\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x07*\xa4\x01\n\x07\x46ixType\x12\x13\n\x0f\x46IX_TYPE_NO_GPS\x10\x00\x12\x13\n\x0f\x46IX_TYPE_NO_FIX\x10\x01\x12\x13\n\x0f\x46IX_TYPE_FIX_2D\x10\x02\x12\x13\n\x0f\x46IX_TYPE_FIX_3D\x10\x03\x12\x15\n\x11\x46IX_TYPE_FIX_DGPS\x10\x04\x12\x16\n\x12\x46IX_TYPE_RTK_FLOAT\x10\x05\x12\x16\n\x12\x46IX_TYPE_RTK_FIXED\x10\x06*\x8d\x01\n\tVtolState\x12\x18\n\x14VTOL_STATE_UNDEFINED\x10\x00\x12\x1f\n\x1bVTOL_STATE_TRANSITION_TO_FW\x10\x01\x12\x1f\n\x1bVTOL_STATE_TRANSITION_TO_MC\x10\x02\x12\x11\n\rVTOL_STATE_MC\x10\x03\x12\x11\n\rVTOL_STATE_FW\x10\x04*\xf9\x01\n\x0eStatusTextType\x12\x1a\n\x16STATUS_TEXT_TYPE_DEBUG\x10\x00\x12\x19\n\x15STATUS_TEXT_TYPE_INFO\x10\x01\x12\x1b\n\x17STATUS_TEXT_TYPE_NOTICE\x10\x02\x12\x1c\n\x18STATUS_TEXT_TYPE_WARNING\x10\x03\x12\x1a\n\x16STATUS_TEXT_TYPE_ERROR\x10\x04\x12\x1d\n\x19STATUS_TEXT_TYPE_CRITICAL\x10\x05\x12\x1a\n\x16STATUS_TEXT_TYPE_ALERT\x10\x06\x12\x1e\n\x1aSTATUS_TEXT_TYPE_EMERGENCY\x10\x07*\x93\x01\n\x0bLandedState\x12\x18\n\x14LANDED_STATE_UNKNOWN\x10\x00\x12\x1a\n\x16LANDED_STATE_ON_GROUND\x10\x01\x12\x17\n\x13LANDED_STATE_IN_AIR\x10\x02\x12\x1b\n\x17LANDED_STATE_TAKING_OFF\x10\x03\x12\x18\n\x14LANDED_STATE_LANDING\x10\x04\x32\xa3\x10\n\x16TelemetryServerService\x12\x82\x01\n\x0fPublishPosition\x12\x33.mavsdk.rpc.telemetry_server.PublishPositionRequest\x1a\x34.mavsdk.rpc.telemetry_server.PublishPositionResponse\"\x04\x80\xb5\x18\x01\x12v\n\x0bPublishHome\x12/.mavsdk.rpc.telemetry_server.PublishHomeRequest\x1a\x30.mavsdk.rpc.telemetry_server.PublishHomeResponse\"\x04\x80\xb5\x18\x01\x12\x85\x01\n\x10PublishSysStatus\x12\x34.mavsdk.rpc.telemetry_server.PublishSysStatusRequest\x1a\x35.mavsdk.rpc.telemetry_server.PublishSysStatusResponse\"\x04\x80\xb5\x18\x01\x12\x9a\x01\n\x17PublishExtendedSysState\x12;.mavsdk.rpc.telemetry_server.PublishExtendedSysStateRequest\x1a<.mavsdk.rpc.telemetry_server.PublishExtendedSysStateResponse\"\x04\x80\xb5\x18\x01\x12|\n\rPublishRawGps\x12\x31.mavsdk.rpc.telemetry_server.PublishRawGpsRequest\x1a\x32.mavsdk.rpc.telemetry_server.PublishRawGpsResponse\"\x04\x80\xb5\x18\x01\x12\x7f\n\x0ePublishBattery\x12\x32.mavsdk.rpc.telemetry_server.PublishBatteryRequest\x1a\x33.mavsdk.rpc.telemetry_server.PublishBatteryResponse\"\x04\x80\xb5\x18\x01\x12\x88\x01\n\x11PublishStatusText\x12\x35.mavsdk.rpc.telemetry_server.PublishStatusTextRequest\x1a\x36.mavsdk.rpc.telemetry_server.PublishStatusTextResponse\"\x04\x80\xb5\x18\x01\x12\x82\x01\n\x0fPublishOdometry\x12\x33.mavsdk.rpc.telemetry_server.PublishOdometryRequest\x1a\x34.mavsdk.rpc.telemetry_server.PublishOdometryResponse\"\x04\x80\xb5\x18\x01\x12\xa3\x01\n\x1aPublishPositionVelocityNed\x12>.mavsdk.rpc.telemetry_server.PublishPositionVelocityNedRequest\x1a?.mavsdk.rpc.telemetry_server.PublishPositionVelocityNedResponse\"\x04\x80\xb5\x18\x01\x12\x8b\x01\n\x12PublishGroundTruth\x12\x36.mavsdk.rpc.telemetry_server.PublishGroundTruthRequest\x1a\x37.mavsdk.rpc.telemetry_server.PublishGroundTruthResponse\"\x04\x80\xb5\x18\x01\x12s\n\nPublishImu\x12..mavsdk.rpc.telemetry_server.PublishImuRequest\x1a/.mavsdk.rpc.telemetry_server.PublishImuResponse\"\x04\x80\xb5\x18\x01\x12\x85\x01\n\x10PublishScaledImu\x12\x34.mavsdk.rpc.telemetry_server.PublishScaledImuRequest\x1a\x35.mavsdk.rpc.telemetry_server.PublishScaledImuResponse\"\x04\x80\xb5\x18\x01\x12|\n\rPublishRawImu\x12\x31.mavsdk.rpc.telemetry_server.PublishRawImuRequest\x1a\x32.mavsdk.rpc.telemetry_server.PublishRawImuResponse\"\x04\x80\xb5\x18\x01\x12\x91\x01\n\x14PublishUnixEpochTime\x12\x38.mavsdk.rpc.telemetry_server.PublishUnixEpochTimeRequest\x1a\x39.mavsdk.rpc.telemetry_server.PublishUnixEpochTimeResponse\"\x04\x80\xb5\x18\x01\x12\x94\x01\n\x15PublishDistanceSensor\x12\x39.mavsdk.rpc.telemetry_server.PublishDistanceSensorRequest\x1a:.mavsdk.rpc.telemetry_server.PublishDistanceSensorResponse\"\x04\x80\xb5\x18\x01\x42\x32\n\x1aio.mavsdk.telemetry_serverB\x14TelemetryServerProtob\x06proto3') _FIXTYPE = DESCRIPTOR.enum_types_by_name['FixType'] FixType = enum_type_wrapper.EnumTypeWrapper(_FIXTYPE) @@ -70,6 +70,7 @@ _PUBLISHSCALEDIMUREQUEST = DESCRIPTOR.message_types_by_name['PublishScaledImuRequest'] _PUBLISHRAWIMUREQUEST = DESCRIPTOR.message_types_by_name['PublishRawImuRequest'] _PUBLISHUNIXEPOCHTIMEREQUEST = DESCRIPTOR.message_types_by_name['PublishUnixEpochTimeRequest'] +_PUBLISHDISTANCESENSORREQUEST = DESCRIPTOR.message_types_by_name['PublishDistanceSensorRequest'] _PUBLISHPOSITIONRESPONSE = DESCRIPTOR.message_types_by_name['PublishPositionResponse'] _PUBLISHHOMERESPONSE = DESCRIPTOR.message_types_by_name['PublishHomeResponse'] _PUBLISHSYSSTATUSRESPONSE = DESCRIPTOR.message_types_by_name['PublishSysStatusResponse'] @@ -84,6 +85,7 @@ _PUBLISHSCALEDIMURESPONSE = DESCRIPTOR.message_types_by_name['PublishScaledImuResponse'] _PUBLISHRAWIMURESPONSE = DESCRIPTOR.message_types_by_name['PublishRawImuResponse'] _PUBLISHUNIXEPOCHTIMERESPONSE = DESCRIPTOR.message_types_by_name['PublishUnixEpochTimeResponse'] +_PUBLISHDISTANCESENSORRESPONSE = DESCRIPTOR.message_types_by_name['PublishDistanceSensorResponse'] _POSITION = DESCRIPTOR.message_types_by_name['Position'] _HEADING = DESCRIPTOR.message_types_by_name['Heading'] _QUATERNION = DESCRIPTOR.message_types_by_name['Quaternion'] @@ -233,6 +235,13 @@ }) _sym_db.RegisterMessage(PublishUnixEpochTimeRequest) +PublishDistanceSensorRequest = _reflection.GeneratedProtocolMessageType('PublishDistanceSensorRequest', (_message.Message,), { + 'DESCRIPTOR' : _PUBLISHDISTANCESENSORREQUEST, + '__module__' : 'telemetry_server.telemetry_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry_server.PublishDistanceSensorRequest) + }) +_sym_db.RegisterMessage(PublishDistanceSensorRequest) + PublishPositionResponse = _reflection.GeneratedProtocolMessageType('PublishPositionResponse', (_message.Message,), { 'DESCRIPTOR' : _PUBLISHPOSITIONRESPONSE, '__module__' : 'telemetry_server.telemetry_server_pb2' @@ -331,6 +340,13 @@ }) _sym_db.RegisterMessage(PublishUnixEpochTimeResponse) +PublishDistanceSensorResponse = _reflection.GeneratedProtocolMessageType('PublishDistanceSensorResponse', (_message.Message,), { + 'DESCRIPTOR' : _PUBLISHDISTANCESENSORRESPONSE, + '__module__' : 'telemetry_server.telemetry_server_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.telemetry_server.PublishDistanceSensorResponse) + }) +_sym_db.RegisterMessage(PublishDistanceSensorResponse) + Position = _reflection.GeneratedProtocolMessageType('Position', (_message.Message,), { 'DESCRIPTOR' : _POSITION, '__module__' : 'telemetry_server.telemetry_server_pb2' @@ -650,14 +666,16 @@ _TELEMETRYSERVERSERVICE.methods_by_name['PublishRawImu']._serialized_options = b'\200\265\030\001' _TELEMETRYSERVERSERVICE.methods_by_name['PublishUnixEpochTime']._options = None _TELEMETRYSERVERSERVICE.methods_by_name['PublishUnixEpochTime']._serialized_options = b'\200\265\030\001' - _FIXTYPE._serialized_start=7416 - _FIXTYPE._serialized_end=7580 - _VTOLSTATE._serialized_start=7583 - _VTOLSTATE._serialized_end=7724 - _STATUSTEXTTYPE._serialized_start=7727 - _STATUSTEXTTYPE._serialized_end=7976 - _LANDEDSTATE._serialized_start=7979 - _LANDEDSTATE._serialized_end=8126 + _TELEMETRYSERVERSERVICE.methods_by_name['PublishDistanceSensor']._options = None + _TELEMETRYSERVERSERVICE.methods_by_name['PublishDistanceSensor']._serialized_options = b'\200\265\030\001' + _FIXTYPE._serialized_start=7636 + _FIXTYPE._serialized_end=7800 + _VTOLSTATE._serialized_start=7803 + _VTOLSTATE._serialized_end=7944 + _STATUSTEXTTYPE._serialized_start=7947 + _STATUSTEXTTYPE._serialized_end=8196 + _LANDEDSTATE._serialized_start=8199 + _LANDEDSTATE._serialized_end=8346 _PUBLISHPOSITIONREQUEST._serialized_start=95 _PUBLISHPOSITIONREQUEST._serialized_end=295 _PUBLISHHOMEREQUEST._serialized_start=297 @@ -692,94 +710,98 @@ _PUBLISHRAWIMUREQUEST._serialized_end=1754 _PUBLISHUNIXEPOCHTIMEREQUEST._serialized_start=1756 _PUBLISHUNIXEPOCHTIMEREQUEST._serialized_end=1802 - _PUBLISHPOSITIONRESPONSE._serialized_start=1804 - _PUBLISHPOSITIONRESPONSE._serialized_end=1914 - _PUBLISHHOMERESPONSE._serialized_start=1916 - _PUBLISHHOMERESPONSE._serialized_end=2022 - _PUBLISHSYSSTATUSRESPONSE._serialized_start=2024 - _PUBLISHSYSSTATUSRESPONSE._serialized_end=2135 - _PUBLISHEXTENDEDSYSSTATERESPONSE._serialized_start=2137 - _PUBLISHEXTENDEDSYSSTATERESPONSE._serialized_end=2255 - _PUBLISHRAWGPSRESPONSE._serialized_start=2257 - _PUBLISHRAWGPSRESPONSE._serialized_end=2365 - _PUBLISHBATTERYRESPONSE._serialized_start=2367 - _PUBLISHBATTERYRESPONSE._serialized_end=2476 - _PUBLISHSTATUSTEXTRESPONSE._serialized_start=2478 - _PUBLISHSTATUSTEXTRESPONSE._serialized_end=2590 - _PUBLISHODOMETRYRESPONSE._serialized_start=2592 - _PUBLISHODOMETRYRESPONSE._serialized_end=2702 - _PUBLISHPOSITIONVELOCITYNEDRESPONSE._serialized_start=2704 - _PUBLISHPOSITIONVELOCITYNEDRESPONSE._serialized_end=2825 - _PUBLISHGROUNDTRUTHRESPONSE._serialized_start=2827 - _PUBLISHGROUNDTRUTHRESPONSE._serialized_end=2940 - _PUBLISHIMURESPONSE._serialized_start=2942 - _PUBLISHIMURESPONSE._serialized_end=3047 - _PUBLISHSCALEDIMURESPONSE._serialized_start=3049 - _PUBLISHSCALEDIMURESPONSE._serialized_end=3160 - _PUBLISHRAWIMURESPONSE._serialized_start=3162 - _PUBLISHRAWIMURESPONSE._serialized_end=3270 - _PUBLISHUNIXEPOCHTIMERESPONSE._serialized_start=3272 - _PUBLISHUNIXEPOCHTIMERESPONSE._serialized_end=3387 - _POSITION._serialized_start=3390 - _POSITION._serialized_end=3539 - _HEADING._serialized_start=3541 - _HEADING._serialized_end=3580 - _QUATERNION._serialized_start=3582 - _QUATERNION._serialized_end=3696 - _EULERANGLE._serialized_start=3698 - _EULERANGLE._serialized_end=3813 - _ANGULARVELOCITYBODY._serialized_start=3815 - _ANGULARVELOCITYBODY._serialized_end=3923 - _GPSINFO._serialized_start=3925 - _GPSINFO._serialized_end=4021 - _RAWGPS._serialized_start=4024 - _RAWGPS._serialized_end=4375 - _BATTERY._serialized_start=4377 - _BATTERY._serialized_end=4450 - _RCSTATUS._serialized_start=4452 - _RCSTATUS._serialized_end=4576 - _STATUSTEXT._serialized_start=4578 - _STATUSTEXT._serialized_end=4663 - _ACTUATORCONTROLTARGET._serialized_start=4665 - _ACTUATORCONTROLTARGET._serialized_end=4728 - _ACTUATOROUTPUTSTATUS._serialized_start=4730 - _ACTUATOROUTPUTSTATUS._serialized_end=4793 - _COVARIANCE._serialized_start=4795 - _COVARIANCE._serialized_end=4834 - _VELOCITYBODY._serialized_start=4836 - _VELOCITYBODY._serialized_end=4895 - _POSITIONBODY._serialized_start=4897 - _POSITIONBODY._serialized_end=4950 - _ODOMETRY._serialized_start=4953 - _ODOMETRY._serialized_end=5629 - _ODOMETRY_MAVFRAME._serialized_start=5523 - _ODOMETRY_MAVFRAME._serialized_end=5629 - _DISTANCESENSOR._serialized_start=5631 - _DISTANCESENSOR._serialized_end=5758 - _SCALEDPRESSURE._serialized_start=5761 - _SCALEDPRESSURE._serialized_end=5937 - _POSITIONNED._serialized_start=5939 - _POSITIONNED._serialized_end=6028 - _VELOCITYNED._serialized_start=6030 - _VELOCITYNED._serialized_end=6098 - _POSITIONVELOCITYNED._serialized_start=6101 - _POSITIONVELOCITYNED._serialized_end=6242 - _GROUNDTRUTH._serialized_start=6244 - _GROUNDTRUTH._serialized_end=6358 - _FIXEDWINGMETRICS._serialized_start=6360 - _FIXEDWINGMETRICS._serialized_end=6480 - _ACCELERATIONFRD._serialized_start=6482 - _ACCELERATIONFRD._serialized_end=6587 - _ANGULARVELOCITYFRD._serialized_start=6589 - _ANGULARVELOCITYFRD._serialized_end=6700 - _MAGNETICFIELDFRD._serialized_start=6702 - _MAGNETICFIELDFRD._serialized_end=6811 - _IMU._serialized_start=6814 - _IMU._serialized_end=7102 - _TELEMETRYSERVERRESULT._serialized_start=7105 - _TELEMETRYSERVERRESULT._serialized_end=7413 - _TELEMETRYSERVERRESULT_RESULT._serialized_start=7226 - _TELEMETRYSERVERRESULT_RESULT._serialized_end=7413 - _TELEMETRYSERVERSERVICE._serialized_start=8129 - _TELEMETRYSERVERSERVICE._serialized_end=10061 + _PUBLISHDISTANCESENSORREQUEST._serialized_start=1804 + _PUBLISHDISTANCESENSORREQUEST._serialized_end=1904 + _PUBLISHPOSITIONRESPONSE._serialized_start=1906 + _PUBLISHPOSITIONRESPONSE._serialized_end=2016 + _PUBLISHHOMERESPONSE._serialized_start=2018 + _PUBLISHHOMERESPONSE._serialized_end=2124 + _PUBLISHSYSSTATUSRESPONSE._serialized_start=2126 + _PUBLISHSYSSTATUSRESPONSE._serialized_end=2237 + _PUBLISHEXTENDEDSYSSTATERESPONSE._serialized_start=2239 + _PUBLISHEXTENDEDSYSSTATERESPONSE._serialized_end=2357 + _PUBLISHRAWGPSRESPONSE._serialized_start=2359 + _PUBLISHRAWGPSRESPONSE._serialized_end=2467 + _PUBLISHBATTERYRESPONSE._serialized_start=2469 + _PUBLISHBATTERYRESPONSE._serialized_end=2578 + _PUBLISHSTATUSTEXTRESPONSE._serialized_start=2580 + _PUBLISHSTATUSTEXTRESPONSE._serialized_end=2692 + _PUBLISHODOMETRYRESPONSE._serialized_start=2694 + _PUBLISHODOMETRYRESPONSE._serialized_end=2804 + _PUBLISHPOSITIONVELOCITYNEDRESPONSE._serialized_start=2806 + _PUBLISHPOSITIONVELOCITYNEDRESPONSE._serialized_end=2927 + _PUBLISHGROUNDTRUTHRESPONSE._serialized_start=2929 + _PUBLISHGROUNDTRUTHRESPONSE._serialized_end=3042 + _PUBLISHIMURESPONSE._serialized_start=3044 + _PUBLISHIMURESPONSE._serialized_end=3149 + _PUBLISHSCALEDIMURESPONSE._serialized_start=3151 + _PUBLISHSCALEDIMURESPONSE._serialized_end=3262 + _PUBLISHRAWIMURESPONSE._serialized_start=3264 + _PUBLISHRAWIMURESPONSE._serialized_end=3372 + _PUBLISHUNIXEPOCHTIMERESPONSE._serialized_start=3374 + _PUBLISHUNIXEPOCHTIMERESPONSE._serialized_end=3489 + _PUBLISHDISTANCESENSORRESPONSE._serialized_start=3491 + _PUBLISHDISTANCESENSORRESPONSE._serialized_end=3607 + _POSITION._serialized_start=3610 + _POSITION._serialized_end=3759 + _HEADING._serialized_start=3761 + _HEADING._serialized_end=3800 + _QUATERNION._serialized_start=3802 + _QUATERNION._serialized_end=3916 + _EULERANGLE._serialized_start=3918 + _EULERANGLE._serialized_end=4033 + _ANGULARVELOCITYBODY._serialized_start=4035 + _ANGULARVELOCITYBODY._serialized_end=4143 + _GPSINFO._serialized_start=4145 + _GPSINFO._serialized_end=4241 + _RAWGPS._serialized_start=4244 + _RAWGPS._serialized_end=4595 + _BATTERY._serialized_start=4597 + _BATTERY._serialized_end=4670 + _RCSTATUS._serialized_start=4672 + _RCSTATUS._serialized_end=4796 + _STATUSTEXT._serialized_start=4798 + _STATUSTEXT._serialized_end=4883 + _ACTUATORCONTROLTARGET._serialized_start=4885 + _ACTUATORCONTROLTARGET._serialized_end=4948 + _ACTUATOROUTPUTSTATUS._serialized_start=4950 + _ACTUATOROUTPUTSTATUS._serialized_end=5013 + _COVARIANCE._serialized_start=5015 + _COVARIANCE._serialized_end=5054 + _VELOCITYBODY._serialized_start=5056 + _VELOCITYBODY._serialized_end=5115 + _POSITIONBODY._serialized_start=5117 + _POSITIONBODY._serialized_end=5170 + _ODOMETRY._serialized_start=5173 + _ODOMETRY._serialized_end=5849 + _ODOMETRY_MAVFRAME._serialized_start=5743 + _ODOMETRY_MAVFRAME._serialized_end=5849 + _DISTANCESENSOR._serialized_start=5851 + _DISTANCESENSOR._serialized_end=5978 + _SCALEDPRESSURE._serialized_start=5981 + _SCALEDPRESSURE._serialized_end=6157 + _POSITIONNED._serialized_start=6159 + _POSITIONNED._serialized_end=6248 + _VELOCITYNED._serialized_start=6250 + _VELOCITYNED._serialized_end=6318 + _POSITIONVELOCITYNED._serialized_start=6321 + _POSITIONVELOCITYNED._serialized_end=6462 + _GROUNDTRUTH._serialized_start=6464 + _GROUNDTRUTH._serialized_end=6578 + _FIXEDWINGMETRICS._serialized_start=6580 + _FIXEDWINGMETRICS._serialized_end=6700 + _ACCELERATIONFRD._serialized_start=6702 + _ACCELERATIONFRD._serialized_end=6807 + _ANGULARVELOCITYFRD._serialized_start=6809 + _ANGULARVELOCITYFRD._serialized_end=6920 + _MAGNETICFIELDFRD._serialized_start=6922 + _MAGNETICFIELDFRD._serialized_end=7031 + _IMU._serialized_start=7034 + _IMU._serialized_end=7322 + _TELEMETRYSERVERRESULT._serialized_start=7325 + _TELEMETRYSERVERRESULT._serialized_end=7633 + _TELEMETRYSERVERRESULT_RESULT._serialized_start=7446 + _TELEMETRYSERVERRESULT_RESULT._serialized_end=7633 + _TELEMETRYSERVERSERVICE._serialized_start=8349 + _TELEMETRYSERVERSERVICE._serialized_end=10432 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/telemetry_server_pb2_grpc.py b/mavsdk/telemetry_server_pb2_grpc.py index fbe82598..f16c8b52 100644 --- a/mavsdk/telemetry_server_pb2_grpc.py +++ b/mavsdk/telemetry_server_pb2_grpc.py @@ -87,6 +87,11 @@ def __init__(self, channel): request_serializer=telemetry__server_dot_telemetry__server__pb2.PublishUnixEpochTimeRequest.SerializeToString, response_deserializer=telemetry__server_dot_telemetry__server__pb2.PublishUnixEpochTimeResponse.FromString, ) + self.PublishDistanceSensor = channel.unary_unary( + '/mavsdk.rpc.telemetry_server.TelemetryServerService/PublishDistanceSensor', + request_serializer=telemetry__server_dot_telemetry__server__pb2.PublishDistanceSensorRequest.SerializeToString, + response_deserializer=telemetry__server_dot_telemetry__server__pb2.PublishDistanceSensorResponse.FromString, + ) class TelemetryServerServiceServicer(object): @@ -193,6 +198,13 @@ def PublishUnixEpochTime(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def PublishDistanceSensor(self, request, context): + """Publish to "distance sensor" updates. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_TelemetryServerServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -266,6 +278,11 @@ def add_TelemetryServerServiceServicer_to_server(servicer, server): request_deserializer=telemetry__server_dot_telemetry__server__pb2.PublishUnixEpochTimeRequest.FromString, response_serializer=telemetry__server_dot_telemetry__server__pb2.PublishUnixEpochTimeResponse.SerializeToString, ), + 'PublishDistanceSensor': grpc.unary_unary_rpc_method_handler( + servicer.PublishDistanceSensor, + request_deserializer=telemetry__server_dot_telemetry__server__pb2.PublishDistanceSensorRequest.FromString, + response_serializer=telemetry__server_dot_telemetry__server__pb2.PublishDistanceSensorResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.telemetry_server.TelemetryServerService', rpc_method_handlers) @@ -516,3 +533,20 @@ def PublishUnixEpochTime(request, telemetry__server_dot_telemetry__server__pb2.PublishUnixEpochTimeResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PublishDistanceSensor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.telemetry_server.TelemetryServerService/PublishDistanceSensor', + telemetry__server_dot_telemetry__server__pb2.PublishDistanceSensorRequest.SerializeToString, + telemetry__server_dot_telemetry__server__pb2.PublishDistanceSensorResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/mavsdk/transponder.py b/mavsdk/transponder.py index a1d487e9..eb4dc01e 100644 --- a/mavsdk/transponder.py +++ b/mavsdk/transponder.py @@ -186,6 +186,42 @@ def __str__(self): return self.name +class AdsbAltitudeType(Enum): + """ + Altitude type used in AdsbVehicle message + + Values + ------ + PRESSURE_QNH + Altitude reported from a Baro source using QNH reference + + GEOMETRIC + Altitude reported from a GNSS source + + """ + + + PRESSURE_QNH = 0 + GEOMETRIC = 1 + + def translate_to_rpc(self): + if self == AdsbAltitudeType.PRESSURE_QNH: + return transponder_pb2.ADSB_ALTITUDE_TYPE_PRESSURE_QNH + if self == AdsbAltitudeType.GEOMETRIC: + return transponder_pb2.ADSB_ALTITUDE_TYPE_GEOMETRIC + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == transponder_pb2.ADSB_ALTITUDE_TYPE_PRESSURE_QNH: + return AdsbAltitudeType.PRESSURE_QNH + if rpc_enum_value == transponder_pb2.ADSB_ALTITUDE_TYPE_GEOMETRIC: + return AdsbAltitudeType.GEOMETRIC + + def __str__(self): + return self.name + + class AdsbVehicle: """ ADSB Vehicle type. @@ -201,8 +237,11 @@ class AdsbVehicle: longitude_deg : double Longitude in degrees (range: -180 to +180). + altitude_type : AdsbAltitudeType + ADSB altitude type. + absolute_altitude_m : float - Altitude AMSL (above mean sea level) in metres + Altitude in metres according to altitude_type heading_deg : float Course over ground, in degrees @@ -234,6 +273,7 @@ def __init__( icao_address, latitude_deg, longitude_deg, + altitude_type, absolute_altitude_m, heading_deg, horizontal_velocity_m_s, @@ -246,6 +286,7 @@ def __init__( self.icao_address = icao_address self.latitude_deg = latitude_deg self.longitude_deg = longitude_deg + self.altitude_type = altitude_type self.absolute_altitude_m = absolute_altitude_m self.heading_deg = heading_deg self.horizontal_velocity_m_s = horizontal_velocity_m_s @@ -264,6 +305,7 @@ def __eq__(self, to_compare): (self.icao_address == to_compare.icao_address) and \ (self.latitude_deg == to_compare.latitude_deg) and \ (self.longitude_deg == to_compare.longitude_deg) and \ + (self.altitude_type == to_compare.altitude_type) and \ (self.absolute_altitude_m == to_compare.absolute_altitude_m) and \ (self.heading_deg == to_compare.heading_deg) and \ (self.horizontal_velocity_m_s == to_compare.horizontal_velocity_m_s) and \ @@ -282,6 +324,7 @@ def __str__(self): "icao_address: " + str(self.icao_address), "latitude_deg: " + str(self.latitude_deg), "longitude_deg: " + str(self.longitude_deg), + "altitude_type: " + str(self.altitude_type), "absolute_altitude_m: " + str(self.absolute_altitude_m), "heading_deg: " + str(self.heading_deg), "horizontal_velocity_m_s: " + str(self.horizontal_velocity_m_s), @@ -308,6 +351,9 @@ def translate_from_rpc(rpcAdsbVehicle): rpcAdsbVehicle.longitude_deg, + AdsbAltitudeType.translate_from_rpc(rpcAdsbVehicle.altitude_type), + + rpcAdsbVehicle.absolute_altitude_m, @@ -356,6 +402,12 @@ def translate_to_rpc(self, rpcAdsbVehicle): + rpcAdsbVehicle.altitude_type = self.altitude_type.translate_to_rpc() + + + + + rpcAdsbVehicle.absolute_altitude_m = self.absolute_altitude_m diff --git a/mavsdk/transponder_pb2.py b/mavsdk/transponder_pb2.py index 705bd61b..36df7192 100644 --- a/mavsdk/transponder_pb2.py +++ b/mavsdk/transponder_pb2.py @@ -15,10 +15,12 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dtransponder/transponder.proto\x12\x16mavsdk.rpc.transponder\"\x1d\n\x1bSubscribeTransponderRequest\"O\n\x13TransponderResponse\x12\x38\n\x0btransponder\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.transponder.AdsbVehicle\",\n\x19SetRateTransponderRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"c\n\x1aSetRateTransponderResponse\x12\x45\n\x12transponder_result\x18\x01 \x01(\x0b\x32).mavsdk.rpc.transponder.TransponderResult\"\xb3\x02\n\x0b\x41\x64sbVehicle\x12\x14\n\x0cicao_address\x18\x01 \x01(\r\x12\x14\n\x0clatitude_deg\x18\x02 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x03 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x05 \x01(\x02\x12\x13\n\x0bheading_deg\x18\x06 \x01(\x02\x12\x1f\n\x17horizontal_velocity_m_s\x18\x07 \x01(\x02\x12\x1d\n\x15vertical_velocity_m_s\x18\x08 \x01(\x02\x12\x10\n\x08\x63\x61llsign\x18\t \x01(\t\x12=\n\x0c\x65mitter_type\x18\n \x01(\x0e\x32\'.mavsdk.rpc.transponder.AdsbEmitterType\x12\x0e\n\x06squawk\x18\r \x01(\r\x12\x0e\n\x06tslc_s\x18\x0e \x01(\r\"\x8f\x02\n\x11TransponderResult\x12@\n\x06result\x18\x01 \x01(\x0e\x32\x30.mavsdk.rpc.transponder.TransponderResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xa3\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06*\xad\x05\n\x0f\x41\x64sbEmitterType\x12\x1d\n\x19\x41\x44SB_EMITTER_TYPE_NO_INFO\x10\x00\x12\x1b\n\x17\x41\x44SB_EMITTER_TYPE_LIGHT\x10\x01\x12\x1b\n\x17\x41\x44SB_EMITTER_TYPE_SMALL\x10\x02\x12\x1b\n\x17\x41\x44SB_EMITTER_TYPE_LARGE\x10\x03\x12\'\n#ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE\x10\x04\x12\x1b\n\x17\x41\x44SB_EMITTER_TYPE_HEAVY\x10\x05\x12\"\n\x1e\x41\x44SB_EMITTER_TYPE_HIGHLY_MANUV\x10\x06\x12\x1f\n\x1b\x41\x44SB_EMITTER_TYPE_ROTOCRAFT\x10\x07\x12 \n\x1c\x41\x44SB_EMITTER_TYPE_UNASSIGNED\x10\x08\x12\x1c\n\x18\x41\x44SB_EMITTER_TYPE_GLIDER\x10\t\x12!\n\x1d\x41\x44SB_EMITTER_TYPE_LIGHTER_AIR\x10\n\x12\x1f\n\x1b\x41\x44SB_EMITTER_TYPE_PARACHUTE\x10\x0b\x12!\n\x1d\x41\x44SB_EMITTER_TYPE_ULTRA_LIGHT\x10\x0c\x12!\n\x1d\x41\x44SB_EMITTER_TYPE_UNASSIGNED2\x10\r\x12\x19\n\x15\x41\x44SB_EMITTER_TYPE_UAV\x10\x0e\x12\x1b\n\x17\x41\x44SB_EMITTER_TYPE_SPACE\x10\x0f\x12!\n\x1d\x41\x44SB_EMITTER_TYPE_UNASSGINED3\x10\x10\x12\'\n#ADSB_EMITTER_TYPE_EMERGENCY_SURFACE\x10\x11\x12%\n!ADSB_EMITTER_TYPE_SERVICE_SURFACE\x10\x12\x12$\n ADSB_EMITTER_TYPE_POINT_OBSTACLE\x10\x13\x32\x91\x02\n\x12TransponderService\x12|\n\x14SubscribeTransponder\x12\x33.mavsdk.rpc.transponder.SubscribeTransponderRequest\x1a+.mavsdk.rpc.transponder.TransponderResponse\"\x00\x30\x01\x12}\n\x12SetRateTransponder\x12\x31.mavsdk.rpc.transponder.SetRateTransponderRequest\x1a\x32.mavsdk.rpc.transponder.SetRateTransponderResponse\"\x00\x42)\n\x15io.mavsdk.transponderB\x10TransponderProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dtransponder/transponder.proto\x12\x16mavsdk.rpc.transponder\"\x1d\n\x1bSubscribeTransponderRequest\"O\n\x13TransponderResponse\x12\x38\n\x0btransponder\x18\x01 \x01(\x0b\x32#.mavsdk.rpc.transponder.AdsbVehicle\",\n\x19SetRateTransponderRequest\x12\x0f\n\x07rate_hz\x18\x01 \x01(\x01\"c\n\x1aSetRateTransponderResponse\x12\x45\n\x12transponder_result\x18\x01 \x01(\x0b\x32).mavsdk.rpc.transponder.TransponderResult\"\xf4\x02\n\x0b\x41\x64sbVehicle\x12\x14\n\x0cicao_address\x18\x01 \x01(\r\x12\x14\n\x0clatitude_deg\x18\x02 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x03 \x01(\x01\x12?\n\raltitude_type\x18\x04 \x01(\x0e\x32(.mavsdk.rpc.transponder.AdsbAltitudeType\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x05 \x01(\x02\x12\x13\n\x0bheading_deg\x18\x06 \x01(\x02\x12\x1f\n\x17horizontal_velocity_m_s\x18\x07 \x01(\x02\x12\x1d\n\x15vertical_velocity_m_s\x18\x08 \x01(\x02\x12\x10\n\x08\x63\x61llsign\x18\t \x01(\t\x12=\n\x0c\x65mitter_type\x18\n \x01(\x0e\x32\'.mavsdk.rpc.transponder.AdsbEmitterType\x12\x0e\n\x06squawk\x18\r \x01(\r\x12\x0e\n\x06tslc_s\x18\x0e \x01(\r\"\x8f\x02\n\x11TransponderResult\x12@\n\x06result\x18\x01 \x01(\x0e\x32\x30.mavsdk.rpc.transponder.TransponderResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xa3\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12\x12\n\x0eRESULT_TIMEOUT\x10\x06*\xad\x05\n\x0f\x41\x64sbEmitterType\x12\x1d\n\x19\x41\x44SB_EMITTER_TYPE_NO_INFO\x10\x00\x12\x1b\n\x17\x41\x44SB_EMITTER_TYPE_LIGHT\x10\x01\x12\x1b\n\x17\x41\x44SB_EMITTER_TYPE_SMALL\x10\x02\x12\x1b\n\x17\x41\x44SB_EMITTER_TYPE_LARGE\x10\x03\x12\'\n#ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE\x10\x04\x12\x1b\n\x17\x41\x44SB_EMITTER_TYPE_HEAVY\x10\x05\x12\"\n\x1e\x41\x44SB_EMITTER_TYPE_HIGHLY_MANUV\x10\x06\x12\x1f\n\x1b\x41\x44SB_EMITTER_TYPE_ROTOCRAFT\x10\x07\x12 \n\x1c\x41\x44SB_EMITTER_TYPE_UNASSIGNED\x10\x08\x12\x1c\n\x18\x41\x44SB_EMITTER_TYPE_GLIDER\x10\t\x12!\n\x1d\x41\x44SB_EMITTER_TYPE_LIGHTER_AIR\x10\n\x12\x1f\n\x1b\x41\x44SB_EMITTER_TYPE_PARACHUTE\x10\x0b\x12!\n\x1d\x41\x44SB_EMITTER_TYPE_ULTRA_LIGHT\x10\x0c\x12!\n\x1d\x41\x44SB_EMITTER_TYPE_UNASSIGNED2\x10\r\x12\x19\n\x15\x41\x44SB_EMITTER_TYPE_UAV\x10\x0e\x12\x1b\n\x17\x41\x44SB_EMITTER_TYPE_SPACE\x10\x0f\x12!\n\x1d\x41\x44SB_EMITTER_TYPE_UNASSGINED3\x10\x10\x12\'\n#ADSB_EMITTER_TYPE_EMERGENCY_SURFACE\x10\x11\x12%\n!ADSB_EMITTER_TYPE_SERVICE_SURFACE\x10\x12\x12$\n ADSB_EMITTER_TYPE_POINT_OBSTACLE\x10\x13*Y\n\x10\x41\x64sbAltitudeType\x12#\n\x1f\x41\x44SB_ALTITUDE_TYPE_PRESSURE_QNH\x10\x00\x12 \n\x1c\x41\x44SB_ALTITUDE_TYPE_GEOMETRIC\x10\x01\x32\x91\x02\n\x12TransponderService\x12|\n\x14SubscribeTransponder\x12\x33.mavsdk.rpc.transponder.SubscribeTransponderRequest\x1a+.mavsdk.rpc.transponder.TransponderResponse\"\x00\x30\x01\x12}\n\x12SetRateTransponder\x12\x31.mavsdk.rpc.transponder.SetRateTransponderRequest\x1a\x32.mavsdk.rpc.transponder.SetRateTransponderResponse\"\x00\x42)\n\x15io.mavsdk.transponderB\x10TransponderProtob\x06proto3') _ADSBEMITTERTYPE = DESCRIPTOR.enum_types_by_name['AdsbEmitterType'] AdsbEmitterType = enum_type_wrapper.EnumTypeWrapper(_ADSBEMITTERTYPE) +_ADSBALTITUDETYPE = DESCRIPTOR.enum_types_by_name['AdsbAltitudeType'] +AdsbAltitudeType = enum_type_wrapper.EnumTypeWrapper(_ADSBALTITUDETYPE) ADSB_EMITTER_TYPE_NO_INFO = 0 ADSB_EMITTER_TYPE_LIGHT = 1 ADSB_EMITTER_TYPE_SMALL = 2 @@ -39,6 +41,8 @@ ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17 ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18 ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19 +ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0 +ADSB_ALTITUDE_TYPE_GEOMETRIC = 1 _SUBSCRIBETRANSPONDERREQUEST = DESCRIPTOR.message_types_by_name['SubscribeTransponderRequest'] @@ -95,8 +99,10 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\025io.mavsdk.transponderB\020TransponderProto' - _ADSBEMITTERTYPE._serialized_start=901 - _ADSBEMITTERTYPE._serialized_end=1586 + _ADSBEMITTERTYPE._serialized_start=966 + _ADSBEMITTERTYPE._serialized_end=1651 + _ADSBALTITUDETYPE._serialized_start=1653 + _ADSBALTITUDETYPE._serialized_end=1742 _SUBSCRIBETRANSPONDERREQUEST._serialized_start=57 _SUBSCRIBETRANSPONDERREQUEST._serialized_end=86 _TRANSPONDERRESPONSE._serialized_start=88 @@ -106,11 +112,11 @@ _SETRATETRANSPONDERRESPONSE._serialized_start=215 _SETRATETRANSPONDERRESPONSE._serialized_end=314 _ADSBVEHICLE._serialized_start=317 - _ADSBVEHICLE._serialized_end=624 - _TRANSPONDERRESULT._serialized_start=627 - _TRANSPONDERRESULT._serialized_end=898 - _TRANSPONDERRESULT_RESULT._serialized_start=735 - _TRANSPONDERRESULT_RESULT._serialized_end=898 - _TRANSPONDERSERVICE._serialized_start=1589 - _TRANSPONDERSERVICE._serialized_end=1862 + _ADSBVEHICLE._serialized_end=689 + _TRANSPONDERRESULT._serialized_start=692 + _TRANSPONDERRESULT._serialized_end=963 + _TRANSPONDERRESULT_RESULT._serialized_start=800 + _TRANSPONDERRESULT_RESULT._serialized_end=963 + _TRANSPONDERSERVICE._serialized_start=1745 + _TRANSPONDERSERVICE._serialized_end=2018 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/winch.py b/mavsdk/winch.py new file mode 100644 index 00000000..e66ca037 --- /dev/null +++ b/mavsdk/winch.py @@ -0,0 +1,1021 @@ +# -*- coding: utf-8 -*- +# DO NOT EDIT! This file is auto-generated from +# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py +from ._base import AsyncBase +from . import winch_pb2, winch_pb2_grpc +from enum import Enum + + +class WinchAction(Enum): + """ + Winch Action type. + + Values + ------ + RELAXED + Allow motor to freewheel + + RELATIVE_LENGTH_CONTROL + Wind or unwind specified length of line, optionally using specified rate + + RATE_CONTROL + Wind or unwind line at specified rate + + LOCK + Perform the locking sequence to relieve motor while in the fully retracted position + + DELIVER + Sequence of drop, slow down, touch down, reel up, lock + + HOLD + Engage motor and hold current position + + RETRACT + Return the reel to the fully retracted position + + LOAD_LINE + Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold + + ABANDON_LINE + Spool out the entire length of the line + + LOAD_PAYLOAD + Spools out just enough to present the hook to the user to load the payload + + """ + + + RELAXED = 0 + RELATIVE_LENGTH_CONTROL = 1 + RATE_CONTROL = 2 + LOCK = 3 + DELIVER = 4 + HOLD = 5 + RETRACT = 6 + LOAD_LINE = 7 + ABANDON_LINE = 8 + LOAD_PAYLOAD = 9 + + def translate_to_rpc(self): + if self == WinchAction.RELAXED: + return winch_pb2.WINCH_ACTION_RELAXED + if self == WinchAction.RELATIVE_LENGTH_CONTROL: + return winch_pb2.WINCH_ACTION_RELATIVE_LENGTH_CONTROL + if self == WinchAction.RATE_CONTROL: + return winch_pb2.WINCH_ACTION_RATE_CONTROL + if self == WinchAction.LOCK: + return winch_pb2.WINCH_ACTION_LOCK + if self == WinchAction.DELIVER: + return winch_pb2.WINCH_ACTION_DELIVER + if self == WinchAction.HOLD: + return winch_pb2.WINCH_ACTION_HOLD + if self == WinchAction.RETRACT: + return winch_pb2.WINCH_ACTION_RETRACT + if self == WinchAction.LOAD_LINE: + return winch_pb2.WINCH_ACTION_LOAD_LINE + if self == WinchAction.ABANDON_LINE: + return winch_pb2.WINCH_ACTION_ABANDON_LINE + if self == WinchAction.LOAD_PAYLOAD: + return winch_pb2.WINCH_ACTION_LOAD_PAYLOAD + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == winch_pb2.WINCH_ACTION_RELAXED: + return WinchAction.RELAXED + if rpc_enum_value == winch_pb2.WINCH_ACTION_RELATIVE_LENGTH_CONTROL: + return WinchAction.RELATIVE_LENGTH_CONTROL + if rpc_enum_value == winch_pb2.WINCH_ACTION_RATE_CONTROL: + return WinchAction.RATE_CONTROL + if rpc_enum_value == winch_pb2.WINCH_ACTION_LOCK: + return WinchAction.LOCK + if rpc_enum_value == winch_pb2.WINCH_ACTION_DELIVER: + return WinchAction.DELIVER + if rpc_enum_value == winch_pb2.WINCH_ACTION_HOLD: + return WinchAction.HOLD + if rpc_enum_value == winch_pb2.WINCH_ACTION_RETRACT: + return WinchAction.RETRACT + if rpc_enum_value == winch_pb2.WINCH_ACTION_LOAD_LINE: + return WinchAction.LOAD_LINE + if rpc_enum_value == winch_pb2.WINCH_ACTION_ABANDON_LINE: + return WinchAction.ABANDON_LINE + if rpc_enum_value == winch_pb2.WINCH_ACTION_LOAD_PAYLOAD: + return WinchAction.LOAD_PAYLOAD + + def __str__(self): + return self.name + + +class StatusFlags: + """ + Winch Status Flags. + + The status flags are defined in mavlink + https://mavlink.io/en/messages/common.html#MAV_WINCH_STATUS_FLAG. + + Multiple status fields can be set simultaneously. Mavlink does + not specify which states are mutually exclusive. + + Parameters + ---------- + healthy : bool + Winch is healthy + + fully_retracted : bool + Winch line is fully retracted + + moving : bool + Winch motor is moving + + clutch_engaged : bool + Winch clutch is engaged allowing motor to move freely + + locked : bool + Winch is locked by locking mechanism + + dropping : bool + Winch is gravity dropping payload + + arresting : bool + Winch is arresting payload descent + + ground_sense : bool + Winch is using torque measurements to sense the ground + + retracting : bool + Winch is returning to the fully retracted position + + redeliver : bool + Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING. + + abandon_line : bool + Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold. + + locking : bool + Winch is engaging the locking mechanism + + load_line : bool + Winch is spooling on line + + load_payload : bool + Winch is loading a payload + + """ + + + + def __init__( + self, + healthy, + fully_retracted, + moving, + clutch_engaged, + locked, + dropping, + arresting, + ground_sense, + retracting, + redeliver, + abandon_line, + locking, + load_line, + load_payload): + """ Initializes the StatusFlags object """ + self.healthy = healthy + self.fully_retracted = fully_retracted + self.moving = moving + self.clutch_engaged = clutch_engaged + self.locked = locked + self.dropping = dropping + self.arresting = arresting + self.ground_sense = ground_sense + self.retracting = retracting + self.redeliver = redeliver + self.abandon_line = abandon_line + self.locking = locking + self.load_line = load_line + self.load_payload = load_payload + + def __eq__(self, to_compare): + """ Checks if two StatusFlags are the same """ + try: + # Try to compare - this likely fails when it is compared to a non + # StatusFlags object + return \ + (self.healthy == to_compare.healthy) and \ + (self.fully_retracted == to_compare.fully_retracted) and \ + (self.moving == to_compare.moving) and \ + (self.clutch_engaged == to_compare.clutch_engaged) and \ + (self.locked == to_compare.locked) and \ + (self.dropping == to_compare.dropping) and \ + (self.arresting == to_compare.arresting) and \ + (self.ground_sense == to_compare.ground_sense) and \ + (self.retracting == to_compare.retracting) and \ + (self.redeliver == to_compare.redeliver) and \ + (self.abandon_line == to_compare.abandon_line) and \ + (self.locking == to_compare.locking) and \ + (self.load_line == to_compare.load_line) and \ + (self.load_payload == to_compare.load_payload) + + except AttributeError: + return False + + def __str__(self): + """ StatusFlags in string representation """ + struct_repr = ", ".join([ + "healthy: " + str(self.healthy), + "fully_retracted: " + str(self.fully_retracted), + "moving: " + str(self.moving), + "clutch_engaged: " + str(self.clutch_engaged), + "locked: " + str(self.locked), + "dropping: " + str(self.dropping), + "arresting: " + str(self.arresting), + "ground_sense: " + str(self.ground_sense), + "retracting: " + str(self.retracting), + "redeliver: " + str(self.redeliver), + "abandon_line: " + str(self.abandon_line), + "locking: " + str(self.locking), + "load_line: " + str(self.load_line), + "load_payload: " + str(self.load_payload) + ]) + + return f"StatusFlags: [{struct_repr}]" + + @staticmethod + def translate_from_rpc(rpcStatusFlags): + """ Translates a gRPC struct to the SDK equivalent """ + return StatusFlags( + + rpcStatusFlags.healthy, + + + rpcStatusFlags.fully_retracted, + + + rpcStatusFlags.moving, + + + rpcStatusFlags.clutch_engaged, + + + rpcStatusFlags.locked, + + + rpcStatusFlags.dropping, + + + rpcStatusFlags.arresting, + + + rpcStatusFlags.ground_sense, + + + rpcStatusFlags.retracting, + + + rpcStatusFlags.redeliver, + + + rpcStatusFlags.abandon_line, + + + rpcStatusFlags.locking, + + + rpcStatusFlags.load_line, + + + rpcStatusFlags.load_payload + ) + + def translate_to_rpc(self, rpcStatusFlags): + """ Translates this SDK object into its gRPC equivalent """ + + + + + rpcStatusFlags.healthy = self.healthy + + + + + + rpcStatusFlags.fully_retracted = self.fully_retracted + + + + + + rpcStatusFlags.moving = self.moving + + + + + + rpcStatusFlags.clutch_engaged = self.clutch_engaged + + + + + + rpcStatusFlags.locked = self.locked + + + + + + rpcStatusFlags.dropping = self.dropping + + + + + + rpcStatusFlags.arresting = self.arresting + + + + + + rpcStatusFlags.ground_sense = self.ground_sense + + + + + + rpcStatusFlags.retracting = self.retracting + + + + + + rpcStatusFlags.redeliver = self.redeliver + + + + + + rpcStatusFlags.abandon_line = self.abandon_line + + + + + + rpcStatusFlags.locking = self.locking + + + + + + rpcStatusFlags.load_line = self.load_line + + + + + + rpcStatusFlags.load_payload = self.load_payload + + + + + +class Status: + """ + Status type. + + Parameters + ---------- + time_usec : uint64_t + Time in usec + + line_length_m : float + Length of the line in meters + + speed_m_s : float + Speed in meters per second + + tension_kg : float + Tension in kilograms + + voltage_v : float + Voltage in volts + + current_a : float + Current in amperes + + temperature_c : int32_t + Temperature in Celsius + + status_flags : StatusFlags + Status flags + + """ + + + + def __init__( + self, + time_usec, + line_length_m, + speed_m_s, + tension_kg, + voltage_v, + current_a, + temperature_c, + status_flags): + """ Initializes the Status object """ + self.time_usec = time_usec + self.line_length_m = line_length_m + self.speed_m_s = speed_m_s + self.tension_kg = tension_kg + self.voltage_v = voltage_v + self.current_a = current_a + self.temperature_c = temperature_c + self.status_flags = status_flags + + def __eq__(self, to_compare): + """ Checks if two Status are the same """ + try: + # Try to compare - this likely fails when it is compared to a non + # Status object + return \ + (self.time_usec == to_compare.time_usec) and \ + (self.line_length_m == to_compare.line_length_m) and \ + (self.speed_m_s == to_compare.speed_m_s) and \ + (self.tension_kg == to_compare.tension_kg) and \ + (self.voltage_v == to_compare.voltage_v) and \ + (self.current_a == to_compare.current_a) and \ + (self.temperature_c == to_compare.temperature_c) and \ + (self.status_flags == to_compare.status_flags) + + except AttributeError: + return False + + def __str__(self): + """ Status in string representation """ + struct_repr = ", ".join([ + "time_usec: " + str(self.time_usec), + "line_length_m: " + str(self.line_length_m), + "speed_m_s: " + str(self.speed_m_s), + "tension_kg: " + str(self.tension_kg), + "voltage_v: " + str(self.voltage_v), + "current_a: " + str(self.current_a), + "temperature_c: " + str(self.temperature_c), + "status_flags: " + str(self.status_flags) + ]) + + return f"Status: [{struct_repr}]" + + @staticmethod + def translate_from_rpc(rpcStatus): + """ Translates a gRPC struct to the SDK equivalent """ + return Status( + + rpcStatus.time_usec, + + + rpcStatus.line_length_m, + + + rpcStatus.speed_m_s, + + + rpcStatus.tension_kg, + + + rpcStatus.voltage_v, + + + rpcStatus.current_a, + + + rpcStatus.temperature_c, + + + StatusFlags.translate_from_rpc(rpcStatus.status_flags) + ) + + def translate_to_rpc(self, rpcStatus): + """ Translates this SDK object into its gRPC equivalent """ + + + + + rpcStatus.time_usec = self.time_usec + + + + + + rpcStatus.line_length_m = self.line_length_m + + + + + + rpcStatus.speed_m_s = self.speed_m_s + + + + + + rpcStatus.tension_kg = self.tension_kg + + + + + + rpcStatus.voltage_v = self.voltage_v + + + + + + rpcStatus.current_a = self.current_a + + + + + + rpcStatus.temperature_c = self.temperature_c + + + + + + self.status_flags.translate_to_rpc(rpcStatus.status_flags) + + + + + +class WinchResult: + """ + Result type. + + Parameters + ---------- + result : Result + Result enum value + + result_str : std::string + Human-readable English string describing the result + + """ + + + + class Result(Enum): + """ + Possible results returned for winch action requests. + + Values + ------ + UNKNOWN + Unknown result + + SUCCESS + Request was successful + + NO_SYSTEM + No system is connected + + BUSY + Temporarily rejected + + TIMEOUT + Request timed out + + UNSUPPORTED + Action not supported + + FAILED + Action failed + + """ + + + UNKNOWN = 0 + SUCCESS = 1 + NO_SYSTEM = 2 + BUSY = 3 + TIMEOUT = 4 + UNSUPPORTED = 5 + FAILED = 6 + + def translate_to_rpc(self): + if self == WinchResult.Result.UNKNOWN: + return winch_pb2.WinchResult.RESULT_UNKNOWN + if self == WinchResult.Result.SUCCESS: + return winch_pb2.WinchResult.RESULT_SUCCESS + if self == WinchResult.Result.NO_SYSTEM: + return winch_pb2.WinchResult.RESULT_NO_SYSTEM + if self == WinchResult.Result.BUSY: + return winch_pb2.WinchResult.RESULT_BUSY + if self == WinchResult.Result.TIMEOUT: + return winch_pb2.WinchResult.RESULT_TIMEOUT + if self == WinchResult.Result.UNSUPPORTED: + return winch_pb2.WinchResult.RESULT_UNSUPPORTED + if self == WinchResult.Result.FAILED: + return winch_pb2.WinchResult.RESULT_FAILED + + @staticmethod + def translate_from_rpc(rpc_enum_value): + """ Parses a gRPC response """ + if rpc_enum_value == winch_pb2.WinchResult.RESULT_UNKNOWN: + return WinchResult.Result.UNKNOWN + if rpc_enum_value == winch_pb2.WinchResult.RESULT_SUCCESS: + return WinchResult.Result.SUCCESS + if rpc_enum_value == winch_pb2.WinchResult.RESULT_NO_SYSTEM: + return WinchResult.Result.NO_SYSTEM + if rpc_enum_value == winch_pb2.WinchResult.RESULT_BUSY: + return WinchResult.Result.BUSY + if rpc_enum_value == winch_pb2.WinchResult.RESULT_TIMEOUT: + return WinchResult.Result.TIMEOUT + if rpc_enum_value == winch_pb2.WinchResult.RESULT_UNSUPPORTED: + return WinchResult.Result.UNSUPPORTED + if rpc_enum_value == winch_pb2.WinchResult.RESULT_FAILED: + return WinchResult.Result.FAILED + + def __str__(self): + return self.name + + + def __init__( + self, + result, + result_str): + """ Initializes the WinchResult object """ + self.result = result + self.result_str = result_str + + def __eq__(self, to_compare): + """ Checks if two WinchResult are the same """ + try: + # Try to compare - this likely fails when it is compared to a non + # WinchResult object + return \ + (self.result == to_compare.result) and \ + (self.result_str == to_compare.result_str) + + except AttributeError: + return False + + def __str__(self): + """ WinchResult in string representation """ + struct_repr = ", ".join([ + "result: " + str(self.result), + "result_str: " + str(self.result_str) + ]) + + return f"WinchResult: [{struct_repr}]" + + @staticmethod + def translate_from_rpc(rpcWinchResult): + """ Translates a gRPC struct to the SDK equivalent """ + return WinchResult( + + WinchResult.Result.translate_from_rpc(rpcWinchResult.result), + + + rpcWinchResult.result_str + ) + + def translate_to_rpc(self, rpcWinchResult): + """ Translates this SDK object into its gRPC equivalent """ + + + + + rpcWinchResult.result = self.result.translate_to_rpc() + + + + + + rpcWinchResult.result_str = self.result_str + + + + + + +class WinchError(Exception): + """ Raised when a WinchResult is a fail code """ + + def __init__(self, result, origin, *params): + self._result = result + self._origin = origin + self._params = params + + def __str__(self): + return f"{self._result.result}: '{self._result.result_str}'; origin: {self._origin}; params: {self._params}" + + +class Winch(AsyncBase): + """ + Allows users to send winch actions, as well as receive status information from winch systems. + + Generated by dcsdkgen - MAVSDK Winch API + """ + + # Plugin name + name = "Winch" + + def _setup_stub(self, channel): + """ Setups the api stub """ + self._stub = winch_pb2_grpc.WinchServiceStub(channel) + + + def _extract_result(self, response): + """ Returns the response status and description """ + return WinchResult.translate_from_rpc(response.winch_result) + + + async def status(self): + """ + Subscribe to 'winch status' updates. + + Yields + ------- + status : Status + The next 'winch status' state + + + """ + + request = winch_pb2.SubscribeStatusRequest() + status_stream = self._stub.SubscribeStatus(request) + + try: + async for response in status_stream: + + + + yield Status.translate_from_rpc(response.status) + finally: + status_stream.cancel() + + async def relax(self, instance): + """ + Allow motor to freewheel. + + Parameters + ---------- + instance : uint32_t + + Raises + ------ + WinchError + If the request fails. The error contains the reason for the failure. + """ + + request = winch_pb2.RelaxRequest() + request.instance = instance + response = await self._stub.Relax(request) + + + result = self._extract_result(response) + + if result.result != WinchResult.Result.SUCCESS: + raise WinchError(result, "relax()", instance) + + + async def relative_length_control(self, instance, length_m, rate_m_s): + """ + Wind or unwind specified length of line, optionally using specified rate. + + Parameters + ---------- + instance : uint32_t + Instance ID of the winch addressed by this request + + length_m : float + Length of line to unwind or wind + + rate_m_s : float + Rate at which to wind or unwind the line + + Raises + ------ + WinchError + If the request fails. The error contains the reason for the failure. + """ + + request = winch_pb2.RelativeLengthControlRequest() + request.instance = instance + request.length_m = length_m + request.rate_m_s = rate_m_s + response = await self._stub.RelativeLengthControl(request) + + + result = self._extract_result(response) + + if result.result != WinchResult.Result.SUCCESS: + raise WinchError(result, "relative_length_control()", instance, length_m, rate_m_s) + + + async def rate_control(self, instance, rate_m_s): + """ + Wind or unwind line at specified rate. + + Parameters + ---------- + instance : uint32_t + + rate_m_s : float + Rate at which to wind or unwind the line + + Raises + ------ + WinchError + If the request fails. The error contains the reason for the failure. + """ + + request = winch_pb2.RateControlRequest() + request.instance = instance + request.rate_m_s = rate_m_s + response = await self._stub.RateControl(request) + + + result = self._extract_result(response) + + if result.result != WinchResult.Result.SUCCESS: + raise WinchError(result, "rate_control()", instance, rate_m_s) + + + async def lock(self, instance): + """ + Perform the locking sequence to relieve motor while in the fully retracted position. + + Parameters + ---------- + instance : uint32_t + + Raises + ------ + WinchError + If the request fails. The error contains the reason for the failure. + """ + + request = winch_pb2.LockRequest() + request.instance = instance + response = await self._stub.Lock(request) + + + result = self._extract_result(response) + + if result.result != WinchResult.Result.SUCCESS: + raise WinchError(result, "lock()", instance) + + + async def deliver(self, instance): + """ + Sequence of drop, slow down, touch down, reel up, lock. + + Parameters + ---------- + instance : uint32_t + + Raises + ------ + WinchError + If the request fails. The error contains the reason for the failure. + """ + + request = winch_pb2.DeliverRequest() + request.instance = instance + response = await self._stub.Deliver(request) + + + result = self._extract_result(response) + + if result.result != WinchResult.Result.SUCCESS: + raise WinchError(result, "deliver()", instance) + + + async def hold(self, instance): + """ + Engage motor and hold current position. + + Parameters + ---------- + instance : uint32_t + + Raises + ------ + WinchError + If the request fails. The error contains the reason for the failure. + """ + + request = winch_pb2.HoldRequest() + request.instance = instance + response = await self._stub.Hold(request) + + + result = self._extract_result(response) + + if result.result != WinchResult.Result.SUCCESS: + raise WinchError(result, "hold()", instance) + + + async def retract(self, instance): + """ + Return the reel to the fully retracted position. + + Parameters + ---------- + instance : uint32_t + + Raises + ------ + WinchError + If the request fails. The error contains the reason for the failure. + """ + + request = winch_pb2.RetractRequest() + request.instance = instance + response = await self._stub.Retract(request) + + + result = self._extract_result(response) + + if result.result != WinchResult.Result.SUCCESS: + raise WinchError(result, "retract()", instance) + + + async def load_line(self, instance): + """ + Load the reel with line. + + The winch will calculate the total loaded length and stop when the tension exceeds a threshold. + + Parameters + ---------- + instance : uint32_t + + Raises + ------ + WinchError + If the request fails. The error contains the reason for the failure. + """ + + request = winch_pb2.LoadLineRequest() + request.instance = instance + response = await self._stub.LoadLine(request) + + + result = self._extract_result(response) + + if result.result != WinchResult.Result.SUCCESS: + raise WinchError(result, "load_line()", instance) + + + async def abandon_line(self, instance): + """ + Spool out the entire length of the line. + + Parameters + ---------- + instance : uint32_t + + Raises + ------ + WinchError + If the request fails. The error contains the reason for the failure. + """ + + request = winch_pb2.AbandonLineRequest() + request.instance = instance + response = await self._stub.AbandonLine(request) + + + result = self._extract_result(response) + + if result.result != WinchResult.Result.SUCCESS: + raise WinchError(result, "abandon_line()", instance) + + + async def load_payload(self, instance): + """ + Spools out just enough to present the hook to the user to load the payload. + + Parameters + ---------- + instance : uint32_t + + Raises + ------ + WinchError + If the request fails. The error contains the reason for the failure. + """ + + request = winch_pb2.LoadPayloadRequest() + request.instance = instance + response = await self._stub.LoadPayload(request) + + + result = self._extract_result(response) + + if result.result != WinchResult.Result.SUCCESS: + raise WinchError(result, "load_payload()", instance) + \ No newline at end of file diff --git a/mavsdk/winch_pb2.py b/mavsdk/winch_pb2.py new file mode 100644 index 00000000..76163c8e --- /dev/null +++ b/mavsdk/winch_pb2.py @@ -0,0 +1,299 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: winch/winch.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import mavsdk_options_pb2 as mavsdk__options__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11winch/winch.proto\x12\x10mavsdk.rpc.winch\x1a\x14mavsdk_options.proto\"\x18\n\x16SubscribeStatusRequest\":\n\x0eStatusResponse\x12(\n\x06status\x18\x01 \x01(\x0b\x32\x18.mavsdk.rpc.winch.Status\"\xa1\x02\n\x0bStatusFlags\x12\x0f\n\x07healthy\x18\x01 \x01(\x08\x12\x17\n\x0f\x66ully_retracted\x18\x02 \x01(\x08\x12\x0e\n\x06moving\x18\x03 \x01(\x08\x12\x16\n\x0e\x63lutch_engaged\x18\x04 \x01(\x08\x12\x0e\n\x06locked\x18\x05 \x01(\x08\x12\x10\n\x08\x64ropping\x18\x06 \x01(\x08\x12\x11\n\tarresting\x18\x07 \x01(\x08\x12\x14\n\x0cground_sense\x18\x08 \x01(\x08\x12\x12\n\nretracting\x18\t \x01(\x08\x12\x11\n\tredeliver\x18\n \x01(\x08\x12\x14\n\x0c\x61\x62\x61ndon_line\x18\x0b \x01(\x08\x12\x0f\n\x07locking\x18\x0c \x01(\x08\x12\x11\n\tload_line\x18\r \x01(\x08\x12\x14\n\x0cload_payload\x18\x0e \x01(\x08\"\xcb\x01\n\x06Status\x12\x11\n\ttime_usec\x18\x01 \x01(\x04\x12\x15\n\rline_length_m\x18\x02 \x01(\x02\x12\x11\n\tspeed_m_s\x18\x03 \x01(\x02\x12\x12\n\ntension_kg\x18\x04 \x01(\x02\x12\x11\n\tvoltage_v\x18\x05 \x01(\x02\x12\x11\n\tcurrent_a\x18\x06 \x01(\x02\x12\x15\n\rtemperature_c\x18\x07 \x01(\x05\x12\x33\n\x0cstatus_flags\x18\x08 \x01(\x0b\x32\x1d.mavsdk.rpc.winch.StatusFlags\" \n\x0cRelaxRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\"D\n\rRelaxResponse\x12\x33\n\x0cwinch_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.winch.WinchResult\"]\n\x1cRelativeLengthControlRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\x12\x10\n\x08length_m\x18\x02 \x01(\x02\x12\x19\n\x08rate_m_s\x18\x03 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"T\n\x1dRelativeLengthControlResponse\x12\x33\n\x0cwinch_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.winch.WinchResult\"8\n\x12RateControlRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\x12\x10\n\x08rate_m_s\x18\x02 \x01(\x02\"J\n\x13RateControlResponse\x12\x33\n\x0cwinch_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.winch.WinchResult\"\x1f\n\x0bLockRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\"C\n\x0cLockResponse\x12\x33\n\x0cwinch_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.winch.WinchResult\"\"\n\x0e\x44\x65liverRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\"F\n\x0f\x44\x65liverResponse\x12\x33\n\x0cwinch_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.winch.WinchResult\"\x1f\n\x0bHoldRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\"C\n\x0cHoldResponse\x12\x33\n\x0cwinch_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.winch.WinchResult\"\"\n\x0eRetractRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\"F\n\x0fRetractResponse\x12\x33\n\x0cwinch_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.winch.WinchResult\"#\n\x0fLoadLineRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\"G\n\x10LoadLineResponse\x12\x33\n\x0cwinch_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.winch.WinchResult\"&\n\x12\x41\x62\x61ndonLineRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\"J\n\x13\x41\x62\x61ndonLineResponse\x12\x33\n\x0cwinch_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.winch.WinchResult\"&\n\x12LoadPayloadRequest\x12\x10\n\x08instance\x18\x01 \x01(\r\"J\n\x13LoadPayloadResponse\x12\x33\n\x0cwinch_result\x18\x01 \x01(\x0b\x32\x1d.mavsdk.rpc.winch.WinchResult\"\xf0\x01\n\x0bWinchResult\x12\x34\n\x06result\x18\x01 \x01(\x0e\x32$.mavsdk.rpc.winch.WinchResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\x96\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x0f\n\x0bRESULT_BUSY\x10\x03\x12\x12\n\x0eRESULT_TIMEOUT\x10\x04\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x05\x12\x11\n\rRESULT_FAILED\x10\x06*\xac\x02\n\x0bWinchAction\x12\x18\n\x14WINCH_ACTION_RELAXED\x10\x00\x12(\n$WINCH_ACTION_RELATIVE_LENGTH_CONTROL\x10\x01\x12\x1d\n\x19WINCH_ACTION_RATE_CONTROL\x10\x02\x12\x15\n\x11WINCH_ACTION_LOCK\x10\x03\x12\x18\n\x14WINCH_ACTION_DELIVER\x10\x04\x12\x15\n\x11WINCH_ACTION_HOLD\x10\x05\x12\x18\n\x14WINCH_ACTION_RETRACT\x10\x06\x12\x1a\n\x16WINCH_ACTION_LOAD_LINE\x10\x07\x12\x1d\n\x19WINCH_ACTION_ABANDON_LINE\x10\x08\x12\x1d\n\x19WINCH_ACTION_LOAD_PAYLOAD\x10\t2\xde\x07\n\x0cWinchService\x12\x61\n\x0fSubscribeStatus\x12(.mavsdk.rpc.winch.SubscribeStatusRequest\x1a .mavsdk.rpc.winch.StatusResponse\"\x00\x30\x01\x12J\n\x05Relax\x12\x1e.mavsdk.rpc.winch.RelaxRequest\x1a\x1f.mavsdk.rpc.winch.RelaxResponse\"\x00\x12z\n\x15RelativeLengthControl\x12..mavsdk.rpc.winch.RelativeLengthControlRequest\x1a/.mavsdk.rpc.winch.RelativeLengthControlResponse\"\x00\x12\\\n\x0bRateControl\x12$.mavsdk.rpc.winch.RateControlRequest\x1a%.mavsdk.rpc.winch.RateControlResponse\"\x00\x12G\n\x04Lock\x12\x1d.mavsdk.rpc.winch.LockRequest\x1a\x1e.mavsdk.rpc.winch.LockResponse\"\x00\x12P\n\x07\x44\x65liver\x12 .mavsdk.rpc.winch.DeliverRequest\x1a!.mavsdk.rpc.winch.DeliverResponse\"\x00\x12G\n\x04Hold\x12\x1d.mavsdk.rpc.winch.HoldRequest\x1a\x1e.mavsdk.rpc.winch.HoldResponse\"\x00\x12P\n\x07Retract\x12 .mavsdk.rpc.winch.RetractRequest\x1a!.mavsdk.rpc.winch.RetractResponse\"\x00\x12S\n\x08LoadLine\x12!.mavsdk.rpc.winch.LoadLineRequest\x1a\".mavsdk.rpc.winch.LoadLineResponse\"\x00\x12\\\n\x0b\x41\x62\x61ndonLine\x12$.mavsdk.rpc.winch.AbandonLineRequest\x1a%.mavsdk.rpc.winch.AbandonLineResponse\"\x00\x12\\\n\x0bLoadPayload\x12$.mavsdk.rpc.winch.LoadPayloadRequest\x1a%.mavsdk.rpc.winch.LoadPayloadResponse\"\x00\x42\x1d\n\x0fio.mavsdk.winchB\nWinchProtob\x06proto3') + +_WINCHACTION = DESCRIPTOR.enum_types_by_name['WinchAction'] +WinchAction = enum_type_wrapper.EnumTypeWrapper(_WINCHACTION) +WINCH_ACTION_RELAXED = 0 +WINCH_ACTION_RELATIVE_LENGTH_CONTROL = 1 +WINCH_ACTION_RATE_CONTROL = 2 +WINCH_ACTION_LOCK = 3 +WINCH_ACTION_DELIVER = 4 +WINCH_ACTION_HOLD = 5 +WINCH_ACTION_RETRACT = 6 +WINCH_ACTION_LOAD_LINE = 7 +WINCH_ACTION_ABANDON_LINE = 8 +WINCH_ACTION_LOAD_PAYLOAD = 9 + + +_SUBSCRIBESTATUSREQUEST = DESCRIPTOR.message_types_by_name['SubscribeStatusRequest'] +_STATUSRESPONSE = DESCRIPTOR.message_types_by_name['StatusResponse'] +_STATUSFLAGS = DESCRIPTOR.message_types_by_name['StatusFlags'] +_STATUS = DESCRIPTOR.message_types_by_name['Status'] +_RELAXREQUEST = DESCRIPTOR.message_types_by_name['RelaxRequest'] +_RELAXRESPONSE = DESCRIPTOR.message_types_by_name['RelaxResponse'] +_RELATIVELENGTHCONTROLREQUEST = DESCRIPTOR.message_types_by_name['RelativeLengthControlRequest'] +_RELATIVELENGTHCONTROLRESPONSE = DESCRIPTOR.message_types_by_name['RelativeLengthControlResponse'] +_RATECONTROLREQUEST = DESCRIPTOR.message_types_by_name['RateControlRequest'] +_RATECONTROLRESPONSE = DESCRIPTOR.message_types_by_name['RateControlResponse'] +_LOCKREQUEST = DESCRIPTOR.message_types_by_name['LockRequest'] +_LOCKRESPONSE = DESCRIPTOR.message_types_by_name['LockResponse'] +_DELIVERREQUEST = DESCRIPTOR.message_types_by_name['DeliverRequest'] +_DELIVERRESPONSE = DESCRIPTOR.message_types_by_name['DeliverResponse'] +_HOLDREQUEST = DESCRIPTOR.message_types_by_name['HoldRequest'] +_HOLDRESPONSE = DESCRIPTOR.message_types_by_name['HoldResponse'] +_RETRACTREQUEST = DESCRIPTOR.message_types_by_name['RetractRequest'] +_RETRACTRESPONSE = DESCRIPTOR.message_types_by_name['RetractResponse'] +_LOADLINEREQUEST = DESCRIPTOR.message_types_by_name['LoadLineRequest'] +_LOADLINERESPONSE = DESCRIPTOR.message_types_by_name['LoadLineResponse'] +_ABANDONLINEREQUEST = DESCRIPTOR.message_types_by_name['AbandonLineRequest'] +_ABANDONLINERESPONSE = DESCRIPTOR.message_types_by_name['AbandonLineResponse'] +_LOADPAYLOADREQUEST = DESCRIPTOR.message_types_by_name['LoadPayloadRequest'] +_LOADPAYLOADRESPONSE = DESCRIPTOR.message_types_by_name['LoadPayloadResponse'] +_WINCHRESULT = DESCRIPTOR.message_types_by_name['WinchResult'] +_WINCHRESULT_RESULT = _WINCHRESULT.enum_types_by_name['Result'] +SubscribeStatusRequest = _reflection.GeneratedProtocolMessageType('SubscribeStatusRequest', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIBESTATUSREQUEST, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.SubscribeStatusRequest) + }) +_sym_db.RegisterMessage(SubscribeStatusRequest) + +StatusResponse = _reflection.GeneratedProtocolMessageType('StatusResponse', (_message.Message,), { + 'DESCRIPTOR' : _STATUSRESPONSE, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.StatusResponse) + }) +_sym_db.RegisterMessage(StatusResponse) + +StatusFlags = _reflection.GeneratedProtocolMessageType('StatusFlags', (_message.Message,), { + 'DESCRIPTOR' : _STATUSFLAGS, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.StatusFlags) + }) +_sym_db.RegisterMessage(StatusFlags) + +Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), { + 'DESCRIPTOR' : _STATUS, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.Status) + }) +_sym_db.RegisterMessage(Status) + +RelaxRequest = _reflection.GeneratedProtocolMessageType('RelaxRequest', (_message.Message,), { + 'DESCRIPTOR' : _RELAXREQUEST, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RelaxRequest) + }) +_sym_db.RegisterMessage(RelaxRequest) + +RelaxResponse = _reflection.GeneratedProtocolMessageType('RelaxResponse', (_message.Message,), { + 'DESCRIPTOR' : _RELAXRESPONSE, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RelaxResponse) + }) +_sym_db.RegisterMessage(RelaxResponse) + +RelativeLengthControlRequest = _reflection.GeneratedProtocolMessageType('RelativeLengthControlRequest', (_message.Message,), { + 'DESCRIPTOR' : _RELATIVELENGTHCONTROLREQUEST, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RelativeLengthControlRequest) + }) +_sym_db.RegisterMessage(RelativeLengthControlRequest) + +RelativeLengthControlResponse = _reflection.GeneratedProtocolMessageType('RelativeLengthControlResponse', (_message.Message,), { + 'DESCRIPTOR' : _RELATIVELENGTHCONTROLRESPONSE, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RelativeLengthControlResponse) + }) +_sym_db.RegisterMessage(RelativeLengthControlResponse) + +RateControlRequest = _reflection.GeneratedProtocolMessageType('RateControlRequest', (_message.Message,), { + 'DESCRIPTOR' : _RATECONTROLREQUEST, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RateControlRequest) + }) +_sym_db.RegisterMessage(RateControlRequest) + +RateControlResponse = _reflection.GeneratedProtocolMessageType('RateControlResponse', (_message.Message,), { + 'DESCRIPTOR' : _RATECONTROLRESPONSE, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RateControlResponse) + }) +_sym_db.RegisterMessage(RateControlResponse) + +LockRequest = _reflection.GeneratedProtocolMessageType('LockRequest', (_message.Message,), { + 'DESCRIPTOR' : _LOCKREQUEST, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LockRequest) + }) +_sym_db.RegisterMessage(LockRequest) + +LockResponse = _reflection.GeneratedProtocolMessageType('LockResponse', (_message.Message,), { + 'DESCRIPTOR' : _LOCKRESPONSE, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LockResponse) + }) +_sym_db.RegisterMessage(LockResponse) + +DeliverRequest = _reflection.GeneratedProtocolMessageType('DeliverRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELIVERREQUEST, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.DeliverRequest) + }) +_sym_db.RegisterMessage(DeliverRequest) + +DeliverResponse = _reflection.GeneratedProtocolMessageType('DeliverResponse', (_message.Message,), { + 'DESCRIPTOR' : _DELIVERRESPONSE, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.DeliverResponse) + }) +_sym_db.RegisterMessage(DeliverResponse) + +HoldRequest = _reflection.GeneratedProtocolMessageType('HoldRequest', (_message.Message,), { + 'DESCRIPTOR' : _HOLDREQUEST, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.HoldRequest) + }) +_sym_db.RegisterMessage(HoldRequest) + +HoldResponse = _reflection.GeneratedProtocolMessageType('HoldResponse', (_message.Message,), { + 'DESCRIPTOR' : _HOLDRESPONSE, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.HoldResponse) + }) +_sym_db.RegisterMessage(HoldResponse) + +RetractRequest = _reflection.GeneratedProtocolMessageType('RetractRequest', (_message.Message,), { + 'DESCRIPTOR' : _RETRACTREQUEST, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RetractRequest) + }) +_sym_db.RegisterMessage(RetractRequest) + +RetractResponse = _reflection.GeneratedProtocolMessageType('RetractResponse', (_message.Message,), { + 'DESCRIPTOR' : _RETRACTRESPONSE, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RetractResponse) + }) +_sym_db.RegisterMessage(RetractResponse) + +LoadLineRequest = _reflection.GeneratedProtocolMessageType('LoadLineRequest', (_message.Message,), { + 'DESCRIPTOR' : _LOADLINEREQUEST, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LoadLineRequest) + }) +_sym_db.RegisterMessage(LoadLineRequest) + +LoadLineResponse = _reflection.GeneratedProtocolMessageType('LoadLineResponse', (_message.Message,), { + 'DESCRIPTOR' : _LOADLINERESPONSE, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LoadLineResponse) + }) +_sym_db.RegisterMessage(LoadLineResponse) + +AbandonLineRequest = _reflection.GeneratedProtocolMessageType('AbandonLineRequest', (_message.Message,), { + 'DESCRIPTOR' : _ABANDONLINEREQUEST, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.AbandonLineRequest) + }) +_sym_db.RegisterMessage(AbandonLineRequest) + +AbandonLineResponse = _reflection.GeneratedProtocolMessageType('AbandonLineResponse', (_message.Message,), { + 'DESCRIPTOR' : _ABANDONLINERESPONSE, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.AbandonLineResponse) + }) +_sym_db.RegisterMessage(AbandonLineResponse) + +LoadPayloadRequest = _reflection.GeneratedProtocolMessageType('LoadPayloadRequest', (_message.Message,), { + 'DESCRIPTOR' : _LOADPAYLOADREQUEST, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LoadPayloadRequest) + }) +_sym_db.RegisterMessage(LoadPayloadRequest) + +LoadPayloadResponse = _reflection.GeneratedProtocolMessageType('LoadPayloadResponse', (_message.Message,), { + 'DESCRIPTOR' : _LOADPAYLOADRESPONSE, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LoadPayloadResponse) + }) +_sym_db.RegisterMessage(LoadPayloadResponse) + +WinchResult = _reflection.GeneratedProtocolMessageType('WinchResult', (_message.Message,), { + 'DESCRIPTOR' : _WINCHRESULT, + '__module__' : 'winch.winch_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.WinchResult) + }) +_sym_db.RegisterMessage(WinchResult) + +_WINCHSERVICE = DESCRIPTOR.services_by_name['WinchService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\017io.mavsdk.winchB\nWinchProto' + _RELATIVELENGTHCONTROLREQUEST.fields_by_name['rate_m_s']._options = None + _RELATIVELENGTHCONTROLREQUEST.fields_by_name['rate_m_s']._serialized_options = b'\202\265\030\003NaN' + _WINCHACTION._serialized_start=2070 + _WINCHACTION._serialized_end=2370 + _SUBSCRIBESTATUSREQUEST._serialized_start=61 + _SUBSCRIBESTATUSREQUEST._serialized_end=85 + _STATUSRESPONSE._serialized_start=87 + _STATUSRESPONSE._serialized_end=145 + _STATUSFLAGS._serialized_start=148 + _STATUSFLAGS._serialized_end=437 + _STATUS._serialized_start=440 + _STATUS._serialized_end=643 + _RELAXREQUEST._serialized_start=645 + _RELAXREQUEST._serialized_end=677 + _RELAXRESPONSE._serialized_start=679 + _RELAXRESPONSE._serialized_end=747 + _RELATIVELENGTHCONTROLREQUEST._serialized_start=749 + _RELATIVELENGTHCONTROLREQUEST._serialized_end=842 + _RELATIVELENGTHCONTROLRESPONSE._serialized_start=844 + _RELATIVELENGTHCONTROLRESPONSE._serialized_end=928 + _RATECONTROLREQUEST._serialized_start=930 + _RATECONTROLREQUEST._serialized_end=986 + _RATECONTROLRESPONSE._serialized_start=988 + _RATECONTROLRESPONSE._serialized_end=1062 + _LOCKREQUEST._serialized_start=1064 + _LOCKREQUEST._serialized_end=1095 + _LOCKRESPONSE._serialized_start=1097 + _LOCKRESPONSE._serialized_end=1164 + _DELIVERREQUEST._serialized_start=1166 + _DELIVERREQUEST._serialized_end=1200 + _DELIVERRESPONSE._serialized_start=1202 + _DELIVERRESPONSE._serialized_end=1272 + _HOLDREQUEST._serialized_start=1274 + _HOLDREQUEST._serialized_end=1305 + _HOLDRESPONSE._serialized_start=1307 + _HOLDRESPONSE._serialized_end=1374 + _RETRACTREQUEST._serialized_start=1376 + _RETRACTREQUEST._serialized_end=1410 + _RETRACTRESPONSE._serialized_start=1412 + _RETRACTRESPONSE._serialized_end=1482 + _LOADLINEREQUEST._serialized_start=1484 + _LOADLINEREQUEST._serialized_end=1519 + _LOADLINERESPONSE._serialized_start=1521 + _LOADLINERESPONSE._serialized_end=1592 + _ABANDONLINEREQUEST._serialized_start=1594 + _ABANDONLINEREQUEST._serialized_end=1632 + _ABANDONLINERESPONSE._serialized_start=1634 + _ABANDONLINERESPONSE._serialized_end=1708 + _LOADPAYLOADREQUEST._serialized_start=1710 + _LOADPAYLOADREQUEST._serialized_end=1748 + _LOADPAYLOADRESPONSE._serialized_start=1750 + _LOADPAYLOADRESPONSE._serialized_end=1824 + _WINCHRESULT._serialized_start=1827 + _WINCHRESULT._serialized_end=2067 + _WINCHRESULT_RESULT._serialized_start=1917 + _WINCHRESULT_RESULT._serialized_end=2067 + _WINCHSERVICE._serialized_start=2373 + _WINCHSERVICE._serialized_end=3363 +# @@protoc_insertion_point(module_scope) diff --git a/mavsdk/winch_pb2_grpc.py b/mavsdk/winch_pb2_grpc.py new file mode 100644 index 00000000..cdbca8d3 --- /dev/null +++ b/mavsdk/winch_pb2_grpc.py @@ -0,0 +1,428 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import winch_pb2 as winch_dot_winch__pb2 + + +class WinchServiceStub(object): + """ + Allows users to send winch actions, as well as receive status information from winch systems. + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.SubscribeStatus = channel.unary_stream( + '/mavsdk.rpc.winch.WinchService/SubscribeStatus', + request_serializer=winch_dot_winch__pb2.SubscribeStatusRequest.SerializeToString, + response_deserializer=winch_dot_winch__pb2.StatusResponse.FromString, + ) + self.Relax = channel.unary_unary( + '/mavsdk.rpc.winch.WinchService/Relax', + request_serializer=winch_dot_winch__pb2.RelaxRequest.SerializeToString, + response_deserializer=winch_dot_winch__pb2.RelaxResponse.FromString, + ) + self.RelativeLengthControl = channel.unary_unary( + '/mavsdk.rpc.winch.WinchService/RelativeLengthControl', + request_serializer=winch_dot_winch__pb2.RelativeLengthControlRequest.SerializeToString, + response_deserializer=winch_dot_winch__pb2.RelativeLengthControlResponse.FromString, + ) + self.RateControl = channel.unary_unary( + '/mavsdk.rpc.winch.WinchService/RateControl', + request_serializer=winch_dot_winch__pb2.RateControlRequest.SerializeToString, + response_deserializer=winch_dot_winch__pb2.RateControlResponse.FromString, + ) + self.Lock = channel.unary_unary( + '/mavsdk.rpc.winch.WinchService/Lock', + request_serializer=winch_dot_winch__pb2.LockRequest.SerializeToString, + response_deserializer=winch_dot_winch__pb2.LockResponse.FromString, + ) + self.Deliver = channel.unary_unary( + '/mavsdk.rpc.winch.WinchService/Deliver', + request_serializer=winch_dot_winch__pb2.DeliverRequest.SerializeToString, + response_deserializer=winch_dot_winch__pb2.DeliverResponse.FromString, + ) + self.Hold = channel.unary_unary( + '/mavsdk.rpc.winch.WinchService/Hold', + request_serializer=winch_dot_winch__pb2.HoldRequest.SerializeToString, + response_deserializer=winch_dot_winch__pb2.HoldResponse.FromString, + ) + self.Retract = channel.unary_unary( + '/mavsdk.rpc.winch.WinchService/Retract', + request_serializer=winch_dot_winch__pb2.RetractRequest.SerializeToString, + response_deserializer=winch_dot_winch__pb2.RetractResponse.FromString, + ) + self.LoadLine = channel.unary_unary( + '/mavsdk.rpc.winch.WinchService/LoadLine', + request_serializer=winch_dot_winch__pb2.LoadLineRequest.SerializeToString, + response_deserializer=winch_dot_winch__pb2.LoadLineResponse.FromString, + ) + self.AbandonLine = channel.unary_unary( + '/mavsdk.rpc.winch.WinchService/AbandonLine', + request_serializer=winch_dot_winch__pb2.AbandonLineRequest.SerializeToString, + response_deserializer=winch_dot_winch__pb2.AbandonLineResponse.FromString, + ) + self.LoadPayload = channel.unary_unary( + '/mavsdk.rpc.winch.WinchService/LoadPayload', + request_serializer=winch_dot_winch__pb2.LoadPayloadRequest.SerializeToString, + response_deserializer=winch_dot_winch__pb2.LoadPayloadResponse.FromString, + ) + + +class WinchServiceServicer(object): + """ + Allows users to send winch actions, as well as receive status information from winch systems. + + """ + + def SubscribeStatus(self, request, context): + """Subscribe to 'winch status' updates. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Relax(self, request, context): + """ + Allow motor to freewheel. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RelativeLengthControl(self, request, context): + """ + Wind or unwind specified length of line, optionally using specified rate. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RateControl(self, request, context): + """ + Wind or unwind line at specified rate. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Lock(self, request, context): + """ + Perform the locking sequence to relieve motor while in the fully retracted position. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Deliver(self, request, context): + """ + Sequence of drop, slow down, touch down, reel up, lock. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Hold(self, request, context): + """ + Engage motor and hold current position. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Retract(self, request, context): + """ + Return the reel to the fully retracted position. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def LoadLine(self, request, context): + """ + Load the reel with line. + + The winch will calculate the total loaded length and stop when the tension exceeds a threshold. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AbandonLine(self, request, context): + """ + Spool out the entire length of the line. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def LoadPayload(self, request, context): + """ + Spools out just enough to present the hook to the user to load the payload. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_WinchServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'SubscribeStatus': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeStatus, + request_deserializer=winch_dot_winch__pb2.SubscribeStatusRequest.FromString, + response_serializer=winch_dot_winch__pb2.StatusResponse.SerializeToString, + ), + 'Relax': grpc.unary_unary_rpc_method_handler( + servicer.Relax, + request_deserializer=winch_dot_winch__pb2.RelaxRequest.FromString, + response_serializer=winch_dot_winch__pb2.RelaxResponse.SerializeToString, + ), + 'RelativeLengthControl': grpc.unary_unary_rpc_method_handler( + servicer.RelativeLengthControl, + request_deserializer=winch_dot_winch__pb2.RelativeLengthControlRequest.FromString, + response_serializer=winch_dot_winch__pb2.RelativeLengthControlResponse.SerializeToString, + ), + 'RateControl': grpc.unary_unary_rpc_method_handler( + servicer.RateControl, + request_deserializer=winch_dot_winch__pb2.RateControlRequest.FromString, + response_serializer=winch_dot_winch__pb2.RateControlResponse.SerializeToString, + ), + 'Lock': grpc.unary_unary_rpc_method_handler( + servicer.Lock, + request_deserializer=winch_dot_winch__pb2.LockRequest.FromString, + response_serializer=winch_dot_winch__pb2.LockResponse.SerializeToString, + ), + 'Deliver': grpc.unary_unary_rpc_method_handler( + servicer.Deliver, + request_deserializer=winch_dot_winch__pb2.DeliverRequest.FromString, + response_serializer=winch_dot_winch__pb2.DeliverResponse.SerializeToString, + ), + 'Hold': grpc.unary_unary_rpc_method_handler( + servicer.Hold, + request_deserializer=winch_dot_winch__pb2.HoldRequest.FromString, + response_serializer=winch_dot_winch__pb2.HoldResponse.SerializeToString, + ), + 'Retract': grpc.unary_unary_rpc_method_handler( + servicer.Retract, + request_deserializer=winch_dot_winch__pb2.RetractRequest.FromString, + response_serializer=winch_dot_winch__pb2.RetractResponse.SerializeToString, + ), + 'LoadLine': grpc.unary_unary_rpc_method_handler( + servicer.LoadLine, + request_deserializer=winch_dot_winch__pb2.LoadLineRequest.FromString, + response_serializer=winch_dot_winch__pb2.LoadLineResponse.SerializeToString, + ), + 'AbandonLine': grpc.unary_unary_rpc_method_handler( + servicer.AbandonLine, + request_deserializer=winch_dot_winch__pb2.AbandonLineRequest.FromString, + response_serializer=winch_dot_winch__pb2.AbandonLineResponse.SerializeToString, + ), + 'LoadPayload': grpc.unary_unary_rpc_method_handler( + servicer.LoadPayload, + request_deserializer=winch_dot_winch__pb2.LoadPayloadRequest.FromString, + response_serializer=winch_dot_winch__pb2.LoadPayloadResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'mavsdk.rpc.winch.WinchService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class WinchService(object): + """ + Allows users to send winch actions, as well as receive status information from winch systems. + + """ + + @staticmethod + def SubscribeStatus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/mavsdk.rpc.winch.WinchService/SubscribeStatus', + winch_dot_winch__pb2.SubscribeStatusRequest.SerializeToString, + winch_dot_winch__pb2.StatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Relax(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.winch.WinchService/Relax', + winch_dot_winch__pb2.RelaxRequest.SerializeToString, + winch_dot_winch__pb2.RelaxResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RelativeLengthControl(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.winch.WinchService/RelativeLengthControl', + winch_dot_winch__pb2.RelativeLengthControlRequest.SerializeToString, + winch_dot_winch__pb2.RelativeLengthControlResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RateControl(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.winch.WinchService/RateControl', + winch_dot_winch__pb2.RateControlRequest.SerializeToString, + winch_dot_winch__pb2.RateControlResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Lock(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.winch.WinchService/Lock', + winch_dot_winch__pb2.LockRequest.SerializeToString, + winch_dot_winch__pb2.LockResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Deliver(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.winch.WinchService/Deliver', + winch_dot_winch__pb2.DeliverRequest.SerializeToString, + winch_dot_winch__pb2.DeliverResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Hold(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.winch.WinchService/Hold', + winch_dot_winch__pb2.HoldRequest.SerializeToString, + winch_dot_winch__pb2.HoldResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Retract(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.winch.WinchService/Retract', + winch_dot_winch__pb2.RetractRequest.SerializeToString, + winch_dot_winch__pb2.RetractResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def LoadLine(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.winch.WinchService/LoadLine', + winch_dot_winch__pb2.LoadLineRequest.SerializeToString, + winch_dot_winch__pb2.LoadLineResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AbandonLine(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.winch.WinchService/AbandonLine', + winch_dot_winch__pb2.AbandonLineRequest.SerializeToString, + winch_dot_winch__pb2.AbandonLineResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def LoadPayload(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.winch.WinchService/LoadPayload', + winch_dot_winch__pb2.LoadPayloadRequest.SerializeToString, + winch_dot_winch__pb2.LoadPayloadResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto b/proto index e6d38681..736bc2af 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit e6d38681b78fb50460fb8059d8bb82f6cfd52b28 +Subproject commit 736bc2af1b6eae5c255b5b68014597527bd78c8c From cbbc522a18485acf80ed5519d633fd39e99177b4 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 31 Jan 2024 10:29:35 +1300 Subject: [PATCH 2/2] CI: try Python 3.11 instead of 3.12 on macOS And update it to 3.11 on Linux while we're at it. Signed-off-by: Julian Oes --- .github/workflows/main.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 89df71a1..bf77504e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -143,16 +143,21 @@ jobs: echo $? git tag --list + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Install prerequisites run: | - python3 -m pip install -r requirements.txt - python3 -m pip install twine wheel - python3 -m pip install --user delocate + python -m pip install -r requirements.txt + python -m pip install twine wheel + python -m pip install --user delocate - name: Create wheel run: | - python3 setup.py bdist_wheel - export PATH="$(python3 -m site --user-base)/bin:$PATH" + python setup.py bdist_wheel + export PATH="$(python -m site --user-base)/bin:$PATH" echo "PATH: $PATH" delocate-wheel -w wheelhouse -v dist/*.whl ls wheelhouse/*any.whl | sed -e 'p;s/any/macosx_10_9_x86_64/' | xargs -n2 mv @@ -195,9 +200,9 @@ jobs: git tag --list - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.10 + python-version: 3.11 architecture: ${{ matrix.arch }} - name: Install prerequisites