as2_python_api.modules package

Submodules

as2_python_api.modules.dummy_module module

dummy_module.py

class as2_python_api.modules.dummy_module.DummyModule(drone: DroneInterface)[source]

Bases: ModuleBase

Dummy Module

destroy()[source]

DummyModule does not inherit from a behavior with a destroy method, so self defining it Does nothing…

stop()[source]

stop dummy module

as2_python_api.modules.follow_path_gps_module module

follow_path_gps_module.py

class as2_python_api.modules.follow_path_gps_module.FollowPathGpsModule(drone: DroneInterface)[source]

Bases: ModuleBase, FollowPathBehavior

Follow Path GPS Module

as2_python_api.modules.follow_path_module module

follow_path_module.py

class as2_python_api.modules.follow_path_module.FollowPathModule(drone: DroneInterface)[source]

Bases: ModuleBase, FollowPathBehavior

Follow Path Module

follow_path_with_keep_yaw(path: Path, speed: float, frame_id: str = 'earth') None[source]

Follow path with speed and keep yaw

follow_path_with_path_facing(path: Path, speed: float, frame_id: str = 'earth') None[source]

Follow path with path facing and with speed

follow_path_with_yaw(path: Path, speed: float, angle: float, frame_id: str = 'earth') None[source]

Follow path with speed and yaw_angle

as2_python_api.modules.follow_reference_module module

follow_reference_module.py

class as2_python_api.modules.follow_reference_module.FollowReferenceModule(drone: DroneInterface)[source]

Bases: ModuleBase, FollowReferenceBehavior

Follow reference Module

follow_reference(_x: float, _y: float, _z: float, frame_id: str, speed_x: float, speed_y: float, speed_z: float) None[source]

Follow reference (m) with speed (m/s).

follow_reference_with_reference_facing(_x: float, _y: float, _z: float, frame_id: str, speed_x: float, speed_y: float, speed_z: float) None[source]

Follow reference with speed and yaw_angle

follow_reference_with_yaw(_x: float, _y: float, _z: float, frame_id: str, speed_x: float, speed_y: float, speed_z: float, angle: float) None[source]

Follow reference with speed and yaw_angle

as2_python_api.modules.go_to_gps_module module

go_to_gps_module.py

class as2_python_api.modules.go_to_gps_module.GoToGpsModule(drone: DroneInterface)[source]

Bases: ModuleBase, GoToBehavior

Go to GPS Module

go_to_gps(lat: float, lon: float, alt: float, speed: float) None[source]

Go to GPS point (deg, m) with speed (m/s).

go_to_gps_path_facing(lat: float, lon: float, alt: float, speed: float) None[source]

Go to gps position with speed facing the goal

go_to_gps_point(waypoint: List[float], speed: float) None[source]

Go to GPS point (deg, m) with speed (m/s).

go_to_gps_point_path_facing(waypoint: List[float], speed: float) None[source]

Go to gps point with speed facing the goal

go_to_gps_point_with_yaw(waypoint: List[float], speed: float, angle: float) None[source]

Go to gps point with speed and yaw angle

go_to_gps_with_yaw(lat: float, lon: float, alt: float, speed: float, angle: float) None[source]

Go to gps position with speed and angle

as2_python_api.modules.go_to_module module

go_to_module.py

class as2_python_api.modules.go_to_module.GoToModule(drone: DroneInterface)[source]

Bases: ModuleBase, GoToBehavior

Go to Module

go_to(_x: float, _y: float, _z: float, speed: float, frame_id: str = 'earth') None[source]

Go to point (m) with speed (m/s).

go_to_path_facing(_x: float, _y: float, _z: float, speed: float, frame_id: str = 'earth') None[source]

Go to position facing goal with speed

go_to_point(point: List[float], speed: float, frame_id: str = 'earth') None[source]

Go to point (m) with speed (m/s).

go_to_point_path_facing(point: List[float], speed: float, frame_id: str = 'earth') None[source]

Go to point facing goal with speed

go_to_point_with_yaw(point: List[float], speed: float, angle: float, frame_id: str = 'earth') None[source]

Go to point with speed and yaw_angle

go_to_with_yaw(_x: float, _y: float, _z: float, speed: float, angle: float, frame_id: str = 'earth') None[source]

Go to position with speed and yaw_angle

as2_python_api.modules.gps_module module

gps_module.py

class as2_python_api.modules.gps_module.GpsModule(drone: DroneInterface)[source]

Bases: ModuleBase

GPS module

destroy() None[source]

Destroy module, clean exit

property origin: List[float]

Get Origin GPS position (lat, lon, alt) in deg and m. None if not set.

Return type:

List[float]

property pose: List[float]

Get GPS position (lat, lon, alt) in deg and m.

Return type:

List[float]

set_origin(gps_pose: List[float]) bool[source]

Set Origin position.

as2_python_api.modules.land_module module

land_module.py

class as2_python_api.modules.land_module.LandModule(drone: DroneInterface)[source]

Bases: ModuleBase, LandBehavior

Land Module

as2_python_api.modules.module_base module

module_base.py

class as2_python_api.modules.module_base.ModuleBase(drone: DroneInterface, alias: str)[source]

Bases: object

Module Base

classmethod get_plan_item(method_name: Callable | None = None, *args, **kwargs) MissionItem[source]

Get a MissionItem from a method call

Example: # Take Off mission.plan.append(TakeoffModule.get_plan_item(

TakeoffModule.__call__, height=takeoff_height, speed=takeoff_speed))

# Go To Take Off Height mission.plan.append(GoToModule.get_plan_item(

GoToModule.go_to, go_to_x, go_to_y, takeoff_height, takeoff_speed))

# Land mission.plan.append(LandModule.get_plan_item(

speed=land_speed, wait=True))

Args:

method_name (Callable, optional): Method to be called. Defaults to “cls.__call__”.

Returns:

MissionItem: MissionItem with the method call

as2_python_api.modules.motion_reference_handler_module module

motion_reference_handler_module.py

class as2_python_api.modules.motion_reference_handler_module.MotionReferenceHandlerModule(drone: DroneInterface)[source]

Bases: ModuleBase

Motion Reference Handlers module

destroy() None[source]

Destroy module, clean exit

hover() None[source]

Stop and hover current position.

as2_python_api.modules.point_gimbal_module module

point_gimbal_module.py

class as2_python_api.modules.point_gimbal_module.PointGimbalModule(drone: DroneInterface)[source]

Bases: ModuleBase, PointGimbalBehavior

Point Gimbal Module

point_gimbal(_x: float, _y: float, _z: float, frame_id: str) None[source]

Point Gimbal to reference (m).

as2_python_api.modules.rtl_module module

rtl_module.py

class as2_python_api.modules.rtl_module.RTLModule(drone: DroneInterface)[source]

Bases: ModuleBase

Return To Launch Module

destroy() None[source]

Destroy module, clean exit

property feedback

Behavior feedback

Returns:

rclpy.Feedback

as2_python_api.modules.takeoff_module module

takeoff_module.py

class as2_python_api.modules.takeoff_module.TakeoffModule(drone: DroneInterface)[source]

Bases: ModuleBase, TakeoffBehavior

Takeoff Module

Module contents