Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simulation repo to demo workspace for the nav2 demo (#201) #202

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading