From e14eb142bfadc036d03802f9c07c72c0067df5ad Mon Sep 17 00:00:00 2001 From: PyroX2 Date: Tue, 12 Mar 2024 17:16:32 +0100 Subject: [PATCH 1/3] Add dockerfile for ros2 humble --- docker/Dockerfile_ros2-humble | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docker/Dockerfile_ros2-humble diff --git a/docker/Dockerfile_ros2-humble b/docker/Dockerfile_ros2-humble new file mode 100644 index 0000000..0f52d24 --- /dev/null +++ b/docker/Dockerfile_ros2-humble @@ -0,0 +1,30 @@ +FROM px4io/px4-dev-simulation-jammy +LABEL maintainer="Jakub Wilk " + +# ENV DEBIAN_FRONTEND noninteractive +# ENV LANG C.UTF-8 +# ENV LC_ALL C.UTF-8 + +RUN apt update +RUN apt install -y \ + git \ + sudo + +WORKDIR /home/user + +# clone and build px4 +RUN git clone https://github.com/PX4/PX4-Autopilot.git +RUN ./PX4-Autopilot/Tools/setup/ubuntu.sh + +# install ros2 humble +RUN apt update && apt install -y locales +RUN locale-gen en_US en_US.UTF-8 +RUN update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 +RUN export LANG=en_US.UTF-8 +RUN apt install -y software-properties-common +RUN add-apt-repository universe +RUN apt update && apt install curl -y +RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg +RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null +RUN apt update && apt upgrade -y +RUN apt install -y ros-humble-desktop From 0988d5bc94bb8602236cf6281ea623b95e58b8e0 Mon Sep 17 00:00:00 2001 From: PyroX2 Date: Tue, 12 Mar 2024 17:17:34 +0100 Subject: [PATCH 2/3] Clean --- docker/Dockerfile_ros2-humble | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docker/Dockerfile_ros2-humble b/docker/Dockerfile_ros2-humble index 0f52d24..d8f0509 100644 --- a/docker/Dockerfile_ros2-humble +++ b/docker/Dockerfile_ros2-humble @@ -1,10 +1,6 @@ FROM px4io/px4-dev-simulation-jammy LABEL maintainer="Jakub Wilk " -# ENV DEBIAN_FRONTEND noninteractive -# ENV LANG C.UTF-8 -# ENV LC_ALL C.UTF-8 - RUN apt update RUN apt install -y \ git \ From 89fc6d785f89425b1faed13f1323bcbf7f471fc6 Mon Sep 17 00:00:00 2001 From: PyroX2 Date: Tue, 12 Mar 2024 17:54:51 +0100 Subject: [PATCH 3/3] Install Micro-DDS --- docker/Dockerfile_ros2-humble | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docker/Dockerfile_ros2-humble b/docker/Dockerfile_ros2-humble index d8f0509..3326006 100644 --- a/docker/Dockerfile_ros2-humble +++ b/docker/Dockerfile_ros2-humble @@ -24,3 +24,13 @@ RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null RUN apt update && apt upgrade -y RUN apt install -y ros-humble-desktop + +# install Micro-XRCE-DDS-Agent +RUN git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git \ + && cd Micro-XRCE-DDS-Agent \ + && mkdir build \ + && cd build \ + && cmake .. \ + && make \ + && make install \ + && ldconfig /usr/local/lib/ \ No newline at end of file