2023-07-26 11:02:21 +00:00
|
|
|
ARG ROS_DISTRO=humble
|
2023-07-27 10:35:44 +00:00
|
|
|
ARG UNDERLAY_WS=/rmp_ws
|
2023-07-26 11:02:21 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
# 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
|
2023-07-27 10:35:44 +00:00
|
|
|
RUN mkdir -p /rmp_ws/src
|
|
|
|
WORKDIR /rmp_ws/src
|
2023-07-26 11:02:21 +00:00
|
|
|
COPY dependencies.repos .
|
2023-07-28 08:07:09 +00:00
|
|
|
RUN vcs import < dependencies.amd64.repos
|
2023-07-26 11:02:21 +00:00
|
|
|
|
|
|
|
# Build the base Colcon workspace, installing dependencies first.
|
2023-07-27 10:35:44 +00:00
|
|
|
WORKDIR /rmp_ws
|
2023-07-26 11:02:21 +00:00
|
|
|
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
|
|
|
|
COPY overlay.repos .
|
|
|
|
RUN vcs import < overlay.repos
|
|
|
|
|
|
|
|
WORKDIR /overlay_ws
|
|
|
|
# COPY ./tb3_autonomy/ ./src/tb3_autonomy/
|
|
|
|
# COPY ./tb3_worlds/ ./src/tb3_worlds/
|
2023-07-27 10:35:44 +00:00
|
|
|
RUN source /rmp_ws/install/setup.bash \
|
2023-07-26 11:02:21 +00:00
|
|
|
&& 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" ]
|