-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Environment
- Hardware Platform: NVIDIA Jetson orin nano 4G (ARM64 architecture)
- Operating System: Linux
- Software: ROS2,
orbbec_cameraROS2 package - SDK Version: Orbbec SDK v1.10.22 (from the official
linux_arm64_release.zippackage)
Problem Description
While compiling the orbbec_camera package on a Jetson platform, I encountered a series of issues ranging from linking during compilation to library loading at runtime. The root cause is that the library files provided in the orbbec_camera repository's SDK/lib/arm64/ directory are invalid placeholders (ASCII text files) instead of genuine ELF shared libraries.
Steps to Reproduce & Solutions Tried
-
Initial Compilation Failure: A direct
colcon buildafter cloning theOrbbecSDK_ROS2repository fails during the linking phase ofliborbbec_camera.sowith the error:/usr/bin/ld: .../orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so: file format not recognizedUsing the
filecommand, I confirmed thatlibOrbbecSDK.soat this path is anASCII textfile. -
Installing the Correct SDK: I downloaded the official
OrbbecSDK_C_C++_v1.10.22_..._linux_arm664_release.zip. After extracting it, I found the real library file islib/libOrbbecSDK.so.1.10.22(a valid ELF shared library). I installed it to the system path/usr/local/lib/and created the correct symbolic links:/usr/local/lib/libOrbbecSDK.so -> libOrbbecSDK.so.1.10.22 /usr/local/lib/libOrbbecSDK.so.1.10.22 (ELF 64-bit LSB shared object, ARM aarch64) -
Resolving the Compilation Issue: To allow the build to pass, I copied the real file,
/usr/local/lib/libOrbbecSDK.so.1.10.22, and renamed it tolibOrbbecSDK.so, overwriting the placeholder file in thesrc/orbbec_camera/SDK/lib/arm64/directory. After this,colcon buildcompleted successfully. -
Runtime Loading Failure: After a successful build, running
ros2 launch orbbec_camera astra.launch.pyfails to start the node with the error:[ERROR] [...]: Failed to load library: Could not load library dlopen error: /home/wahaha/Desktop/AstraProPlus/install/orbbec_camera/lib/libOrbbecSDK.so.1.10: file too short ... -
Root Cause Analysis: I inspected the
install/orbbec_camera/lib/directory and found the following:libOrbbecSDK.soandlibOrbbecSDK.so.1.10.22are the genuine ELF files that I copied (around 10MB).libOrbbecSDK.so.1.10, however, is an invalidASCII textfile (only 23 bytes).
It appears that during the installation phase,
colcon buildnot only bundles the real library files but also packages other placeholder files with similar names from thesrc/orbbec_camera/SDK/lib/arm64/directory. At runtime,dlopenattempts to load this incorrectlibOrbbecSDK.so.1.10file, leading to the "file too short" error.
My Questions
What is the best practice for handling compilation and runtime issues caused by placeholder library files provided in an upstream repository?
- Manual Cleanup? Should I manually clean up the
src/orbbec_camera/SDK/lib/arm64/directory before building, removing all placeholder files and keeping only the genuine library files and necessary symbolic links? - Modify CMake? Alternatively, should I modify the
orbbec_cameraCMakeLists.txtfile to ignore the bundledSDKdirectory and force it to link against the system-wide SDK I've installed in/usr/local/lib? - Other Solutions? Are there other, more standard solutions for this situation?
Part 2: Runtime Point Cloud Failure (No valid point in point cloud)
Description
After resolving the build issues, the orbbec_camera node starts successfully and connects to the Astra Pro Plus. However, it fails to generate any point cloud data, and the log is continuously spammed with the warning: [WARN] [camera.camera]: No valid point in point cloud.
Analysis
- Native SDK Demo Works Perfectly: I can run the native SDK example (
./OBMultiStream) without any issues. It streams color and depth data correctly, which confirms the camera and the low-level SDK are functioning properly. This suggests the problem lies within the ROS2 wrapper's configuration. - Likely Cause is USB 2.0 Bandwidth: The Jetson is connected to the camera via USB 2.0. The default launch parameters for resolution and frame rate (640x480 @ 30 FPS for both color and depth) likely saturate the USB 2.0 bandwidth, causing data corruption or loss that prevents point cloud generation.
- Partial Workaround: I found that I can get the node to function somewhat by reducing the data load with launch arguments:
While this helps, it is not a stable or complete solution.
ros2 launch orbbec_camera astra_adv.launch.py enable_ir:=false depth_format:=Y11
Request for Part 2
Since the native SDK demo works, it must be using a more optimized configuration. Could you please provide a recommended launch file or a set of optimized parameters specifically for the Astra Pro Plus that is tested to work reliably over a USB 2.0 connection?
Relevant Log Output for Part 2
[component_container-1] [INFO] [1757069238.799566346] [camera.camera]: usb connect type: USB2.0
...
[component_container-1] [INFO] [1757069238.064674102] [camera.camera]: stream color is enabled - width: 640, height: 480, fps: 30, Format: OB_FORMAT_RGB
[component_container-1] [INFO] [1757069238.065488146] [camera.camera]: stream depth is enabled - width: 640, height: 480, fps: 30, Format: OB_FORMAT_Y11
...
[component_container-1] [WARN] [1757069310.211786350] [camera.camera]: No valid point in point cloud
[component_container-1] [WARN] [1757069310.213881142] [camera.camera]: No valid point in point cloud
...
Thank you