以下安装的驱动都是ROS2 Humble版本的,且都是源码编译。
I. Orbbec Gemini2L RGBD Camera
Steps:
-
先装依赖
sudo apt install libgflags-dev nlohmann-json3-dev
ros-ROS_DISTRO-image-transport ros-{ROS_DISTRO}-image-transport-plugins ros-{ROS_DISTRO}-compressed-image-transport \ ros-ROS_DISTRO-image-publisher ros-ROS_DISTRO-camera-info-manager \ ros-ROS_DISTRO-diagnostic-updater ros-ROS_DISTRO-diagnostic-msgs ros-ROS_DISTRO-statistics-msgs ros-ROS_DISTRO-xacro \ ros-ROS_DISTRO-backward-ros libdw-dev libssl-dev mesa-utils libgl1 libgoogle-glog-dev -
创建一个ws
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
git clone https://github.com/orbbec/OrbbecSDK_ROS2.git
cd OrbbecSDK_ROS2
git checkout v2-main -
编译
cd ~/ros2_ws
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=Release -
注册脚本
cd ~/ros2_ws/src/OrbbecSDK_ROS2/orbbec_camera/scripts
sudo bash install_udev_rules.sh
sudo udevadm control --reload-rules && sudo udevadm trigger -
运行
ros2 launch orbbec_camera gemini2L.launch.py
如果成功没报错的话,就可以正常使用了,打开rviz就可以添加订阅对应的topic查看了
-
可能出现的问题
但是可能会出现报错,提示关于depth format报错,如下:
rob@robnuc:~/orbbect_ws$ ros2 launch orbbec_camera gemini2L.launch.py
[INFO] [launch]: All log files can be found below /home/rob/.ros/log/2026-01-12-16-01-44-805630-robnuc-11028
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [component_container-1]: process started with pid [11039]
[component_container-1] [INFO] [1768204905.134407323] [camera.camera_container]: Load Library: /home/rob/orbbect_ws/install/orbbec_camera/lib/liborbbec_camera.so
[component_container-1] [INFO] [1768204905.189721726] [camera.camera_container]: Found class: rclcpp_components::NodeFactoryTemplate<orbbec_camera::OBCameraNodeDriver>
[component_container-1] [INFO] [1768204905.189768362] [camera.camera_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<orbbec_camera::OBCameraNodeDriver>
[component_container-1] [INFO] [1768204905.194551579] [camera.camera]: Device access mode: Default (4)
[component_container-1] [INFO] [1768204905.194576276] [camera.camera]: setUvcBackendType:libuvc
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/camera/camera' in container '/camera/camera_container'
[component_container-1] [INFO] [1768204908.283918521] [camera.camera]: startDevice called
[component_container-1] [INFO] [1768204908.384128300] [camera.camera]: Connecting to the default device
[component_container-1] [INFO] [1768204908.467458110] [camera.camera]: Select device cost 83 ms
[component_container-1] [INFO] [1768204908.467529469] [camera.camera]: Try to connect device via USB3.0
[component_container-1] [INFO] [1768204908.467622151] [camera.camera]: OBCameraNode: use_intra_process: OFF
[component_container-1] OBFormatFromString: MJPG
[component_container-1] OBFormatFromString: Y16
[component_container-1] OBFormatFromString: Y8
[component_container-1] OBFormatFromString: Y16
[component_container-1] OBFormatFromString: Y16
[component_container-1] [INFO] [1768204908.621667484] [camera.camera]: current time domain: global
[component_container-1] [INFO] [1768204908.621749157] [camera.camera]: hdr_index1_laser_control_ 1 hdr_index1_depth_exposure_ 1 hdr_index1_depth_gain_ 16 hdr_index1_ir_brightness_ 30 hdr_index1_ir_ae_max_exposure_ 30458
[component_container-1]
[component_container-1] [INFO] [1768204908.621765979] [camera.camera]: hdr_index0_laser_control_ 1 hdr_index0_depth_exposure_ 7500 hdr_index0_depth_gain_ 16 hdr_index0_ir_brightness_ 90 hdr_index0_ir_ae_max_exposure_ 30458
[component_container-1]
[component_container-1] [INFO] [1768204908.621779431] [camera.camera]: laser_index1_laser_control_ 0 laser_index1_depth_exposure_ 3000 laser_index1_depth_gain_ 16 laser_index1_ir_brightness_ 60 laser_index1_ir_ae_max_exposure_ 7000
[component_container-1]
[component_container-1] [INFO] [1768204908.621792674] [camera.camera]: laser_index0_laser_control_ 1 laser_index0_depth_exposure_ 3000 laser_index0_depth_gain_ 16 laser_index0_ir_brightness_ 60 laser_index0_ir_ae_max_exposure_ 17000
[component_container-1]
[component_container-1] [INFO] [1768204908.644371427] [camera.camera]: Setting heartbeat to OFF
[component_container-1] [INFO] [1768204908.644586118] [camera.camera]: Depth process is SW
[component_container-1] [INFO] [1768204908.644596348] [camera.camera]: Setting LDP to ON
[component_container-1] [INFO] [1768204908.644765342] [camera.camera]: Setting laser control to 1
[component_container-1] [INFO] [1768204908.644937766] [camera.camera]: Current sync mode: OB_MULTI_DEVICE_SYNC_MODE_STANDALONE
[component_container-1] [INFO] [1768204908.644950265] [camera.camera]: Set sync mode: OB_MULTI_DEVICE_SYNC_MODE_STANDALONE
[component_container-1] [INFO] [1768204908.644957998] [camera.camera]: Setting color mirror to OFF
[component_container-1] [INFO] [1768204908.644977784] [camera.camera]: Setting color flip to OFF
[component_container-1] [INFO] [1768204908.644985703] [camera.camera]: Setting depth mirror to OFF
[component_container-1] [INFO] [1768204908.644992859] [camera.camera]: Setting depth flip to OFF
[component_container-1] [INFO] [1768204908.645002307] [camera.camera]: Setting ir mirror to OFF
[component_container-1] [INFO] [1768204908.645018072] [camera.camera]: Setting ir flip to OFF
[component_container-1] [INFO] [1768204908.645026526] [camera.camera]: Setting noise removal filter:ON
[component_container-1] [INFO] [1768204908.645031862] [camera.camera]: Setting color auto white balance to ON
[component_container-1] [INFO] [1768204908.645122523] [camera.camera]: Setting color auto exposure to ON
[component_container-1] [INFO] [1768204908.646833164] [camera.camera]: Setting IR auto exposure to ON
[component_container-1] [INFO] [1768204908.651501556] [camera.camera]: default noise removal filter min diff: 256
[component_container-1] [INFO] [1768204908.651526226] [camera.camera]: default noise removal filter max size: 200
[component_container-1] [INFO] [1768204908.651532891] [camera.camera]: Setting accel data correction to ON
[component_container-1] [INFO] [1768204908.651539731] [camera.camera]: Setting gyro data correction to ON
[component_container-1] [INFO] [1768204908.651657488] [camera.camera]: Setting EdgeNoiseRemovalFilter......
[component_container-1] [INFO] [1768204908.651672690] [camera.camera]: Skip setting filter: EdgeNoiseRemovalFilter
[component_container-1] [INFO] [1768204908.651679838] [camera.camera]: Setting SpatialAdvancedFilter......
[component_container-1] [INFO] [1768204908.651684965] [camera.camera]: set SpatialAdvancedFilter to false
[component_container-1] [INFO] [1768204908.651699502] [camera.camera]: Skip setting filter: SpatialAdvancedFilter
[component_container-1] [INFO] [1768204908.651708643] [camera.camera]: Setting TemporalFilter......
[component_container-1] [INFO] [1768204908.651717114] [camera.camera]: set TemporalFilter to false
[component_container-1] [INFO] [1768204908.651730475] [camera.camera]: Skip setting filter: TemporalFilter
[component_container-1] [INFO] [1768204908.651759542] [camera.camera]: Setting HoleFillingFilter......
[component_container-1] [INFO] [1768204908.651765446] [camera.camera]: set HoleFillingFilter to false
[component_container-1] [INFO] [1768204908.651770551] [camera.camera]: Skip setting filter: HoleFillingFilter
[component_container-1] [INFO] [1768204908.651776041] [camera.camera]: Setting DisparityTransform......
[component_container-1] [INFO] [1768204908.651780891] [camera.camera]: set DisparityTransform to true
[component_container-1] [INFO] [1768204908.651785745] [camera.camera]: Skip setting filter: DisparityTransform
[component_container-1] [INFO] [1768204908.651791216] [camera.camera]: Setting ThresholdFilter......
[component_container-1] [INFO] [1768204908.651798803] [camera.camera]: set ThresholdFilter to false
[component_container-1] [INFO] [1768204908.651803972] [camera.camera]: Skip setting filter: ThresholdFilter
[component_container-1] [WARN] [1768204908.652070495] [camera.camera]: Failed to get color sensor filter list
[component_container-1] [INFO] [1768204908.653158392] [camera.camera]: stream color is enabled - width: 1280, height: 800, fps: 30, Format: OB_FORMAT_MJPG
[component_container-1] [ERROR] [1768204908.653334414] [camera.camera]: Failed to get depth profile: Invalid input, No matched video stream profile found!
[component_container-1] [ERROR] [1768204908.653343489] [camera.camera]: Stream: OB_STREAM_DEPTH, Stream Index: 0, Width: 1280, Height: 800, FPS: 30, Format: OB_FORMAT_Y16
[component_container-1] [ERROR] [1768204908.653348329] [camera.camera]: Error: The device might be connected via USB 2.0. Please verify your configuration and try again. The current process will now exit.
[component_container-1] [INFO] [1768204908.653353306] [camera.camera]: Available profiles:
[component_container-1] [INFO] [1768204908.653396583] [camera.camera]: depth profile: 1280x800 30fps REL
[component_container-1] [INFO] [1768204908.653406297] [camera.camera]: depth profile: 1280x800 30fps Y14
[component_container-1] [INFO] [1768204908.653411972] [camera.camera]: depth profile: 1280x800 15fps Y14
[component_container-1] [INFO] [1768204908.653417443] [camera.camera]: depth profile: 1280x800 15fps REL
[component_container-1] [INFO] [1768204908.653422802] [camera.camera]: depth profile: 1280x800 10fps Y14
[component_container-1] [INFO] [1768204908.653428211] [camera.camera]: depth profile: 1280x800 10fps REL
[component_container-1] [INFO] [1768204908.653433697] [camera.camera]: depth profile: 1280x800 5fps Y14
[component_container-1] [INFO] [1768204908.653439364] [camera.camera]: depth profile: 1280x800 5fps REL
[component_container-1] [INFO] [1768204908.653444799] [camera.camera]: depth profile: 640x400 30fps Y14
[component_container-1] [INFO] [1768204908.653452211] [camera.camera]: depth profile: 640x400 30fps REL
[component_container-1] [INFO] [1768204908.653459102] [camera.camera]: depth profile: 640x400 15fps Y14
[component_container-1] [INFO] [1768204908.653464636] [camera.camera]: depth profile: 640x400 15fps REL
[component_container-1] [INFO] [1768204908.653470081] [camera.camera]: depth profile: 640x400 10fps Y14
[component_container-1] [INFO] [1768204908.653475460] [camera.camera]: depth profile: 640x400 10fps REL
[component_container-1] [INFO] [1768204908.653482819] [camera.camera]: depth profile: 640x400 5fps Y14
[component_container-1] [INFO] [1768204908.653488534] [camera.camera]: depth profile: 640x400 5fps REL
[component_container-1] [INFO] [1768204908.653493915] [camera.camera]: depth profile: 320x200 30fps Y14
[component_container-1] [INFO] [1768204908.653499261] [camera.camera]: depth profile: 320x200 30fps REL
[component_container-1] [INFO] [1768204908.653504656] [camera.camera]: depth profile: 320x200 15fps Y14
[component_container-1] [INFO] [1768204908.653509990] [camera.camera]: depth profile: 320x200 15fps REL
[component_container-1] [INFO] [1768204908.653515272] [camera.camera]: depth profile: 320x200 10fps Y14
[component_container-1] [INFO] [1768204908.653520627] [camera.camera]: depth profile: 320x200 10fps REL
[component_container-1] [INFO] [1768204908.653525943] [camera.camera]: depth profile: 320x200 5fps Y14
[component_container-1] [INFO] [1768204908.653532400] [camera.camera]: depth profile: 320x200 5fps REL
[component_container-1] [ERROR] [1768204908.653538187] [camera.camera]: Because can not set this stream, so exit.
[ERROR] [component_container-1]: process has died [pid 11039, exit code 255, cmd '/opt/ros/humble/lib/rclcpp_components/component_container --ros-args -r __node:=camera_container -r __ns:=/camera'].
这时可以试试运行下面这句,更换depth format
ros2 launch orbbec_camera gemini2L.launch.py depth_format:=Y14
如果上面这句指令能正常运行,修改一下launch文件里的默认参数以及再次编译,下次就不用添加参数了,步骤如下:
Solution:
1)Find "~/orbbect_ws/src/OrbbecSDK_ROS2/orbbec_camera/launch/gemini2L.launch.py"
2)Modify 'depth_format' value from "Y16" to "Y14"
DeclareLaunchArgument("depth_format", default_value="Y14"),
3)Complie
cd orbbect_ws
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=Release
4)Run ros2 launch orbbec_camera gemini2L.launch.py
5)Open rviz2 to display the RGB image / depth image / Point cloud

