Gimbal feature

event messageolympe.messages.gimbal.gimbal_capabilities(gimbal_id=None, model=None, axes=None, _policy='check_wait', _float_tol=(0.1, 0.1))

Gimbal.Gimbal_capabilities

Gimbal capabilities

Parameters
  • gimbal_id (u8) – id of the gimbal. Gimbal id is unique and persistent: the same gimbal model on a same drone model always has the same id. Main/Built-in gimbal has id zero.

  • model (olympe.enums.gimbal.model) – Camera model.

  • axes (BitfieldOf(olympe.enums.gimbal.axis, u8)) – Bitfield of axes that can be controlled. If bit is set to 1, it means that the axis can be controlled.

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Triggered at connection.

event messageolympe.messages.gimbal.relative_attitude_bounds(gimbal_id=None, min_yaw=None, max_yaw=None, min_pitch=None, max_pitch=None, min_roll=None, max_roll=None, _policy='check_wait', _float_tol=(0.1, 0.1))

Gimbal.Relative_attitude_bounds

Relative attitude bounds

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • min_yaw (float) – Minimum yaw value, in degrees, in the relative frame of reference

  • max_yaw (float) – Maximum yaw value, in degrees, in the relative frame of reference

  • min_pitch (float) – Minimum pitch value, in degrees, in the relative frame of reference

  • max_pitch (float) – Maximum pitch value, in degrees, in the relative frame of reference

  • min_roll (float) – Minimum roll value, in degrees, in the relative frame of reference

  • max_roll (float) – Maximum roll value, in degrees, in the relative frame of reference

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Triggered when the bounds change.

event messageolympe.messages.gimbal.max_speed(gimbal_id=None, min_bound_yaw=None, max_bound_yaw=None, current_yaw=None, min_bound_pitch=None, max_bound_pitch=None, current_pitch=None, min_bound_roll=None, max_bound_roll=None, current_roll=None, _policy='check_wait', _float_tol=(0.1, 0.1))

Gimbal.Max_speed

Max speed

Parameters
  • gimbal_id (u8) – id of the gimbal. Gimbal id is unique and persistent: the same gimbal model on a same drone model always has the same id. Main/Built-in gimbal has id zero.

  • min_bound_yaw (float) – Lower bound of the max yaw speed, in degrees per seconds

  • max_bound_yaw (float) – Upper bound of the max yaw speed, in degrees per seconds

  • current_yaw (float) – Maximum yaw speed value, in degrees per seconds

  • min_bound_pitch (float) – Lower bound of the max pitch speed, in degrees per seconds

  • max_bound_pitch (float) – Upper bound of the max pitch speed, in degrees per seconds

  • current_pitch (float) – Maximum pitch speed value, in degrees per seconds

  • min_bound_roll (float) – Lower bound of the max roll speed, in degrees per seconds

  • max_bound_roll (float) – Upper bound of the max roll speed, in degrees per seconds

  • current_roll (float) – Maximum roll speed value, in degrees per 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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Triggered by set_max_speed() or when the speed bounds changes.

command messageolympe.messages.gimbal.set_max_speed(gimbal_id, yaw, pitch, roll, _timeout=10, _no_expect=False, _float_tol=(0.1, 0.1))

Gimbal.Set_max_speed

Set max speed

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • yaw (float) – Maximum yaw speed value, in degrees per seconds This value will be clamped between max_speed() min_bound_yaw and max_bound_yaw

  • pitch (float) – Maximum pitch speed value, in degrees per seconds This value will be clamped between max_speed() min_bound_pitch and max_bound_pitch

  • roll (float) – Maximum roll speed value, in degrees per seconds This value will be clamped between max_speed() min_bound_roll and max_bound_roll

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Result: set the max speed setting then max_speed() is triggered.

Expectations: max_speed(gimbal_id=self.gimbal_id, _policy='wait')

command messageolympe.messages.gimbal.set_target(gimbal_id, control_mode, yaw_frame_of_reference, yaw, pitch_frame_of_reference, pitch, roll_frame_of_reference, roll, _timeout=10, _no_expect=False, _float_tol=(0.1, 0.1))

Gimbal.Set_target

Set the gimbal target

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • control_mode (olympe.enums.gimbal.control_mode) – Mode of changing the gimbal attitude. This parameter will caracterize following parameters units.

  • yaw_frame_of_reference (olympe.enums.gimbal.frame_of_reference) – Frame of reference of the yaw value. none if the yaw target should not be changed

  • yaw (float) – Yaw value. Frame of reference is given by the value of yaw_frame_of_reference. Units depend on the control_mode value: - position: value is in degrees - velocity, value is in signed ratio (from -1 to 1) of the max_speed() current_yaw parameter

  • pitch_frame_of_reference (olympe.enums.gimbal.frame_of_reference) – Frame of reference of the pitch value none if the pitch target should not be changed

  • pitch (float) – Pitch value. Frame of reference is given by the value of pitch_frame_of_reference. Units depend on the control_mode value: - position: value is in degrees - velocity, value is in signed ratio (from -1 to 1) of the max_speed() current_pitch parameter

  • roll_frame_of_reference (olympe.enums.gimbal.frame_of_reference) – Frame of reference of the roll value none if the roll target should not be changed

  • roll (float) – Roll value. Frame of reference is given by the value of roll_frame_of_reference. Units depend on the control_mode value: - position: value is in degrees - velocity, value is in signed ratio (from -1 to 1) of the max_speed() current_roll parameter

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Result: set the target.

