Skip to content

Commit

Permalink
Add simulation repo to demo workspace for the nav2 demo (issue #201)
Browse files Browse the repository at this point in the history
  • Loading branch information
eholum committed Oct 22, 2024
1 parent 045f144 commit 5b2b4fa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
25 changes: 22 additions & 3 deletions nav2_demo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,33 @@ ARG DEBIAN_FRONTEND=noninteractive

# Define workspace locations
ENV NAVIGATION2_WS=${HOME_DIR}/nav2_ws
ENV NAV2_DEPS_WS=${HOME_DIR}/nav2_deps_ws
ENV NAV2_DEMO_WS=${HOME_DIR}/nav2_demo_ws

# Install LFS for simulation resources
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
sudo apt-get update -y && \
sudo apt-get install -y \
git-lfs

# Grab required simulation resources
WORKDIR ${NAV2_DEMO_WS}
RUN mkdir -p src
COPY nav2_demo.repos /tmp/
RUN vcs import --input /tmp/nav2_demo.repos src/

# Install them
RUN source ${SPACEROS_DIR}/install/setup.bash && \
source ${NAVIGATION2_WS}/install/setup.bash && \
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
RUN rm -rf src build log

# Setup mars_rover demo
# Install map file for localization
COPY mars_map* /home/spaceros-user/nav2_ws
COPY --chown=${USERNAME}:${USERNAME} mars_map* .

# Install nav2 config file for mars rover demo
COPY nav2_params.yaml /home/spaceros-user/nav2_ws
COPY --chown=${USERNAME}:${USERNAME} nav2_params.yaml .

# Set up the entrypoint
COPY ./entrypoint.sh /
Expand Down
2 changes: 1 addition & 1 deletion nav2_demo/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
set -e

# Setup the Navigation2 environment
source "/home/spaceros-user/nav2_ws/install/setup.bash"
source "${NAV2_DEMO_WS}/install/setup.bash"
exec "$@"
5 changes: 5 additions & 0 deletions nav2_demo/nav2_demo.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repositories:
simulation:
type: git
url: https://github.com/space-ros/simulation.git
version: ead69c448cd08484b12c252d17cbd8473c4d309e

0 comments on commit 5b2b4fa

Please sign in to comment.