update layers

This commit is contained in:
Björn Ellensohn 2023-08-09 16:33:46 +02:00
parent 8a8d1187bb
commit 7c3f7066d4
3 changed files with 25 additions and 87 deletions

View File

@ -1,29 +0,0 @@
#!/bin/bash
# Basic entrypoint for ROS / Colcon Docker containers
# Source ROS 2
source /opt/ros/${ROS_DISTRO}/setup.bash
echo "Sourced ROS 2 ${ROS_DISTRO}"
# Source the base workspace, if built
if [ -f ${UNDERLAY_WS}/install/setup.bash ]
then
source ${UNDERLAY_WS}/install/setup.bash
#export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$(ros2 pkg prefix turtlebot3_gazebo)/share/turtlebot3_gazebo/models
echo "Sourced Bot Mini base workspace"
fi
# Source the overlay workspace, if built
if [ -f /overlay_ws/install/setup.bash ]
then
source /overlay_ws/install/setup.bash
#export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$(ros2 pkg prefix tb3_worlds)/share/tb3_worlds/models
echo "Sourced Bot Mini overlay workspace"
fi
# Start Robot ROS2 Nodes
ros2 launch bot_mini_bringup robot_controller.launch.py priority:=80 cpu-affinity:=4 lock-memory-size:=100 config-child-threads:=True &
ros2 launch bot_mini_bringup robot_twist_mux.launch.py &
ros2 launch bot_mini_bringup robot_joy_teleop.launch.py
wait

View File

@ -30,12 +30,12 @@ RUN echo "Hardware platform is: $(uname -m)"
RUN uname -a
RUN if [ "$(uname -m)" = "x86_64" ]; then \
echo "Copying files for linux/amd64"; \
mv dependencies.amd64.repos dependencies.repos; \
else \
echo "Copying files for linux/arm64"; \
mv dependencies.arm64.repos dependencies.repos; \
fi
echo "Copying files for linux/amd64"; \
mv dependencies.amd64.repos dependencies.repos; \
else \
echo "Copying files for linux/arm64"; \
mv dependencies.arm64.repos dependencies.repos; \
fi
#RUN vcs import < dependencies.repos
RUN vcs import < dependencies.repos;
@ -43,16 +43,17 @@ RUN vcs import < dependencies.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 \
&& rm -rf /var/lib/apt/lists/*
&& apt-get update -y \
&& rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y
# Use Cyclone DDS as middleware
RUN source /opt/ros/${ROS_DISTRO}/setup.bash \
&& colcon build --symlink-install
# Use Cyclone DDS as middleware and install xacro
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
ros-${ROS_DISTRO}-xacro \
&& rm -rf /var/lib/apt/lists/*
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
ros-${ROS_DISTRO}-xacro \
&& rm -rf /var/lib/apt/lists/*
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
@ -62,7 +63,7 @@ ENV UNDERLAY_WS=${UNDERLAY_WS}
# Overlay Image for RMP Control #
###########################################
FROM base AS overlay
# Create an overlay Colcon workspace
RUN mkdir -p /overlay_ws/src
WORKDIR /overlay_ws/src
@ -74,21 +75,17 @@ WORKDIR /overlay_ws
RUN echo "update overlay"
RUN source /rmp_ws/install/setup.bash \
&& colcon build --symlink-install \
&& apt-get update \
&& rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \
&& rm -rf /var/lib/apt/lists/*
&& apt-get update \
&& rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \
&& rm -rf /var/lib/apt/lists/*
RUN source /rmp_ws/install/setup.bash \
&& colcon build --symlink-install
# 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" ]
###########################################
@ -98,11 +95,9 @@ FROM overlay AS guis
# Install additional GUI tools
RUN source /rmp_ws/install/setup.bash \
&& colcon build --symlink-install \
&& apt-get update \
&& apt-get install -y --no-install-recommends ros-${ROS_DISTRO}-rviz2 \
&& rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \
&& rm -rf /var/lib/apt/lists/*
&& apt-get update \
&& apt-get install -y --no-install-recommends ros-${ROS_DISTRO}-rviz2 \
&& rm -rf /var/lib/apt/lists/*
# Set up the entrypoint
ENTRYPOINT [ "/entrypoint.sh" ]

View File

@ -1,28 +0,0 @@
#!/bin/bash
# Basic entrypoint for ROS / Colcon Docker containers
# Source ROS 2
source /opt/ros/${ROS_DISTRO}/setup.bash
echo "Sourced ROS 2 ${ROS_DISTRO}"
# Source the base workspace, if built
if [ -f ${UNDERLAY_WS}/install/setup.bash ]
then
source ${UNDERLAY_WS}/install/setup.bash
#export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$(ros2 pkg prefix turtlebot3_gazebo)/share/turtlebot3_gazebo/models
echo "Sourced Bot Mini base workspace"
fi
# Source the overlay workspace, if built
if [ -f /overlay_ws/install/setup.bash ]
then
source /overlay_ws/install/setup.bash
#export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$(ros2 pkg prefix tb3_worlds)/share/tb3_worlds/models
echo "Sourced Bot Mini overlay workspace"
fi
# Start Robot ROS2 Nodes
ros2 launch bot_mini_bringup robot_lidar.launch.py &
ros2 launch bot_mini_bringup robot_localization.launch.py
wait