From 12a9161f0e9df2d4e8c99fd365c655511ba175ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ellensohn?= Date: Wed, 6 Sep 2023 08:37:24 +0200 Subject: [PATCH] update --- docker-compose.yaml | 2 +- docker/Dockerfile | 9 ++++++ docker/Dockerfile.amd64 | 61 ---------------------------------------- docker/Dockerfile.arm64 | 62 ----------------------------------------- 4 files changed, 10 insertions(+), 124 deletions(-) delete mode 100644 docker/Dockerfile.amd64 delete mode 100644 docker/Dockerfile.arm64 diff --git a/docker-compose.yaml b/docker-compose.yaml index 4eef17a..792c625 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -175,7 +175,7 @@ services: network_mode: host ipc: host environment: - - ROS_DOMAIN_ID=5 + - ROS_DOMAIN_ID=5 - RMW_IMPLEMENTATION=rmw_cyclonedds_cpp # slam-toolbox-localization diff --git a/docker/Dockerfile b/docker/Dockerfile index c5e5d2b..4e8fb0f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -67,6 +67,9 @@ ENV UNDERLAY_WS=${UNDERLAY_WS} COPY ./docker/entrypoint.sh / RUN chmod +x /entrypoint.sh +# Update repository at the end of this build stage +RUN vcs pull src + ENTRYPOINT [ "/entrypoint.sh" ] ########################################### @@ -96,6 +99,9 @@ RUN source /rmp_ws/install/setup.bash \ COPY ./docker/entrypoint.sh / RUN chmod +x /entrypoint.sh +# Update repository at the end of this build stage +RUN vcs pull src + ENTRYPOINT [ "/entrypoint.sh" ] ########################################### @@ -109,6 +115,9 @@ RUN source /rmp_ws/install/setup.bash \ && apt-get install -y --no-install-recommends ros-${ROS_DISTRO}-rviz2 \ && rm -rf /var/lib/apt/lists/* +# Update repository at the end of this build stage +RUN vcs pull src + # Set up the entrypoint ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/docker/Dockerfile.amd64 b/docker/Dockerfile.amd64 deleted file mode 100644 index ed65b77..0000000 --- a/docker/Dockerfile.amd64 +++ /dev/null @@ -1,61 +0,0 @@ -ARG ROS_DISTRO=humble -ARG UNDERLAY_WS=/rmp_ws - -######################################## -# Base Image for Bot Mini Control # -######################################## -FROM osrf/ros:${ROS_DISTRO}-desktop as base -ENV ROS_DISTRO=${ROS_DISTRO} -SHELL ["/bin/bash", "-c"] - -# Create Colcon workspace with external dependencies -RUN mkdir -p /rmp_ws/src -WORKDIR /rmp_ws/src -COPY dependencies.repos . -RUN vcs import < dependencies.amd64.repos - -# Build the base Colcon workspace, installing dependencies first. -WORKDIR /rmp_ws -RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ - && apt-get update -y \ - && rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \ - && colcon build --symlink-install - -# Use Cyclone DDS as middleware -RUN apt-get update && apt-get install -y --no-install-recommends \ - ros-${ROS_DISTRO}-rmw-cyclonedds-cpp -ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp - -ENV UNDERLAY_WS=${UNDERLAY_WS} - -########################################### -# Overlay Image for Bot Mini Control # -########################################### -FROM base AS overlay - -# Create an overlay Colcon workspace -RUN mkdir -p /overlay_ws/src -WORKDIR /overlay_ws/src - -RUN echo "Dummy step" -COPY overlay.repos . -RUN vcs import < overlay.repos - -WORKDIR /overlay_ws -# COPY ./tb3_autonomy/ ./src/tb3_autonomy/ -# COPY ./tb3_worlds/ ./src/tb3_worlds/ -RUN source /rmp_ws/install/setup.bash \ - && colcon build --symlink-install \ - && rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y - -# Set up the entrypoint -COPY ./docker/entrypoint.sh / -RUN chmod +x /entrypoint.sh - -COPY ./controller_startup.sh / -RUN chmod +x /controller_startup.sh - -COPY ./localization_startup.sh / -RUN chmod +x /localization_startup.sh - -ENTRYPOINT [ "/entrypoint.sh" ] \ No newline at end of file diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 deleted file mode 100644 index ae96e74..0000000 --- a/docker/Dockerfile.arm64 +++ /dev/null @@ -1,62 +0,0 @@ -ARG ROS_DISTRO=humble -ARG UNDERLAY_WS=/rmp_ws - -######################################## -# Base Image for Bot Mini Control # -######################################## -#FROM --platform=linux/arm64 ros:${ROS_DISTRO} as base -FROM ros:${ROS_DISTRO} as base -ENV ROS_DISTRO=${ROS_DISTRO} -SHELL ["/bin/bash", "-c"] - -# Create Colcon workspace with external dependencies -RUN mkdir -p /rmp_ws/src -WORKDIR /rmp_ws/src -COPY dependencies.repos . -RUN vcs import < dependencies.arm64.repos - -# Build the base Colcon workspace, installing dependencies first. -WORKDIR /rmp_ws -RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ - && apt-get update -y \ - && rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \ - && colcon build --symlink-install - -# Use Cyclone DDS as middleware -RUN apt-get update && apt-get install -y --no-install-recommends \ - ros-${ROS_DISTRO}-rmw-cyclonedds-cpp -ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp - -ENV UNDERLAY_WS=${UNDERLAY_WS} - -########################################### -# Overlay Image for Bot Mini Control # -########################################### -FROM base AS overlay - -# Create an overlay Colcon workspace -RUN mkdir -p /overlay_ws/src -WORKDIR /overlay_ws/src - -RUN echo "Dummy step" -COPY overlay.repos . -RUN vcs import < overlay.repos - -WORKDIR /overlay_ws -# COPY ./tb3_autonomy/ ./src/tb3_autonomy/ -# COPY ./tb3_worlds/ ./src/tb3_worlds/ -RUN source /rmp_ws/install/setup.bash \ - && colcon build --symlink-install \ - && rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y - -# Set up the entrypoint -COPY ./docker/entrypoint.sh / -RUN chmod +x /entrypoint.sh - -COPY ./controller_startup.sh / -RUN chmod +x /controller_startup.sh - -COPY ./localization_startup.sh / -RUN chmod +x /localization_startup.sh - -ENTRYPOINT [ "/entrypoint.sh" ] \ No newline at end of file