Skip to content

Commit

Permalink
Install Gazebo as part of Tutorials image build (#937)
Browse files Browse the repository at this point in the history
* Install Gazebo as part of Tutorials image build

* Use the named Gazebo version instead of a number
  • Loading branch information
sea-bass authored Aug 2, 2024
1 parent 753276a commit b1a23f3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# syntax = docker/dockerfile:1.3

ARG ROS_DISTRO=rolling
ARG GZ_VERSION=harmonic

######################### Tutorial Image #################################################

FROM moveit/moveit2:${ROS_DISTRO}-source as tutorial_image

LABEL org.opencontainers.image.description "This container has working versions of the tutorials discussed here: https://moveit.picknik.ai/main/doc/tutorials/tutorials.html"

ARG GZ_VERSION

# Copy sources from docker context
COPY . src/moveit2_tutorials

Expand Down Expand Up @@ -45,6 +48,12 @@ COPY ./doc/tutorials/pick_and_place_with_moveit_task_constructor/src/mtc_node.cp
# Add the launch folder to the tutorial package and CMakeLists.txt
COPY ./doc/tutorials/pick_and_place_with_moveit_task_constructor/launch src/mtc_tutorial/launch

# Install Gazebo, which is needed by some dependencies.
RUN sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' && \
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - && \
sudo apt update && \
sudo apt-get install -y "gz-${GZ_VERSION}"

# Add install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) to CMakeLists.txt
RUN sed -i "s|ament_package()|install(DIRECTORY launch DESTINATION share/\${PROJECT_NAME})\nament_package()|g" src/mtc_tutorial/CMakeLists.txt
# Build the tutorials and set up the entrypoint/bashrc
Expand Down

0 comments on commit b1a23f3

Please sign in to comment.