Skip to main content

__init__

No description provided!

takeoffAsync

Takeoff vehicle to 3m above ground. Vehicle should not be moving when this API is used. It also clears any prior collision information by calling simGetCollisionInfo()
int, optional
Timeout for the vehicle to reach desired altitude
str, optional
Name of the vehicle to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

landAsync

Land the vehicle
int, optional
Timeout for the vehicle to land
str, optional
Name of the vehicle to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

goHomeAsync

Return vehicle to Home i.e. Launch location
int, optional
Timeout for the vehicle to reach desired altitude
str, optional
Name of the vehicle to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

cancelLastTask

Cancel previous Async task
str, optional
Name of the vehicle

moveByVelocityBodyFrameAsync

No description provided!
float
desired velocity in the X axis of the vehicle’s local NED frame.
float
desired velocity in the Y axis of the vehicle’s local NED frame.
float
desired velocity in the Z axis of the vehicle’s local NED frame.
float
Desired amount of time (seconds), to send this command for
DrivetrainType, optional
drivetrain
YawMode, optional
yaw_mode
str, optional
Name of the multirotor to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

moveByVelocityZBodyFrameAsync

No description provided!
float
desired velocity in the X axis of the vehicle’s local NED frame
float
desired velocity in the Y axis of the vehicle’s local NED frame
float
desired Z value (in local NED frame of the vehicle)
float
Desired amount of time (seconds), to send this command for
DrivetrainType, optional
drivetrain
YawMode, optional
yaw_mode
str, optional
Name of the multirotor to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

moveByAngleZAsync

No description provided!

moveByAngleThrottleAsync

No description provided!

moveByVelocityAsync

No description provided!
float
desired velocity in world (NED) X axis
float
desired velocity in world (NED) Y axis
float
desired velocity in world (NED) Z axis
float
Desired amount of time (seconds), to send this command for
DrivetrainType, optional
drivetrain
YawMode, optional
yaw_mode
str, optional
Name of the multirotor to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

moveByVelocityZAsync

#todo: add description
_type_
description
_type_
description
_type_
description
_type_
description
_type_, optional
description. Defaults to DrivetrainType.MaxDegreeOfFreedom.
_type_, optional
description. Defaults to YawMode().
str, optional
description. Defaults to "".
_type_
description

moveOnPathAsync

Give a list of 3D points, and the drone will move along that path at the specified velocity
_type_
description
_type_
description
_type_, optional
description. Defaults to 3e38.
_type_, optional
description. Defaults to DrivetrainType.MaxDegreeOfFreedom.
_type_, optional
description. Defaults to YawMode().
int, optional
description. Defaults to -1.
int, optional
description. Defaults to 1.
str, optional
description. Defaults to "".
_type_
description

moveOnGPSPathAsync

Give a list of LLA geopoints, and the drone will move along that path at the specified velocity
_type_
description
_type_
description
_type_, optional
description. Defaults to 3e38.
_type_, optional
description. Defaults to DrivetrainType.MaxDegreeOfFreedom.
_type_, optional
description. Defaults to YawMode().
int, optional
description. Defaults to -1.
int, optional
description. Defaults to 1.
str, optional
description. Defaults to "".
_type_
description

moveToPositionAsync

move the drone directly towards to a desired position in the world if possible
_type_
description
_type_
description
_type_
description
_type_
description
_type_, optional
description. Defaults to 3e38.
_type_, optional
description. Defaults to DrivetrainType.MaxDegreeOfFreedom.
_type_, optional
description. Defaults to YawMode().
int, optional
description. Defaults to -1.
int, optional
description. Defaults to 1.
str, optional
description. Defaults to "".
_type_
description

moveToGPSAsync

No description provided!

moveToZAsync

No description provided!

moveByManualAsync

  • Read current RC state and use it to control the vehicles. Parameters sets up the constraints on velocity and minimum altitude while flying. If RC state is detected to violate these constraints then that RC state would be ignored.
float
max velocity allowed in x direction
float
max velocity allowed in y direction
float
max velocity allowed in z direction
float
min z allowed for vehicle position
float
after this duration vehicle would switch back to non-manual mode
DrivetrainType
(DrivetrainType): when ForwardOnly, vehicle rotates itself so that its front is always facing the direction of travel. If MaxDegreeOfFreedom then it doesn’t do that (crab-like movement)
YawMode
(YawMode): Specifies if vehicle should face at given angle (is_rate=False) or should be rotating around its axis at given rate (is_rate=True)
str, optional
Name of the multirotor to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

rotateToYawAsync

No description provided!

rotateByYawRateAsync

No description provided!

hoverAsync

No description provided!

moveByRC

No description provided!

moveByMotorPWMsAsync

  • Directly control the motors using PWM values