II. Mid-360 配置
Steps:
-
先安装SDK
Livox-SDK2
确保用安装cmake,然后先安装SDK,找个地方下载包 (如,主目录), 运行git clone https://github.com/Livox-SDK/Livox-SDK2.git
cd ./Livox-SDK2/
mkdir build
cd build
cmake .. && make -j
sudo make install -
然后安装驱动:
livox_ros_driver2
下面这句指令会自动创建ws和下载包git clone https://github.com/Livox-SDK/livox_ros_driver2.git ws_livox/src/livox_ros_driver2
下载完后,进行编译:
cd ws_livox/src/livox_ros_driver2
source /opt/ros/humble/setup.sh
./build.sh humble
- 运行
ros2 launch livox_ros_driver2 rviz_MID360_launch.py
这时应该会遇到报错,如下
ERROR 1:
"terminate called after throwing an instance of 'class_loader::LibraryLoadException'
what(): Could not load library dlopen error: liblivox_lidar_sdk_shared.so: cannot open shared object file: No such file or directory, at ./src/shared_library.c:99
[ros2run]: Aborted"
解决方法:
再.bashrc 文件最后加一行
- 打开terminal,输入:
export LD_LIBRARY_PATH=/usr/local/lib - 再次运行
ros2 launch livox_ros_driver2 rviz_MID360_launch.py
ERROR 2:
rob@robnuc:~/ws_livox$ ros2 launch livox_ros_driver2 rviz_MID360_launch.py
[INFO] [launch]: All log files can be found below /home/rob/.ros/log/2026-01-12-18-00-57-848143-robnuc-6277
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [livox_ros_driver2_node-1]: process started with pid [6278]
[INFO] [rviz2-2]: process started with pid [6280]
[livox_ros_driver2_node-1] [INFO] [1768212057.902159952] [livox_lidar_publisher]: Livox Ros Driver2 Version: 1.2.4
[livox_ros_driver2_node-1] [INFO] [1768212057.902493986] [livox_lidar_publisher]: Data Source is raw lidar.
[livox_ros_driver2_node-1] [INFO] [1768212057.902514468] [livox_lidar_publisher]: Config file : /home/rob/ws_livox/install/livox_ros_driver2/share/livox_ros_driver2/launch_ROS2/../config/MID360_config.json
[livox_ros_driver2_node-1] LdsLidar *GetInstance
[livox_ros_driver2_node-1] config lidar type: 8
[livox_ros_driver2_node-1] successfully parse base config, counts: 1
[livox_ros_driver2_node-1] bind failed
[livox_ros_driver2_node-1] Failed to init livox lidar sdk.
[livox_ros_driver2_node-1] [ERROR] [1768212057.904702665] [livox_lidar_publisher]: Init lds lidar fail!
[rviz2-2] [INFO] [1768212058.174511057] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-2] [INFO] [1768212058.174582048] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-2] [INFO] [1768212058.187690039] [rviz2]: Stereo is NOT SUPPORTED
解决方法:
配置电脑端和Mid360的ip地址
-
打开
/home/rob/ws_livox/src/livox_ros_driver2/config/MID360_config.json -
修改里面的ip地址
Host ip: 这是我们电脑的静态ip,host_net_info里面所有的ip都改成这个静态ip地址
Lidar ip: 192.168.1.1xx (xx是mid360上的序列号最后两位),我买的这个最后两位是35,所以对应的地址就是192.168.1.135

{
"lidar_summary_info" : {
"lidar_type": 8
},
"MID360": {
"lidar_net_info" : {
"cmd_data_port": 56100,
"push_msg_port": 56200,
"point_data_port": 56300,
"imu_data_port": 56400,
"log_data_port": 56500
},
"host_net_info" : {
"cmd_data_ip" : "192.168.1.5",
"cmd_data_port": 56101,
"push_msg_ip": "192.168.1.5",
"push_msg_port": 56201,
"point_data_ip": "192.168.1.5",
"point_data_port": 56301,
"imu_data_ip" : "192.168.1.5",
"imu_data_port": 56401,
"log_data_ip" : "",
"log_data_port": 56501
}
},
"lidar_configs" : [
{
"ip" : "192.168.1.135",
"pcl_data_type" : 1,
"pattern_mode" : 0,
"extrinsic_parameter" : {
"roll": 0.0,
"pitch": 0.0,
"yaw": 0.0,
"x": 0,
"y": 0,
"z": 0
}
}
]
} -
编译
./src/livox_ros_driver2/build.sh humble
-
运行
ros2 launch livox_ros_driver2 rviz_MID360_launch.py
