Software repository named common

Overview

Audience: Software members.

The repository named common contains cross subteam code used across multiple repositories.

Repository:

https://github.com/UWARG/common

Software

Setup

Follow the instructions: Autonomy Workflow Software

Install packages: pip install -r requirements.txt

Usage

Add this repository as a submodule.

  • Install submodule packages: pip install -r [path to submodule]/requirements.txt

Use the modules under each subdirectory as a normal Python import.

Development

Activate the environment:

camera

Python serialization and deserialization for Autonomy.

Testing:

Attach a camera, then test the software:

cd camera python -m test_camera

Every nth image is saved as image0.png , image1.png , etc. They can be deleted after the test.

kml

Converts a list of waypoints to KML file for visualization (e.g. Google Earth, Google Maps).

Testing:

cd kml pytest

mavlink

Connection to drone using the MAVLink protocol. This module uses WGS 84 only.

Testing:

Start Mission Planner simulation with MAVLink forwarding: Mission Planner Simulated Ardupilot

Remember the home location.

Create a mission with a few waypoints and start the mission.

Run and make sure the home location matches:

python -m test_flight_controller

qr

QR scanning and text output.

Testing:

Unit tests:

Camera to QR integration:

Attach a camera and prepare a QR code to be shown, then test the software:

The text output should be as expected.

image_encoding

Encode and decode images from numpy array to jpeg (raw bytes). See Profile Encode Repository and Formats for more details on why jpeg was chosen.

Testing:

There will be a result.jpg in the image_encode directory after the test to ensure that the images look similar.

network

TCP and UDP socket tools to send data across a network (private networks).

Testing:

Unit test:

Integration test with image_encoding: