From 56d399348faac3e2297fe7309874a924ea1724b2 Mon Sep 17 00:00:00 2001 From: Tim Korjakow Date: Fri, 31 Mar 2023 16:27:14 +0200 Subject: [PATCH] Added working Docker setup --- .gitignore | 3 +++ .gitmodules | 3 +++ Dockerfile | 27 +++++++++++++++++++++++++++ docker-compose.yml | 8 ++++++++ livox_camera_calib | 1 + 5 files changed, 42 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 160000 livox_camera_calib diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01a4e65 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +data/ +output/ +.vscode/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..96f75a4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "livox_camera_calib"] + path = livox_camera_calib + url = ./livox_camera_calib/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e8487f2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM ros:melodic-perception + +RUN apt-get update && apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget libeigen3-dev ros-melodic-cv-bridge ros-melodic-pcl-conversions libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev libpcl-dev \ + && wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - \ + && apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' \ + && apt-get update \ + && apt-get install -y cmake + +# Install ceres +RUN git clone --depth 1 --branch 2.0.0 https://ceres-solver.googlesource.com/ceres-solver \ + && mkdir ceres-bin \ + && cd ceres-bin \ + && cmake ../ceres-solver \ + && make -j`nproc` \ + && make install + +# install calibrator +RUN mv /usr/include/flann/ext/lz4.h /usr/include/flann/ext/lz4.h.bak \ + && mv /usr/include/flann/ext/lz4hc.h /usr/include/flann/ext/lz4.h.bak \ + && ln -s /usr/include/lz4.h /usr/include/flann/ext/lz4.h \ + && ln -s /usr/include/lz4hc.h /usr/include/flann/ext/lz4hc.h + +WORKDIR /catkin_ws +ADD ./livox_camera_calib ./src/livox_camera_calib +RUN . /opt/ros/melodic/setup.sh \ + && catkin_make \ + && . /catkin_ws/devel/setup.sh diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..02e1271 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3.9" +services: + calibrator: + build: . + volumes: + - ./data:/data + - ./output:/output + command: /catkin_ws/devel/env.sh roslaunch livox_camera_calib calib.launch diff --git a/livox_camera_calib b/livox_camera_calib new file mode 160000 index 0000000..499dac4 --- /dev/null +++ b/livox_camera_calib @@ -0,0 +1 @@ +Subproject commit 499dac4d4ae1a5935bd24ca440d801a6a18a320d