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

Spring 2024 final merge #33

Open
wants to merge 436 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
436 commits
Select commit Hold shift + click to select a range
aca855e
ui
hebronh Feb 19, 2024
b15c5be
progress in ui design
hebronh Feb 19, 2024
06a85d3
update on the wind type bug
yashaswini-slu Feb 22, 2024
7aa6156
Merge pull request #73 from oss-slu/windTypeBugFix
BohanZhang1 Feb 22, 2024
53cd69c
newBranch
Feb 26, 2024
715d435
log fix
Feb 26, 2024
b4c5543
updated the design of help text
yashaswini-slu Feb 26, 2024
167abff
unblocked the gps details in UI
yashaswini-slu Feb 26, 2024
fc90c66
Merge branch 'main' into issue61FuzzyTestToTestConfiguration
sr259 Feb 26, 2024
0d94426
removed x emoticon in pass case
hebronh Feb 26, 2024
0defcff
Fixed the conflict after some issues
sr259 Feb 26, 2024
9c760b9
Merge pull request #72 from oss-slu/issue61FuzzyTestToTestConfiguration
yashaswini-slu Feb 26, 2024
c61a527
moved
hebronh Feb 26, 2024
370a2d2
removed old code
Feb 26, 2024
f9ba29f
Revert "removed old code"
Feb 26, 2024
a8ec60d
final changes for report dashboard
hebronh Feb 27, 2024
0c4539d
table changes
hebronh Feb 27, 2024
1d4e657
Merge pull request #75 from oss-slu/pr71update
yashaswini-slu Feb 28, 2024
3578fe9
final changes
hebronh Feb 28, 2024
9f4f2ce
update on the table design
yashaswini-slu Feb 29, 2024
80e6e07
Merge pull request #70 from oss-slu/65-acceptednotacceptedui
yashaswini-slu Feb 29, 2024
f1fc722
change
hebronh Mar 1, 2024
840ce75
redirectingbuttons
hebronh Mar 2, 2024
94ac1f2
Initial documentation for windows
sr259 Mar 4, 2024
d1a7cf9
landing page edits
hebronh Mar 11, 2024
b54118f
Merge branch 'main' of https://github.com/oss-slu/DroneWorld into iss…
sr259 Mar 14, 2024
b9527ea
Adding windows and mac installation, as well as changing readme to ac…
sr259 Mar 14, 2024
465df9f
Fixed issue as well as added more details
sr259 Mar 17, 2024
b868a9e
adding readme
sr259 Mar 17, 2024
f9764ea
adding windows installation
sr259 Mar 17, 2024
cedb785
Rename WindowsInstallation.md to windowsinstallation.md
sr259 Mar 17, 2024
81e6ad2
changes
hebronh Mar 18, 2024
9464f0a
apiCall
Mar 18, 2024
3d88e29
final changes
hebronh Mar 18, 2024
482cd19
removed --force in instructions
sr259 Mar 18, 2024
10ac0e4
Merge branch 'issue76WindowsDocumentation' of https://github.com/oss-…
sr259 Mar 18, 2024
74a19fb
removed --force in instructions, removed Python and React from instru…
sr259 Mar 18, 2024
471d1e8
About Us is now a link
hebronh Mar 18, 2024
7bbf980
updated simulation button
hebronh Mar 18, 2024
14e66aa
Merge pull request #79 from oss-slu/issue76WindowsDocumentation
yashaswini-slu Mar 18, 2024
cc11782
Merge pull request #78 from oss-slu/62-uilandingpage
yashaswini-slu Mar 18, 2024
630af0d
Merge branch 'main' of https://github.com/oss-slu/DroneWorld into iss…
sr259 Mar 18, 2024
c61af99
apiCallUpdate
Mar 18, 2024
7add58f
Fixed bug where settings were being sent to as strings, made gps sett…
sr259 Mar 19, 2024
5d28438
Fixed parsing bug
sr259 Mar 24, 2024
98a9f9f
starting link
hebronh Mar 25, 2024
c842284
base64 and Monitor view
Mar 25, 2024
76ea6d0
removed the api under development message
yashaswini-slu Mar 25, 2024
dcc9685
update on the routing links
yashaswini-slu Mar 26, 2024
bf98803
app route added
Apr 1, 2024
d0e57eb
500
Apr 1, 2024
9073cff
updates
hebronh Apr 7, 2024
43bf162
Merge pull request #83 from oss-slu/issue82BarometerMagnetometerBug
yashaswini-slu Apr 7, 2024
2e11736
Merge pull request #74 from oss-slu/issue43update
yashaswini-slu Apr 7, 2024
6927f77
updated changes
hebronh Apr 8, 2024
4e2c9a9
updated pull request changes
hebronh Apr 9, 2024
f68c04d
About Us Card
Apr 9, 2024
832f13d
About Us
Apr 10, 2024
98b4d98
Merge pull request #86 from oss-slu/issue63fix
yashaswini-slu Apr 11, 2024
7034871
Starting button to open files
sr259 Apr 15, 2024
5fc3509
reverting back to original, making a new branch
sr259 Apr 15, 2024
548ec38
adding a button to allow users to see the main report
sr259 Apr 15, 2024
c0e77b9
Merge branch 'main' into issue43api
Apr 15, 2024
90f9e62
fx
Apr 17, 2024
c4c7842
changes
hebronh Apr 18, 2024
3ffcd99
Turbulent Wind
Apr 19, 2024
cc3cd4f
Turbulent Wind
Apr 19, 2024
c4c4a3b
Windshear
Apr 19, 2024
24abd35
Windshear
Apr 19, 2024
54ffb89
Merge pull request #90 from oss-slu/issue89
BohanZhang1 Apr 19, 2024
d6e439e
list_folder_contents()
Apr 22, 2024
ef992af
Merge branch 'main' of https://github.com/oss-slu/DroneWorld into iss…
sr259 Apr 22, 2024
e60547f
list_folder_contents()
Apr 22, 2024
4c757c7
list_folder_contents()
Apr 22, 2024
b87a0f4
added git ignore files for pycache
yashaswini-slu Apr 22, 2024
4f969b8
Merge branch 'main' of https://github.com/oss-slu/DroneWorld into iss…
sr259 Apr 23, 2024
200c826
Current progress on handling json instead of files
sr259 Apr 26, 2024
e2fe87c
Fuzzy dashboard does not accept json as is, some configuring needs to…
sr259 Apr 28, 2024
033b386
final
hebronh Apr 28, 2024
deda3e8
Draft fix
Apr 29, 2024
11f5c27
Parser with png/html
Apr 29, 2024
9c7567d
Merge branch 'main' into issue43api
Apr 29, 2024
8f8bcfb
Adding button to call the backend, need the api method merged into ma…
sr259 Apr 30, 2024
82fcbc5
Additional changes
sr259 Apr 30, 2024
f8ad0a9
made api call from kalebs implementation
sr259 Apr 30, 2024
2d32fe0
Added post method to api call
sr259 Apr 30, 2024
304eb9d
Working api call with image contents
sr259 Apr 30, 2024
e82ce43
Uncommented regular list-reports
Apr 30, 2024
88d2feb
new get info content
May 1, 2024
617f972
Maybe Z fix
May 1, 2024
b8d323e
tech fix
May 1, 2024
7e0af59
removed elif
May 2, 2024
399982c
fix
May 2, 2024
3a15d12
Undo testing change
May 2, 2024
3c667bc
added detail dashborad navigation
yashaswini-slu May 2, 2024
73f6aab
Fuzzy parse
May 2, 2024
19c6c0a
Removed hard coded value
May 2, 2024
a8b3892
Made changes to the report dashboard as well as added the key to the …
sr259 May 2, 2024
23c64de
got a warning about putting an api key so i reverted it back into the…
sr259 May 2, 2024
7a7583f
changes
hebronh May 3, 2024
b0798a8
Fuzzy Fix
May 3, 2024
6e33117
done
hebronh May 3, 2024
b89bead
removed extra About US
hebronh May 3, 2024
1024345
merging with hebrons branch
sr259 May 3, 2024
da7dbf1
merging kalebs branch
sr259 May 3, 2024
5d86817
json fix
May 3, 2024
701c84f
JSON fix
May 3, 2024
154f651
removed Welcome to DroneWorld
hebronh May 4, 2024
c6f818b
update on report dashboard
yashaswini-slu May 5, 2024
0fd3bc6
update on parameters
yashaswini-slu May 5, 2024
a05e4bf
issue43api merge
yashaswini-slu May 5, 2024
e37726a
update on voilation message
yashaswini-slu May 5, 2024
21752da
removed line
May 5, 2024
42d9a88
Removed z comment
May 5, 2024
4c9308f
Removed z comment
May 5, 2024
72191c8
Merge pull request #92 from oss-slu/issue91
yashaswini-slu May 5, 2024
ec677bc
removed extra text
yashaswini-slu May 6, 2024
bc1dbaf
listreport
May 6, 2024
5dd64fe
Merge branch '81-link-dashboard-to-landing-page' of https://github.co…
sr259 May 6, 2024
4ecf7fe
Made button a link
sr259 May 6, 2024
0bbb701
added navbar to all components
yashaswini-slu May 6, 2024
63652b0
Merge branch 'main' into issue43api
May 6, 2024
654f1b3
listreport
May 6, 2024
f582878
merging
sr259 May 6, 2024
f5a94e1
fixed merge
sr259 May 6, 2024
5c2cc1b
update on useEffect for the dashboard
yashaswini-slu May 6, 2024
e8b0ca3
Merge branch 'issue52DisplayMainReport' of https://github.com/oss-slu…
yashaswini-slu May 6, 2024
44a6e94
updated
hebronh May 6, 2024
cbdb138
Merge branch 'issue43api' into issue52DisplayMainReport
yashaswini-slu May 6, 2024
74484b7
updated with main
hebronh May 6, 2024
e854263
Merge pull request #80 from oss-slu/issue43api
yashaswini-slu May 6, 2024
207b174
update on the back button in fuzzyDashboard
yashaswini-slu May 6, 2024
b897957
update on style
yashaswini-slu May 6, 2024
62cd971
Merge pull request #84 from oss-slu/81-link-dashboard-to-landing-page
yashaswini-slu May 6, 2024
91c9307
merging
sr259 May 6, 2024
86243b1
update on create simulation error
yashaswini-slu May 6, 2024
7cc28bd
Merge branch 'main' into issue52DisplayMainReport
yashaswini-slu May 6, 2024
79238b1
Merge pull request #87 from oss-slu/issue52DisplayMainReport
yashaswini-slu May 6, 2024
c7ffe28
Revert to React 17 rendering API for compatibility
mohamdlog Aug 14, 2024
db5b1ae
Downgrade React version to 17 for compatibility with @mui/styles
mohamdlog Aug 14, 2024
a046340
Resolve connection error related to API key
mohamdlog Aug 14, 2024
aafca34
Add .bat and .sh scripts for easier backend server startup
mohamdlog Aug 14, 2024
cbe887d
Create LICENSE
mohamdlog Sep 6, 2024
0babc06
add codeowners file
mohamdlog Sep 14, 2024
86ef3c4
add codeowners file
mohamdlog Sep 14, 2024
4523d55
fixed the issue, used the dayjs library which handles null values, wh…
nguzinski Sep 15, 2024
f2968ee
Update CODEOWNERS
mohamdlog Sep 22, 2024
6d83367
issue94Loadingattempt
Damerson1 Sep 16, 2024
53a0633
issue94-LoadingUIResolved
Damerson1 Sep 16, 2024
f1a4b56
issue94-LoadingUIResolved
Damerson1 Sep 16, 2024
7f5255a
Updated Code based on review
Damerson1 Sep 22, 2024
d582b22
Changed name of Loading file to Loading.jsx
Damerson1 Sep 22, 2024
0ae437b
Rename Loading.JSX to Loading.jsx
Damerson1 Sep 22, 2024
d935a51
Delete frontend/src/components/Loading.js
Damerson1 Sep 23, 2024
d51300b
Battery Monitor Commit
Sep 16, 2024
e81d811
Target Battery value and info alert section update
Sep 23, 2024
cacfcab
input fields bug fix
Sep 23, 2024
94d52d0
Add pymongo to requirements
mohamdlog Sep 25, 2024
b501390
Remove /unreal_app/
mohamdlog Sep 26, 2024
2deae23
Update README and installation instructions
mohamdlog Sep 26, 2024
6f32ea6
Combine multiple gitignore files
mohamdlog Sep 26, 2024
8dd5c93
Add not found page (#95)
Alhajideen Sep 29, 2024
4a2dd4f
Prepare files for GCS implementation
mohamdlog Oct 1, 2024
776b4ae
Setup GCS client
mohamdlog Oct 1, 2024
597f354
Merge pull request #122 from oss-slu/setup-gcs-client
mohamdlog Oct 1, 2024
91ba6cf
Update CODEOWNERS
mohamdlog Oct 3, 2024
fd6daf6
Create workflows for testing
mohamdlog Oct 6, 2024
b864602
Update workflow
mohamdlog Oct 6, 2024
f7aaa53
Update workflow files (#131)
mohamdlog Oct 6, 2024
8f18889
save report to GCS
Oct 7, 2024
0301482
wrapping up
nguzinski Oct 7, 2024
aa38711
Refactoring of save_method
Damerson1 Oct 7, 2024
f571987
AbstractMission Changes
Damerson1 Oct 8, 2024
bb92837
Add desktop.ini and key.json to .gitignore
Damerson1 Oct 8, 2024
30ca9fc
Save_method tested
Damerson1 Oct 8, 2024
d0e7d13
Update abstract_mission.py
Damerson1 Oct 8, 2024
1a460ac
Update GCS storage
mohamdlog Oct 8, 2024
a70ba04
Work in Progress uploading html files.
Damerson1 Oct 14, 2024
66e4788
Update point_deviation_monitor.py
Damerson1 Oct 14, 2024
05296e5
initial set up of the abstract class and concrete implementation
nguzinski Oct 14, 2024
67e9a90
this should work
nguzinski Oct 14, 2024
5984479
this should work
nguzinski Oct 14, 2024
ef2d591
fetch report files from GCS
Oct 14, 2024
d988694
Uploading Html files currently working
Damerson1 Oct 20, 2024
0f9f12e
Uploading Html files currently working
Damerson1 Oct 20, 2024
a25bb73
Attempt to pass test, indent error
Damerson1 Oct 20, 2024
351da92
Replaces unneeded inheritance and functions
Damerson1 Oct 20, 2024
02991e4
local file handling bug fix
Oct 21, 2024
36bbaa5
delete unnecessary file
Oct 21, 2024
6b4e6bb
edits
Oct 21, 2024
c188647
Reworked File Path
Damerson1 Oct 21, 2024
8266fda
another edit
Oct 21, 2024
dc53047
Removed local html file saving from draw_interactive_trace_vs_planned
Damerson1 Oct 21, 2024
2a83956
pushing up
nguzinski Oct 21, 2024
7ff4e45
Update
mohamdlog Oct 22, 2024
88cb8cc
Merge pull request #142 from oss-slu/issue139
mohamdlog Oct 22, 2024
35524cf
Merge pull request #140 from oss-slu/issue138
mohamdlog Oct 22, 2024
d2e6ccd
Update
mohamdlog Oct 22, 2024
d3d1ec5
Fix merge conflict
mohamdlog Oct 22, 2024
6762c6a
Update
mohamdlog Oct 22, 2024
a47a8e2
Merge pull request #141 from oss-slu/137-create-storageservice-interf…
mohamdlog Oct 22, 2024
29e6c16
Replaces every instance of upload_to_gcs with save_report_to_storage
Damerson1 Oct 28, 2024
0a4c01c
parse pass/fail counts
Oct 28, 2024
5a39a80
setting up explanation of task
nguzinski Oct 28, 2024
40cbf53
Merge pull request #156 from oss-slu/issue147
mohamdlog Oct 29, 2024
c8ff76b
Update drone count
mohamdlog Oct 29, 2024
789824a
Merge pull request #157 from oss-slu/issue146
mohamdlog Oct 29, 2024
8d6d244
Fix pass/fail extra counts (#159)
mohamdlog Oct 30, 2024
b7dc0f6
update files for sprint 5
mohamdlog Oct 31, 2024
9480419
Update workflow actions and requirements
mohamdlog Oct 31, 2024
dcf1005
update wiki
mohamdlog Oct 31, 2024
335932f
add loader in report dashboard
Alhajideen Oct 31, 2024
06c4d93
Update workflows
mohamdlog Nov 1, 2024
0c9d615
Merge pull request #164 from oss-slu/update-workflow
mohamdlog Nov 1, 2024
56d4bac
separate header from loader in homepage
Alhajideen Nov 1, 2024
54eb9ec
fix alignments of text on homepage
Alhajideen Nov 3, 2024
a5c7d46
fix alignments of text on homepage
Alhajideen Nov 3, 2024
08ea2c9
Merge pull request #163 from Alhajideen/add_loader_in_reports_dashboard
mohamdlog Nov 3, 2024
feb6c0a
fixed those typos
nguzinski Nov 4, 2024
58570a1
Fix typo
mohamdlog Nov 5, 2024
611166f
Remove old comments
mohamdlog Nov 5, 2024
207d688
Merge pull request #158 from oss-slu/145-fix-violation-detected-in-re…
mohamdlog Nov 5, 2024
61d3cbd
Remove extra files
mohamdlog Nov 5, 2024
ea5314b
Issue165 File Paths need work
Damerson1 Nov 11, 2024
11fc336
Merge branch 'main' of https://github.com/oss-slu/DroneWorld
Damerson1 Nov 11, 2024
bff6f0c
initially setting up the process
nguzinski Nov 11, 2024
cd4b7ee
first attempt
nguzinski Nov 11, 2024
613b38e
tested and complete, with built in auto test
nguzinski Nov 11, 2024
8625953
html file links
Nov 11, 2024
4e4825c
File paths work in progress, files upload, two separate paths are gen…
Damerson1 Nov 17, 2024
7b9dbe7
Updated initializations of the grapher to include log_subdir and stor…
Damerson1 Nov 18, 2024
2facea2
improve legibility
Nov 18, 2024
0491d97
rid of extra folder
Nov 18, 2024
ed8216e
final touches as requested
nguzinski Nov 18, 2024
ca711c9
final touches as requested
nguzinski Nov 18, 2024
44e655c
PNG file handling fix
Nov 19, 2024
5cf08d8
Update
mohamdlog Nov 19, 2024
cf7948a
Merge pull request #172 from oss-slu/issue165
mohamdlog Nov 19, 2024
859dc70
Update
mohamdlog Nov 19, 2024
c64f60d
Merge pull request #170 from oss-slu/166-add-functionality-to-upload-…
mohamdlog Nov 19, 2024
97d73b3
Update
mohamdlog Nov 19, 2024
b65ae54
Merge pull request #171 from oss-slu/issue167
mohamdlog Nov 19, 2024
94e4691
HTML frontend
Nov 25, 2024
d0dcd67
Update
mohamdlog Nov 28, 2024
7f034d4
Update
mohamdlog Nov 28, 2024
8f4de86
Merge pull request #178 from oss-slu/issue175
mohamdlog Nov 28, 2024
114744a
Update
mohamdlog Nov 28, 2024
d83f318
Merge pull request #176 from oss-slu/173-implement-report-pulling-in-…
mohamdlog Nov 28, 2024
5c891af
Update
mohamdlog Nov 29, 2024
e2689b1
Merge pull request #177 from oss-slu/issue1174
mohamdlog Nov 29, 2024
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
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Code owners for the entire repository
* @ankyAgrawal @BohanZhang1 @mohamdlog @yashaswini-slu
55 changes: 55 additions & 0 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Backend CI

on:
push:
branches:
- main
- docker-main
pull_request:
branches:
- main
- docker-main

jobs:
backend-setup:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.10]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache pip dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r backend/requirements.txt

- name: Lint backend code
run: |
pip install flake8
flake8 backend/ --max-line-length 160 --ignore E127,E251,E302,E501,E261,E262,E265,F401,F403,F405,F841,W293,E128,E303,E305,W292,E122,W391,E111,E117,E301,E125,E222,E226,E201,E203,E202,E721,W503,W504,E272,E126,E225,W291,E211,E231,E722,W191,E712,F523,E402,E306

- name: Format backend code with Black
run: |
pip install black
black backend/

- name: Perform Dependency Audit
run: |
pip install safety
safety check -r backend/requirements.txt
57 changes: 57 additions & 0 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Frontend CI

on:
push:
branches:
- main
- docker-main
pull_request:
branches:
- main
- docker-main

jobs:
frontend-setup:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: |
cd frontend
npm install

- name: Lint frontend code
run: |
cd frontend
npm run lint

- name: Format frontend code with Prettier
run: |
cd frontend
npm run format

- name: Build frontend
run: |
cd frontend
npm run build

- name: Run ESLint Security Checks
run: |
cd frontend
npm audit --omit=dev --audit-level=critical || true
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Ignore Visual Studio files
.vs/

# Ignore virtual environments
backend/venv/

# Ignore Node.js dependencies
node_modules/

# Ignore Python bytecode files and __pycache__ directories globally
*.pyc
__pycache__/

# Ignore backend-specific files
backend/*.csv
backend/*.html
backend/*.png
backend/*.jpg

# Frontend ignores
# dependencies
frontend/node_modules
frontend/.pnp
frontend/.pnp.js

# testing
frontend/coverage

# production
frontend/build

# misc
frontend/.DS_Store
frontend/.env.local
frontend/.env.development.local
frontend/.env.test.local
frontend/.env.production.local

frontend/npm-debug.log*
frontend/yarn-debug.log*
frontend/yarn-error.log*

# Ignore frontend package-lock.json
frontend/package-lock.json

# Ignore Windows system file
desktop.ini

# Ignore Google Cloud service account key
key.json
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) 2024 Open Source with SLU

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.
9 changes: 0 additions & 9 deletions backend/.gitignore

This file was deleted.

14 changes: 12 additions & 2 deletions backend/PythonClient/multirotor/airsim_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
from abc import abstractmethod

from PythonClient import airsim

from PythonClient.multirotor.storage.storage_config import get_storage_service

class AirSimApplication:
# Parent class for all airsim client side mission and monitors
def __init__(self):
# Set up the storage service
self.storage_service = get_storage_service()

self.circular_mission_names = {"FlyInCircle"}
self.polygon_mission_names = {"FlyToPoints", "FlyToPointsGeo"}
self.point_mission_names = {"FlyStraight"}
Expand Down Expand Up @@ -59,6 +62,13 @@ def append_pass_to_log(self, new_log_string):
def save_report(self):
pass

def save_report_to_storage(self, file_name, content, content_type='text/plain'):
"""
Saves the content as a report and uploads it using the storage service.
Uses the upload_to_service method of the storage service.
"""
self.storage_service.upload_to_service(file_name, content, content_type)

def save_pic(self, picture):
self.snap_shots.append(picture)

Expand Down Expand Up @@ -104,4 +114,4 @@ def get_cesium_origin(self):
lat = data["latitude"]
lon = data["longitude"]
height = data["height"]
return [lat, lon, height]
return [lat, lon, height]
57 changes: 42 additions & 15 deletions backend/PythonClient/multirotor/control/simulation_task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def add_task(self, raw_request_json, uuid):
json.dump(raw_request_json, f, indent=4)

def __populate_drone_and_mission_settings(self, new_setting_dot_json, raw_request_json):
print(new_setting_dot_json)
for single_drone_setting in raw_request_json["Drones"]:
# Must-exist params for setting.json or mission dispatch
single_drone_setting_copy = copy.deepcopy(single_drone_setting)
Expand All @@ -180,10 +181,36 @@ def __populate_drone_and_mission_settings(self, new_setting_dot_json, raw_reques

diff_dict = self.__find_diff(single_drone_setting_copy, self.__DEFAULT_DRONE_FULL_LENGTH)

if "Sensors" in single_drone_setting:
diff_dict["Sensors"] = diff_dict.get("Sensors", {})
if "Barometer" in single_drone_setting["Sensors"]:
diff_dict["Sensors"]["Barometer"] = single_drone_setting["Sensors"]["Barometer"]
if "Magnetometer" in single_drone_setting["Sensors"]:
diff_dict["Sensors"]["Magnetometer"] = single_drone_setting["Sensors"]["Magnetometer"]
if "GPS" in single_drone_setting["Sensors"]:
diff_dict["Sensors"]["GPS"] = single_drone_setting["Sensors"]["GPS"]

new_one_drone_json = {
drone_name: dict(VehicleType="SimpleFlight", X=drone_x, Y=drone_y, Z=drone_z)
drone_name: dict(FlightController="SimpleFlight", X=drone_x, Y=drone_y, Z=drone_z)
}

# # GPS settings
# if "GPS" in single_drone_setting["Sensors"]:
# diff_dict["Sensors"]["GPS"] = {
# "EphTimeConstant": single_drone_setting["Sensors"]["GPS"].get("EphTimeConstant", 0.9),
# "EpvTimeConstant": single_drone_setting["Sensors"]["GPS"].get("EpvTimeConstant", 0.9),
# "EphInitial": single_drone_setting["Sensors"]["GPS"].get("EphInitial", 25),
# "EpvInitial": single_drone_setting["Sensors"]["GPS"].get("EpvInitial", 25),
# "EphFinal": single_drone_setting["Sensors"]["GPS"].get("EphFinal", 0.1),
# "EpvFinal": single_drone_setting["Sensors"]["GPS"].get("EpvFinal", 0.1),
# "EphMin3d": single_drone_setting["Sensors"]["GPS"].get("EphMin3d", 3),
# "EphMin2d": single_drone_setting["Sensors"]["GPS"].get("EphMin2d", 4),
# "UpdateLatency": single_drone_setting["Sensors"]["GPS"].get("UpdateLatency", 0.2),
# "UpdateFrequency": single_drone_setting["Sensors"]["GPS"].get("UpdateFrequency", 50),
# "StartupDelay": single_drone_setting["Sensors"]["GPS"].get("StartupDelay", 1),
# }


new_one_drone_json[drone_name].update(diff_dict)
new_setting_dot_json['Vehicles'].update(new_one_drone_json)
self.__drone_positions_seen.clear() # clear the duplicate drone position list
Expand All @@ -195,8 +222,8 @@ def __handle_wind_settings(self, new_setting_dot_json, raw_request_json):
# wind vector already handled in run_fuzzy_test_batch
else:
wind = raw_request_json['environment']['Wind']
if "Force" in wind:
wind_vector = self.__string_to_wind_vector(wind["Distance"], wind["Force"])
if "Velocity" in wind:
wind_vector = self.__string_to_wind_vector(wind["Direction"], wind["Velocity"])
new_setting_dot_json['Wind'] = {'X': wind_vector[0], 'Y': wind_vector[1], 'Z': wind_vector[2]}
elif not (wind['X'] == 0 and wind['Y'] == 0 and wind['Z'] == 0):
new_setting_dot_json['Wind'] = raw_request_json['environment']['Wind']
Expand Down Expand Up @@ -392,7 +419,7 @@ def __create_global_monitor_threads(self, monitor_list):
start_threads.append(threading.Thread(target=monitor_instance.start))
stop_threads.append(threading.Thread(target=monitor_instance.stop))
return start_threads, stop_threads

@staticmethod
def __get_class_instance(class_name, module_name):
module = importlib.import_module("PythonClient.multirotor." + module_name + "." + class_name)
Expand All @@ -401,7 +428,7 @@ def __get_class_instance(class_name, module_name):
@staticmethod
def __create_default_drone_full_length_reqeust():
return dict(
VehicleType="SimpleFlight", DefaultVehicleState="Armed", PawnPath="",
FlightController="SimpleFlight", DefaultVehicleState="Armed", PawnPath="",
EnableCollisionPassthrogh=False, EnableCollisions=True,
AllowAPIAlways=True, EnableTrace=False, Name="Drone1", Mission={},
X=0, Y=0, Z=0, Pitch=0, Roll=0, Yaw=0)
Expand Down Expand Up @@ -445,23 +472,23 @@ def __set_fuzzy_wind_vector(wind_magnitude):
return [x, y, 0]

@staticmethod
def __string_to_wind_vector(direction, force):
def __string_to_wind_vector(direction, velocity):
if direction == 'N':
return [force, 0, 0]
return [velocity, 0, 0]
elif direction == 'S':
return [-force, 0, 0]
return [-velocity, 0, 0]
elif direction == 'E':
return [0, force, 0]
return [0, velocity, 0]
elif direction == 'W':
return [0, -force, 0]
return [0, -velocity, 0]
elif direction == 'NE':
return [force / 2 ** 0.5, force / 2 ** 0.5, 0]
return [velocity / 2 ** 0.5, velocity / 2 ** 0.5, 0]
elif direction == 'NW':
return [force / 2 ** 0.5, -force / 2 ** 0.5, 0]
return [velocity / 2 ** 0.5, -velocity / 2 ** 0.5, 0]
elif direction == 'SE':
return [-force / 2 ** 0.5, force / 2 ** 0.5, 0]
return [-velocity / 2 ** 0.5, velocity / 2 ** 0.5, 0]
elif direction == 'SW':
return [-force / 2 ** 0.5, -force / 2 ** 0.5, 0]
return [-velocity / 2 ** 0.5, -velocity / 2 ** 0.5, 0]
else:
return [0, 0, 0]

Expand Down Expand Up @@ -502,7 +529,7 @@ def __environment_check():
"SimMode": "Multirotor",
"Vehicles": {
"Drone1": {
"VehicleType": "SimpleFlight",
"FlightController": "SimpleFlight",
"X": 0,
"Y": 0,
"Z": 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
import os
import threading
from enum import Enum

from PythonClient.multirotor.airsim_application import AirSimApplication


lock = threading.Lock()


Expand Down Expand Up @@ -34,24 +32,17 @@ def async_fly_to_position(self, drone_name, point, speed):

def save_report(self):
with lock:
log_dir = os.path.join(self.dir_path, self.log_subdir, self.__class__.__name__)
# print("DEBUG:" + log_dir)
if not os.path.exists(log_dir):
try:
os.makedirs(log_dir)
except:
print("Folder exist, thread unsafe")
# Directly create the file name for GCS
file_name = self.__class__.__name__ + "_" + self.target_drone + "_log.txt"
gcs_path = f"{self.log_subdir}/{self.__class__.__name__}/{file_name}"

with open(log_dir + os.sep + self.__class__.__name__ + "_" + self.target_drone + "_log.txt", 'w') as outfile:
outfile.write(self.log_text)
# Upload directly to GCS (log_text is uploaded as file content)
self.save_report_to_storage(gcs_path, self.log_text)

def kill_mission(self):
self.state = self.State.END
# kill all threads





if __name__ == '__main__':
mission = GenericMission()
mission = GenericMission()
Loading