Skip to content

Commit 18636d7

Browse files
Merge pull request #294 from hrnbot/main
0.35.0 MAVSDK Server based MAVSDK-Python
2 parents c16b040 + bbbdc44 commit 18636d7

27 files changed

+603
-116
lines changed

MAVSDK_SERVER_VERSION

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
v0.35.0
1+
v0.35.1
2+
3+
4+

mavsdk/action.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import action_pb2, action_pb2_grpc
66
from enum import Enum

mavsdk/calibration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import calibration_pb2, calibration_pb2_grpc
66
from enum import Enum

mavsdk/camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import camera_pb2, camera_pb2_grpc
66
from enum import Enum

mavsdk/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import core_pb2, core_pb2_grpc
66
from enum import Enum

mavsdk/failure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import failure_pb2, failure_pb2_grpc
66
from enum import Enum

mavsdk/follow_me.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import follow_me_pb2, follow_me_pb2_grpc
66
from enum import Enum

mavsdk/ftp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import ftp_pb2, ftp_pb2_grpc
66
from enum import Enum

mavsdk/geofence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import geofence_pb2, geofence_pb2_grpc
66
from enum import Enum

mavsdk/gimbal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import gimbal_pb2, gimbal_pb2_grpc
66
from enum import Enum

mavsdk/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import info_pb2, info_pb2_grpc
66
from enum import Enum

mavsdk/log_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import log_files_pb2, log_files_pb2_grpc
66
from enum import Enum

mavsdk/manual_control.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import manual_control_pb2, manual_control_pb2_grpc
66
from enum import Enum
@@ -52,6 +52,9 @@ class Result(Enum):
5252
INPUT_OUT_OF_RANGE
5353
Input out of range
5454
55+
INPUT_NOT_SET
56+
No Input set
57+
5558
"""
5659

5760

@@ -63,6 +66,7 @@ class Result(Enum):
6366
COMMAND_DENIED = 5
6467
TIMEOUT = 6
6568
INPUT_OUT_OF_RANGE = 7
69+
INPUT_NOT_SET = 8
6670

6771
def translate_to_rpc(self):
6872
if self == ManualControlResult.Result.UNKNOWN:
@@ -81,6 +85,8 @@ def translate_to_rpc(self):
8185
return manual_control_pb2.ManualControlResult.RESULT_TIMEOUT
8286
if self == ManualControlResult.Result.INPUT_OUT_OF_RANGE:
8387
return manual_control_pb2.ManualControlResult.RESULT_INPUT_OUT_OF_RANGE
88+
if self == ManualControlResult.Result.INPUT_NOT_SET:
89+
return manual_control_pb2.ManualControlResult.RESULT_INPUT_NOT_SET
8490

8591
@staticmethod
8692
def translate_from_rpc(rpc_enum_value):
@@ -101,6 +107,8 @@ def translate_from_rpc(rpc_enum_value):
101107
return ManualControlResult.Result.TIMEOUT
102108
if rpc_enum_value == manual_control_pb2.ManualControlResult.RESULT_INPUT_OUT_OF_RANGE:
103109
return ManualControlResult.Result.INPUT_OUT_OF_RANGE
110+
if rpc_enum_value == manual_control_pb2.ManualControlResult.RESULT_INPUT_NOT_SET:
111+
return ManualControlResult.Result.INPUT_NOT_SET
104112

105113
def __str__(self):
106114
return self.name

mavsdk/manual_control_pb2.py

Lines changed: 10 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mavsdk/mission.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import mission_pb2, mission_pb2_grpc
66
from enum import Enum

mavsdk/mission_raw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import mission_raw_pb2, mission_raw_pb2_grpc
66
from enum import Enum

mavsdk/mocap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import mocap_pb2, mocap_pb2_grpc
66
from enum import Enum

mavsdk/offboard.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# DO NOT EDIT! This file is auto-generated from
3-
# https://github.com/mavlink/MAVSDK-Python/tree/master/other/templates/py
3+
# https://github.com/mavlink/MAVSDK-Python/tree/main/other/templates/py
44
from ._base import AsyncBase
55
from . import offboard_pb2, offboard_pb2_grpc
66
from enum import Enum
@@ -1112,4 +1112,40 @@ async def set_velocity_ned(self, velocity_ned_yaw):
11121112

11131113
if result.result is not OffboardResult.Result.SUCCESS:
11141114
raise OffboardError(result, "set_velocity_ned()", velocity_ned_yaw)
1115+
1116+
1117+
async def set_position_velocity_ned(self, position_ned_yaw, velocity_ned_yaw):
1118+
"""
1119+
Set the position in NED coordinates, with the velocity to be used as feed-forward.
1120+
1121+
Parameters
1122+
----------
1123+
position_ned_yaw : PositionNedYaw
1124+
Position and yaw
1125+
1126+
velocity_ned_yaw : VelocityNedYaw
1127+
Velocity and yaw
1128+
1129+
Raises
1130+
------
1131+
OffboardError
1132+
If the request fails. The error contains the reason for the failure.
1133+
"""
1134+
1135+
request = offboard_pb2.SetPositionVelocityNedRequest()
1136+
1137+
position_ned_yaw.translate_to_rpc(request.position_ned_yaw)
1138+
1139+
1140+
1141+
velocity_ned_yaw.translate_to_rpc(request.velocity_ned_yaw)
1142+
1143+
1144+
response = await self._stub.SetPositionVelocityNed(request)
1145+
1146+
1147+
result = self._extract_result(response)
1148+
1149+
if result.result is not OffboardResult.Result.SUCCESS:
1150+
raise OffboardError(result, "set_position_velocity_ned()", position_ned_yaw, velocity_ned_yaw)
11151151

0 commit comments

Comments
 (0)