Skip to content

Commit

Permalink
Build Zenoh in a separate workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
LoyVanBeek committed Dec 21, 2024
1 parent 0662464 commit 0d31fbe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docker/robot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ RUN apt update -qq && apt install -y --no-install-recommends \
tmux \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /root/ros2_ws/src
WORKDIR /root/ros2_ws/src

# install ROS additional packages needed for application
RUN apt update -qq && apt install -y --no-install-recommends \
ros-${ROS_DISTRO}-xacro \
Expand All @@ -41,8 +38,21 @@ RUN apt update -qq && apt install -y --no-install-recommends \

# Install rmw_zenoh
# Latest version as of writing

RUN mkdir -p /root/zenoh_ws/src
WORKDIR /root/zenoh_ws/src
RUN git clone https://github.com/ros2/rmw_zenoh.git && cd rmw_zenoh && git reset --hard dd82e84 && cd ..

WORKDIR /root/zenoh_ws
RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash \
&& apt-get update -y \
&& rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \
&& colcon build --symlink-install --event-handlers console_cohesion+\
&& rm -rf /var/lib/apt/lists/*"

RUN mkdir -p /root/ros2_ws/src
WORKDIR /root/ros2_ws/src

COPY ./neato_description /root/ros2_ws/src/neato_description
COPY ./neato_ros2_python /root/ros2_ws/src/neato_ros2_python
COPY ./neato_bringup /root/ros2_ws/src/neato_bringup
Expand Down
3 changes: 3 additions & 0 deletions docker/robot/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Source ROS 2
source /opt/ros/${ROS_DISTRO}/setup.bash

# Source the Zenoh workspace, if built
source /root/zenoh_ws/install/setup.bash

# Source the overlay workspace, if built
source /root/ros2_ws/install/setup.bash

Expand Down

0 comments on commit 0d31fbe

Please sign in to comment.