@@ -43,8 +43,17 @@ ARG DEBIAN_FRONTEND=noninteractive
43
43
44
44
SHELL ["/bin/bash" , "-c" ]
45
45
46
+ # Install required dependencies
47
+ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
48
+ --mount=type=cache,target=/var/lib/apt,sharing=locked \
49
+ sudo apt update && \
50
+ sudo apt install -y \
51
+ python3-rosdep \
52
+ python3-vcstool
53
+ RUN sudo rosdep init && rosdep update
54
+
46
55
# Define workspace locations
47
- ENV NAVIGATION2_WS=${HOME_DIR }/nav2_ws
56
+ ENV NAVIGATION2_WS=${HOME }/nav2_ws
48
57
49
58
RUN mkdir -p ${NAVIGATION2_WS}/src
50
59
@@ -56,19 +65,19 @@ RUN vcs import --shallow src < navigation2.repos
56
65
COPY --chown=spaceros-user:spaceros-user src/ src
57
66
58
67
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
59
- --mount=type=cache,target=/var/lib/apt,sharing=locked \
60
- source ${SPACEROS_DIR}/install/ setup.bash && \
68
+ --mount=type=cache,target=/var/lib/apt,sharing=locked \
69
+ source ${SPACEROS_DIR}/setup.bash && \
61
70
sudo apt update && \
62
71
rosdep install -i --from-path src --skip-keys $(cat excluded-pkgs.txt) -y
63
- RUN source ${SPACEROS_DIR}/install/ setup.bash && \
72
+ RUN source ${SPACEROS_DIR}/setup.bash && \
64
73
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --no-warn-unused-cli
65
74
RUN rm -rf src build log
66
75
67
76
68
- # Install rviz2 to send goals to Nav2.
77
+ # Install rviz2 to send goals to Nav2.
69
78
# TODO(xfiderek): Remove rviz2 and humble-nav2 froms this image
70
79
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
71
- --mount=type=cache,target=/var/lib/apt,sharing=locked \
80
+ --mount=type=cache,target=/var/lib/apt,sharing=locked \
72
81
sudo apt update && \
73
82
sudo apt install -y ros-humble-rviz2 ros-humble-nav2-bringup
74
83
0 commit comments