event messageolympe.messages.gimbal.attitude(gimbal_id=None, yaw_frame_of_reference=None, pitch_frame_of_reference=None, roll_frame_of_reference=None, yaw_relative=None, pitch_relative=None, roll_relative=None, yaw_absolute=None, pitch_absolute=None, roll_absolute=None, _policy='check_wait', _float_tol=(0.1, 0.1))

Gimbal.Attitude

Gimbal attitude

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • yaw_frame_of_reference (olympe.enums.gimbal.frame_of_reference) – Current frame of reference used for the yaw axis.

  • pitch_frame_of_reference (olympe.enums.gimbal.frame_of_reference) – Current frame of reference used for the pitch axis.

  • roll_frame_of_reference (olympe.enums.gimbal.frame_of_reference) – Current frame of reference used for the roll axis.

  • yaw_relative (float) – Yaw orientation of the gimbal in the relative frame of reference, in degrees.

  • pitch_relative (float) – Pitch orientation of the gimbal in the relative frame of reference, in degrees.

  • roll_relative (float) – Roll orientation of the gimbal in the relative frame of reference, in degrees.

  • yaw_absolute (float) – Yaw orientation of the gimbal in the absolute frame of reference, in degrees.

  • pitch_absolute (float) – Pitch orientation of the gimbal in the absolute frame of reference, in degrees.

  • roll_absolute (float) – Roll orientation of the gimbal in the absolute frame of reference, in degrees.

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Triggered regularly.

event messageolympe.messages.gimbal.axis_lock_state(gimbal_id=None, locked=None, _policy='check_wait', _float_tol=(0.1, 0.1))

Gimbal.Axis_lock_state

Axis lock state

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • locked (BitfieldOf(olympe.enums.gimbal.axis, u8)) – Bitfield indicating if each axis is temporarily locked. Bits set to 1 are locked.

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Triggered when the axis lock is changed.

event messageolympe.messages.gimbal.offsets(gimbal_id=None, update_state=None, min_bound_yaw=None, max_bound_yaw=None, current_yaw=None, min_bound_pitch=None, max_bound_pitch=None, current_pitch=None, min_bound_roll=None, max_bound_roll=None, current_roll=None, _policy='check_wait', _float_tol=(0.1, 0.1))

Gimbal.Offsets

Get the offsets

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • update_state (olympe.enums.gimbal.state) – offset update states.

  • min_bound_yaw (float) – Lower bound of the offset that can be set on the yaw axis, in degrees

  • max_bound_yaw (float) – Upper bound of the offset that can be set on the yaw axis, in degrees

  • current_yaw (float) – Current offset applied to the yaw axis, in degrees

  • min_bound_pitch (float) – Lower bound of the offset that can be set on the pitch axis, in degrees

  • max_bound_pitch (float) – Upper bound of the offset that can be set on the pitch axis, in degrees

  • current_pitch (float) – Current offset applied to the pitch axis, in degrees

  • min_bound_roll (float) – Lower bound of the offset that can be set on the roll axis, in degrees

  • max_bound_roll (float) – Upper bound of the offset that can be set on the roll axis, in degrees

  • current_roll (float) – Current offset applied to the roll axis, in degrees

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Triggered at connection and by set_offsets().

command messageolympe.messages.gimbal.set_offsets(gimbal_id, yaw, pitch, roll, _timeout=10, _no_expect=False, _float_tol=(0.1, 0.1))

Gimbal.Set_offsets