float
PWM value for the front right motor (between 0.0 to 1.0)
float
PWM value for the rear left motor (between 0.0 to 1.0)
float
PWM value for the front left motor (between 0.0 to 1.0)
float
PWM value for the rear right motor (between 0.0 to 1.0)
float
Desired amount of time (seconds), to send this command for
str, optional
Name of the multirotor to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

moveByRollPitchYawZAsync

  • z is given in local NED frame of the vehicle.
    • Roll angle, pitch angle, and yaw angle set points are given in radians, in the body frame.
    • The body frame follows the Front Left Up (FLU) convention, and right-handedness.
    • Frame Convention:
      • X axis is along the Front direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive roll angle. | Hence, rolling with a positive angle is equivalent to translating in the right direction, w.r.t. our FLU body frame.
      • Y axis is along the Left direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive pitch angle. | Hence, pitching with a positive angle is equivalent to translating in the front direction, w.r.t. our FLU body frame.
      • Z axis is along the Up direction.
      | Clockwise rotation about this axis defines a positive yaw angle. | Hence, yawing with a positive angle is equivalent to rotated towards the left direction wrt our FLU body frame. Or in an anticlockwise fashion in the body XY / FL plane.
float
Desired roll angle, in radians.
float
Desired pitch angle, in radians.
float
Desired yaw angle, in radians.
float
Desired Z value (in local NED frame of the vehicle)
float
Desired amount of time (seconds), to send this command for
str, optional
Name of the multirotor to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

moveByRollPitchYawThrottleAsync

  • Desired throttle is between 0.0 to 1.0
    • Roll angle, pitch angle, and yaw angle are given in degrees when using PX4 and in radians when using SimpleFlight, in the body frame.
    • The body frame follows the Front Left Up (FLU) convention, and right-handedness.
    • Frame Convention:
      • X axis is along the Front direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive roll angle. | Hence, rolling with a positive angle is equivalent to translating in the right direction, w.r.t. our FLU body frame.
      • Y axis is along the Left direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive pitch angle. | Hence, pitching with a positive angle is equivalent to translating in the front direction, w.r.t. our FLU body frame.
      • Z axis is along the Up direction.
      | Clockwise rotation about this axis defines a positive yaw angle. | Hence, yawing with a positive angle is equivalent to rotated towards the left direction wrt our FLU body frame. Or in an anticlockwise fashion in the body XY / FL plane.
float
Desired roll angle.
float
Desired pitch angle.
float
Desired yaw angle.
float
Desired throttle (between 0.0 to 1.0)
float
Desired amount of time (seconds), to send this command for
str, optional
Name of the multirotor to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

moveByRollPitchYawrateThrottleAsync

  • Desired throttle is between 0.0 to 1.0
    • Roll angle, pitch angle, and yaw rate set points are given in radians, in the body frame.
    • The body frame follows the Front Left Up (FLU) convention, and right-handedness.
    • Frame Convention:
      • X axis is along the Front direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive roll angle. | Hence, rolling with a positive angle is equivalent to translating in the right direction, w.r.t. our FLU body frame.
      • Y axis is along the Left direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive pitch angle. | Hence, pitching with a positive angle is equivalent to translating in the front direction, w.r.t. our FLU body frame.
      • Z axis is along the Up direction.
      | Clockwise rotation about this axis defines a positive yaw angle. | Hence, yawing with a positive angle is equivalent to rotated towards the left direction wrt our FLU body frame. Or in an anticlockwise fashion in the body XY / FL plane.
float
Desired roll angle, in radians.
float
Desired pitch angle, in radians.
float
Desired yaw rate, in radian per second.
float
Desired throttle (between 0.0 to 1.0)
float
Desired amount of time (seconds), to send this command for
str, optional
Name of the multirotor to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

moveByRollPitchYawrateZAsync

  • z is given in local NED frame of the vehicle.
    • Roll angle, pitch angle, and yaw rate set points are given in radians, in the body frame.
    • The body frame follows the Front Left Up (FLU) convention, and right-handedness.
    • Frame Convention:
      • X axis is along the Front direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive roll angle. | Hence, rolling with a positive angle is equivalent to translating in the right direction, w.r.t. our FLU body frame.
      • Y axis is along the Left direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive pitch angle. | Hence, pitching with a positive angle is equivalent to translating in the front direction, w.r.t. our FLU body frame.
      • Z axis is along the Up direction.
      | Clockwise rotation about this axis defines a positive yaw angle. | Hence, yawing with a positive angle is equivalent to rotated towards the left direction wrt our FLU body frame. Or in an anticlockwise fashion in the body XY / FL plane.
float
Desired roll angle, in radians.
float
Desired pitch angle, in radians.
float
Desired yaw rate, in radian per second.
float
Desired Z value (in local NED frame of the vehicle)
float
Desired amount of time (seconds), to send this command for
str, optional
Name of the multirotor to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

