Auto Follow feature#

event messageolympe.messages.auto_follow.config(distance=None, elevation=None, azimuth=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))#

auto_follow.config

Configuration changed. This event is only valid when arg behavior in state() is equal to follow.

Parameters
  • distance (float) – The distance leader-follower in meters. If distance is default, this value is the current drone distance.

  • elevation (float) – The elevation leader-follower in rad. If elevation is default, this value is the current leader to drone elevation.

  • azimuth (float) – The azimuth north-leader-follower in rad. If azimuth is default, this value is the current leader to drone azimuth.

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Supported by:

Anafi Ai

with an up to date firmware

Triggered By start().

event messageolympe.messages.auto_follow.info(mode=None, missing_inputs=None, improvements=None, list_flags=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))#

auto_follow.info

Describes the missing inputs which prevent from starting a follow mode, and improvements

Parameters
  • mode (olympe.enums.auto_follow.mode) – Mode of follow me.

  • missing_inputs (BitfieldOf(olympe.enums.auto_follow.indicator, u32)) – List of missing requirements to enter this mode. If at least one input is missing, drone won’t be able to follow the target. It won’t use any fallback either.

  • improvements (BitfieldOf(olympe.enums.auto_follow.indicator, u32)) – List of inputs that can improve the mode.

  • list_flags (BitfieldOf(olympe.enums.auto_follow.list_flags, u8)) –

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Supported by:

Anafi Ai

with an up to date firmware

Triggered During connection and when the list of missing requirements or improvements changes for the mode

command messageolympe.messages.auto_follow.start(mode, use_default, distance, elevation, azimuth, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))#

auto_follow.start

Start a follow me. Sending this command will stop other running follow me.

Parameters
  • mode (olympe.enums.auto_follow.mode) – Mode of follow me.

  • use_default (BitfieldOf(olympe.enums.auto_follow.configure_param, u8)) – Use default value for distance, elevation and/or azimuth.

  • distance (float) – The distance leader-follower in meters. Ignored if flag distance is raised in arg use_default.

  • elevation (float) – The elevation leader-follower in rad. Ignored if flag elevation is raised in arg use_default.

  • azimuth (float) – The azimuth north-leader-follower in rad. Ignored if flag azimuth is raised in arg use_default.

  • _timeout (int) – command message timeout (defaults to 10)

  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)

  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Supported by:

Anafi Ai

with an up to date firmware

Result: Event state() and config() are triggered.

Expectations: state(mode=self.mode, behavior='follow', _policy='wait') & config(distance=self.distance, elevation=self.elevation, azimuth=self.azimuth, _policy='wait')

event messageolympe.messages.auto_follow.state(mode=None, behavior=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))#

auto_follow.state

State of the follow me.

Parameters
  • mode (olympe.enums.auto_follow.mode) – Current mode.

  • behavior (olympe.enums.auto_follow.behavior) – Current behavior.

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Supported by:

Anafi Ai

with an up to date firmware

Triggered by any changes on the follow me, like start(), stop()

command messageolympe.messages.auto_follow.stop(_timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))#

auto_follow.stop

Stop current follow me.

Parameters
  • _timeout (int) – command message timeout (defaults to 10)

  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)

  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Supported by:

Anafi Ai

with an up to date firmware

Result: Event state() is triggered with mode equals to none.

Expectations: state(mode='none', behavior='idle', _policy='wait')

enumolympe.enums.auto_follow.behavior#

Behavior.

idle

Drone is not following the target. (0)

follow

Follow the target. (1)

enumolympe.enums.auto_follow.configure_param#

Follow me configuration parameters.

Enum aliases:

distance

Distance configuration. (0)

elevation

Elevation configuration. (1)

azimuth

Azimuth configuration. (2)

enumolympe.enums.auto_follow.indicator#

Indicators needed to start an animation.

drone_gps

Drone gps is not fixed. (0)

drone_magneto

Drone magneto is not valid. (1)

drone_geofence

Drone is out of geofence. (2)

drone_min_altitude

Drone is under min altitude. (3)

drone_max_altitude

Drone is above max altitude. (4)

drone_flying

Drone is not flying. (5)

target_position_accuracy

Target position has a bad accuracy. (6)

target_image_detection

Target image detection is not working. (7)

drone_target_distance_min

Drone is too close to target. (8)

drone_target_distance_max

Drone is too far from target. (9)

target_horiz_speed

Target horizontal speed is too high. (10)

target_vert_speed

Target vertical speed is too high. (11)

target_altitude_accuracy

Target altitude has a bad accuracy. (12)

enumolympe.enums.auto_follow.list_flags#

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages

First

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (0)

Last

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (1)

Empty

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (2)

Remove

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (3)

enumolympe.enums.auto_follow.mode#

Mode of follow me.

none

No follow me. (0)

geographic

Follow the target keeping the same vector. (1)

relative

Follow the target keeping the same orientation to its direction. (2)

leash

Follow the target as it was held by a leash. (3)