|
| 1 | +# This is an auto generated Dockerfile for ros:robot |
| 2 | +# generated from docker_images/create_ros_image.Dockerfile.em |
| 3 | +FROM ros:melodic-ros-base-bionic |
| 4 | + |
| 5 | +# Set the working directory to /root |
| 6 | +ENV DIRPATH /root |
| 7 | +WORKDIR $DIRPATH |
| 8 | + |
| 9 | +# install ros packages |
| 10 | +RUN apt-get update && apt-get install -y ros-melodic-robot=1.4.1-0* |
| 11 | + # && rm -rf /var/lib/apt/lists/* |
| 12 | + |
| 13 | +RUN apt install -y ros-melodic-nmea-navsat-driver libgeographic-dev |
| 14 | + |
| 15 | +RUN apt install -y git cmake wget python-catkin-tools |
| 16 | + |
| 17 | +RUN apt install -y libopencv-dev |
| 18 | + |
| 19 | +# # Install OpenCV for Ubuntu 18.04 |
| 20 | +# RUN apt-get update && apt-get install -y \ |
| 21 | +# build-essential cmake unzip pkg-config \ |
| 22 | +# libjpeg-dev libpng-dev libtiff-dev \ |
| 23 | +# libvtk6-dev \ |
| 24 | +# libgtk-3-dev \ |
| 25 | +# libatlas-base-dev gfortran |
| 26 | +# |
| 27 | +# RUN git clone https://github.com/opencv/opencv.git |
| 28 | +# RUN cd opencv && \ |
| 29 | +# git checkout tags/3.3.1 && \ |
| 30 | +# mkdir build -j$(nproc) |
| 31 | +# |
| 32 | +# RUN git clone https://github.com/opencv/opencv_contrib.git |
| 33 | +# RUN cd opencv_contrib && \ |
| 34 | +# git checkout tags/3.3.1 |
| 35 | +# |
| 36 | +# RUN cd opencv/build && \ |
| 37 | +# cmake -DCMAKE_BUILD_TYPE=Release \ |
| 38 | +# -DCMAKE_INSTALL_PREFIX=/usr/local \ |
| 39 | +# -D BUILD_opencv_python=OFF \ |
| 40 | +# -D BUILD_opencv_python2=OFF \ |
| 41 | +# -D BUILD_opencv_python3=OFF \ |
| 42 | +# -DOPENCV_EXTRA_MODULES_PATH=$DIRPATH/opencv_contrib/modules .. && \ |
| 43 | +# make -j$(nproc) install |
| 44 | + |
| 45 | +RUN apt install -y libeigen3-dev libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev |
| 46 | + |
| 47 | +RUN cd $DIRPATH |
| 48 | +RUN wget http://ceres-solver.org/ceres-solver-2.1.0.tar.gz && tar xvzf ceres-solver-2.1.0.tar.gz && \ |
| 49 | + cd ceres-solver-2.1.0 && mkdir build && cd build && cmake .. && make install -j$(nproc) |
| 50 | + |
| 51 | +ENV TERM xterm |
| 52 | +ENV PYTHONIOENCODING UTF-8 |
| 53 | + |
| 54 | +RUN cd $DIRPATH |
| 55 | + |
| 56 | +# dataset |
| 57 | +RUN mkdir $DIRPATH/dataset |
| 58 | +RUN wget -P $DIRPATH/dataset https://cggos.i234.me:5001/fsdownload/wYejg2zlD/orbslam2_v101easy.bag |
| 59 | + |
| 60 | +RUN mkdir -p $DIRPATH/ws_msf/src |
| 61 | +RUN git clone https://github.com/cggos/imu_x_fusion.git $DIRPATH/ws_msf/src/imu_x_fusion |
| 62 | +WORKDIR $DIRPATH/ws_msf |
| 63 | +RUN catkin config --extend /opt/ros/$ROS_DISTRO --cmake-args -DCMAKE_BUILD_TYPE=Release && \ |
| 64 | + catkin build -j4 && \ |
| 65 | + sed -i '/exec "$@"/i \ |
| 66 | + source "/root/ws_msf/devel/setup.bash"' /ros_entrypoint.sh |
| 67 | +# RUN source $DIRPATH/ws_msf/devel/setup.bash |
0 commit comments