moveByAngleRatesZAsync

  • z is given in local NED frame of the vehicle.
    • Roll rate, pitch rate, and yaw rate set points are given in radians, in the body frame.
    • The body frame follows the Front Left Up (FLU) convention, and right-handedness.
    • Frame Convention:
      • X axis is along the Front direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive roll angle. | Hence, rolling with a positive angle is equivalent to translating in the right direction, w.r.t. our FLU body frame.
      • Y axis is along the Left direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive pitch angle. | Hence, pitching with a positive angle is equivalent to translating in the front direction, w.r.t. our FLU body frame.
      • Z axis is along the Up direction.
      | Clockwise rotation about this axis defines a positive yaw angle. | Hence, yawing with a positive angle is equivalent to rotated towards the left direction wrt our FLU body frame. Or in an anticlockwise fashion in the body XY / FL plane.
float
Desired roll rate, in radians / second
float
Desired pitch rate, in radians / second
float
Desired yaw rate, in radians / second
float
Desired Z value (in local NED frame of the vehicle)
float
Desired amount of time (seconds), to send this command for
str, optional
Name of the multirotor to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

moveByAngleRatesThrottleAsync

  • Desired throttle is between 0.0 to 1.0
    • Roll rate, pitch rate, and yaw rate set points are given in radians, in the body frame.
    • The body frame follows the Front Left Up (FLU) convention, and right-handedness.
    • Frame Convention:
      • X axis is along the Front direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive roll angle. | Hence, rolling with a positive angle is equivalent to translating in the right direction, w.r.t. our FLU body frame.
      • Y axis is along the Left direction of the quadrotor.
      | Clockwise rotation about this axis defines a positive pitch angle. | Hence, pitching with a positive angle is equivalent to translating in the front direction, w.r.t. our FLU body frame.
      • Z axis is along the Up direction.
      | Clockwise rotation about this axis defines a positive yaw angle. | Hence, yawing with a positive angle is equivalent to rotated towards the left direction wrt our FLU body frame. Or in an anticlockwise fashion in the body XY / FL plane.
float
Desired roll rate, in radians / second
float
Desired pitch rate, in radians / second
float
Desired yaw rate, in radians / second
float
Desired throttle (between 0.0 to 1.0)
float
Desired amount of time (seconds), to send this command for
str, optional
Name of the multirotor to send this command to
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

setNacellesRotation

Set the rotation of all the Nacelles
float
Pitch angle in degrees.
float
Speed at which the angles update.
bool, optional
Whether we sweep to the target rotation, and stopping short of the target if blocked by something.
str, optional
Vehicle to get the state of.

setAngleRateControllerGains

  • Modifying these gains will have an affect on ALL move*() APIs. This is because any velocity setpoint is converted to an angle level setpoint which is tracked with an angle level controllers. That angle level setpoint is itself tracked with and angle rate controller.
    • This function should only be called if the default angle rate control PID gains need to be modified.
AngleRateControllerGains
(AngleRateControllerGains): angle_rate_gains
str, optional
Name of the multirotor to send this command to

setAngleLevelControllerGains

  • Sets angle level controller gains (used by any API setting angle references - for ex: moveByRollPitchYawZAsync(), moveByRollPitchYawThrottleAsync(), etc)
    • Modifying these gains will also affect the behaviour of moveByVelocityAsync() API. This is because the airgen flight controller will track velocity setpoints by converting them to angle set points.
    • This function should only be called if the default angle level control PID gains need to be modified.
    • Passing AngleLevelControllerGains() sets gains to default airgen values.
AngleLevelControllerGains
(AngleLevelControllerGains): angle_level_gains
str, optional
Name of the multirotor to send this command to

setVelocityControllerGains

  • Sets velocity controller gains for moveByVelocityAsync().
    • This function should only be called if the default velocity control PID gains need to be modified.
    • Passing VelocityControllerGains() sets gains to default airgen values.
VelocityControllerGains
(VelocityControllerGains): velocity_gains
str, optional
Name of the multirotor to send this command to

setPositionControllerGains

Sets position controller gains for moveByPositionAsync. This function should only be called if the default position control PID gains need to be modified.
PositionControllerGains
(PositionControllerGains): position_gains
str, optional
Name of the multirotor to send this command to

getMultirotorState

The position inside the returned MultirotorState is in the frame of the vehicle’s starting point
str, optional
Vehicle to get the state of
MultirotorState
MultirotorState

getRotorStates

Used to obtain the current state of all a multirotor’s rotors. The state includes the speeds, thrusts and torques for all rotors.
str, optional
Vehicle to get the rotor state of
RotorStates
Containing a timestamp and the speed, thrust and torque of all rotors.