Set gimbal offsets

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • yaw (float) – Offset, in degrees, that should be applied to the yaw axis. This value will be clamped between offsets() min_bound_yaw and max_bound_yaw

  • pitch (float) – Offset, in degrees, that should be applied to the pitch axis. This value will be clamped between [offsets() min_bound_pitch and max_bound_pitch

  • roll (float) – Offset, in degrees, that should be applied to the roll axis. This value will be clamped between offsets() min_bound_roll and max_bound_roll

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Result: if the offset update process has been started, the offsets are set on each axis then offsets() is triggered.

Expectations: offsets(gimbal_id=self.gimbal_id, _policy='wait')

event messageolympe.messages.gimbal.absolute_attitude_bounds(gimbal_id=None, min_yaw=None, max_yaw=None, min_pitch=None, max_pitch=None, min_roll=None, max_roll=None, _policy='check_wait', _float_tol=(0.1, 0.1))

Gimbal.Absolute_attitude_bounds

Absolute attitude bounds

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • min_yaw (float) – Minimum yaw value, in degrees, in the absolute frame of reference

  • max_yaw (float) – Maximum yaw value, in degrees, in the absolute frame of reference

  • min_pitch (float) – Minimum pitch value, in degrees, in the absolute frame of reference

  • max_pitch (float) – Maximum pitch value, in degrees, in the absolute frame of reference

  • min_roll (float) – Minimum roll value, in degrees, in the absolute frame of reference

  • max_roll (float) – Maximum roll value, in degrees, in the absolute frame of reference

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Triggered when the bounds change.

command messageolympe.messages.gimbal.reset_orientation(gimbal_id=0, _timeout=10, _no_expect=False, _float_tol=(0.1, 0.1))

Gimbal.Reset_orientation

Reset the orientation of the gimbal

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Result: Orientation of the gimbal is reset.

command messageolympe.messages.gimbal.start_offsets_update(gimbal_id=0, _timeout=10, _no_expect=False, _float_tol=(0.1, 0.1))

Gimbal.Start_offsets_update

Start offset update

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Result: actual offsets and update state offsets() is triggered, with update_state set to active.

Expectations: offsets(gimbal_id=self.gimbal_id, update_state='active', _policy='wait')

command messageolympe.messages.gimbal.stop_offsets_update(gimbal_id=0, _timeout=10, _no_expect=False, _float_tol=(0.1, 0.1))

Gimbal.Stop_offsets_update

Stop offset update

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Result: offsets() is triggered, with update_state set to inactive.

Expectations: offsets(gimbal_id=self.gimbal_id, update_state='inactive', _policy='wait')

event messageolympe.messages.gimbal.calibration_state(state=None, gimbal_id=None, _policy='check_wait', _float_tol=(0.1, 0.1))

Gimbal.Calibration_state

Calibration state

Parameters
  • state (olympe.enums.gimbal.calibration_state) – Current state

  • gimbal_id (u8) – id of the gimbal.

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Triggered at connection and when calibration state changes.

command messageolympe.messages.gimbal.calibrate(gimbal_id, _timeout=10, _no_expect=False, _float_tol=(0.1, 0.1))

Gimbal.Calibrate

Start calibration.

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Result: calibration_state() changes to in_progress. calibration_result() when calibration is terminated.

Expectations: calibration_state(gimbal_id=self.gimbal_id, state='in_progress', _policy='wait')

event messageolympe.messages.gimbal.calibration_result(gimbal_id=None, result=None, _policy='check_wait', _float_tol=(0.1, 0.1))

Gimbal.Calibration_result

Calibration result.

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • result (olympe.enums.gimbal.calibration_result) – Calibration result.

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Triggered At the end of the gimbal calibration.

event messageolympe.messages.gimbal.alert(gimbal_id=None, error=None, _policy='check_wait', _float_tol=(0.1, 0.1))

Gimbal.Alert

Gimbal error.

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • error (BitfieldOf(olympe.enums.gimbal.error, u8)) – Error bitfield.

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Triggered At connection and when an error occurs.

command messageolympe.messages.gimbal.cancel_calibration(gimbal_id, _timeout=10, _no_expect=False, _float_tol=(0.1, 0.1))

Gimbal.Cancel_calibration

Cancel calibration.

Parameters
  • gimbal_id (u8) – id of the gimbal.

  • _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 (0.1, 0.1)). See python 3 stdlib math.isclose documentation for more information

Result: calibration_state() changes to required or ok. calibration_result() with canceled result.

Expectations: calibration_result(gimbal_id=self.gimbal_id, result='canceled', _policy='wait')

enumolympe.enums.gimbal.model

Gimbal model.

main

Main gimbal. Only one gimbal of this kind is allowed at a time on a drone. (0)

enumolympe.enums.gimbal.state

Feature current state.

inactive

Feature is not currently active. (0)

active

Feature is currently active. (1)

enumolympe.enums.gimbal.error

Gimbal error.

calibration_error

Calibration error. Verify that nothing is blocking the gimbal movement. (0)

overload_error

Overload error. Verify that nothing is blocking the gimbal movement. (1)

comm_error

Communication error. Wait for retry. (2)

critical_error

Critical error. Drone must be restarted. (3)

enumolympe.enums.gimbal.calibration_state

Calibration state.

required

Calibration is required. (0)

in_progress

Calibration is in progress. (1)

ok

Calibration is ok. (2)

enumolympe.enums.gimbal.calibration_result

Calibration result.

success

Calibration completed successfully. (0)

failure

Calibration failed. (1)

canceled

Calibration canceled, with command cancel_calibration. (2)

enumolympe.enums.gimbal.axis

Axis.

yaw

Yaw axis (0)

pitch

Pitch axis (1)

roll

Roll axis (2)

enumolympe.enums.gimbal.control_mode

Gimbal control mode.

position

Attitude is set by giving a position. (0)

velocity

Attitude is set by giving a velocity. (1)

enumolympe.enums.gimbal.frame_of_reference

Frame of reference.

none

None (0)

relative

Euler angles define gimbal attitude in the drone frame of reference, where, as seen from the drone: - roll axis points forward - pitch axis points on the right hand side - yaw axis points downward (1)

absolute

Euler angles define gimbal attitude in the Earth frame of reference, where: - roll axis points North - pitch axis points East - yaw axis points toward the center of the Earth (2)

enumolympe.enums.gimbal.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)