diff --git a/Dockerfile.rhel9 b/Dockerfile.rhel9 index 26948d5..b4ab37a 100644 --- a/Dockerfile.rhel9 +++ b/Dockerfile.rhel9 @@ -11,6 +11,7 @@ RUN dnf install \ make \ langpacks-en \ git \ + wget \ -y --refresh RUN dnf config-manager --set-enabled crb @@ -21,6 +22,44 @@ python3-colcon-common-extensions RUN rosdep init RUN pip3 install vcstool colcon-mixin colcon-coveragepy-result colcon-lcov-result +# install cmake 3.23.5 +RUN \ + cd && \ + wget https://github.com/Kitware/CMake/releases/download/v3.23.5/cmake-3.23.5-linux-x86_64.tar.gz && \ + cd /usr && \ + tar --strip-components=1 -xzf ~/cmake-3.23.5-linux-x86_64.tar.gz && \ + rm ~/cmake-3.23.5-linux-x86_64.tar.gz + +# install additional dependencies +# TODO where does the mix of python3.9 and python3.11 come from? +RUN \ + cd && \ + wget https://bootstrap.pypa.io/get-pip.py && \ + python3.11 get-pip.py && rm get-pip.py && \ + python3.11 -m pip install catkin-pkg + +# 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 + +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 && \ + source /opt/ros/$ROS_DISTRO/setup.sh && \ + rosdep update --rosdistro $ROS_DISTRO && \ + rosdep install -iyr --from-path src || true && \ + 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" ] diff --git a/ros-controls.repos b/ros-controls.repos new file mode 100644 index 0000000..e47f561 --- /dev/null +++ b/ros-controls.repos @@ -0,0 +1,9 @@ +repositories: + rsl: + type: git + url: https://github.com/PickNikRobotics/RSL.git + version: main + generate_parameter_library: + type: git + url: https://github.com/PickNikRobotics/generate_parameter_library.git + version: main \ No newline at end of file