Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel6
minLevel1
outlinefalse
typelist
printablefalse

Overview

Audience: Software members.

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

...

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.

...

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

Development

Activate the environment: Python Repository

...

Include Page
CV:Activate the Python virtual environment
CV:Activate the Python virtual environment

Data exchange structs

Spatial coordinate classes:

Spatial coordinate classes are organized along the following axes:

  • Coordinate system

  • Altitude

  • Name

Coordinate system

Altitude

Name

Class

Expected user

Local

No

No

LocationLocal (NE)

Airside

Local

No

Yes

NamedLocationLocal

-

Local

Yes

No

PositionLocal (NED)

Airside

Local

Yes

Yes

NamedPositionLocal

-

Global

No

No

LocationGlobal (WGS84)

Airside

Global

No

Yes

NamedLocationGlobal

Pathing

Global

Yes

No

PositionGlobal (WGS84 with alt - sea level)

Airside

Global

Yes

Yes

NamedPositionGlobal

-

GlobalRelativeAltitude

Yes

No

PositionGlobalRelativeAltitude (WGS84 with alt - relative to home location)

-

GlobalRelativeAltitude

Yes

Yes

NamedPositionGlobalRelativeAltitude

Pathing

Orientation:

Orientation is for all coordinate systems.

camera

Python serialization and deserialization for Autonomy.

Testing:

Attach a camera, then test the software:

...

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

comms

Testing:

Attach 2 USBTTL devices and wire them together, then test the software.

...

kml

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

Testing:

Code Block
cd comms
python -m test_tx

Asynchronous:

In a terminal:

Code Block
cd comms
python receive

In another terminal:

Code Block
cd comms
python transmit

...

kml
pytest

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:

Code Block
python -m test_flight_controller

qr

QR scanning and text output.

Testing:

Unit tests:

Code Block
cd qr
pytest

...

The text output should be as expected.

Setup

Follow the instructions: Python Repository

Install packages: pip install -r requirements.txt

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:

Code Block
cd image_encoding
python -m test_image_encode_decode 

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:

Code Block
cd network
pytest

Integration test with image_encoding:

Code Block
pytest (tests the whole repository)
OR
pytest test_send_image.py (tests only this integration test)