Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/flight structure #29

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0a8c6f8
Prelim Interop Testing
cjhr95 Oct 27, 2021
ad080ff
JSON Parsing for Waypoints & St. Obstacles
cjhr95 Mar 2, 2022
4849718
Prelim Base Flight Structure
cjhr95 Mar 4, 2022
e2ad2f7
Flight Structure w/o Decorators
cjhr95 Mar 9, 2022
c90eaa2
Settings w/ Decorators
cjhr95 Mar 9, 2022
51e3348
Test
cjhr95 Mar 16, 2022
c007851
JSON Parsing Documentation
cjhr95 Mar 23, 2022
59ef20b
Single Line Docstring and Test File Removal
cjhr95 Mar 23, 2022
17d9c3a
Documentation updates
cjhr95 Apr 8, 2022
86e31b9
Redundant Task
mat-px Nov 4, 2021
4be6bfc
pre-commit config from IARC
mat-px Nov 4, 2021
5c2816e
gitignore from IARC
mat-px Nov 4, 2021
332a2c0
Update .pre-commit-config.yaml
mat-px Nov 4, 2021
1b80126
Update README.md
mat-px Nov 4, 2021
5fed42d
Update README.md
mat-px Nov 4, 2021
e1fa9f7
Add json, xml, yaml, and mixed line ending hooks
mrouie Nov 5, 2021
c283b6a
Resolved errors
mrouie Nov 5, 2021
e3f7cfe
Create object bounding box script.
ClayJay3 Nov 5, 2021
fdee5e9
Update object_bounding_box.py
ClayJay3 Nov 10, 2021
a68ed20
Test file. remove pls
mrouie Mar 2, 2022
c85e276
Auto-Formatting
fallscameron01 Feb 9, 2022
317d562
Initial text detection
fallscameron01 Feb 9, 2022
3664a47
notes on random ideas
fallscameron01 Feb 9, 2022
db2ed9b
Updated format, typing
fallscameron01 Feb 11, 2022
91a8e3f
Filtering detected text
fallscameron01 Feb 11, 2022
d1cf74b
Plan for getting text color
fallscameron01 Feb 11, 2022
b05b5f9
Update doc, fix char check
fallscameron01 Feb 11, 2022
5dee156
Image processing, fixed detection
fallscameron01 Feb 16, 2022
ebb5cf6
Draw line around detected characters
fallscameron01 Feb 16, 2022
79f6418
Autoformatting
fallscameron01 Feb 16, 2022
26b1d7b
New preprocessing, rotate images
fallscameron01 Feb 23, 2022
058fbe4
Put functions in class
fallscameron01 Feb 23, 2022
089acfd
Add check for full-image text
fallscameron01 Feb 23, 2022
970e16f
Fix crop/rotation, cleanup
fallscameron01 Mar 2, 2022
ee9b833
Add get_text_characteristics, cleanup
fallscameron01 Mar 2, 2022
322595d
Cleanup and documentation updates
fallscameron01 Mar 2, 2022
25f1927
Add command line args
fallscameron01 Mar 4, 2022
a1961b3
Initial obstacle avoidance code
cmspencer109 Mar 4, 2022
7240e91
Document and type all functions
cmspencer109 Mar 6, 2022
b21c2d2
Resolve documentation issues and dead code
cmspencer109 Mar 9, 2022
117921c
Add poetry python dependencies and dev dependencies
mrouie Mar 11, 2022
aeb9168
Reformat file.
mrouie Mar 11, 2022
bbe1e1c
AirDrop & ODLC States
cjhr95 Apr 15, 2022
5c5a33f
Revert "Documentation updates"
cjhr95 Apr 15, 2022
1a6f2e0
Documentation
cjhr95 Apr 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# PyCharm
.idea/
# Vim
.vim/
# Visual Studio Code
.vscode/

# Spreadsheets
*.csv
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- repo: https://github.com/ambv/black
rev: 21.10b0
hooks:
- id: black
language_version: python3.8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
- id: end-of-file-fixer
- id: check-json
- id: check-xml
- id: check-yaml
- id: check-toml
- id: mixed-line-ending
args: ['--fix=lf']
description: Forces line endings to the UNIX LF character
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Missouri S&T Multirotor Robot Design Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# SUAS-2022
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)

# Setup
```
pip install pre-commit
pre-commit install
```
> `branch_name` should follow the convention `feature/{feature_name}`, or `hotfix/{fix_name}`
3 changes: 3 additions & 0 deletions flight/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions flight/.idea/flight.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions flight/.idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions flight/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions flight/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions flight/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 68 additions & 0 deletions flight/Stationary Obstacle Avoidance/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import obstacle_avoidance
import plotter

SAFETY_MARGIN = 10 # meters
MAX_DISTANCE = 0 # meters

waypoints = [
{"latitude": 37.94883876837826, "longitude": -91.78443677093598, "altitude": 100.0},
{
"latitude": 37.949016435151485,
"longitude": -91.78364283711778,
"altitude": 150.0,
},
{"latitude": 37.94957481364174, "longitude": -91.78369648129468, "altitude": 300.0},
{"latitude": 37.95004012580848, "longitude": -91.78468353414975, "altitude": 250.0},
{
"latitude": 37.949735558177984,
"longitude": -91.78542382379104,
"altitude": 150.0,
},
{
"latitude": 37.948790418686826,
"longitude": -91.78605823636349,
"altitude": 200.0,
},
{
"latitude": 37.948576497594445,
"longitude": -91.78460843230208,
"altitude": 150.0,
},
]

obstacles = [
{
"latitude": 37.94986244280119,
"longitude": -91.78386816205061,
"radius": 20,
"height": 400,
},
{
"latitude": 37.949388706571064,
"longitude": -91.78569200437985,
"radius": 30,
"height": 200,
},
{
"latitude": 37.94828884469052,
"longitude": -91.78546673913256,
"radius": 50,
"height": 150,
},
]

if __name__ == "__main__":
# Convert latlon data to UTM projection
waypoints = obstacle_avoidance.all_latlon_to_utm(waypoints)
obstacles = obstacle_avoidance.all_latlon_to_utm(obstacles)

# Plot data before processing
# plotter.plot_data(waypoints, obstacles, SAFETY_MARGIN)

# Find new safe path between all waypoints
waypoints = obstacle_avoidance.get_safe_route(
waypoints, obstacles, SAFETY_MARGIN, MAX_DISTANCE, debugging=False
)

# Plot data after processing
plotter.plot_data(waypoints, obstacles, SAFETY_MARGIN, flight_path_color="bo-")
Loading