Skip to content

Commit

Permalink
Update the space robots demo for new base image (issue #198)
Browse files Browse the repository at this point in the history
  • Loading branch information
eholum committed Oct 22, 2024
1 parent bba6830 commit f5aab64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
11 changes: 4 additions & 7 deletions space_robots/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ LABEL org.label-schema.vcs-url="https://github.com/space-ros/docker"
LABEL org.label-schema.vcs-ref=${VCS_REF}

# Define a few key variables
ENV DEMO_DIR=${HOME_DIR}/demos_ws
ENV DEMO_DIR=${HOME}/demos_ws
ENV IGNITION_VERSION fortress
ENV GZ_VERSION fortress

Expand Down Expand Up @@ -84,22 +84,19 @@ RUN cd mongo-cxx-driver-r3.6.7/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCM
# Get the source for the dependencies
# RUN vcs import src < /tmp/demo_generated_pkgs.repos
COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/
RUN vcs import src < /tmp/demo_manual_pkgs.repos && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"'
RUN vcs import src < /tmp/demo_manual_pkgs.repos && /bin/bash -c 'source "${SPACEROS_DIR}/setup.bash"'

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
sudo apt-get update -y \
&& /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \
&& /bin/bash -c 'source "${SPACEROS_DIR}/setup.bash"' \
&& /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \
&& rosdep install --from-paths src --ignore-src -r -y --rosdistro ${ROS_DISTRO}

# Build the demo
RUN /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash && source ${MOVEIT2_DIR}/install/setup.bash \
RUN /bin/bash -c 'source ${SPACEROS_DIR}/setup.bash && source ${MOVEIT2_DIR}/install/setup.bash \
&& colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release'

# Add the user to the render group so that the user can access /dev/dri/renderD128
RUN sudo usermod -aG render $USERNAME

# Setup the entrypoint
COPY ./entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
Expand Down
7 changes: 2 additions & 5 deletions space_robots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Depending on the host computer, you might need to remove the ```--gpus all``` fl
## Running the Demos

### Curiosity Mars rover demo

Launch the demo:
```bash
ros2 launch mars_rover mars_rover.launch.py
Expand All @@ -57,11 +58,7 @@ docker exec -it <container-name> bash
Make sure packages are sourced:

```bash
source ${SPACEROS_DIR}/install/setup.bash
```

```bash
source ~/demos_ws/install/setup.bash
source ${DEMO_DIR}/install/setup.bash
```

#### Available Commands
Expand Down

0 comments on commit f5aab64

Please sign in to comment.