Skip to content

Commit 45fd06c

Browse files
committed
Fix the navigation2 build (issue #198)
1 parent f5aab64 commit 45fd06c

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

navigation2/Dockerfile

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,17 @@ ARG DEBIAN_FRONTEND=noninteractive
4343

4444
SHELL ["/bin/bash", "-c"]
4545

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+
4655
# Define workspace locations
47-
ENV NAVIGATION2_WS=${HOME_DIR}/nav2_ws
56+
ENV NAVIGATION2_WS=${HOME}/nav2_ws
4857

4958
RUN mkdir -p ${NAVIGATION2_WS}/src
5059

@@ -56,19 +65,19 @@ RUN vcs import --shallow src < navigation2.repos
5665
COPY --chown=spaceros-user:spaceros-user src/ src
5766

5867
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 && \
6170
sudo apt update && \
6271
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 && \
6473
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --no-warn-unused-cli
6574
RUN rm -rf src build log
6675

6776

68-
# Install rviz2 to send goals to Nav2.
77+
# Install rviz2 to send goals to Nav2.
6978
# TODO(xfiderek): Remove rviz2 and humble-nav2 froms this image
7079
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 \
7281
sudo apt update && \
7382
sudo apt install -y ros-humble-rviz2 ros-humble-nav2-bringup
7483

navigation2/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ docker image list
3333
The output will look something like this:
3434

3535
```
36-
REPOSITORY TAG IMAGE ID CREATED SIZE
37-
osrf/space_nav2 latest 6edb2edc9643 10 hours ago 15.5GB
38-
osrf/space-ros latest 629b13cf7b74 12 hours ago 7.8GB
36+
REPOSITORY TAG IMAGE ID CREATED SIZE
37+
osrf/space_nav2 latest 7016292fba1c 32 minutes ago 3.65GB
38+
osrf/space-ros latest cf10cd2cb82c 4 days ago 1.05GB
3939
```
4040

4141
The new image is named **osrf/space_nav2:latest**.

0 commit comments

Comments
 (0)