This commit is contained in:
Philipp Horstenkamp 2022-06-22 02:23:08 +02:00
commit 8660c92d5d
Signed by: Philipp
GPG Key ID: DD53EAC36AFB61B4
18 changed files with 4145 additions and 0 deletions

154
.dockerignore Normal file
View File

@ -0,0 +1,154 @@
### TortoiseGit template
# Project-level settings
/.tgitconfig
### Example user template template
### Example user template
# IntelliJ project files
.idea
*.iml
out
gen
### Python template
# 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/
share/python-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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# 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/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
.git/
/.idea

207
.gitignore vendored Normal file
View File

@ -0,0 +1,207 @@
### ROS template
devel/
logs/
build/
bin/
lib/
msg_gen/
srv_gen/
msg/*Action.msg
msg/*ActionFeedback.msg
msg/*ActionGoal.msg
msg/*ActionResult.msg
msg/*Feedback.msg
msg/*Goal.msg
msg/*Result.msg
msg/_*.py
build_isolated/
devel_isolated/
# Generated by dynamic reconfigure
*.cfgc
/cfg/cpp/
/cfg/*.py
# Ignore generated docs
*.dox
*.wikidoc
# eclipse stuff
.project
.cproject
# qcreator stuff
CMakeLists.txt.user
srv/_*.py
*.pcd
*.pyc
qtcreator-*
*.user
/planning/cfg
/planning/docs
/planning/src
*~
# Emacs
.#*
# Catkin custom files
CATKIN_IGNORE
### JupyterNotebooks template
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/
.ipynb_checkpoints
*/.ipynb_checkpoints/*
# IPython
profile_default/
ipython_config.py
# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/
### Python template
# 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/
share/python-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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# 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/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/

8
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,23 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="DuplicatedCode" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="PyMissingOrEmptyDocstringInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="N801" />
</list>
</option>
</inspection_tool>
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="urllib.request.get" />
<option value="tika.parser" />
<option value="itertools.repeat.__add__" />
</list>
</option>
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Poetry (ml-programmiereprojekt)" project-jdk-type="Python SDK" />
</project>

24
.idea/ml-programmiereprojekt.iml generated Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Poetry (ml-programmiereprojekt)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="GOOGLE" />
<option name="myDocStringFormat" value="Google" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/ros-nodes/doc/templates" />
</list>
</option>
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="py.test" />
</component>
</module>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/ml-programmiereprojekt.iml" filepath="$PROJECT_DIR$/.idea/ml-programmiereprojekt.iml" />
</modules>
</component>
</project>

9
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/model" vcs="Git" />
<mapping directory="$PROJECT_DIR$/pyrate" vcs="Git" />
<mapping directory="$PROJECT_DIR$/ros-nodes" vcs="Git" />
</component>
</project>

82
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,82 @@
default_language_version:
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: end-of-file-fixer
exclude: (.txt$|.ipynb$)
- id: trailing-whitespace
exclude: (.txt$|README.md$)
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-xml
# - id: check-added-large-files
args: [--enforce-all]
- id: name-tests-test
- id: detect-private-key
- id: check-case-conflict
- id: check-symlinks
- id: check-docstring-first
- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
args: [--config=pyproject.toml]
- id: black-jupyter
args: [--config=pyproject.toml]
- repo: https://github.com/seandstewart/pre-commit-poetry-export
rev: f0501a85959a71c26b964d9542a78d1033af083e
hooks: []
# - id: export-requirements
# - id: export-requirements-dev
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.2.0
hooks:
- id: pretty-format-ini
args: [--autofix]
- id: pretty-format-toml
args: [--autofix]
- id: pretty-format-yaml
args: [--autofix]
- repo: https://github.com/jendrikseipp/vulture
rev: v2.3 # or any later Vulture version
hooks:
- id: vulture
- repo: https://github.com/domdfcoding/flake2lint
rev: v0.4.1
hooks:
- id: flake2lint
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
args: [--config=.flake8]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
- repo: https://github.com/frnmst/md-toc
rev: 8.1.1
hooks:
- id: md-toc
- repo: https://gitlab.com/smop/pre-commit-hooks
rev: v1.0.0
hooks:
- id: check-poetry
- repo: https://github.com/Lucas-C/pre-commit-hooks-java
rev: 1.3.10
hooks:
- id: validate-html

4
README.md Normal file
View File

@ -0,0 +1,4 @@
[WIKI](https://gitlab.sailingteam.hg.tu-darmstadt.de/team/wiki/-/wikis/Software/Installation#docker)

File diff suppressed because one or more lines are too long

1
model Submodule

@ -0,0 +1 @@
Subproject commit c17462041b57c0f6978bad6ca31f27ca75556369

2741
poetry.lock generated Normal file

File diff suppressed because it is too large Load Diff

23
pyproject.toml Normal file
View File

@ -0,0 +1,23 @@
[tool.poetry]
name = "ml-programmiereprojekt"
version = "0.1.0"
description = ""
authors = ["Philipp Horstenkamp <philipp@horstenkamp.de>"]
[tool.poetry.dependencies]
python = ">=3.9, <3.11"
pandas = "^1.4.2"
numpy = "^1.22.3"
tensorflow = "^2.8.0"
scipy = "^1.8.0"
Shapely = "^1.8.2"
[tool.poetry.dev-dependencies]
black = {extras = ["jupyter"], version = "^22.3.0"}
jupyter = "^1.0.0"
matplotlib = "^3.5.1"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

1
pyrate Submodule

@ -0,0 +1 @@
Subproject commit 1415645163062bcdabd81226cb4a1281f9ca8735

1
ros-nodes Submodule

@ -0,0 +1 @@
Subproject commit 69495ee41d8cb8f0a9df2874442be2745986b542

26
ros.dockerfile Normal file
View File

@ -0,0 +1,26 @@
FROM ros:humble-ros-base-jammy
# Resolve APT dependencies
RUN apt-get update -qq
RUN apt-get install apt-utils software-properties-common -yqq
RUN add-apt-repository ppa:antiprism/ppa -y
RUN apt-get install apt-utils software-properties-common python3-pip g++ python3-dev python3-gdal libgdal-dev libsqlite3-mod-spatialite antiprism git libqt5gui5 libqt5core5a qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libxtst6 libasound2 -yqq
# Clone and install Pyrate
COPY pyrate/ pyrate
RUN pip3 install ./pyrate
# Clone and install Model
COPY model/ model
RUN pip3 install ./model
# Clone ROS nodes and install requirements
COPY ros-nodes/ ros-nodes
WORKDIR ros-nodes
RUN pip3 install -r requirements.txt
RUN rosdep update -q
RUN rosdep install -q -y -i --from-path src --as-root pip:false
RUN pip install jupyter
SHELL ["/bin/bash", "-c", "source /opt/ros/humble/setup.bash && colcon build --symlink-install"]
RUN source install/setup.bash