diff --git a/.github/workflows/build_ros2.yml b/.github/workflows/build_ros2.yml index d94f4c660..6d0ad84dc 100644 --- a/.github/workflows/build_ros2.yml +++ b/.github/workflows/build_ros2.yml @@ -49,3 +49,24 @@ jobs: - name: Run OpenVINS Simulation! run: | docker run -t --mount type=bind,source=$GITHUB_WORKSPACE,target=/catkin_ws openvins /bin/bash -c "cd /catkin_ws && source install/setup.bash && ros2 run ov_msckf run_simulation src/open_vins/config/rpng_sim/estimator_config.yaml" + build_2204: + name: "ROS2 Ubuntu 22.04" + runs-on: ubuntu-latest + steps: + - name: Code Checkout + uses: actions/checkout@v2 + - name: Create Workspace and Docker Image + run: | + export REPO=$(basename $GITHUB_REPOSITORY) && + cd $GITHUB_WORKSPACE/.. && mkdir src/ && + mv $REPO/ src/ && mkdir $REPO/ && mv src/ $REPO/ && cd $REPO/ && + docker build -t openvins -f $GITHUB_WORKSPACE/src/$REPO/Dockerfile_ros2_22_04 . + - name: Echo Enviroment + run: | + docker run -t --mount type=bind,source=$GITHUB_WORKSPACE,target=/catkin_ws openvins /bin/bash -c "echo $ROS_DISTRO && echo $ROS_VERSION" + - name: Run Build in Docker + run: | + docker run -t --mount type=bind,source=$GITHUB_WORKSPACE,target=/catkin_ws openvins /bin/bash -c "cd /catkin_ws && colcon build" + - name: Run OpenVINS Simulation! + run: | + docker run -t --mount type=bind,source=$GITHUB_WORKSPACE,target=/catkin_ws openvins /bin/bash -c "cd /catkin_ws && source install/setup.bash && ros2 run ov_msckf run_simulation src/open_vins/config/rpng_sim/estimator_config.yaml" diff --git a/Dockerfile_ros2_22_04 b/Dockerfile_ros2_22_04 new file mode 100644 index 000000000..a983f4ce7 --- /dev/null +++ b/Dockerfile_ros2_22_04 @@ -0,0 +1,47 @@ +FROM osrf/ros:humble-desktop + +# ========================================================= +# ========================================================= + +# Are you are looking for how to use this docker file? +# - https://docs.openvins.com/dev-docker.html +# - https://docs.docker.com/get-started/ +# - http://wiki.ros.org/docker/Tutorials/Docker + +# ========================================================= +# ========================================================= + +# Dependencies we use, catkin tools is very good build system +# Also some helper utilities for fast in terminal edits (nano etc) +RUN apt-get update && apt-get install -y libeigen3-dev nano git + +# Ceres solver install and setup +RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev +# ENV CERES_VERSION="2.0.0" +# RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \ +# cd ceres-solver && \ +# git checkout tags/${CERES_VERSION} && \ +# mkdir build && cd build && \ +# cmake .. && \ +# make -j$(nproc) install && \ +# rm -rf ../../ceres-solver + +# Seems this has Python 3.10 installed on it... +RUN apt-get update && apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk + +# Install deps needed for clion remote debugging +# https://blog.jetbrains.com/clion/2020/01/using-docker-with-clion/ +# RUN sed -i '6i\source "/catkin_ws/install/setup.bash"\' /ros_entrypoint.sh +RUN apt-get update && apt-get install -y ssh build-essential gcc g++ \ + gdb clang cmake rsync tar python3 && apt-get clean +RUN ( \ + echo 'LogLevel DEBUG2'; \ + echo 'PermitRootLogin yes'; \ + echo 'PasswordAuthentication yes'; \ + echo 'Subsystem sftp /usr/lib/openssh/sftp-server'; \ + ) > /etc/ssh/sshd_config_test_clion \ + && mkdir /run/sshd +RUN useradd -m user && yes password | passwd user +RUN usermod -s /bin/bash user +CMD ["/usr/sbin/sshd", "-D", "-e", "-f", "/etc/ssh/sshd_config_test_clion"] +