mirror of
https://github.com/Mobile-Robotics-W20-Team-9/UMICH-NCLT-SLAP.git
synced 2025-09-07 03:53:13 +00:00
Docker Services
- Update docker-compose with all services - Create Dockerfiles for each service - Fix file paths - Remove localization.py - Fix typos and python 2 -> 3 conversion in read_vel_hits.py - Remove pickle files - Move all docker files to docker folder in root directory
This commit is contained in:
@@ -5,18 +5,13 @@ version: '3'
|
||||
|
||||
# Define services
|
||||
services:
|
||||
# Python Development Container
|
||||
python-dev:
|
||||
# Use Dockerfile in current folder
|
||||
build: .
|
||||
# Particle filter Container
|
||||
particle-filter:
|
||||
# Use Dockerfile in particle-filter folder
|
||||
build: ./particle-filter
|
||||
# Mount folders on host to app folder in container
|
||||
volumes:
|
||||
- ../src/control:/app/control
|
||||
- ../src/dataset:/app/dataset
|
||||
- ../src/localization:/app/localization
|
||||
- ../src/planning:/app/planning
|
||||
- ../src/semantic:/app/semantic
|
||||
- ../src/visualization:/app/visualization
|
||||
- ../src/polex:/app/polex
|
||||
# Set DISPLAY variable and network mode for GUIs
|
||||
environment:
|
||||
@@ -24,3 +19,62 @@ services:
|
||||
network_mode: "host"
|
||||
# Set working directory in container to app folder
|
||||
working_dir: /app
|
||||
|
||||
# Planning Container
|
||||
planning:
|
||||
# Use Dockerfile in planning folder
|
||||
build: ./planning
|
||||
# Mount folders on host to app folder in container
|
||||
volumes:
|
||||
- ../src/dataset:/app/dataset
|
||||
- ../src/planning:/app/planning
|
||||
# Set DISPLAY variable and network mode for GUIs
|
||||
environment:
|
||||
- DISPLAY=${IP_ADDRESS}:0.0
|
||||
network_mode: "host"
|
||||
# Set working directory in container to app folder
|
||||
working_dir: /app
|
||||
|
||||
# Semantic Container
|
||||
semantic:
|
||||
# Use Dockerfile in semantic folder
|
||||
build: ./semantic
|
||||
# Mount folders on host to app folder in container
|
||||
volumes:
|
||||
- ../src/semantic:/app/semantic
|
||||
# Set DISPLAY variable and network mode for GUIs
|
||||
environment:
|
||||
- DISPLAY=${IP_ADDRESS}:0.0
|
||||
network_mode: "host"
|
||||
# Set working directory in container to app folder
|
||||
working_dir: /app
|
||||
|
||||
# Visualization Container
|
||||
visualization:
|
||||
# Use Dockerfile in visualization folder
|
||||
build: ./visualization
|
||||
# Mount folders on host to app folder in container
|
||||
volumes:
|
||||
- ../src/dataset:/app/dataset
|
||||
- ../src/visualization:/app/visualization
|
||||
# Set DISPLAY variable and network mode for GUIs
|
||||
environment:
|
||||
- DISPLAY=${IP_ADDRESS}:0.0
|
||||
network_mode: "host"
|
||||
# Set working directory in container to app folder
|
||||
working_dir: /app
|
||||
|
||||
# Velocity Control Container
|
||||
velocity-control:
|
||||
# Use Dockerfile in velocity-control folder
|
||||
build: ./velocity-control
|
||||
# Mount folders on host to app folder in container
|
||||
volumes:
|
||||
- ../src/control:/app/control
|
||||
- ../src/dataset:/app/dataset
|
||||
# Set DISPLAY variable and network mode for GUIs
|
||||
environment:
|
||||
- DISPLAY=${IP_ADDRESS}:0.0
|
||||
network_mode: "host"
|
||||
# Set working directory in container to app folder
|
||||
working_dir: /app
|
15
docker/planning/Dockerfile
Normal file
15
docker/planning/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM python:3.6.9
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
python3-dev \
|
||||
python3-pip
|
||||
|
||||
RUN pip3 install --upgrade pip && \
|
||||
pip3 install \
|
||||
numpy \
|
||||
matplotlib \
|
||||
scipy
|
||||
|
||||
CMD ["/bin/bash"]
|
@@ -23,6 +23,5 @@ RUN pip install -U pip && \
|
||||
keras
|
||||
|
||||
RUN python -m spacy download en_core_web_sm
|
||||
pickle-mixin
|
||||
|
||||
CMD ["/bin/bash"]
|
16
docker/velocity-control/Dockerfile
Normal file
16
docker/velocity-control/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM python:3.6.9
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
python3-dev \
|
||||
python3-pip
|
||||
|
||||
RUN pip3 install --upgrade pip && \
|
||||
pip3 install \
|
||||
numpy \
|
||||
matplotlib \
|
||||
scipy \
|
||||
cvxpy
|
||||
|
||||
CMD ["/bin/bash"]
|
18
docker/visualization/Dockerfile
Normal file
18
docker/visualization/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM python:3
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
python-opencv \
|
||||
libpcl-dev
|
||||
|
||||
RUN pip install -U pip && \
|
||||
pip install -U \
|
||||
cython \
|
||||
numpy \
|
||||
scipy \
|
||||
matplotlib \
|
||||
nltk \
|
||||
setuptools
|
||||
|
||||
CMD ["/bin/bash"]
|
@@ -1,7 +1,7 @@
|
||||
from mpc_func import *
|
||||
from Astar import *
|
||||
|
||||
poses = load_poses('pose_gt.csv')
|
||||
poses = load_poses('/app/dataset/data/pose_gt.csv')
|
||||
sparseness = 100
|
||||
# print(poses.shape[0]/sparseness)
|
||||
# plot_position(poses[1::sparseness])
|
||||
|
@@ -1,6 +1,6 @@
|
||||
from mpc_func import *
|
||||
|
||||
poses = load_poses('pose_gt.csv')
|
||||
poses = load_poses('/app/dataset/data/pose_gt.csv')
|
||||
sparseness = 100
|
||||
sparse_poses = poses[1::sparseness, 1:3]
|
||||
|
||||
|
@@ -1,16 +0,0 @@
|
||||
# localization.py
|
||||
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
import csv
|
||||
import os
|
||||
from PoseList import PoseList
|
||||
from scipy.spatial import distance
|
||||
|
||||
|
||||
def main():
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@@ -35,7 +35,7 @@ def verify_magic(s):
|
||||
def main(args):
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print "Please specifiy input bin file"
|
||||
print("Please specify input bin file")
|
||||
return 1
|
||||
|
||||
f_bin = open(sys.argv[1], "r")
|
||||
@@ -51,14 +51,14 @@ def main(args):
|
||||
break
|
||||
|
||||
if not verify_magic(magic):
|
||||
print "Could not verify magic"
|
||||
print("Could not verify magic")
|
||||
|
||||
num_hits = struct.unpack('<I', f_bin.read(4))[0]
|
||||
utime = struct.unpack('<Q', f_bin.read(8))[0]
|
||||
|
||||
padding = f_bin.read(4) # padding
|
||||
|
||||
print "Have %d hits for utime %ld" % (num_hits, utime)
|
||||
print("Have %d hits for utime %ld" % (num_hits, utime))
|
||||
|
||||
total_hits += num_hits
|
||||
if first_utime == -1:
|
||||
@@ -82,7 +82,7 @@ def main(args):
|
||||
|
||||
f_bin.close()
|
||||
|
||||
print "Read %d total hits from %ld to %ld" % (total_hits, first_utime, last_utime)
|
||||
print("Read %d total hits from %ld to %ld" % (total_hits, first_utime, last_utime))
|
||||
|
||||
return 0
|
||||
|
||||
|
@@ -1,18 +1,4 @@
|
||||
{
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 0,
|
||||
"metadata": {
|
||||
"colab": {
|
||||
"name": "Motion_Planning_Functions",
|
||||
"provenance": [],
|
||||
"collapsed_sections": []
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3"
|
||||
},
|
||||
"accelerator": "GPU"
|
||||
},
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
@@ -60,7 +46,7 @@
|
||||
" pose_gt = np.loadtxt(pose_gt_file, delimiter = \",\")\n",
|
||||
" return pose_gt[1:, 1:3]\n",
|
||||
"\n",
|
||||
"poses = load_poses('../dataset/ground_truth/groundtruth_2012-01-08.csv')"
|
||||
"poses = load_poses('../dataset/data/ground_truth/groundtruth_2012-01-08.csv')"
|
||||
],
|
||||
"execution_count": 0,
|
||||
"outputs": []
|
||||
@@ -607,5 +593,19 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"metadata": {
|
||||
"colab": {
|
||||
"name": "Motion_Planning_Functions",
|
||||
"provenance": [],
|
||||
"collapsed_sections": []
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3"
|
||||
},
|
||||
"accelerator": "GPU"
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 0
|
||||
}
|
@@ -23,8 +23,7 @@ def load_poses(pose_gt_file) :
|
||||
|
||||
|
||||
def main() :
|
||||
#poses = load_poses('../dataset/ground_truth/groundtruth_2012-01-08.csv')
|
||||
poses = load_poses('../dataset/ground_truth/debug.csv')
|
||||
poses = load_poses('../dataset/data/ground_truth/debug.csv')
|
||||
sparseness = 10
|
||||
k=50
|
||||
|
||||
|
@@ -1,26 +0,0 @@
|
||||
# Docker Compose
|
||||
|
||||
# docker-compose.yml format version
|
||||
version: '3'
|
||||
|
||||
# Define services
|
||||
services:
|
||||
# Python Development Container
|
||||
python-dev:
|
||||
# Use Dockerfile in current folder
|
||||
build: .
|
||||
# Mount folders on host to app folder in container
|
||||
volumes:
|
||||
- ../src/control:/app/control
|
||||
- ../src/dataset:/app/dataset
|
||||
- ../src/localization:/app/localization
|
||||
- ../src/planning:/app/planning
|
||||
- ../src/semantic:/app/semantic
|
||||
- ../src/visualization:/app/visualization
|
||||
- ../src/polex:/app/polex
|
||||
# Set DISPLAY variable and network mode for GUIs
|
||||
environment:
|
||||
- DISPLAY=${IP_ADDRESS}:0.0
|
||||
network_mode: "host"
|
||||
# Set working directory in container to app folder
|
||||
working_dir: /app
|
@@ -1,27 +0,0 @@
|
||||
# Docker Compose
|
||||
|
||||
# docker-compose.yml format version
|
||||
version: '3'
|
||||
|
||||
# Define services
|
||||
services:
|
||||
# Python Development Container
|
||||
python-dev:
|
||||
# Use Dockerfile in current folder
|
||||
build: .
|
||||
# Mount ros-dev folder on host to app folder in container
|
||||
volumes:
|
||||
- ./control:/app/control
|
||||
- ./dataset:/app/dataset
|
||||
- ./localization:/app/localization
|
||||
- ./planning:/app/planning
|
||||
- ./semantic:/app/semantic
|
||||
- ./visualization:/app/visualization
|
||||
- /tmp/.X11-unix/:/tmp/.X11-unix
|
||||
# Set DISPLAY variable and network mode for GUIs
|
||||
environment:
|
||||
- DISPLAY=$DISPLAY
|
||||
#- DISPLAY=${IP_ADDRESS}:0.0
|
||||
network_mode: "host"
|
||||
# Set working directory in container to app folder
|
||||
working_dir: /app
|
Reference in New Issue
Block a user