diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 2371c93181..662f6fe669 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -8,14 +8,11 @@ FROM moveit/moveit2:${ROS_DISTRO}-source as tutorial_image LABEL org.opencontainers.image.description "This container has working versions of the tutorials discussed here: https://moveit.picknik.ai/main/doc/tutorials/tutorials.html" -# Copy MoveIt sources from docker context +# Copy sources from docker context COPY . src/moveit2_tutorials -# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size -# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers -RUN --mount=type=cache,target=/root/.ccache/ \ - # Fetch required upstream sources for building - vcs import src < /root/ws_moveit/src/moveit2_tutorials/.github/upstream.repos +# Fetch required upstream sources for building +RUN vcs import src < src/moveit2_tutorials/.github/upstream.repos ######################### Hello World Tutorial ######################################### @@ -28,10 +25,7 @@ RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" &&\ --dependencies moveit_ros_planning_interface moveit_visual_tools rclcpp \ --node-name hello_moveit hello_moveit -######################### Planning Around Objects ####################################### - -# Remove the hello_world tutorial cpp file and replace it with the planning_around_objects file -RUN rm src/hello_moveit/src/hello_moveit.cpp +# Replace template hello_moveit.cpp with implementation from planning_around_objects COPY ./doc/tutorials/planning_around_objects/hello_moveit.cpp src/hello_moveit/src/hello_moveit.cpp ######################### Pick and Place (MTC) Image ######################################### @@ -45,8 +39,7 @@ RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" &&\ --dependencies moveit_task_constructor_core rclcpp \ --node-name mtc_node mtc_tutorial -# Remove the empty cpp file and replace it with the example file -RUN rm src/mtc_tutorial/src/mtc_node.cpp +# Replace template mtc_node.cpp with the example file COPY ./doc/tutorials/pick_and_place_with_moveit_task_constructor/src/mtc_node.cpp src/mtc_tutorial/src/mtc_node.cpp # Add the launch folder to the tutorial package and CMakeLists.txt @@ -58,7 +51,7 @@ RUN sed -i "s|ament_package()|install(DIRECTORY launch DESTINATION share/\${PRO RUN --mount=type=cache,target=/root/.ccache/ \ # Enable ccache . "/opt/ros/${ROS_DISTRO}/setup.sh" &&\ - . "install/setup.sh" &&\ + . "install/setup.sh" &&\ sudo apt update && rosdep install -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y && \ sudo apt install -y ros-${ROS_DISTRO}-rmw-cyclonedds-cpp && \ colcon build \ diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml index 750b5b2dbd..70776a8fdf 100644 --- a/.github/workflows/docker-images.yml +++ b/.github/workflows/docker-images.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - ROS_DISTRO: [humble, rolling] + ROS_DISTRO: [rolling] runs-on: ubuntu-latest permissions: packages: write @@ -19,11 +19,6 @@ jobs: PUSH: ${{ (github.ref_name == 'main') }} steps: - - name: Checkout distro branch - if: ${{ matrix.ROS_DISTRO != 'rolling' }} - uses: actions/checkout@v4 - with: - ref: ${{ matrix.ROS_DISTRO }} - name: Set lower case for container name run: | echo "GH_IMAGE_LC=${GH_IMAGE,,}" >>${GITHUB_ENV}