@@ -8,25 +8,6 @@ ARG WORKSPACE
88ARG USER_CREDENTIALS
99
1010
11- ####################
12- ## MICROROS IMAGE ##
13- ####################
14-
15- FROM ros:${ROSDISTRO}-ros-base AS micro-ros-agent-builder
16-
17- ARG ROSDISTRO
18- ARG DEBIAN_FRONTEND=noninteractive
19-
20- WORKDIR /svea_ws
21-
22- RUN . /opt/ros/$ROSDISTRO/setup.sh \
23- && git clone -b $ROSDISTRO https://github.com/micro-ROS/micro_ros_msgs src/micro_ros_msgs \
24- && git clone -b $ROSDISTRO https://github.com/micro-ROS/micro-ROS-Agent src/micro-ROS-Agent \
25- && colcon build \
26- && rm -rf log/ build/ src/
27-
28-
29-
3011####################
3112## MICROROS IMAGE ##
3213####################
@@ -58,8 +39,6 @@ ARG DEBIAN_FRONTEND=noninteractive
5839
5940COPY --from=micro-ros-agent-builder /svea_ws /svea_ws
6041
61- COPY --from=micro-ros-agent-builder /svea_ws /svea_ws
62-
6342## Install dependencies from apt-get
6443
6544RUN apt-get update -y && \
@@ -68,26 +47,17 @@ RUN apt-get update -y && \
6847 apt-utils lsb-release \
6948 build-essential cmake \
7049 openssh-server ca-certificates \
71- openssh-server ca-certificates \
7250 git vim nano curl iputils-ping \
7351 python3-pip \
7452 python3-rosdep \
7553 python3-vcstool \
76- python3-rosdep \
77- python3-vcstool \
7854 python3-colcon-common-extensions \
7955 ## Move these to rosdep?
8056 ros-$ROSDISTRO-ament-cmake-python \
8157 ros-$ROSDISTRO-ros-base=0.11.0-1* \
8258 # ros-$ROSDISTRO-rmw-zenoh-cpp \
8359 ros-$ROSDISTRO-teleop-twist-keyboard \
8460 ros-$ROSDISTRO-nav2-* \
85- ## Move these to rosdep?
86- ros-$ROSDISTRO-ament-cmake-python \
87- ros-$ROSDISTRO-ros-base=0.11.0-1* \
88- # ros-$ROSDISTRO-rmw-zenoh-cpp \
89- ros-$ROSDISTRO-teleop-twist-keyboard \
90- ros-$ROSDISTRO-nav2-* \
9161 && \
9262 rm -rf /var/lib/apt/lists/*
9363
@@ -147,11 +117,8 @@ RUN apt-get update -y && \
147117 -qry \
148118 && \
149119 pip install \
150- --break-system-packages \
151- \
152120 --break-system-packages \
153121 -r requirements.txt \
154- \
155122 && \
156123 rm -rf /var/lib/apt/lists/*
157124
@@ -172,34 +139,12 @@ ENV MICROROS_DISABLE_SHM=1
172139RUN echo "source /opt/ros/$ROSDISTRO/setup.bash" >> ~/.bashrc && \
173140 echo "source /svea_ws/install/setup.bash" >> ~/.bashrc && \
174141 echo "source /svea_ws/install/local_setup.bash" >> ~/.bashrc
175- # Ensure proper environment setup before build
176- ENV CMAKE_PREFIX_PATH="/opt/ros/$ROSDISTRO"
177-
178- # Build the ROS 2 workspace
179- RUN /bin/bash -c "source /opt/ros/$ROSDISTRO/setup.bash && \
180- colcon build --symlink-install"
181-
182- COPY firmware/disable_fastdds_shm.xml \
183- firmware/disable_fastdds_shm_localhost_only.xml \
184- /tmp/
185- ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp
186- ENV MICROROS_DISABLE_SHM=1
187-
188- # Source the setup file in the .bashrc for convenience
189- RUN echo "source /opt/ros/$ROSDISTRO/setup.bash" >> ~/.bashrc && \
190- echo "source /svea_ws/install/setup.bash" >> ~/.bashrc && \
191- echo "source /svea_ws/install/local_setup.bash" >> ~/.bashrc
192-
193- ## Container entrypoint and default command
194142
195- # For fixing WSL error. TODO: investigate further
196- RUN chmod +x ./entrypoint
197143## Container entrypoint and default command
198144
199145# For fixing WSL error. TODO: investigate further
200146RUN chmod +x ./entrypoint
201147
202- ENTRYPOINT ["./entrypoint"]
203148ENTRYPOINT ["./entrypoint"]
204149
205150CMD ["bash"]
0 commit comments