From f8987da0f24b3edfb0f763801eb4433a8b9d7f92 Mon Sep 17 00:00:00 2001 From: ChrisTimperley Date: Fri, 27 Apr 2018 12:48:04 -0400 Subject: [PATCH] added Dockerfile --- .dockerignore | 3 +++ Dockerfile | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d0a3ee2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +** +!pkgs.rosinstall +!turtletest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7b054e0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,67 @@ +FROM cmu-mars/gazebo + +ENV USER mars +ENV ROS_WS /home/mars/catkin_ws +WORKDIR ${ROS_WS} + +# trash the workspace +RUN . /opt/ros/kinetic/setup.sh && \ + catkin_make clean && \ + rm -rf src/* build devel + +# install basic utilities +RUN sudo apt-get update && \ + sudo apt-get install -y vim wget curl python-catkin-tools + +# uninstall kobuki +RUN sudo apt-get remove -y ros-kinetic-kobuki \ + ros-kinetic-kobuki-core + +# use a ROS install file to create a workspace +ADD pkgs.rosinstall pkgs.rosinstall +RUN sudo chown -R ${USER} . && \ + wstool init -j8 src pkgs.rosinstall + +# install system dependencies +# --ignore-src (what does this do?) +RUN rosdep update \ + && rosdep install -i -y -r --from-paths src \ + --ignore-src \ + --skip-keys="python-rosdep python-catkin-pkg python-rospkg" \ + --rosdistro="${ROS_DISTRO}" \ + && sudo apt-get clean \ + && sudo rm -rf /var/lib/apt/lists/* + +# fix: https://github.com/ros/geometry/issues/144 +# fix: https://github.com/ros-drivers/freenect_stack/issues/36 +# fix BFL includes +RUN cd "${ROS_WS}/src/ros_comm/xmlrpcpp" && \ + sed -i "s#INCLUDE_DIRS include#INCLUDE_DIRS include include/xmlrpcpp#" CMakeLists.txt +RUN cd "${ROS_WS}/src/freenect_stack" && \ + find . -type f -exec sed -i "s#libfreenect/libfreenect.h#libfreenect.h#g" "{}" \; && \ + find . -type f -exec sed -i "s#libfreenect/libfreenect_registration.h#libfreenect_registration.h#g" "{}" \; +RUN cd "${ROS_WS}/src/navigation" && \ + find . -type f -exec sed -i "s#