MissionRawServer¶
- class mavsdk.mission_raw_server.MissionItem(seq, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z, mission_type)¶
Bases:
object
Mission item exactly identical to MAVLink MISSION_ITEM_INT.
- Parameters:
seq (uint32_t) – Sequence (uint16_t)
frame (uint32_t) – The coordinate system of the waypoint (actually uint8_t)
command (uint32_t) – The scheduled action for the waypoint (actually uint16_t)
current (uint32_t) – false:0, true:1 (actually uint8_t)
autocontinue (uint32_t) – Autocontinue to next waypoint (actually uint8_t)
param1 (float) – PARAM1, see MAV_CMD enum
param2 (float) – PARAM2, see MAV_CMD enum
param3 (float) – PARAM3, see MAV_CMD enum
param4 (float) – PARAM4, see MAV_CMD enum
x (int32_t) – PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
y (int32_t) – PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7
z (float) – PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)
mission_type (uint32_t) – Mission type (actually uint8_t)
- class mavsdk.mission_raw_server.MissionPlan(mission_items)¶
Bases:
object
Mission plan type
- Parameters:
mission_items ([MissionItem]) – The mission items
- class mavsdk.mission_raw_server.MissionProgress(current, total)¶
Bases:
object
Mission progress type.
- Parameters:
current (int32_t) – Current mission item index (0-based), if equal to total, the mission is finished
total (int32_t) – Total number of mission items
- class mavsdk.mission_raw_server.MissionRawServer(async_plugin_manager)¶
Bases:
AsyncBase
Acts as a vehicle and receives incoming missions from GCS (in raw MAVLINK format). Provides current mission item state, so the server can progress through missions.
Generated by dcsdkgen - MAVSDK MissionRawServer API
- async clear_all()¶
Subscribe when a MISSION_CLEAR_ALL is received
- Yields:
clear_type (uint32_t)
- async current_item_changed()¶
Subscribe to when a new current item is set
- Yields:
mission_item (MissionItem)
- async incoming_mission()¶
Subscribe to when a new mission is uploaded (asynchronous).
- Yields:
mission_plan (MissionPlan) – The mission plan
- Raises:
MissionRawServerError – If the request fails. The error contains the reason for the failure.
- name = 'MissionRawServer'¶
- async set_current_item_complete()¶
Set Current item as completed
- exception mavsdk.mission_raw_server.MissionRawServerError(result, origin, *params)¶
Bases:
Exception
Raised when a MissionRawServerResult is a fail code
- class mavsdk.mission_raw_server.MissionRawServerResult(result, result_str)¶
Bases:
object
Result type.
- Parameters:
result (Result) – Result enum value
result_str (std::string) – Human-readable English string describing the result
- class Result(value)¶
Bases:
Enum
Possible results returned for action requests.
Values¶
- UNKNOWN
Unknown result
- SUCCESS
Request succeeded
- ERROR
Error
- TOO_MANY_MISSION_ITEMS
Too many mission items in the mission
- BUSY
Vehicle is busy
- TIMEOUT
Request timed out
- INVALID_ARGUMENT
Invalid argument
- UNSUPPORTED
Mission downloaded from the system is not supported
- NO_MISSION_AVAILABLE
No mission available on the system
- UNSUPPORTED_MISSION_CMD
Unsupported mission command
- TRANSFER_CANCELLED
Mission transfer (upload or download) has been cancelled
- NO_SYSTEM
No system connected
- NEXT
Intermediate message showing progress or instructions on the next steps
- BUSY = 4¶
- ERROR = 2¶
- INVALID_ARGUMENT = 6¶
- NEXT = 12¶
- NO_MISSION_AVAILABLE = 8¶
- NO_SYSTEM = 11¶
- SUCCESS = 1¶
- TIMEOUT = 5¶
- TOO_MANY_MISSION_ITEMS = 3¶
- TRANSFER_CANCELLED = 10¶
- UNKNOWN = 0¶
- UNSUPPORTED = 7¶
- UNSUPPORTED_MISSION_CMD = 9¶