TrackingServer

class mavsdk.tracking_server.CommandAnswer(value)

Bases: Enum

Answer to respond to an incoming command

Values

ACCEPTED

Command accepted

TEMPORARILY_REJECTED

Command temporarily rejected

DENIED

Command denied

UNSUPPORTED

Command unsupported

FAILED

Command failed

ACCEPTED = 0
DENIED = 2
FAILED = 4
TEMPORARILY_REJECTED = 1
UNSUPPORTED = 3
class mavsdk.tracking_server.TrackPoint(point_x, point_y, radius)

Bases: object

Point description type

Parameters:
  • point_x (float) – Point to track x value (normalized 0..1, 0 is left, 1 is right).

  • point_y (float) – Point to track y value (normalized 0..1, 0 is top, 1 is bottom).

  • radius (float) – Point to track y value (normalized 0..1, 0 is top, 1 is bottom).

class mavsdk.tracking_server.TrackRectangle(top_left_corner_x, top_left_corner_y, bottom_right_corner_x, bottom_right_corner_y)

Bases: object

Rectangle description type

Parameters:
  • top_left_corner_x (float) – Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).

  • top_left_corner_y (float) – Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).

  • bottom_right_corner_x (float) – Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).

  • bottom_right_corner_y (float) – Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).

class mavsdk.tracking_server.TrackingServer(async_plugin_manager)

Bases: AsyncBase

API for an onboard image tracking software.

Generated by dcsdkgen - MAVSDK TrackingServer API

name = 'TrackingServer'
async respond_tracking_off_command(command_answer)

Respond to an incoming tracking off command.

Parameters:

command_answer (CommandAnswer) – The ack to answer to the incoming command

Raises:

TrackingServerError – If the request fails. The error contains the reason for the failure.

async respond_tracking_point_command(command_answer)

Respond to an incoming tracking point command.

Parameters:

command_answer (CommandAnswer) – The ack to answer to the incoming command

Raises:

TrackingServerError – If the request fails. The error contains the reason for the failure.

async respond_tracking_rectangle_command(command_answer)

Respond to an incoming tracking rectangle command.

Parameters:

command_answer (CommandAnswer) – The ack to answer to the incoming command

Raises:

TrackingServerError – If the request fails. The error contains the reason for the failure.

async set_tracking_off_status()

Set the current tracking status to off.

async set_tracking_point_status(tracked_point)

Set/update the current point tracking status.

Parameters:

tracked_point (TrackPoint) – The tracked point

async set_tracking_rectangle_status(tracked_rectangle)

Set/update the current rectangle tracking status.

Parameters:

tracked_rectangle (TrackRectangle) – The tracked rectangle

async tracking_off_command()

Subscribe to incoming tracking off command.

Yields:

dummy (int32_t) – Unused

async tracking_point_command()

Subscribe to incoming tracking point command.

Yields:

track_point (TrackPoint) – The point to track if a point is to be tracked

async tracking_rectangle_command()

Subscribe to incoming tracking rectangle command.

Yields:

track_rectangle (TrackRectangle) – The point to track if a point is to be tracked

exception mavsdk.tracking_server.TrackingServerError(result, origin, *params)

Bases: Exception

Raised when a TrackingServerResult is a fail code

class mavsdk.tracking_server.TrackingServerResult(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 tracking_server requests.

Values

UNKNOWN

Unknown result

SUCCESS

Request succeeded

NO_SYSTEM

No system is connected

CONNECTION_ERROR

Connection error

CONNECTION_ERROR = 3
NO_SYSTEM = 2
SUCCESS = 1
UNKNOWN = 0