Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ROS 2 humble. Update ROS 2 dockerfile to take args for the ros ve… #339

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions .github/workflows/docker_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,36 @@ 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-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
Expand All @@ -460,10 +486,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"
Expand All @@ -483,10 +512,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"
Expand Down
18 changes: 9 additions & 9 deletions docker/Dockerfile_ros2-rolling → docker/Dockerfile_ros2
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
# 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 <[email protected]>"

# 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
Expand Down Expand Up @@ -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
Expand Down
78 changes: 0 additions & 78 deletions docker/Dockerfile_ros2-galactic

This file was deleted.

9 changes: 6 additions & 3 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ 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-rolling: px4-dev-base-jammy
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-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-simulation-bionic: px4-dev-base-bionic
docker build -t px4io/px4-dev-simulation-bionic . -f Dockerfile_simulation-bionic
Expand Down