diff --git a/.github/workflows/docker_builds.yml b/.github/workflows/docker_builds.yml index c8e77c5b..6e284103 100644 --- a/.github/workflows/docker_builds.yml +++ b/.github/workflows/docker_builds.yml @@ -442,10 +442,62 @@ jobs: tag_names: true workdir: docker + px4-dev-ros2-humble: + name: "ROS2 Humble" + runs-on: ubuntu-latest + needs: px4-dev-base-jammy + steps: + - uses: actions/checkout@v3 + - name: Build container + if: github.event_name == 'pull_request' + run: | + cd docker + make px4-dev-ros2-humble + - name: Build & Publish container + if: github.event_name == 'push' && (contains(github.ref, '/heads/master') || contains(github.ref, '/tags/')) + uses: julianoes/Publish-Docker-Github-Action@master + with: + name: px4io/px4-dev-ros2-humble + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + dockerfile: Dockerfile_ros2 + cache: false + tag_names: true + workdir: docker + build-args: | + ROS_DISTRO=humble + BASE=px4io/px4-dev-base-jammy + + px4-dev-ros2-iron: + name: "ROS2 Iron" + runs-on: ubuntu-latest + needs: px4-dev-base-jammy + steps: + - uses: actions/checkout@v3 + - name: Build container + if: github.event_name == 'pull_request' + run: | + cd docker + make px4-dev-ros2-iron + - name: Build & Publish container + if: github.event_name == 'push' && (contains(github.ref, '/heads/master') || contains(github.ref, '/tags/')) + uses: julianoes/Publish-Docker-Github-Action@master + with: + name: px4io/px4-dev-ros2-iron + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + dockerfile: Dockerfile_ros2 + cache: false + tag_names: true + workdir: docker + build-args: | + ROS_DISTRO=iron + BASE=px4io/px4-dev-base-jammy + px4-dev-ros2-rolling: name: "ROS2 Rolling" runs-on: ubuntu-latest - needs: px4-dev-base-focal + needs: px4-dev-base-jammy steps: - uses: actions/checkout@v3 - name: Build container @@ -460,10 +512,13 @@ jobs: name: px4io/px4-dev-ros2-rolling username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - dockerfile: Dockerfile_ros2-rolling + dockerfile: Dockerfile_ros2 cache: false tag_names: true workdir: docker + build-args: | + ROS_DISTRO=rolling + BASE=px4io/px4-dev-base-jammy px4-dev-ros2-galactic: name: "ROS2 Galactic" @@ -483,10 +538,13 @@ jobs: name: px4io/px4-dev-ros2-galactic username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - dockerfile: Dockerfile_ros2-galactic + dockerfile: Dockerfile_ros2 cache: false tag_names: true workdir: docker + build-args: | + ROS_DISTRO=galactic + BASE=px4io/px4-dev-base-focal px4-docs: name: "Ubuntu Docs" diff --git a/docker/Dockerfile_aarch64 b/docker/Dockerfile_aarch64 index 6bd56837..9b2cb8e1 100644 --- a/docker/Dockerfile_aarch64 +++ b/docker/Dockerfile_aarch64 @@ -9,9 +9,9 @@ FROM debian:buster LABEL maintainer="SalimTerryLi " -ENV DEBIAN_FRONTEND noninteractive -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 +ENV DEBIAN_FRONTEND=noninteractive +ENV LANG=C.UTF-8 +ENV LC_ALL=C.UTF-8 RUN apt-get update && apt-get -y --quiet --no-install-recommends install \ bzip2 \ @@ -80,7 +80,7 @@ RUN wget -q "https://services.gradle.org/distributions/gradle-5.6.2-bin.zip" -O && unzip -d /opt/gradle gradle-5.6.2-bin.zip \ && rm -rf /tmp/* -ENV PATH "/opt/gradle/gradle-5.6.2/bin:$PATH" +ENV PATH="/opt/gradle/gradle-5.6.2/bin:$PATH" # Fast-RTPS RUN git clone --recursive https://github.com/eProsima/Fast-DDS.git -b v1.8.2 /tmp/FastRTPS-1.8.2 \ diff --git a/docker/Dockerfile_armhf b/docker/Dockerfile_armhf index 39196393..dc9413a7 100644 --- a/docker/Dockerfile_armhf +++ b/docker/Dockerfile_armhf @@ -11,9 +11,9 @@ FROM debian:bullseye LABEL maintainer="Daniel Agar " -ENV DEBIAN_FRONTEND noninteractive -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 +ENV DEBIAN_FRONTEND=noninteractive +ENV LANG=C.UTF-8 +ENV LC_ALL=C.UTF-8 RUN apt-get update && apt-get -y --quiet --no-install-recommends install \ bzip2 \ diff --git a/docker/Dockerfile_base-archlinux b/docker/Dockerfile_base-archlinux index e548672c..cbea10c9 100644 --- a/docker/Dockerfile_base-archlinux +++ b/docker/Dockerfile_base-archlinux @@ -51,7 +51,7 @@ RUN wget -q "https://services.gradle.org/distributions/gradle-6.1-rc-3-bin.zip" && unzip -d /opt/gradle gradle-6.1-rc-3-bin.zip \ && rm -rf /tmp/* -ENV PATH "/opt/gradle/gradle-6.1-rc-3/bin:$PATH" +ENV PATH="/opt/gradle/gradle-6.1-rc-3/bin:$PATH" # Intall foonathan_memory from source as it is required to Fast-RTPS >= 1.9 RUN git clone https://github.com/eProsima/foonathan_memory_vendor.git /tmp/foonathan_memory \ @@ -85,7 +85,7 @@ RUN ln -s /usr/bin/ccache /usr/lib/ccache/bin/arm-none-eabi-gcc \ ENV CCACHE_MAXSIZE=1G ENV FASTRTPSGEN_DIR="/usr/local/bin/" -ENV PATH "/usr/lib/ccache/bin:$PATH" +ENV PATH="/usr/lib/ccache/bin:$PATH" ENV TERM=xterm # SITL UDP PORTS diff --git a/docker/Dockerfile_base-bionic b/docker/Dockerfile_base-bionic index 45775014..a1140c98 100644 --- a/docker/Dockerfile_base-bionic +++ b/docker/Dockerfile_base-bionic @@ -5,9 +5,9 @@ FROM ubuntu:18.04 LABEL maintainer="Daniel Agar " -ENV DEBIAN_FRONTEND noninteractive -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 +ENV DEBIAN_FRONTEND=noninteractive +ENV LANG=C.UTF-8 +ENV LC_ALL=C.UTF-8 RUN apt-get update && apt-get -y --quiet --no-install-recommends install \ bzip2 \ @@ -83,7 +83,7 @@ RUN wget -q "https://services.gradle.org/distributions/gradle-6.3-rc-4-bin.zip" && unzip -d /opt/gradle gradle-6.3-rc-4-bin.zip \ && rm -rf /tmp/* -ENV PATH "/opt/gradle/gradle-6.3-rc-4/bin:$PATH" +ENV PATH="/opt/gradle/gradle-6.3-rc-4/bin:$PATH" # Fast-RTPS 1.8.4 RUN git clone --recursive https://github.com/eProsima/Fast-DDS.git -b v1.8.4 /tmp/FastRTPS-1.8.4 \ @@ -107,7 +107,7 @@ RUN useradd --shell /bin/bash -u 1001 -c "" -m user && usermod -a -G dialout use RUN mkdir /tmp/.X11-unix && \ chmod 1777 /tmp/.X11-unix && \ chown -R root:root /tmp/.X11-unix -ENV DISPLAY :99 +ENV DISPLAY=:99 ENV CCACHE_UMASK=000 ENV FASTRTPSGEN_DIR="/usr/local/bin/" diff --git a/docker/Dockerfile_base-focal b/docker/Dockerfile_base-focal deleted file mode 100644 index 86760234..00000000 --- a/docker/Dockerfile_base-focal +++ /dev/null @@ -1,134 +0,0 @@ -# -# PX4 base development environment -# - -FROM ubuntu:20.04 -LABEL maintainer="Daniel Agar " - -ENV DEBIAN_FRONTEND noninteractive -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 - -RUN apt-get update && apt-get -y --quiet --no-install-recommends install \ - bzip2 \ - ca-certificates \ - ccache \ - cmake \ - cppcheck \ - curl \ - dirmngr \ - doxygen \ - file \ - g++ \ - gcc \ - gdb \ - git \ - gnupg \ - gosu \ - lcov \ - libfreetype6-dev \ - libgtest-dev \ - libpng-dev \ - libssl-dev \ - lsb-release \ - make \ - ninja-build \ - openjdk-8-jdk \ - openjdk-8-jre \ - openssh-client \ - pkg-config \ - python3-dev \ - python3-pip \ - rsync \ - shellcheck \ - tzdata \ - unzip \ - valgrind \ - wget \ - xsltproc \ - zip \ - && apt-get -y autoremove \ - && apt-get clean autoclean \ - && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* - -# gtest -RUN cd /usr/src/gtest \ - && mkdir build && cd build \ - && cmake .. && make -j$(nproc) \ - && find . -name \*.a -exec cp {} /usr/lib \; \ - && cd .. && rm -rf build - -# Install Python 3 pip build dependencies first. -RUN python3 -m pip install --upgrade pip wheel setuptools - -# Python 3 dependencies installed by pip -RUN python3 -m pip install argparse argcomplete coverage cerberus empy jinja2 kconfiglib \ - matplotlib==3.0.* numpy nunavut>=1.1.0 packaging pkgconfig pyros-genmsg pyulog \ - pyyaml requests serial six toml psutil pyulog wheel jsonschema pynacl - -# manual ccache setup -RUN ln -s /usr/bin/ccache /usr/lib/ccache/cc \ - && ln -s /usr/bin/ccache /usr/lib/ccache/c++ - -# astyle v3.1 -RUN wget -q https://downloads.sourceforge.net/project/astyle/astyle/astyle%203.1/astyle_3.1_linux.tar.gz -O /tmp/astyle.tar.gz \ - && cd /tmp && tar zxf astyle.tar.gz && cd astyle/src \ - && make -f ../build/gcc/Makefile -j$(nproc) && cp bin/astyle /usr/local/bin \ - && rm -rf /tmp/* - -# Gradle (Required to build Fast-RTPS-Gen) -RUN wget -q "https://services.gradle.org/distributions/gradle-6.3-rc-4-bin.zip" -O /tmp/gradle-6.3-rc-4-bin.zip \ - && mkdir /opt/gradle \ - && cd /tmp \ - && unzip -d /opt/gradle gradle-6.3-rc-4-bin.zip \ - && rm -rf /tmp/* - -ENV PATH "/opt/gradle/gradle-6.3-rc-4/bin:$PATH" - -# Intall foonathan_memory from source as it is required to Fast-RTPS >= 1.9 -RUN git clone https://github.com/eProsima/foonathan_memory_vendor.git /tmp/foonathan_memory \ - && cd /tmp/foonathan_memory \ - && mkdir build && cd build \ - && cmake .. \ - && cmake --build . --target install -- -j $(nproc) \ - && rm -rf /tmp/* - -# Fast-DDS (Fast-RTPS 2.0.2) -RUN git clone --recursive https://github.com/eProsima/Fast-DDS.git -b v2.0.2 /tmp/FastDDS-2.0.2 \ - && cd /tmp/FastDDS-2.0.2 \ - && mkdir build && cd build \ - && cmake -DTHIRDPARTY=ON -DSECURITY=ON .. \ - && cmake --build . --target install -- -j $(nproc) \ - && rm -rf /tmp/* - -# Fast-RTPS-Gen 1.0.4 -RUN git clone --recursive https://github.com/eProsima/Fast-DDS-Gen.git -b v1.0.4 /tmp/Fast-RTPS-Gen-1.0.4 \ - && cd /tmp/Fast-RTPS-Gen-1.0.4 \ - && gradle assemble \ - && gradle install \ - && rm -rf /tmp/* - -# create user with id 1001 (jenkins docker workflow default) -RUN useradd --shell /bin/bash -u 1001 -c "" -m user && usermod -a -G dialout user - -# setup virtual X server -RUN mkdir /tmp/.X11-unix && \ - chmod 1777 /tmp/.X11-unix && \ - chown -R root:root /tmp/.X11-unix -ENV DISPLAY :99 - -ENV CCACHE_UMASK=000 -ENV FASTRTPSGEN_DIR="/usr/local/bin/" -ENV PATH="/usr/lib/ccache:$PATH" -ENV TERM=xterm -ENV TZ=UTC - -# SITL UDP PORTS -EXPOSE 14556/udp -EXPOSE 14557/udp - -# create and start as LOCAL_USER_ID -COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh -ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] - -CMD ["/bin/bash"] diff --git a/docker/Dockerfile_base-jammy b/docker/Dockerfile_base-noble similarity index 73% rename from docker/Dockerfile_base-jammy rename to docker/Dockerfile_base-noble index adcc2429..7a17c844 100644 --- a/docker/Dockerfile_base-jammy +++ b/docker/Dockerfile_base-noble @@ -1,13 +1,13 @@ # # PX4 base development environment # - -FROM ubuntu:22.04 +ARG UBUNTU=24.04 +FROM ubuntu:${UBUNTU} LABEL maintainer="Ramon Roche " -ENV DEBIAN_FRONTEND noninteractive -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 +ENV DEBIAN_FRONTEND=noninteractive +ENV LANG=C.UTF-8 +ENV LC_ALL=C.UTF-8 RUN apt-get update && apt-get -y --quiet --no-install-recommends install \ ant \ @@ -73,18 +73,30 @@ RUN cd /usr/src/gtest \ && find . -name \*.a -exec cp {} /usr/lib \; \ && cd .. && rm -rf build -# Install Python 3 pip build dependencies first. -RUN python3 -m pip install --upgrade pip wheel setuptools - # Python 3 dependencies installed by pip -RUN python3 -m pip install argparse argcomplete coverage cerberus empy jinja2 kconfiglib \ - matplotlib>=3.0.* numpy nunavut>=1.1.0 packaging pkgconfig pyros-genmsg pyulog \ - pyyaml requests serial six toml psutil pyulog wheel jsonschema pynacl lxml +# RUN python3 -m pip install argparse argcomplete coverage cerberus empy jinja2 kconfiglib \ +# matplotlib>=3.0.* numpy nunavut>=1.1.0 packaging pkgconfig pyros-genmsg pyulog \ +# pyyaml requests serial six toml psutil pyulog wheel jsonschema pynacl lxml -#RUN python3 -m pip install argcomplete argparse>=1.2 cerberus coverage empy>=3.3 future \ - #jinja2>=2.8 jsonschema kconfiglib lxml matplotlib>=3.0.* numpy>=1.13 nunavut>=1.1.0 \ - #packaging pandas>=0.21 pkgconfigpsutil pygments wheel>=0.31.1 pymavlink pyros-genmsg \ - #pyserial pyulog>=0.5.0 pyyaml requests setuptools>=39.2.0 six>=1.12.0 toml>=0.9 sympy>=1.10.1 +# Python 3 dependencies +RUN apt-get update && apt-get -y --quiet --no-install-recommends install \ + python3-argcomplete \ + python3-coverage \ + python3-cerberus \ + python3-empy \ + python3-jinja2 \ + python3-matplotlib \ + python3-numpy \ + python3-packaging \ + python3-pkgconfig \ + python3-requests \ + python3-serial \ + python3-six \ + python3-toml \ + python3-psutil \ + python3-wheel \ + python3-jsonschema \ + python3-lxml # manual ccache setup RUN ln -s /usr/bin/ccache /usr/lib/ccache/cc \ @@ -103,7 +115,7 @@ RUN useradd --shell /bin/bash -u 1001 -c "" -m user && usermod -a -G dialout use RUN mkdir /tmp/.X11-unix && \ chmod 1777 /tmp/.X11-unix && \ chown -R root:root /tmp/.X11-unix -ENV DISPLAY :99 +ENV DISPLAY=:99 ENV CCACHE_UMASK=000 ENV FASTRTPSGEN_DIR="/usr/local/bin/" diff --git a/docker/Dockerfile_nuttx-noble b/docker/Dockerfile_nuttx-noble new file mode 100644 index 00000000..70d4e78c --- /dev/null +++ b/docker/Dockerfile_nuttx-noble @@ -0,0 +1,49 @@ +# +# PX4 NuttX development environment in Ubuntu 24.04 Noble +# + +FROM px4io/px4-dev-base-noble:latest +LABEL maintainer="Ramón Roche " + +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ + autoconf \ + automake \ + bison \ + build-essential \ + bzip2 \ + file \ + flex \ + genromfs \ + gperf \ + libncurses-dev \ + libtool \ + pkg-config \ + uncrustify \ + vim-common \ + && apt-get -y autoremove \ + && apt-get clean autoclean \ + && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* + +# GNU Arm Embedded Toolchain: 10.3-2021.10 Released: October 21, 2021 +RUN mkdir -p /opt/gcc && cd /opt/gcc \ + && wget -qO- "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2" | tar jx --strip 1 \ + && rm -rf /opt/gcc/share/doc + +ENV PATH="$PATH:/opt/gcc/bin" + +# manual ccache setup for arm-none-eabi-g++/arm-none-eabi-gcc +RUN ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-g++ \ + && ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-gcc + +# nuttx tools +RUN git clone --depth 1 https://bitbucket.org/nuttx/tools.git /tmp/tools \ + && cd /tmp/tools/kconfig-frontends \ + && autoreconf -f -i \ + && ./configure --enable-mconf --disable-nconf --disable-gconf --disable-qconf -prefix=/usr && make -j$(nproc) && make install \ + && rm -rf /tmp/* + +# bloaty - https://github.com/google/bloaty +RUN git clone --recursive https://github.com/google/bloaty.git /tmp/bloaty \ + && cd /tmp/bloaty && cmake -GNinja . && ninja -j $(nproc) bloaty && cp bloaty /usr/local/bin/ \ + && rm -rf /tmp/* diff --git a/docker/Dockerfile_nuttx_clang b/docker/Dockerfile_nuttx_clang index e82bdfc0..449d1786 100644 --- a/docker/Dockerfile_nuttx_clang +++ b/docker/Dockerfile_nuttx_clang @@ -22,5 +22,5 @@ RUN mkdir -p /opt/gcc && cd /opt/gcc && \ RUN ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-g++ \ && ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-gcc -ENV PATH "$PATH:/opt/gcc/bin" +ENV PATH="$PATH:/opt/gcc/bin" ENV CCACHE_CPP2=1 diff --git a/docker/Dockerfile_ros-melodic b/docker/Dockerfile_ros-melodic index a12ea4b8..90106c95 100644 --- a/docker/Dockerfile_ros-melodic +++ b/docker/Dockerfile_ros-melodic @@ -5,7 +5,7 @@ FROM px4io/px4-dev-simulation-bionic:2021-09-08 LABEL maintainer="Nuno Marques " -ENV ROS_DISTRO melodic +ENV ROS_DISTRO=melodic # setup ros keys RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - @@ -45,9 +45,9 @@ RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" # to compile using catkin without it. RUN pip install wheel setuptools # FIXME: regression in control>0.8.4 (used by px4tools) does not run on Python 2. -RUN pip install argcomplete argparse catkin_pkg catkin-tools cerberus coverage \ - empy jinja2 matplotlib==2.2.* numpy pkgconfig control==0.8.4 px4tools pygments \ - pymavlink packaging pyros-genmsg pyulog==0.8.0 pyyaml requests rosdep rospkg \ +RUN pip install argcomplete argparse catkin_pkg catkin-tools coverage \ + empy jinja2 matplotlib==2.2.* numpy pkgconfig control==0.8.4 pygments \ + packaging pyros-genmsg pyulog==0.8.0 pyyaml requests rosdep rospkg \ serial six toml jsonschema==2.6.0 # bootstrap rosdep diff --git a/docker/Dockerfile_ros-noetic b/docker/Dockerfile_ros-noetic index 44988b82..eb535b2f 100644 --- a/docker/Dockerfile_ros-noetic +++ b/docker/Dockerfile_ros-noetic @@ -5,7 +5,7 @@ FROM px4io/px4-dev-simulation-focal:2021-09-08 LABEL maintainer="Nuno Marques " -ENV ROS_DISTRO noetic +ENV ROS_DISTRO=noetic # setup ros keys RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - diff --git a/docker/Dockerfile_ros2-rolling b/docker/Dockerfile_ros2 similarity index 62% rename from docker/Dockerfile_ros2-rolling rename to docker/Dockerfile_ros2 index 5e6f7703..7dd99272 100644 --- a/docker/Dockerfile_ros2-rolling +++ b/docker/Dockerfile_ros2 @@ -7,18 +7,18 @@ # and by maintainers who want their packages released and ready for the next # stable distribution." - in https://docs.ros.org/en/foxy/Releases/Release-Rolling-Ridley.html # - -FROM px4io/px4-dev-base-focal:2021-09-08 +ARG BASE=px4io/px4-dev-base-jammy +FROM ${BASE} LABEL maintainer="Nuno Marques " # setup environment -ENV ROS_DISTRO rolling +ARG ROS_DISTRO=rolling # setup ros2 keys RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg - -# setup sources.list -RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null +RUN ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') && \ + curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" && \ + apt-get install -y /tmp/ros2-apt-source.deb # install bootstrap tools RUN apt-get update \ @@ -42,19 +42,19 @@ RUN apt-get install --quiet --no-install-recommends -y \ && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* # Install Python 3 packages needed for testing -RUN pip3 install -U \ - argcomplete \ - flake8 \ - flake8-blind-except \ - flake8-builtins \ - flake8-class-newline \ - flake8-comprehensions \ - flake8-deprecated \ - flake8-docstrings \ - flake8-import-order \ - flake8-quotes \ - pytest-repeat \ - pytest-rerunfailures +RUN apt-get install --quiet --no-install-recommends -y \ + python3-argcomplete \ + python3-flake8 \ + python3-flake8-blind-except \ + python3-flake8-builtins \ + python3-flake8-class-newline \ + python3-flake8-comprehensions \ + python3-flake8-deprecated \ + python3-flake8-docstrings \ + python3-flake8-import-order \ + python3-flake8-quotes \ + python3-pytest-repeat \ + python3-pytest-rerunfailures # bootstrap rosdep RUN rosdep init && rosdep update @@ -67,13 +67,13 @@ RUN colcon mixin add default \ https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml \ && colcon metadata update -# Install Fast-DDS 2.3.1 -RUN rm -rf /usr/local/include/fastrtps /usr/local/share/fastrtps /usr/local/lib/libfastrtps* \ - && git clone --recursive https://github.com/eProsima/Fast-DDS.git -b v2.3.1 /tmp/FastRTPS-2.3.1 \ - && cd /tmp/FastRTPS-2.3.1 \ +# Install Micro-XRCE-DDS-Agent +RUN git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git /tmp/micro-xrce-dds-agent \ + && cd /tmp/micro-xrce-dds-agent \ && mkdir build && cd build \ - && cmake -DTHIRDPARTY=ON -DSECURITY=ON .. \ - && cmake --build . --target install -- -j $(nproc) \ + && cmake .. \ + && make -j $(nproc) && make install \ + && ldconfig /usr/local/lib \ && rm -rf /tmp/* # create and start as LOCAL_USER_ID diff --git a/docker/Dockerfile_ros2-dashing b/docker/Dockerfile_ros2-dashing index 298af757..eca6c27f 100644 --- a/docker/Dockerfile_ros2-dashing +++ b/docker/Dockerfile_ros2-dashing @@ -7,7 +7,7 @@ FROM px4io/px4-dev-ros-melodic:2021-09-08 LABEL maintainer="Nuno Marques " # setup environment -ENV ROS_DISTRO dashing +ENV ROS_DISTRO=dashing # setup ros2 keys RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg diff --git a/docker/Dockerfile_ros2-eloquent b/docker/Dockerfile_ros2-eloquent index 946b5bc8..0dcd14c4 100644 --- a/docker/Dockerfile_ros2-eloquent +++ b/docker/Dockerfile_ros2-eloquent @@ -7,7 +7,7 @@ FROM px4io/px4-dev-ros-melodic:2021-09-08 LABEL maintainer="Nuno Marques " # setup environment -ENV ROS_DISTRO eloquent +ENV ROS_DISTRO=eloquent # setup ros2 keys RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg diff --git a/docker/Dockerfile_ros2-foxy b/docker/Dockerfile_ros2-foxy index 6486a9e4..1282ee27 100644 --- a/docker/Dockerfile_ros2-foxy +++ b/docker/Dockerfile_ros2-foxy @@ -7,7 +7,7 @@ FROM px4io/px4-dev-ros-noetic:2021-09-08 LABEL maintainer="Nuno Marques " # setup environment -ENV ROS_DISTRO foxy +ENV ROS_DISTRO=foxy # setup ros2 keys RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg diff --git a/docker/Dockerfile_ros2-galactic b/docker/Dockerfile_ros2-galactic deleted file mode 100644 index b3448889..00000000 --- a/docker/Dockerfile_ros2-galactic +++ /dev/null @@ -1,78 +0,0 @@ -# -# PX4 ROS2 Galactic development environment -# Based from container under https://github.com/osrf/docker_images/tree/master/ros2/source/devel -# - -FROM px4io/px4-dev-base-focal:2021-09-08 -LABEL maintainer="Nuno Marques " - -# setup environment -ENV ROS_DISTRO galactic - -# setup ros2 keys -RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg - -# setup sources.list -RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null - -# install bootstrap tools -RUN apt-get update \ - && apt-get install --quiet -y \ - python3-colcon-common-extensions \ - python3-colcon-mixin \ - python3-rosdep \ - python3-vcstool \ - && apt-get -y autoremove \ - && apt-get clean autoclean \ - && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* - -# install ros2 desktop -RUN apt-get install --quiet --no-install-recommends -y \ - ros-$ROS_DISTRO-desktop \ - ros-$ROS_DISTRO-launch-testing-ament-cmake \ - ros-$ROS_DISTRO-ros2bag \ - ros-$ROS_DISTRO-rosidl-generator-dds-idl \ - && apt-get -y autoremove \ - && apt-get clean autoclean \ - && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* - -# Install Python 3 packages needed for testing -RUN pip3 install -U \ - argcomplete \ - flake8 \ - flake8-blind-except \ - flake8-builtins \ - flake8-class-newline \ - flake8-comprehensions \ - flake8-deprecated \ - flake8-docstrings \ - flake8-import-order \ - flake8-quotes \ - pytest-repeat \ - pytest-rerunfailures - -# bootstrap rosdep -RUN rosdep init && rosdep update - -# setup colcon mixin and metadata -RUN colcon mixin add default \ - https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml \ - && colcon mixin update \ - && colcon metadata add default \ - https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml \ - && colcon metadata update - -# Install Fast-DDS 2.3.1 -RUN rm -rf /usr/local/include/fastrtps /usr/local/share/fastrtps /usr/local/lib/libfastrtps* \ - && git clone --recursive https://github.com/eProsima/Fast-DDS.git -b v2.3.1 /tmp/FastRTPS-2.3.1 \ - && cd /tmp/FastRTPS-2.3.1 \ - && mkdir build && cd build \ - && cmake -DTHIRDPARTY=ON -DSECURITY=ON .. \ - && cmake --build . --target install -- -j $(nproc) \ - && rm -rf /tmp/* - -# create and start as LOCAL_USER_ID -COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh -ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] - -CMD ["/bin/bash"] diff --git a/docker/Dockerfile_simulation-bionic b/docker/Dockerfile_simulation-bionic index 36e7e8e2..03cf98fe 100644 --- a/docker/Dockerfile_simulation-bionic +++ b/docker/Dockerfile_simulation-bionic @@ -5,8 +5,8 @@ FROM px4io/px4-dev-base-bionic:2021-09-08 LABEL maintainer="Daniel Agar " -RUN wget --quiet http://packages.osrfoundation.org/gazebo.key -O - | apt-key add - \ - && sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -sc` main" > /etc/apt/sources.list.d/gazebo-stable.list' \ +RUN curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ ant \ @@ -17,7 +17,6 @@ RUN wget --quiet http://packages.osrfoundation.org/gazebo.key -O - | apt-key add gstreamer1.0-plugins-good \ gstreamer1.0-plugins-ugly \ libeigen3-dev \ - libgazebo9-dev \ libgstreamer-plugins-base1.0-dev \ libimage-exiftool-perl \ libopencv-dev \ @@ -29,7 +28,7 @@ RUN wget --quiet http://packages.osrfoundation.org/gazebo.key -O - | apt-key add && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* # Some QT-Apps/Gazebo don't not show controls without this -ENV QT_X11_NO_MITSHM 1 +ENV QT_X11_NO_MITSHM=1 # Use UTF8 encoding in java tools (needed to compile jMAVSim) ENV JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 diff --git a/docker/Dockerfile_simulation-focal b/docker/Dockerfile_simulation-focal index 2bcbb2cb..6dd2a44d 100644 --- a/docker/Dockerfile_simulation-focal +++ b/docker/Dockerfile_simulation-focal @@ -33,7 +33,7 @@ RUN wget --quiet http://packages.osrfoundation.org/gazebo.key -O - | apt-key add && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* # Some QT-Apps/Gazebo don't not show controls without this -ENV QT_X11_NO_MITSHM 1 +ENV QT_X11_NO_MITSHM=1 # Use UTF8 encoding in java tools (needed to compile jMAVSim) ENV JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 diff --git a/docker/Makefile b/docker/Makefile index 7d7698cf..6e3d7b17 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,16 +1,18 @@ .PHONY: px4-dev-armhf, px4-dev-base-archlinux, px4-dev-base-bionic, \ px4-dev-base-focal, px4-dev-base-jammy, px4-dev-clang, px4-dev-nuttx-bionic, \ - px4-dev-nuttx-focal, px4-dev-nuttx-jammy, px4-dev-nuttx-clang, px4-dev-raspi, \ + px4-dev-nuttx-focal, px4-dev-nuttx-jammy, px4-dev-nuttx-noble, px4-dev-nuttx-clang, px4-dev-raspi, \ px4-dev-ros-melodic, px4-dev-ros-noetic, px4-dev-ros2-dashing, \ - px4-dev-ros2-eloquent, px4-dev-ros2-foxy, px4-dev-ros2-galactic, \ - px4-dev-ros2-rolling, px4-dev-simulation-bionic, px4-dev-simulation-focal, \ + px4-dev-ros2-eloquent, px4-dev-ros2-foxy, px4-dev-ros2-galactic, px4-dev-ros2-humble, \ + px4-dev-ros2-iron, px4-dev-ros2-jazzy, px4-dev-ros2-kilted, px4-dev-ros2-rolling, \ + px4-dev-simulation-bionic, px4-dev-simulation-focal, \ px4-docs all: px4-dev-armhf, px4-dev-base-archlinux, px4-dev-base-bionic, \ px4-dev-base-focal, px4-dev-base-jammy, px4-dev-clang, px4-dev-nuttx-bionic, \ - px4-dev-nuttx-focal, px4-dev-nuttx-jammy, px4-dev-nuttx-clang, px4-dev-raspi, \ + px4-dev-nuttx-focal, px4-dev-nuttx-jammy, px4-dev-nutts-noble, px4-dev-nuttx-clang, px4-dev-raspi, \ px4-dev-ros-melodic, px4-dev-ros-noetic, px4-dev-ros2-dashing,\ - px4-dev-ros2-eloquent, px4-dev-ros2-foxy, px4-dev-ros2-galactic, \ + px4-dev-ros2-eloquent, px4-dev-ros2-foxy, px4-dev-ros2-galactic, px4-dev-ros2-humble, \ + px4-dev-ros2-iron, px4-dev-ros2-jazzy, px4-dev-ros2-kilted, \ px4-dev-ros2-rolling, px4-dev-simulation-bionic, px4-dev-simulation-focal, \ px4-docs @@ -27,10 +29,13 @@ px4-dev-base-bionic: docker build -t px4io/px4-dev-base-bionic . -f Dockerfile_base-bionic px4-dev-base-focal: - docker build -t px4io/px4-dev-base-focal . -f Dockerfile_base-focal + docker build -t px4io/px4-dev-base-focal . -f Dockerfile_base-noble --build-arg="UBUNTU=20.04" px4-dev-base-jammy: - docker build -t px4io/px4-dev-base-jammy . -f Dockerfile_base-jammy + docker build -t px4io/px4-dev-base-jammy . -f Dockerfile_base-noble --build-arg="UBUNTU=22.04" + +px4-dev-base-noble: + docker build -t px4io/px4-dev-base-noble . -f Dockerfile_base-noble --build-arg="UBUNTU=24.04" px4-dev-clang: px4-dev-base-bionic docker build -t px4io/px4-dev-clang . -f Dockerfile_clang @@ -44,6 +49,9 @@ px4-dev-nuttx-focal: px4-dev-base-focal px4-dev-nuttx-jammy: px4-dev-base-jammy docker build -t px4io/px4-dev-nuttx-jammy . -f Dockerfile_nuttx-jammy +px4-dev-nuttx-noble: px4-dev-base-noble + docker build -t px4io/px4-dev-nuttx-noble . -f Dockerfile_nuttx-noble + px4-dev-nuttx-clang: px4-dev-clang docker build -t px4io/px4-dev-nuttx-clang . -f Dockerfile_nuttx_clang @@ -65,11 +73,23 @@ px4-dev-ros2-eloquent: px4-dev-ros-melodic px4-dev-ros2-foxy: px4-dev-ros-noetic docker build -t px4io/px4-dev-ros2-foxy . -f Dockerfile_ros2-foxy -px4-dev-ros2-rolling: px4-dev-base-focal - docker build -t px4io/px4-dev-ros2-rolling . -f Dockerfile_ros2-rolling +px4-dev-ros2-humble: px4-dev-base-jammy + docker build -t px4io/px4-dev-ros2-humble -f Dockerfile_ros2 --build-arg="ROS_DISTRO=humble" --build-arg="BASE=px4io/px4-dev-base-jammy" . px4-dev-ros2-galactic: px4-dev-base-focal - docker build -t px4io/px4-dev-ros2-galactic . -f Dockerfile_ros2-galactic + docker build -t px4io/px4-dev-ros2-galactic -f Dockerfile_ros2 --build-arg="ROS_DISTRO=galactic" --build-arg="BASE=px4io/px4-dev-base-focal" . + +px4-dev-ros2-iron: px4-dev-base-jammy + docker build -t px4io/px4-dev-ros2-iron -f Dockerfile_ros2 --build-arg="ROS_DISTRO=iron" --build-arg="BASE=px4io/px4-dev-base-jammy" . + +px4-dev-ros2-jazzy: px4-dev-base-noble + docker build -t px4io/px4-dev-ros2-jazzy -f Dockerfile_ros2 --build-arg="ROS_DISTRO=jazzy" --build-arg="BASE=px4io/px4-dev-base-noble" . + +px4-dev-ros2-kilted: px4-dev-base-noble + docker build -t px4io/px4-dev-ros2-kilted -f Dockerfile_ros2 --build-arg="ROS_DISTRO=kilted" --build-arg="BASE=px4io/px4-dev-base-noble" . + +px4-dev-ros2-rolling: px4-dev-base-noble + docker build -t px4io/px4-dev-ros2-rolling -f Dockerfile_ros2 --build-arg="ROS_DISTRO=rolling" --build-arg="BASE=px4io/px4-dev-base-jammy" . px4-dev-simulation-bionic: px4-dev-base-bionic docker build -t px4io/px4-dev-simulation-bionic . -f Dockerfile_simulation-bionic