Fix upstream for rodep install in devcontainer

This commit is contained in:
Matt Spencer
2026-07-31 14:54:04 +00:00
parent 6cf51a3b67
commit 93e9291e19
4 changed files with 96 additions and 23 deletions
+12 -13
View File
@@ -1,3 +1,4 @@
# syntax=docker/dockerfile:1.7-labs
FROM osrf/ros:jazzy-desktop-full FROM osrf/ros:jazzy-desktop-full
ARG USERNAME=USERNAME ARG USERNAME=USERNAME
ARG USER_UID=1000 ARG USER_UID=1000
@@ -51,19 +52,17 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGE
python3-vcstool \ python3-vcstool \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# system deps from frozen rosdep manifest — no rosdep at build or startup # Copy boilerplate project config into workspace so it can be parsed by rosdep.
# NOTE: There should be a check in your CI that this file is up to date. # This will be obscured by the volume mount or the workspace in the devcontainer
# Something like: # Don't include all sources, because the rosdep will re-process on any file change
# ./scripts/freeze-rosdep.sh && git diff --exit-code rosdep-packages.txt COPY --parents src/**/package.xml src/**/COLCON_IGNORE src/
# COPY rosdep-packages.txt /tmp/rosdep-packages.txt
# The --mount=type=cache option caches the apt packages with buildkit RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \
# The id-apt-cache-${TARGETARCH} option allows for separate caches for different architectures apt-get update \
# this enables parallel builds for different architectures without cache conflicts && rosdep update --rosdistro $ROS_DISTRO \
# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \ && rosdep install --from-paths src --ignore-src -y \
# rm -f /etc/apt/apt.conf.d/docker-clean \ && rm -rf /var/lib/apt/lists/*
# && apt-get update \
# && xargs -r -a /tmp/rosdep-packages.txt apt-get install -y --no-install-recommends \
# && rm -rf /var/lib/apt/lists/*
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \
apt-get update \ apt-get update \
+39 -5
View File
@@ -34,13 +34,47 @@ index 0000000..163fb01
+launch_ROS2 +launch_ROS2
\ No newline at end of file \ No newline at end of file
diff --git a/package.xml b/package.xml diff --git a/package.xml b/package.xml
new file mode 120000 new file mode 100644
index 0000000..36804a4 index 0000000..0000000
--- /dev/null --- /dev/null
+++ b/package.xml +++ b/package.xml
@@ -0,0 +1 @@ @@ -0,0 +1,36 @@
+package_ROS2.xml +<?xml version="1.0"?>
\ No newline at end of file +<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
+<package format="3">
+ <name>livox_ros_driver2</name>
+ <version>1.0.0</version>
+ <description>The ROS device driver for Livox 3D LiDARs, for ROS2</description>
+ <maintainer email="dev@livoxtech.com">feng</maintainer>
+ <license>MIT</license>
+
+ <buildtool_depend>ament_cmake_auto</buildtool_depend>
+ <build_depend>rosidl_default_generators</build_depend>
+ <member_of_group>rosidl_interface_packages</member_of_group>
+
+ <depend>rclcpp</depend>
+ <depend>rclcpp_components</depend>
+ <depend>std_msgs</depend>
+ <depend>sensor_msgs</depend>
+ <depend>rcutils</depend>
+ <depend>pcl_conversions</depend>
+ <depend>rcl_interfaces</depend>
+ <depend>libpcl-all-dev</depend>
+
+ <exec_depend>rosbag2</exec_depend>
+ <exec_depend>rosidl_default_runtime</exec_depend>
+
+ <test_depend>ament_lint_auto</test_depend>
+ <test_depend>ament_lint_common</test_depend>
+
+ <depend>git</depend>
+ <depend>apr</depend>
+ <depend>livox_sdk2</depend>
+
+ <export>
+ <build_type>ament_cmake</build_type>
+ </export>
+</package>
diff --git a/package_ROS2.xml b/package_ROS2.xml diff --git a/package_ROS2.xml b/package_ROS2.xml
index 96f5762..c66785b 100644 index 96f5762..c66785b 100644
--- a/package_ROS2.xml --- a/package_ROS2.xml
+45 -2
View File
@@ -37,10 +37,18 @@ index 041ef0d..dd57d47 100644
install(TARGETS install(TARGETS
diff --git a/unitree_lidar_ros2/src/unitree_lidar_ros2/package.xml b/unitree_lidar_ros2/src/unitree_lidar_ros2/package.xml diff --git a/unitree_lidar_ros2/src/unitree_lidar_ros2/package.xml b/unitree_lidar_ros2/src/unitree_lidar_ros2/package.xml
index 74539aa..b5febb2 100644 index 74539aa..69bb645 100644
--- a/unitree_lidar_ros2/src/unitree_lidar_ros2/package.xml --- a/unitree_lidar_ros2/src/unitree_lidar_ros2/package.xml
+++ b/unitree_lidar_ros2/src/unitree_lidar_ros2/package.xml +++ b/unitree_lidar_ros2/src/unitree_lidar_ros2/package.xml
@@ -21,6 +21,7 @@ @@ -15,14 +15,15 @@
<depend>rclcpp</depend>
<depend>std_msgs</depend>
<depend>sensor_msgs</depend>
-
+
<depend>pcl_conversions</depend>
- <depend>pcl</depend>
+ <depend>libpcl-all-dev</depend>
<depend>geometry_msgs</depend> <depend>geometry_msgs</depend>
<depend>tf2_ros</depend> <depend>tf2_ros</depend>
@@ -48,6 +56,10 @@ index 74539aa..b5febb2 100644
<export> <export>
<build_type>ament_cmake</build_type> <build_type>ament_cmake</build_type>
</export>
-</package>
+</package>
\ No newline at end of file
diff --git a/unitree_lidar_sdk/CMakeLists.txt b/unitree_lidar_sdk/CMakeLists.txt diff --git a/unitree_lidar_sdk/CMakeLists.txt b/unitree_lidar_sdk/CMakeLists.txt
index 80af9c9..0d9a334 100644 index 80af9c9..0d9a334 100644
--- a/unitree_lidar_sdk/CMakeLists.txt --- a/unitree_lidar_sdk/CMakeLists.txt
@@ -103,3 +115,34 @@ index 80af9c9..0d9a334 100644
\ No newline at end of file \ No newline at end of file
+ament_package() +ament_package()
\ No newline at end of file \ No newline at end of file
diff --git a/unitree_lidar_sdk/package.xml b/unitree_lidar_sdk/package.xml
index ef88d9a..68ab313 100644
--- a/unitree_lidar_sdk/package.xml
+++ b/unitree_lidar_sdk/package.xml
@@ -1,15 +1,15 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
- <name>unitree_lidar_sdk</name>
- <version>0.0.0</version>
- <description>Unitree LiDAR SDK (prebuilt static library and headers)</description>
- <maintainer email="lukelbmeng@gmail.com">jo</maintainer>
- <license>BSD-3-Clause</license>
+ <name>unitree_lidar_sdk</name>
+ <version>0.0.0</version>
+ <description>Unitree LiDAR SDK (prebuilt static library and headers)</description>
+ <maintainer email="lukelbmeng@gmail.com">jo</maintainer>
+ <license>BSD-3-Clause</license>
- <buildtool_depend>ament_cmake</buildtool_depend>
+ <buildtool_depend>ament_cmake</buildtool_depend>
- <export>
- <build_type>ament_cmake</build_type>
- </export>
-</package>
+ <export>
+ <build_type>ament_cmake</build_type>
+ </export>
+</package>
\ No newline at end of file
@@ -7,9 +7,6 @@
<maintainer email="your-email@example.com">Your Name</maintainer> <maintainer email="your-email@example.com">Your Name</maintainer>
<license>MIT</license> <license>MIT</license>
<!-- Build dependencies -->
<buildtool_depend>ament_python</buildtool_depend>
<!-- Runtime dependencies --> <!-- Runtime dependencies -->
<depend>rclpy</depend> <depend>rclpy</depend>
<depend>geometry_msgs</depend> <depend>geometry_msgs</depend>