Patch to add symlinks to livox_ros_driver2

This commit is contained in:
Matt Spencer
2026-07-17 10:23:25 +00:00
parent b439d420df
commit a9234a90be
3 changed files with 20 additions and 16 deletions
+3 -16
View File
@@ -8,27 +8,14 @@ COPY src ./src/
COPY patches ./patches/
COPY upstream.jazzy.repos ./upstream.jazzy.repos
# Stage any dual ROS1/ROS2 packages (e.g. livox_ros_driver2) for ROS2 without
# modifying their upstream source: generate package.xml from package_ROS2.xml so
# colcon can discover them. The ROS2 build is selected via -DROS_EDITION below.
# RUN for d in $(find /ros2_ws/src -type f -name package_ROS2.xml -exec dirname {} \;); do \
# cp -f "$d/package_ROS2.xml" "$d/package.xml"; \
# done
# Import all upstream repostories
RUN vcs import ./src/upstream < ./upstream.jazzy.repos
# Fixup the livox package for ros2 build
RUN cd ./src/upstream/livox_ros_driver2 && \
rm -rf launch package.xml && \
ln -sfn launch_ROS2 launch && \
ln -sfn package_ROS2.xml package.xml
RUN cd ./src/upsstream/FAST_LIO && \
RUN cd ./src/upstream/FAST_LIO && \
git submodule update --init
# Apply patches to upstream
# RUN ./patches/apply_patches.sh
RUN ./patches/apply_patches.sh
# system deps from frozen rosdep manifest — no rosdep at build or startup
# NOTE: There should be a check in your CI that this file is up to date.
@@ -61,7 +48,7 @@ RUN cd src/upstream/livox_sdk && \
# Build the workspace with symlink install
RUN . /opt/ros/jazzy/setup.sh && \
colcon build --symlink-install \
--cmake-args -DROS_EDITION=ROS2 -DDISTRO_ROS=jazzy
li --cmake-args -DROS_EDITION=ROS2 -DDISTRO_ROS=jazzy
# Source the overlay on container startup
RUN echo "source /opt/ros/jazzy/setup.bash" >> /root/.bashrc && \
+1
View File
@@ -27,3 +27,4 @@ apply_patch_once "$ROOT_DIR/src/upstream/livox_sdk" "$PATCH_DIR/livox_sdk.patch"
apply_patch_once "$ROOT_DIR/src/upstream/slam_gmapping" "$PATCH_DIR/slam_gmapping.patch"
apply_patch_once "$ROOT_DIR/src/upstream/FAST_LIO" "$PATCH_DIR/fast_lio.patch"
apply_patch_once "$ROOT_DIR/src/upstream/unilidar_sdk2" "$PATCH_DIR/unilidar_sdk2.patch"
apply_patch_once "$ROOT_DIR/src/upstream/livox_ros_driver2" "$PATCH_DIR/livox_ros_driver2.patch"
+16
View File
@@ -0,0 +1,16 @@
diff --git a/launch b/launch
new file mode 120000
index 0000000..163fb01
--- /dev/null
+++ b/launch
@@ -0,0 +1 @@
+launch_ROS2
\ No newline at end of file
diff --git a/package.xml b/package.xml
new file mode 120000
index 0000000..36804a4
--- /dev/null
+++ b/package.xml
@@ -0,0 +1 @@
+package_ROS2.xml
\ No newline at end of file