Move feature

command message olympe.messages.move.extended_move_by(d_x, d_y, d_z, d_psi, max_horizontal_speed, max_vertical_speed, max_yaw_rotation_speed, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09), _int_tol=0)

move.extended_move_by

Move the drone to a relative position and rotate heading by a given angle, with maximum associated speed settings. Moves are relative to the current drone orientation, (drone’s reference). Also note that the given rotation will not modify the move (i.e. moves are always rectilinear). If all speeds are zero or are incoherent with asked d_x/d_y/d_z/d_psi the command will result with event moveByEnd() status ERROR

Parameters:

d_xfloat

Wanted displacement along the front axis [m]

d_yfloat

Wanted displacement along the right axis [m]

d_zfloat

Wanted displacement along the down axis [m]

d_psifloat

Wanted rotation of heading [rad]

max_horizontal_speedfloat

Maximum horizontal speed in m/s.

max_vertical_speedfloat

Maximum vertical speed in m/s.

max_yaw_rotation_speedfloat

Maximum yaw rotation speed in degrees/s.

_timeoutint

command message timeout (defaults to 10)

_no_expectbool

if True, do not expect the usual command expectation (defaults to False)

_float_toltuple

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

_matching_modeolympe.MatchingMode

specify the expectation matching mode (default to olympe.MatchingMode.pattern)

_int_tolint

specify the int comparison tolerance, an int containing an absolute tolerate int value (default to 0)

Supported by:

ANAFI:

for firmware release versions 1.7.0

ANAFI Thermal:

for firmware release versions 1.7.0

Result: The drone will move of the given offsets. Then, event moveByEnd() is triggered. If you send a second relative move command, the drone will trigger a moveByEnd() with the offsets it managed to do before this new command and the value of error set to interrupted.

Expectations: moveByEnd(_policy='wait')

command message olympe.messages.move.extended_move_to(latitude, longitude, altitude, orientation_mode, heading, max_horizontal_speed, max_vertical_speed, max_yaw_rotation_speed, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09), _int_tol=0)

move.extended_move_to

Move the drone to a specified location with speeds limited by the value given. If a new command moveTo/ExtendedMoveTo is sent, the drone will immediatly run it (no cancel will be issued). If a CancelMoveTo() command is sent, the ExtendedMoveTo is stopped. During the ExtendedMoveTo, all pitch, roll and gaz values of the piloting command will be ignored by the drone. However, the yaw value can be used. If all speeds are zero the command will result in event moveToChanged() status ERROR

Parameters:

latitudedouble

Latitude of the location (in degrees) to reach

longitudedouble

Longitude of the location (in degrees) to reach

altitudedouble

Altitude above take off point (in m) to reach

orientation_modeolympe.enums.move.orientation_mode

Orientation mode of the move to

headingfloat

Heading (relative to the North in degrees). This value is only used if the orientation mode is ‘heading_start’ or ‘heading_during’

max_horizontal_speedfloat

Maximum horizontal speed in m/s.

max_vertical_speedfloat

Maximum vertical speed in m/s.

max_yaw_rotation_speedfloat

Maximum yaw rotation speed in degrees/s.

_timeoutint

command message timeout (defaults to 10)

_no_expectbool

if True, do not expect the usual command expectation (defaults to False)

_float_toltuple

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

_matching_modeolympe.MatchingMode

specify the expectation matching mode (default to olympe.MatchingMode.pattern)

_int_tolint

specify the int comparison tolerance, an int containing an absolute tolerate int value (default to 0)

Supported by:

ANAFI:

for firmware release versions 1.7.0

ANAFI Thermal:

for firmware release versions 1.7.0

Result: Event moveToChanged() is triggered with state running. Then, the drone will move to the given location according to max speed parameters. Then, event moveToChanged() is triggered with state succeed.

Expectations: moveToChanged(latitude=self.latitude, longitude=self.longitude, altitude=self.altitude, orientation_mode=self.orientation_mode, status='RUNNING', _policy='wait')

event message olympe.messages.move.info(missing_inputs=None, _policy='check_wait', _float_tol=(1e-07, 1e-09), _int_tol=0)

move.info

Describes the missing requirements to start a move.

Parameters:

missing_inputsBitfieldOf(olympe.enums.move.indicator, u32)

List of missing requirements to start a move. If at least one input is missing, drone won’t be able to start a move.

_policyolympe.messaging.arsdk_expectations.ExpectPolicy

specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

_float_toltuple

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

_matching_modeolympe.MatchingMode

specify the expectation matching mode (default to olympe.MatchingMode.pattern)

_int_tolint

specify the int comparison tolerance, an int containing an absolute tolerate int value (default to 0)

Supported by:

ANAFI Ai:

with an up to date firmware

Triggered: During connection and when the list of missing requirements changes.

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

drone_battery:

Drone battery is insufficient. (13)

drone_state:

Drone is not in a valid state. (14)

enum olympe.enums.move.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.move.orientation_mode

Orientation mode of the move to

Enum aliases:

none:

The drone won’t change its orientation (0)

to_target:

The drone will make a rotation to look in direction of the given location (1)

heading_start:

The drone will orientate itself to the given heading before moving to the location (2)

heading_during:

The drone will orientate itself to the given heading while moving to the location (3)