Obstacle avoidance feature#

event message olympe.messages.obstacle_avoidance.alert_timer(alert=None, timer=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))#

obstacle_avoidance.alert_timer

Obstacle avoidance timer for alert

Parameters:
  • alert (olympe.enums.obstacle_avoidance.alert) – Alert raised.

  • timer (u32) – Timer until the deactivation of obstacle avoidance in seconds.

  • _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 At connection; on changes.

event message olympe.messages.obstacle_avoidance.alerts(alerts=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))#

obstacle_avoidance.alerts

Obstacle avoidance alerts

Parameters:
  • alerts (BitfieldOf(olympe.enums.obstacle_avoidance.alert, u16)) – Bitfield of activated obstacle avoidance alerts.

  • _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 At connection; When entering or leaving any OA alert state.

command message olympe.messages.obstacle_avoidance.set_mode(mode, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))#

obstacle_avoidance.set_mode

Configures obstacle avoidance mode.

Parameters:
  • mode (olympe.enums.obstacle_avoidance.mode) – Obstacle avoidance mode.

  • _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: Activation or deactivation of obstacle avoidance. Event status() is triggered.

Expectations: status(mode=self.mode, _policy='wait')

event message olympe.messages.obstacle_avoidance.status(mode=None, state=None, availability=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))#

obstacle_avoidance.status

Obstacle avoidance status

Parameters:
  • mode (olympe.enums.obstacle_avoidance.mode) – Obstacle avoidance mode.

  • state (olympe.enums.obstacle_avoidance.state) – Obstacle avoidance state.

  • availability (olympe.enums.obstacle_avoidance.availability) – Obstacle avoidance availability.

  • _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 At connection; on changes.

enum olympe.enums.obstacle_avoidance.alert#

Obstacle avoidance alert.

high_deviation:

Distance from nominal trajectory exceeds threshold. (0)

stuck:

Drone is stuck by a presumably large obstacle. (1)

stereo_failure:

Perception system is unplugged or not working properly. Obstacle avoidance is unavailable and state is inactive. (2)

stereo_lens_failure:

Perception system lens is dirty or broken. Obstacle avoidance is unavailable and state is inactive. (3)

gimbal_failure:

Gimbal is not stabilized in direction of motion. Obstacle avoidance is unavailable and state is inactive. (4)

too_dark:

Environment is too dark for perception system or vertical camera. Obstacle avoidance is unavailable and state is inactive. (5)

estimation_unreliable:

GPS and vertical camera do not provide reliable data. Obstacle avoidance is unavailable and state is inactive. (6)

calibration_failure:

Perception system is not calibrated. Obstacle avoidance is unavailable and state is inactive. (7)

poor_gps:

Obstacle Avoidance is in degraded mode due to poor GPS quality. Obstacle avoidance is available with degraded performance. (8)

strong_wind:

Obstacle Avoidance is in degraded mode due to strong wind. Obstacle avoidance is available with degraded performance. (9)

computational_error:

Obstacle avoidance failed to compute trajectories. Obstacle avoidance is unavailable and state is inactive. (10)

blind_motion_direction:

The perception system is blind in the current motion direction. Obstacle avoidance is available and state may be active. (11)

freeze:

The drone is frozen and does not respond to PCMD Obstacle avoidance mode needs to be set to disabled for the drone to move again. Obstacle avoidance is unavailable and state is inactive. (12)

enum olympe.enums.obstacle_avoidance.availability#

Obstacle avoidance availability.

unavailable:

Obstacle avoidance is not currently available. (0)

available:

Obstacle avoidance is currently available. (1)

degraded:

Obstacle avoidance is currently available but with degraded performance. (2)

enum olympe.enums.obstacle_avoidance.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)

enum olympe.enums.obstacle_avoidance.mode#

Obstacle avoidance mode.

disabled:

Obstacle avoidance is disabled. (0)

standard:

Obstacle avoidance is enabled, in standard mode. (1)

enum olympe.enums.obstacle_avoidance.state#

Obstacle avoidance drone state.

inactive:

Obstacle avoidance is not currently active. (0)

active:

Obstacle avoidance is currently active and fully operational. (1)

degraded:

Obstacle avoidance is currently active but in degraded mode. (2)