Update Dockerfile to apply memory strategy patch and adjust ROS_DISTRO handling

This commit is contained in:
EricX-Zhao
2026-05-12 10:47:43 +03:00
parent 89fcebea53
commit 04946f28f0
2 changed files with 19 additions and 1 deletions
@@ -0,0 +1,13 @@
diff --git a/rclcpp/include/rclcpp/memory_strategy.hpp b/rclcpp/include/rclcpp/memory_strategy.hpp
index 67e183d..fb5ba2a 100644
--- a/rclcpp/include/rclcpp/memory_strategy.hpp
+++ b/rclcpp/include/rclcpp/memory_strategy.hpp
@@ -39,7 +39,7 @@ namespace memory_strategy
* the rmw implementation after the executor waits for work, based on the number of entities that
* come through.
*/
-class RCLCPP_PUBLIC [[deprecated("The executor does not used this anymore")]] MemoryStrategy
+class RCLCPP_PUBLIC MemoryStrategy
{
public:
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(MemoryStrategy)
@@ -14,11 +14,16 @@ FROM ${VENDOR_PACKAGES_IMAGE} AS vendor_images
FROM ${CC_PLATFORM_IMAGE} AS ros_builder
ARG ROS_DISTRO
WORKDIR /workspace
COPY --from=ros_src /workspace /workspace
COPY ros2/${ROS_DISTRO}/patch /workspace/patch
COPY --from=vendor_images ${TARGET_SYSROOT} ${TARGET_SYSROOT}
COPY ros2/ros_cpp /workspace/src/ros_cpp
# apply patch
RUN patch -p1 -d /workspace/src/ros2/rclcpp < /workspace/patch/memory_strategy.patch
RUN touch src/ros2/geometry2/tf2_bullet/COLCON_IGNORE \
&& touch src/ros2/rosbag2/rosbag2_storage_sqlite3/COLCON_IGNORE \
&& touch src/ros-perception/image_transport_plugins/theora_image_transport/COLCON_IGNORE
@@ -65,7 +70,7 @@ RUN . "$HOME/.cargo/env" \
RUN mkdir rmw_zenoh_ws/src -p \
&& cd rmw_zenoh_ws/src \
&& git clone --depth=1 -b rolling https://github.com/ros2/rmw_zenoh.git
&& git clone --depth=1 -b lyrical https://github.com/ros2/rmw_zenoh.git
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-none-linux-gnu-gcc