AirGenDrone

Inherits from: AerialRobot

AirGenDrone

AirGenDrone()
Set up client and connect to airgen Args: None Returns: None

record_state

AirGenDrone.record_state()

undo

AirGenDrone.undo()

reset

AirGenDrone.reset()

try_cancel_robot_last_task

AirGenDrone.try_cancel_robot_last_task()

setVelocity

AirGenDrone.setVelocity(velocity: float)
Set the velocity of the drone for moving instructions
Arguments
velocity (float)
required
velocity in meters per second
Returns

moveByVelocity

AirGenDrone.moveByVelocity(velocity: Velocity, duration: int, frame: str, blocking: bool)
Fly the drone with velocity for the specified duration of seconds with respect to chosen frame (NED or Nav).
Arguments
velocity (Velocity)
required
VelocityVelocity type containing the three axis (X, Y, Z) velocity with respect to selected frame
duration (int)
required
number of seconds that the drone should be moving
frame (str), optional
the frame of reference for the velocity vector, one of (default: “ned”)
blocking (bool), optional
whether the function should block until the drone finishes moving (default: True)
Returns

takeoff

AirGenDrone.takeoff()
Takeoff the aerial robot

land

AirGenDrone.land()
Land the aerial robot

getPosition

AirGenDrone.getPosition()
Get the current position of the drone with respect to the world coordinate.

moveToPosition

AirGenDrone.moveToPosition(position: Position, blocking: bool)
Move the drone to absolute position: (x_val, y_val, z_val) with respect to world coordinate frame.
Arguments
position (Position)
required
Positiontarget position of type Position(x, y, z) in meters with respect to the world coordinate
blocking (bool), optional
whether the function should block until the drone finishes moving (default: True)
Returns

Examples


    >>> # move the drone to coordinate (20.0, 100.0, 30.0), no need to flip the sign of z when a complete position (x_val, y_val, z_val) is specified
    >>> drone.moveToPosition(Position(20.0, 100.0, 30.0))

moveToPositionDelta

AirGenDrone.moveToPositionDelta(position_delta: Position, frame: str, blocking: bool)
Move the drone by position_delta: (x_val, y_val, z_val) relative to the current location with respect to selected frame.
Arguments
position_delta (Position)
required
Positiondelta position of type Position(x, y, z) in meters with respect to the world coordinate
frame (str)
required
the frame of reference for the position vector, one of (default: “ned”)
blocking (bool), optional
whether the function should block until the drone finishes moving (default: True)
Returns

moveToGPS

AirGenDrone.moveToGPS(lat: float, lng: float, alt: float, blocking: bool)
Move the drone to gps coordinate: (lat, lng, alt)
Arguments
lat (float)
required
latitude
lng (float)
required
longitude
alt (float)
required
altitude
blocking (bool), optional
whether the function should block until the drone finishes moving (default: True)
Returns

setYaw

AirGenDrone.setYaw(yaw: float, blocking: bool)
Set the yaw (in radians) of the drone to the specified degrees. Yaw measures the rotation of the drone around the z-axis (downwards)
Arguments
yaw (float)
required
the target yaw (radians) for the drone
blocking (bool), optional
whether the function should block until the drone finishes moving (default: True)
Returns

setYawDelta

AirGenDrone.setYawDelta(yaw_delta: float, blocking: bool)
Set a yaw delta (in radians) for the drone to rotate to. Yaw measures the rotation of the drone around the z-axis (downwards).
Arguments
yaw_delta (float)
required
the change in yaw (radians) for the drone
blocking (bool), optional
whether the function should block until the drone finishes moving (default: True)
Returns

getYaw

AirGenDrone.getYaw()
Return the current yaw of the drone in radians. Yaw measures the rotation of the drone

getOrientation

AirGenDrone.getOrientation()
Return the current orientation of the drone in radians
Returns
OrientationCurrent orientation of the drone in Orientation type with pitch, roll, and yaw in radians

getImage

AirGenDrone.getImage(camera_name: str, image_type: str)
return the image of camera(camera_name) with the drone’s current position and pose
Arguments
camera_name (str)
required
name of the camera, one of front_center or bottom_center
image_type (str)
required
supported image types,
Returns
ImageImage type containing the requested image and the camera parameters of capture.