Missouri S&T Multirotor Robot Design Team's code for the Association for Unmanned Vehicle Systems International's 2022 Student Unmanned Aerial Systems Competition (AUVSI SUAS 2022)
flight/ # Physical motor control, movement, path planning, and other flight related algorithms
vision/ # Mapping, shape & text detection, and other computer vision related algorithms
run.py # Python program to run the competition code
integration_tests/ # Programs written to test discrete modules of the competition code
Information about files within each directory can be found in /<directory>/README.md
To run our competition code, you will need:
- A drone or drone simulator
- Python version 3.8 or higher
- Poetry (a list of managed dependencies can be found in the project config)
Follow these instructions exactly based on your platform:
-
Set up the development toolchain (platform dependent).
- Follow the steps on setting up your PX4 development toolchain based on your operating system
-
Install the proper Python version (see Requirements) using pyenv on Linux and macOS. For Windows, get the executable from the Python website.
-
Clone PX4 Firmware repository (tutorial here)
-
If testing without a drone, install a supported simulator
-
Clone the repository with
git clone --recursive https://github.com/MissouriMRR/SUAS-2022.git
-
In the root of the repository, run
poetry install
- Follow the steps in the installation instructions above
- If you are working only on computer vision code, you may skip steps 1, 4, and 5
- Initialize your virtual environment for running and testing code with
poetry shell
- You may now run and test your modules at will inside this shell
- To run the competition code, execute the following from the root directory
./run.py
- When you're done, deactivate and exit the virtual env with
exit
- Clone the repository with
git clone --recursive https://github.com/MissouriMRR/SUAS-2022.git
- Make sure you are on the most up-to-date
develop
branch withgit switch develop
thengit pull
- Create a branch with the proper naming format (see Creating A Branch)
- Make changes in your branch and commit regularly (see Committing Code)
- Once changes are complete, push your code, go to GitHub, and submit a "Pull Request". Then, fill in the necessary information. Any issues your PR solves should be denoted in the description along with a note that the PR "Closes #XX" where XX is replaced with the issue number you are closing. Request a review from one of the software leaders on the upper right-hand side of the PR.
- Once it has been reviewed by the leads, it can be accepted and you can merge your branch into the develop branch.
- Once this is done, you may delete your branch, and the cycle continues...
- To contribute, you must create a new branch for your code
- If you've made changes in
develop
and want to add your changes to a new branch, use
git switch -c "branch_name"
- Otherwise, create & switch to a new branch with
git checkout -b "branch_name"
# or both of
git branch "branch_name"
git checkout "branch_name"
branch_name
should follow the conventionfeature/{feature_name}
, orhotfix/{fix_name}
- When programming with a VCS like Github, you should make changes and commit regularly with clear commit messages.
- This repo uses git hooks for the automated execution of scrips that reformat & analyze your code when a commit is made.
- In order for a pull request to be considered, commits must be made on a repo clone with pre-commit properly installed
- Here are the commands for the first-time setup & install of pre-commit for the repo
pip install pre-commit
pre-commit install
- You can then use
pre-commit run
to run the pre-commit hooks on all staged files or you can let it automatically trigger when you make a commit - Note that if you decide not to use
pre-commit run
before committing code, and your code gets reformatted but passes all of the analysis hooks, you must re-commit that code with a new second commit message either mirroring the previous commit message or stating that the code was reformatted.
- When committing code, our pre-commit hooks will scan your files and look for errors, type inconsistencies, bad practices, and non-conformities to our coding style.
- This means that your commit will be rejected if it fails any one of the pre-commit hooks.
- Oftentimes, one may need to commit code to save their place or the current version in unfinished code and bypass pre-commit hooks
- To bypass all pre-commit hooks, add the
--no-verify
flag to yourgit commit
execution.
- To bypass specific hooks on a module, place the following comments at the beginning of your file(s) for each respective hook.
- Black:
# fmt: off
- Mypy:
# type: ignore
- Pylint:
# pylint: disable=all
- Black:
- Pull requests made that bypass pre-commit hooks without prior approval will be rejected.
We adopt the MIT License for our projects. Please read the LICENSE file for more info