@@ -5,6 +5,9 @@ FROM ${BASE_IMAGE} AS source
55
66WORKDIR ${AMENT_WS}/src
77
8+ RUN apt-get update && apt-get install -y curl \
9+ && curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
10+
811# Clean up and update apt-get, then update rosdep
912RUN sudo apt-get clean && \
1013 sudo apt-get update && \
@@ -16,6 +19,10 @@ RUN sudo apt-get clean && \
1619COPY src/robot .
1720
1821# Scan for rosdeps
22+
23+ RUN apt-get update && apt-get install -y curl \
24+ && curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
25+
1926RUN apt-get -qq update && rosdep update && \
2027 rosdep install --from-paths . --ignore-src -r -s \
2128 | grep 'apt-get install' \
@@ -26,6 +33,10 @@ RUN apt-get -qq update && rosdep update && \
2633FROM ${BASE_IMAGE} AS dependencies
2734
2835# Clean up and update apt-get, then update rosdep
36+
37+ RUN apt-get update && apt-get install -y curl \
38+ && curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
39+
2940RUN sudo apt-get clean && \
3041 sudo apt-get update && \
3142 sudo rosdep update
@@ -50,6 +61,10 @@ RUN apt-get -qq autoremove -y && apt-get -qq autoclean && apt-get -qq clean && \
5061FROM dependencies AS build
5162
5263# Clean up and update apt-get, then update rosdep
64+
65+ RUN apt-get update && apt-get install -y curl \
66+ && curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
67+
5368RUN sudo apt-get clean && \
5469 sudo apt-get update && \
5570 sudo rosdep update
@@ -63,6 +78,18 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
6378# Source and Build Artifact Cleanup
6479# RUN rm -rf src/* build/* devel/* install/* log/*
6580
81+ # add the slam toolbox, localizaiton and rviz2
82+ RUN sudo apt-get update
83+ RUN sudo apt-get install -y ros-humble-rviz2
84+ RUN sudo apt-get install -y ros-humble-navigation2
85+ RUN sudo apt-get install -y ros-humble-slam-toolbox
86+
87+ # add controler support to the container
88+ RUN sudo apt-get install -y ros-humble-joy
89+ RUN sudo apt-get install -y jstest-gtk
90+ RUN mkdir -p /root/.config/jstest-gtk
91+
92+
6693# Entrypoint will run before any CMD on launch. Sources ~/opt/<ROS_DISTRO>/setup.bash and ~/ament_ws/install/setup.bash
6794COPY docker/wato_ros_entrypoint.sh ${AMENT_WS}/wato_ros_entrypoint.sh
6895ENTRYPOINT ["./wato_ros_entrypoint.sh" ]
0 commit comments