Important
Welcome to the OrbbecSDK ROS Wrapper v2. Before you begin using this version of ROS Wrapper, it's crucial to check the following device support list to verify the compatibility.
OrbbecSDK ROS Wrapper provides seamless integration of Orbbec cameras with ROS environment. It supports ROS Kinetic, Melodic, and Noetic distributions. With a major update in October 2024, we release the OrbbecSDK ROS1 Wrapper v2 connected to the open source OrbbecSDK v2 with enhanced flexibility and extensibility. This update ensures compatibility with all Orbbec USB products adhering to UVC standard. However, it no longer supports Orbbec's traditional OpenNI protocol devices. We strongly encourage you to use the v2-main branch if your device is supported.
If you are a user in China, it is recommended to use gitee Repo.
Here is the device support list of main branch (v1.x) and v2-main branch (v2.x):
Product Series | Product | Branch main | Branch v2-main |
---|---|---|---|
Gemini 435Le | Gemini 435Le | Not supported | Recommended for new designs |
Gemini 330 | Gemini 335 | Full maintenance | Recommended for new designs |
Gemini 336 | Full maintenance | Recommended for new designs | |
Gemini 335L | Full maintenance | Recommended for new designs | |
Gemini 336L | Full maintenance | Recommended for new designs | |
Gemini 335Lg | Not supported | Recommended for new designs | |
Gemini 335Le | Not supported | Recommended for new designs | |
Gemini 330 | Full maintenance | Recommended for new designs | |
Gemini 330L | Full maintenance | Recommended for new designs | |
Gemini 2 | Gemini 2 | Full maintenance | Recommended for new designs |
Gemini 2 L | Full maintenance | Recommended for new designs | |
Gemini 2 XL | Recommended for new designs | To be supported | |
Femto | Femto Bolt | Full maintenance | Recommended for new designs |
Femto Mega | Full maintenance | Recommended for new designs | |
Femto Mega I | Full maintenance | To be supported | |
Astra | Astra 2 | Full maintenance | Recommended for new designs |
Astra+ | Limited maintenance | Not supported | |
Astra Pro Plus | Limited maintenance | Not supported | |
Astra Mini | Astra Mini Pro | Full maintenance | Not supported |
Note: If you do not find your device, please contact our FAE or sales representative for help.
Definition:
- Recommended for new designs: we will provide full supports with new features, bug fix and performance optimization;
- Full maintenance: we will provide bug fix support;
- Limited maintenance: we will provide critical bug fix support;
- Not supported: we will not support specific device in this version;
- To be supported: we will add support in the near future.
- OrbbecSDK ROS v2
- Please refer directly to the ROS wiki for installation instructions.
-
Install dependencies (be careful with your ROS distribution):
# Assuming you have sourced the ROS environment, same below sudo apt install libgflags-dev ros-$ROS_DISTRO-image-geometry ros-$ROS_DISTRO-camera-info-manager \ ros-${ROS_DISTRO}-image-transport-plugins ros-${ROS_DISTRO}-compressed-image-transport \ ros-$ROS_DISTRO-image-transport ros-$ROS_DISTRO-image-publisher libgoogle-glog-dev libusb-1.0-0-dev libeigen3-dev \ ros-$ROS_DISTRO-diagnostic-updater ros-$ROS_DISTRO-diagnostic-msgs \ libdw-dev
Currently, the following devices are supported by the OrbbecSDK ROS Wrapper v2-main branch. More devices support will be added in the near future. If you can not find your device in the table below, try the main branch.
For optimal performance, we strongly recommend updating to the latest firmware version. This ensures that you benefit from the most recent enhancements and bug fixes.
The following devices are supported by the OrbbecSDK ROS Wrapper.
Product List | Minimal Firmware Version | Launch File |
---|---|---|
Gemini 435Le | 1.2.04 | gemini435_le.launch |
Gemini 335 | 1.2.20 | gemini_330_series.launch |
Gemini 336 | 1.2.20 | gemini_330_series.launch |
Gemini 335L | 1.2.20 | gemini_330_series.launch |
Gemini 336L | 1.2.20 | gemini_330_series.launch |
Gemini 335Lg | 1.3.46 | gemini_330_series.launch |
Gemini 335Le | 1.5.31 | gemini_330_series.launch |
Gemini 330 | 1.2.20 | gemini_330_series.launch |
Gemini 330L | 1.2.20 | gemini_330_series.launch |
Gemini 2 | 1.4.92 | gemini2.launch |
Gemini 2 L | 1.4.53 | gemini2L.launch |
Femto Bolt | 1.1.2 | femto_bolt.launch |
Femto Mega | 1.3.0 | femto_mega.launch |
Astra 2 | 2.8.20 | astra2.launch |
All launch files are essentially similar, with the primary difference being the default values of the parameters set for different models within the same series. Differences in USB standards, such as USB 2.0 versus USB 3.0, may require adjustments to these parameters. If you encounter a startup failure, please carefully review the specification manual. Pay special attention to the resolution settings in the launch file, as well as other parameters, to ensure compatibility and optimal performance.
Create a ROS workspace (if you don't have one):
mkdir -p ~/ros_ws/src
Get the source code:
cd ~/ros_ws/src
git clone https://github.com/orbbec/OrbbecSDK_ROS1.git
roscd orbbec_camera
git checkout v2-main
git branch #Check whether the branch switch is successful
Build the package:
cd ~/ros_ws
catkin_make
Install udev rules:
cd ~/ros_ws
source ./devel/setup.bash
roscd orbbec_camera
sudo bash ./scripts/install_udev_rules.sh
In terminal 1:
source ./devel/setup.bash
roslaunch orbbec_camera gemini_330_series.launch
In terminal 2:
source ./devel/setup.bash
rviz
Check topics, services, and parameters (Open a new terminal):
rostopic list
rosservice list
rosparam list
Get camera parameters(Must start stream first):
rosservice call /camera/get_camera_params "{}"
Check camera parameters (Please refer to the ROS documentation for the meaning of specific fields in the camera info):
rostopic echo /camera/depth/camera_info
rostopic echo /camera/color/camera_info
Check device information:
rosservice call /camera/get_device_info "{}"
Get the SDK version (Includes firmware and Orbbec SDK versions):
rosservice call /camera/get_sdk_version "{}"
Set/get (Auto) exposure:
rosservice call /camera/set_color_auto_exposure '{data: false}'
rosservice call /camera/set_left_ir_auto_exposure "{data: false}"
# Setting exposure values (be careful with the data range; the following example may not be correct)
rosservice call /camera/set_left_ir_exposure "{data: 2000}"
rosservice call /camera/set_color_exposure "{data: 2000}"
# Get exposure
rosservice call /camera/get_left_ir_exposure "{}"
rosservice call /camera/get_color_exposure "{}"
Set auto exposure ROI:
#In data_param, the first value is the Left setting, the second value is the Right setting, the third value is the Top setting, and the fourth value is the Bottom setting.
#Set color ROI
rosservice call /camera/set_color_ae_roi '{data_param:[0,1279,0,719]}'
#Set depth ROI
rosservice call /camera/set_depth_ae_roi '{data_param:[0,847,0,479]}'
Set/get gain:
# Get gain
rosservice call /camera/get_color_gain '{}'
rosservice call /camera/get_left_ir_gain '{}'
# Setting the gain (be careful with the data range; the following example may not be correct)
rosservice call /camera/set_color_gain "{data: 200}"
rosservice call /camera/set_left_ir_gain "{data: 200}"
Set/get (Auto) white balance:
rosservice call /camera/set_auto_white_balance "{data: false}"
rosservice call /camera/get_auto_white_balance "{data: false}"
Turn on/off laser:
rosservice call /camera/set_laser '{data: true}' # Turn on
rosservice call /camera/set_laser '{data: false}' # Turn off
Save images:
rosservice call /camera/save_images "{}"
Save point cloud:
rosservice call /camera/save_point_cloud "{}"
NOTE: The images are saved under ~/.ros/image
and are only available when the sensor is on.
For the entire list of parameters type rosparam list
.
Modify parameters when launching launch:
roslaunch orbbec_camera gemini_330_series.launch enable_color:=true color_width:=640 color_height:=480
- [color|depth|left_ir|right_ir|ir]_width,[color|depth|left_ir|right_ir|ir]_height,[color|depth|left_ir|right_ir|ir]_fps,[color|depth|left_ir|right_ir|ir]_format
- The resolution and frame rate of the sensor stream
- Run
rosrun orbbec_camera list_camera_profile_mode_node
to get the list of supported profiles - For example:
color_width:=640 color_height:=480 color_fps:=30 color_format:=MJPG depth_width:=640 depth_height:=480 depth_fps:=30 depth_format:=Y16 ir_width:=640 ir_height:=480 ir_fps:=30 ir_format:=Y8
- enable_color_auto_exposure_priority
- Enable the Color auto exposure priority
- For example:
enable_color_auto_exposure_priority:=true
- enable_color_auto_exposure
- Enable the Color auto exposure
- For example:
enable_color_auto_exposure:=true
- color_exposure
- Set the Color exposure
- For example:
color_exposure:=30
- Note:To ensure that the
color_exposure
setting takes effect, make sure to setenable_color_auto_exposure:=false
.
- color_gain
- Set the Color gain
- For example:
color_gain:=16
- Note:To ensure that the
color_gain
setting takes effect, make sure to setenable_color_auto_exposure:=false
.
- enable_depth_auto_exposure_priority
- Enable the Depth auto exposure priority
- For example:
enable_depth_auto_exposure_priority:=true
- depth_brightness
- Set the Depth brightness
- For example:
depth_brightness:=100
Explanation of parameters.Reference:Launch parameters documentation
For the entire list of service rosservice list
.
/camera/get_device_info
rosservice call /camera/get_device_info
/camera/get_sdk_version
rosservice call /camera/get_sdk_version
/camera/reboot_device
rosservice call /camera/reboot_device
Explanation of service.Reference:All available service fo camera control documentation
For the entire list of topic rostopic list
.
/camera/color/camera_info
: The color camera info./camera/color/image_raw
: The color stream image./camera/depth/camera_info
: The depth stream info./camera/depth/image_raw
: The depth stream image.
Explanation of topic.Reference:All available topics documentation
When using Femto Mega and Gemini 335Le, you can use the network to connect the device.
Femto Mega:
roslaunch orbbec_camera femto_mega.launch enumerate_net_device:=true
Gemini 335Le:
roslaunch orbbec_camera gemini_330_series.launch enumerate_net_device:=true
Gemini 435Le:
roslaunch orbbec_camera gemini435_le.launch enumerate_net_device:=true
For more information about network device enumeration.Reference:Network device documentation
When you have multiple cameras, you can activate all of them at the same time.
For more information about Multi camera.Reference:Multi camera documentation
rosrun orbbec_camera list_camera_profile_mode_node
About the mode settings of Predefined presets.Reference:Predefined presets documentation
You can pass the firmware path of the Optional preset into the
preset_firmware_path
launch param
roslaunch orbbec_camera gemini_330_series.launch preset_firmware_path:=/home/orbbec/G336X_Dimensioning_Accurate_0.0.1_78C743B9.bin,/home/orbbec/G336X_Dimensioning_Dense_0.0.1_4E70D227.bin device_preset:=G336X Dimensioning Dense
Gemini 2, Gemini 2 L,and Femto and Femto Bolt cameras setting depth work mode.Reference:Depth work mode switch documentation
For the Femto Mega and Femto Bolt devices setting NFOV and WFOV modes.Reference:Configuration of depth NFOV and WFOV modes documentation
Note: The V4L2 backend is not enabled by default.
- Example:
roslaunch orbbec_camera gemini_330_series.launch uvc_backend:=v4l2
If you want to build the Debian package of OrbbecSDK_ROS.Reference:Building a Debian Package documentation
For users who need to use nodelet, please refer to gemini_330_series_nodelet.launch
To explore practical examples and gain insight into how to use the camera in ROS, please navigate to the Examples section for more information.
If the camera node crashes unexpectedly, it will generate a crash log in the current running directory: ~/.ros/Log/camera_crash_stack_trace_xx.log
. Additionally, regardless of whether the camera node crashes or not, the OrbbecSDK will always generate a log file: ~/.ros/Log/OrbbecSDK.log.txt
, which contains detailed records of the SDK's operations.
Please send these log files to the support team or submit them to a GitHub issue for further assistance.
Insufficient Power Supply:
- Ensure that each camera is connected to a separate hub.
- Use a powered hub to provide sufficient power to each camera.
High Resolution:
- Try lowering the resolution to resolve data stream issues.
Increase usbfs_memory_mb Value:
- Increase the
usbfs_memory_mb
value to 128MB (this is a reference value and can be adjusted based on your system’s needs) by running the following command:
echo 128 | sudo tee /sys/module/usbcore/parameters/usbfs_memory_mb
- To make this change permanent, check this link.
In some cases, you may have multiple versions of OpenCV on your host, which can lead to compilation failures. You can resolve this by specifying the OpenCV version. Find the CMakeLists.txt file in the cmake folder and locate the following code:
find_package(OpenCV REQUIRED)
Either add OpenCV_dir or specify the version before it:
find_package(OpenCV 4.2.0 REQUIRED)
Or:
set(OpenCV_DIR "/path_to_your_opencv_dir")
find_package(OpenCV REQUIRED)
- If you encounter other issues, set the
log_level
parameter todebug
. This will generate an SDK log file in the running directory:~/.ros/Log/OrbbecSDK.log.txt
. Please provide this file to the support team for further assistance. - If firmware logs are required, set
enable_heartbeat
totrue
to activate this feature.
- Different cameras have varying default resolutions and image formats.
- To simplify usage, each camera has its own launch file.
Copyright 2024 Orbbec Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Other names and brands may be claimed as the property of others.