as2_python_api package

Subpackages

Submodules

as2_python_api.drone_interface module

Drone interface to easily command drones with AeroStack2.

class as2_python_api.drone_interface.DroneInterface(drone_id: str = 'drone0', verbose: bool = False, use_sim_time: bool = False)[source]

Bases: DroneInterfaceBase

Drone interface node.

as2_python_api.drone_interface_base module

Python interface base.

class as2_python_api.drone_interface_base.DroneInterfaceBase(drone_id: str = 'drone0', verbose: bool = False, use_sim_time: bool = False)[source]

Bases: Node

Drone interface base node

arm() None[source]

Arm drone.

disarm() None[source]

Disarm drone.

property drone_id: str

Get drone id (namespace).

Return type:

str

property info: Dict[str, bool | str]

Get drone info.

Return type:

Dict[str, Union[bool, str]]

load_module(pkg: str) None[source]

load module on drone

offboard() None[source]

Enable offboard mode.

property orientation: List[float]

Get drone orientation (roll, pitch, yaw) in rad.

Return type:

List[float]

property position: List[float]

Get drone position (x, y, z) in m.

Return type:

List[float]

send_emergency_hover() None[source]

Set controller to hover mode. You will have to take the control manually

send_emergency_hover_to_aircraft() None[source]

Call platform hover. BE CAREFUL, you will have to take it control manually!

send_emergency_killswitch_to_aircraft() None[source]

Call platform stop. BE CAREFUL, motors will stop!

send_emergency_land() None[source]

Emergency landing

send_emergency_land_to_aircraft() None[source]

Call platform emergency land

shutdown() None[source]

Shutdown properly

property speed: List[float]

Get drone speed (vx, vy, vz) in m/s.

Return type:

List[float]

as2_python_api.drone_interface_gps module

Drone interface GPS to easily command drones with AeroStack2.

class as2_python_api.drone_interface_gps.DroneInterfaceGPS(drone_id: str = 'drone0', verbose: bool = False, use_sim_time: bool = False)[source]

Bases: DroneInterfaceBase

Drone interface node

as2_python_api.drone_interface_teleop module

Drone interface with motion handlers to teleoperate.

class as2_python_api.drone_interface_teleop.DroneInterfaceTeleop(drone_id: str = 'drone0', verbose: bool = False, use_sim_time: bool = False)[source]

Bases: DroneInterface

Drone interface

Module contents