Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

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:

  1. If you haven’t already, activate the virtual environment:

    1. Windows command prompt: venv\Scripts\activate.bat

    2. Windows Powershell: .\venv\Scripts\Activate.ps1

      1. If you get an error with: running scripts is disabled on this system

      2. Run: Set-ExecutionPolicy Unrestricted

      3. This allows you to run any Powershell scripts at will. For more detail: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.3

    3. Linux and MacOS: source venv/bin/activate

  2. You should now see (venv) in the prompt line.

  3. Confirm the virtual environment uses Python 3.11: python --version

    1. Literally use python , none of the fancy stuff above.

    2. Example output: Python 3.11.9

  4. When you’re done developing, make sure to either close the terminal or run:

    1. Windows command prompt: venv\Scripts\deactivate.bat

    2. Everything else: deactivate

    3. This is important to avoid going to a different project and then accidentally polluting your current project’s virtual 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

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:

cd qr
pytest

Camera to QR integration:

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

python -m camera_qr_example

The text output should be as expected.

  • No labels