From eb93da82f072a05ffc806badbc86cdbf584d892d Mon Sep 17 00:00:00 2001 From: bjoernellens1 <64093272+bjoernellens1@users.noreply.github.com> Date: Mon, 23 Oct 2023 13:28:29 +0200 Subject: [PATCH] Update my_example.Dockerfile --- docker/my_example.Dockerfile | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/docker/my_example.Dockerfile b/docker/my_example.Dockerfile index ce0511c..55b9e12 100644 --- a/docker/my_example.Dockerfile +++ b/docker/my_example.Dockerfile @@ -24,13 +24,10 @@ RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ && apt-get update -y \ && apt-get install -y --no-install-recommends \ ros-${ROS_DISTRO}-turtlesim \ - ros-${ROS_DISTRO}-rqt - #&& rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y -RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ - && colcon build --symlink-install \ + ros-${ROS_DISTRO}-rqt\ && rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y - -#ENV UNDERLAY_WS=/base_ws +RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ + && colcon build --symlink-install # Set up the entrypoint COPY ./docker/my_entrypoint.sh /entrypoint.sh @@ -42,16 +39,28 @@ RUN vcs pull src ENTRYPOINT [ "/entrypoint.sh" ] -########################################### -# Overlay Image # -########################################### +############################################################# +# Overlay Image -- Building Unitree GO1 ROS2 implementation # +############################################################# FROM base AS overlay # Create an overlay Colcon workspace RUN mkdir -p /overlay_ws/src WORKDIR /overlay_ws/src COPY my_extended.repos ./overlay.repos -RUN vcs import < overlay.repos +RUN vcs import < overlay.repos \ + && cd unitree_ros2_to_real \ + && git clone -b v3.5.1 https://github.com/unitreerobotics/unitree_legged_sdk \ + && mv ros2_unitree_legged_msgs/ .. +WORKDIR /lcm_ws +RUN cd /lcm_ws \ + && git clone -b v1.4.0 https://github.com/lcm-proj/lcm \ + && cd lcm \ + && mkdir build \ + && cd build \ + && cmake ../ \ + && make \ + && make install \ WORKDIR /overlay_ws @@ -60,13 +69,12 @@ ENV DEBIAN_FRONTEND noninteractive RUN source /base_ws/install/setup.bash \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install \ - nano #\ - #&& rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \ + nano \ + && rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \ && rm -rf /var/lib/apt/lists/* RUN source /base_ws/install/setup.bash \ - && colcon build --symlink-install \ - && rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y + && colcon build --symlink-install # Set up the entrypoint COPY ./docker/my_entrypoint.sh /entrypoint.sh