From 515575540024f598d85aff5c963bc15f14354b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ellensohn?= Date: Wed, 2 Aug 2023 19:12:24 +0200 Subject: [PATCH] update --- docker-compose.yaml | 2 ++ docker/Dockerfile | 25 +++++++++++++++---------- overlay.repos | 10 +++------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index ea1ea37..3adb26a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -11,6 +11,8 @@ services: - ghcr.io/bjoernellens1/ros2-base:humble args: ROS_DISTRO: humble + UNDERLAY_WS: cps_bot_mini_ws + OVERLAY_WS: overlay_ws target: base x-bake: platforms: diff --git a/docker/Dockerfile b/docker/Dockerfile index 7014738..f769c3c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,9 +1,12 @@ ARG ROS_DISTRO=humble -ARG UNDERLAY_WS=/bot_mini_ws -ARG OVERLAY_WS=/overlay_ws +ARG UNDERLAY_WS=bot_mini_ws +ARG OVERLAY_WS=overlay_ws # This file should work for both amd64 and arm64 builds. +## Problem! some variables not working currently. Need to find out why. +# For now, the variables are replaced with fixed values. + ######################################## # Base Image for Bot Mini Control # ######################################## @@ -15,16 +18,18 @@ ENV ROS_DISTRO=${ROS_DISTRO} ENV UNDERLAY_WS=${UNDERLAY_WS} ENV OVERLAY_WS=${OVERLAY_WS} +RUN echo "successfully sourced ENV variables: ROS_DISTRO=${ROS_DISTRO}, UNDERLAY_WS=${UNDERLAY_WS}, OVERLAY_WS=${OVERLAY_WS}" + # Create Colcon workspace with external dependencies -RUN mkdir -p /${UNDERLAY_WS}/src -WORKDIR /${UNDERLAY_WS}/src +RUN mkdir -p /bot_mini_ws/src +WORKDIR /bot_mini_ws/src COPY dependencies.repos . #RUN vcs import < dependencies.repos RUN vcs import < dependencies.repos; # Build the base Colcon workspace, installing dependencies first. -WORKDIR /${UNDERLAY_WS} +WORKDIR /bot_mini_ws RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ && apt-get update -y \ && rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \ @@ -45,14 +50,14 @@ ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp FROM base AS overlay # Create an overlay Colcon workspace -RUN mkdir -p /${OVERLAY_WS}/src -WORKDIR /${OVERLAY_WS}/src +RUN mkdir -p /overlay_ws/src +WORKDIR /overlay_ws/src COPY overlay.repos . RUN vcs import < overlay.repos -WORKDIR /${OVERLAY_WS} +WORKDIR /overlay_ws -RUN source /${UNDERLAY_WS}/install/setup.bash \ +RUN source /bot_mini_ws/install/setup.bash \ && colcon build --symlink-install \ && apt-get update \ && rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \ @@ -70,7 +75,7 @@ ENTRYPOINT [ "/entrypoint.sh" ] FROM overlay AS guis # Install additional GUI tools -RUN source /${UNDERLAY_WS}/install/setup.bash \ +RUN source /bot_mini_ws/install/setup.bash \ && colcon build --symlink-install \ && apt-get update \ && apt-get install -y --no-install-recommends ros-${ROS_DISTRO}-rviz2 \ diff --git a/overlay.repos b/overlay.repos index d61bcda..3a0f26f 100644 --- a/overlay.repos +++ b/overlay.repos @@ -8,18 +8,13 @@ repositories: rmp220_teleop: type: git url: https://github.com/bjoernellens1/rmp220_teleop.git - version: main + version: bot_mini cam_openCV: type: git url: https://github.com/bjoernellens1/ros2_cam_openCV.git version: main - bot_mini_teleop: - type: git - url: https://github.com/bjoernellens1/rmp220_teleop - version: bot_mini - bot_mini_description: type: git url: https://github.com/bjoernellens1/bot_mini_description @@ -30,4 +25,5 @@ repositories: bot_mini_bringup: type: git - url: https://github.com/bjoernellens1/bot_mini_bringup \ No newline at end of file + url: https://github.com/bjoernellens1/bot_mini_bringup + version: imu \ No newline at end of file