Missions

Mission Base Class

class dronemanager.plugins.mission.MissionPlugin(dm, logger, name)

Bases: Plugin

PREFIX = 'mission'
async close()

Stop all missions.

Returns:

mission_options()
async load(mission_module: str, name: str | None = None)

Load a new mission, which work like plugins with the name taking the role of the prefix.

async status()

Status of running missions and missions that could be loaded.

class dronemanager.plugins.mission.MissionStage(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

class dronemanager.plugins.mission.FlightArea(*args, **kwargs)

Bases: ABC

abstract property x_min
abstract property x_max
abstract property y_min
abstract property y_max
abstract property z_min
abstract property z_max
bounding_box()
class dronemanager.plugins.mission.Mission(dm, logger, name='YOUDIDSOMETHINGWRONG')

Bases: Plugin, ABC

PREFIX = 'YOUDIDSOMETHINGWRONG'
current_stage: MissionStage | None
flight_area: FlightArea | None
async start()

This function is called when the mission is loaded to start all the necessary processes asynchronously.

It is NOT a “start this mission” function. By default, launches any background processes, like starting a plugin.

async close()

Shutdown function for the script. It should end any running tasks and clear any resources.

By default, it cancels any tasks tracked in self._running_tasks.

abstractmethod async reset()

Resets the mission back to the initial position.

Keep safety in mind when this requires moving drones.

abstractmethod async status()

Should write information about the current status of the mission to the logger under INFO.

abstractmethod async add_drones(names: list[str])

Add drones to the mission. Implementations should check that the drones are capable and meet mission requirements.

abstractmethod async remove_drones(names: list[str])

Remove drones from the mission. Implementations must take measures to prevent missions from running with too few drones

abstractmethod async mission_ready(drone: str)

Check whether any given drone is ready to keep going, i.e. is still connected etc.

Mission list

UAM

class dronemanager.missions.uam.UAMStages(*values)

Bases: MissionStage

Uninitialized = 1
Start = 2
SearchSingle = 3
SearchGroup = 4
POIFound = 5
Observation = 6
Return = 7
class dronemanager.missions.uam.UAMFlightArea(n_lower, n_upper, e_lower, e_upper, alt)

Bases: FlightArea

property x_min
property x_max
property y_min
property y_max
property z_min
property z_max
class dronemanager.missions.uam.FakeBattery

Bases: object

TIME_SCALE = 180
property battery_low
class dronemanager.missions.uam.UAMMission(dm, logger, name='uam')

Bases: Mission

Multi-Stage mission for the UAM Demo 2025.

The demo consists of two stages:T

DEPENDENCIES = ['external']
start_positions_y: dict[str, float]
batteries: dict[str, FakeBattery]
async poi_found()
async observation()
async rtb()
async reset()

Resets the mission back to the initial position.

Keep safety in mind when this requires moving drones.

async set_start()

Set the current stage to the start stage.

This should be called/used when the drones are all setup at their starting positions already.

async set_uninit()

Set the current stage to Uninitialized.

This function is only useful on a CLI to be able to reset without moving any drones. Some computations are performed when the “Start” stage is entered. Setting to Uninitialized and back allows reperforming these.

async status()

Should write information about the current status of the mission to the logger under INFO.

ready()
async add_drones(names: list[str])

Add drones to the mission. Implementations should check that the drones are capable and meet mission requirements.

async remove_drones(names: list[str])

Remove drones from the mission. Implementations must take measures to prevent missions from running with too few drones

mission_ready(drone)

Check whether any given drone is ready to keep going, i.e. is still connected etc.

property battery_levels

Engel

Mission for ENGEL data collection.

Capture images and combine with weather data and position information from the capturing drone, storing them. Also includes functions to retake the same position as in a previous image and capture another image, as well as assorted post-processing and meta-data handling.

class dronemanager.missions.engel.EngelImageInfo(time_utc, gps: ndarray, drone_att: ndarray, gimbal_att: ndarray, gimbal_absolute, cam_file: str)

Bases: object

to_json_dict()
classmethod from_json_dict(json_dict)
class dronemanager.missions.engel.ENGELCaptureInfo(images: list[EngelImageInfo], weather_data: WeatherData, camera_parameters: list[tuple])

Bases: object

to_json_dict()
classmethod from_json_dict(json_dict)
classmethod from_json_dict_legacy(json_dict)
class dronemanager.missions.engel.ENGELDataMission(dm, logger, name='engel')

Bases: Mission

Data collection mission for ENGEL

DEPENDENCIES = ['gimbal', 'camera', 'sensor.ecowitt', 'controllers']
async close()

Shutdown function for the script. It should end any running tasks and clear any resources.

By default, it cancels any tasks tracked in self._running_tasks.

async connect()

Connect to the Leitstand sensor

async configure_cam()

Set parameters for our camera (Workswell WIRIS enterprise), won’t work with others

async do_capture(reference_capture: ENGELCaptureInfo | None = None)

Capture an image and store relevant data.

async set_camera_parameters(params: list[tuple])
async replay_captures()
async transfer(drive_letter: str)

Load images from camera and do assorted metadata processing.

Loads images from camera and stores them in a folder named after their capture ID. The capture information file is also rewritten to account for this. This is intended to be done after flights with the camera directly attached to the computer.

Parameters:

drive_letter – Drive letter of the camera

Returns:

async copy(capture_file: str, target_dir: str)
async merge(other_files: list[str], output_file: str)
async save_captures_to_file(filename: str = None)
async load_captures_from_file(filename: str)

Load capture information from a file for the purpose of replaying it.

async reset()

Clear capture info

async done()
async status()

Print information, such as how many captures we have taken

async add_drones(names: list[str])

Adds camera and gimbal objects and stores current position for rtl

async remove_drones(names: list[str])

Removes camera and gimbal objects

async mission_ready(drone: str)

Check whether any given drone is ready to keep going, i.e. is still connected etc.