Skip to content

Commit

Permalink
fix rmw installation for non-ros base images
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbusch committed Jan 22, 2024
1 parent 5cbaf02 commit a794a31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ RUN source /opt/ros/$ROS_DISTRO/setup.bash && \
# install desired ROS 2 middleware
ARG RMW_IMPLEMENTATION
ENV RMW_IMPLEMENTATION=${RMW_IMPLEMENTATION}
RUN if [[ "$ROS_VERSION" == "2" ]]; then \
RUN source /opt/ros/$ROS_DISTRO/setup.bash && \
if [[ "$ROS_VERSION" == "2" ]]; then \
apt-get update && \
RMW_PACKAGE=ros-$ROS_DISTRO-$(echo $RMW_IMPLEMENTATION | tr '_' '-') && \
apt-get install -y $RMW_PACKAGE && \
Expand Down

0 comments on commit a794a31

Please sign in to comment.