Skip to content

Commit

Permalink
Compile generate_parameter_library on rhel8
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Jan 24, 2024
1 parent b344814 commit 6734c14
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 30 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_and_publish_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- uses: docker/build-push-action@v5
with:
push: true
file: Dockerfile.rhel8
tags: ghcr.io/${{ github.repository_owner }}/ros:${{ matrix.ros_distro }}-rhel
build-args: |
ROS_DISTRO=${{ matrix.ros_distro }}
Expand Down
27 changes: 0 additions & 27 deletions Dockerfile

This file was deleted.

51 changes: 51 additions & 0 deletions Dockerfile.rhel8
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM almalinux:8
ARG ROS_DISTRO=rolling

# install ros
ADD http://packages.ros.org/ros2/rhel/ros2.repo /etc/yum.repos.d/ros2.repo
RUN dnf install \
'dnf-command(config-manager)' \
epel-release \
cmake \
gcc-c++ \
make \
langpacks-en \
git \
wget \
-y --refresh
RUN dnf config-manager --set-enabled powertools

ENV ROS_DISTRO=${ROS_DISTRO}
RUN dnf install -y ros-${ROS_DISTRO}-ros-base \
python3-rosdep \
python3-colcon-common-extensions
RUN rosdep init
RUN pip3 install vcstool colcon-mixin colcon-coveragepy-result colcon-lcov-result

# 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

# we have to compile generate_parameter_library from source
ENV ROS2_WS /opt/ros2_ws
RUN mkdir -p $ROS2_WS/src
WORKDIR $ROS2_WS
ADD ros-controls.rhel8.repos .
RUN vcs import src < ros-controls.rhel8.repos && \
source /opt/ros/$ROS_DISTRO/setup.bash && \
rosdep update --rosdistro $ROS_DISTRO && \
rosdep install -iyr --from-path src && \
colcon build \
--mixin release build-testing-off \
--cmake-args --no-warn-unused-cli \
--packages-up-to generate_parameter_library && \
rm -rf log src build

# set up sourcing of ros
COPY ./ros_entrypoint.sh /
ENTRYPOINT [ "/ros_entrypoint.sh" ]
CMD ["bash"]
4 changes: 2 additions & 2 deletions Dockerfile.rhel9
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ RUN colcon mixin add default \
ENV ROS2_WS /opt/ros2_ws
RUN mkdir -p $ROS2_WS/src
WORKDIR $ROS2_WS
ADD ros-controls.repos .
RUN vcs import src < ros-controls.repos && \
ADD ros-controls.rhel9.repos .
RUN vcs import src < ros-controls.rhel9.repos && \
source /opt/ros/$ROS_DISTRO/setup.sh && \
rosdep update --rosdistro $ROS_DISTRO && \
rosdep install -iyr --from-path src || true && \
Expand Down
13 changes: 13 additions & 0 deletions ros-controls.rhel8.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repositories:
rsl:
type: git
url: https://github.com/christophfroehlich/RSL.git
version: main
generate_parameter_library:
type: git
url: https://github.com/PickNikRobotics/generate_parameter_library.git
version: main
cpp_polyfills:
type: git
url: https://github.com/PickNikRobotics/cpp_polyfills.git
version: main
2 changes: 1 addition & 1 deletion ros-controls.repos → ros-controls.rhel9.repos
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repositories:
rsl:
type: git
url: https://github.com/PickNikRobotics/RSL.git
url: https://github.com/christophfroehlich/RSL.git
version: main
generate_parameter_library:
type: git
Expand Down

0 comments on commit 6734c14

Please sign in to comment.