This commit is contained in:
winf
2025-09-18 07:40:40 +00:00
parent ad1cb49f7d
commit 5e93ac600e
129 changed files with 10549 additions and 10436 deletions
+2 -1
View File
@@ -15,4 +15,5 @@ OrbbecSDK V2 ROS2 Wrapper documentation
source/3_quickstarts/quickstarts.rst
source/4_application_guide/application_guide.rst
source/5_advanced_guide/advanced_guide.rst
source/6_FAQ/FAQ.rst
source/6_developer_guide/developer_guide.rst
source/7_FAQ/FAQ.rst
+129 -2
View File
@@ -2,17 +2,144 @@
OrbbecSDK ROS2 Wrapper provides seamless integration of Orbbec cameras with ROS 2 environment. It supports ROS2 Foxy, Humble, and Jazzy distributions.
With a major update in October 2024, we release the [OrbbecSDK ROS2 Wrapper v2](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main) connected to the open source [OrbbecSDK v2](https://github.com/orbbec/OrbbecSDK_v2/releases) 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.
By default, we recommend using the **v2-main** branch. For older OpenNI devices not supported by v2-main, please use the **main** branch. Device models that are only supported by the main branch are listed in the table below.
If you are a user in China, it is recommended to use [gitee Repo](https://gitee.com/orbbecdeveloper/OrbbecSDK_ROS2).
Here is the device support list of main branch (v1.x) and v2-main branch (v2.x):
<table border="1" style="border-collapse: collapse; text-align: left; width: 100%;">
<thead>
<tr style="background-color: #1f4e78; color: white; text-align: center;">
<th>Product Series</th>
<th>Product</th>
<th><a href="https://github.com/orbbec/OrbbecSDK_ROS2/tree/main" style="color: black; text-decoration: none;">Branch main</a></th>
<th><a href="https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main" style="color: black; text-decoration: none;">Branch v2-main</a></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center; font-weight: bold;">Gemini 435Le</td>
<td>Gemini 435Le</td>
<td>Not supported</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td rowspan="8" style="text-align: center; font-weight: bold;">Gemini 330</td>
<td>Gemini 335</td>
<td>Full maintenance</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Gemini 336</td>
<td>Full maintenance</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Gemini 335L</td>
<td>Full maintenance</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Gemini 336L</td>
<td>Full maintenance</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Gemini 335Lg</td>
<td>Not supported</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Gemini 335Le</td>
<td>Not supported</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Gemini 330</td>
<td>Full maintenance</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Gemini 330L</td>
<td>Full maintenance</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td rowspan="3" style="text-align: center; font-weight: bold;">Gemini 2</td>
<td>Gemini 2</td>
<td>Full maintenance</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Gemini 2 L</td>
<td>Full maintenance</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Gemini 2 XL</td>
<td>Recommended for new designs</td>
<td>To be supported</td>
</tr>
<tr>
<td rowspan="3" style="text-align: center; font-weight: bold;">Femto</td>
<td>Femto Bolt</td>
<td>Full maintenance</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Femto Mega</td>
<td>Full maintenance</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Femto Mega I</td>
<td>Full maintenance</td>
<td>To be supported</td>
</tr>
<tr>
<td rowspan="3" style="text-align: center; font-weight: bold;">Astra</td>
<td>Astra 2</td>
<td>Full maintenance</td>
<td>Recommended for new designs</td>
</tr>
<tr>
<td>Astra+</td>
<td>Limited maintenance</td>
<td>Not supported</td>
</tr>
<tr>
<td>Astra Pro Plus</td>
<td>Limited maintenance</td>
<td>Not supported</td>
</tr>
<tr>
<td style="text-align: center; font-weight: bold;">Astra Mini</td>
<td>Astra Mini Pro</td>
<td>Full maintenance</td>
<td>Full maintenance</td>
</tr>
</tbody>
</table>
**Note**: If you do not find your device, please contact our FAE or sales representative for help.
**Definition**:
1. Recommended for new designs: we will provide full supports with new features, bug fix and performance optimization;
2. Full maintenance: we will provide bug fix support;
3. Limited maintenance: we will provide critical bug fix support;
4. Not supported: we will not support specific device in this version;
5. To be supported: we will add support in the near future.
## Support Hardware Products
The following devices are supported by the OrbbecSDK ROS2 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](https://github.com/orbbec/OrbbecSDK_ROS2) 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.
| Product List | Minimal Firmware Version | **Launch File** |
| Product List | Minimal Firmware Version | **Launch File** |
| :------------- | :----------------------- | :-------------------------- |
| Gemini 435Le | 1.2.04 | gemini435_le.launch.py |
| Gemini 335 | 1.2.20 | gemini_330_series.launch.py |
@@ -33,17 +33,23 @@ git checkout v2-main
Install dependencies:
```bash
sudo apt install libgflags-dev nlohmann-json3-dev libgoogle-glog-dev libgoogle-glog0v5 libssl-dev \
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-backward-ros libdw-dev
```
Optional dependencies:
```bash
# 435Le writeCustomerDate feature:
sudo apt install libssl-dev
```
Build:
```bash
cd ~/ros2_ws
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=Release
```
@@ -9,4 +9,8 @@ This chapter introduces application development with the SDK, including launch p
launch_parameters.md
services.md
topics.md
coordinate_systems.md
camera_sensor_structure.md
tf_transformations.md
compressed_image.md
point_cloud.md
@@ -0,0 +1,5 @@
### Camera sensor structure
![module in rviz2](../image/application_guide/image3.png)
![module in rviz2](../image/application_guide/image1.png)
@@ -0,0 +1,11 @@
### Compressed Image
You can use `image_transport` to compress the image using `jpeg`. Below is an example of how to use it:
To access the compressed color image, you can use the following command:
```bash
ros2 topic echo /camera/color/image_raw/compressed --no-arr
```
This command will allow you to receive the compressed color image from the specified topic.
@@ -0,0 +1,13 @@
### ROS2(Robot) vs Optical(Camera) Coordination Systems
* Point Of View:
* Imagine we are standing behind of the camera, and looking forward.
* Always use this point of view when talking about coordinates, left vs right IRs, position of sensor, etc..
![ROS2 and Camera Coordinate System](../image/application_guide/image0.png)
* ROS2 Coordinate System: (X: Forward, Y:Left, Z: Up)
* Camera Optical Coordinate System: (X: Right, Y: Down, Z: Forward)
* All data published in our wrapper topics is optical data taken directly from our camera sensors.
* static and dynamic TF topics publish optical CS and ROS CS to give the user the ability to move from one CS to other CS.
@@ -135,7 +135,7 @@ The following are the launch parameters available:
* **`frames_per_trigger`**
* The frame number of each stream after each trigger in triggering mode.
> Used for [multi camera synced](../5_advanced_guide/multi_camera_synced.md).
> Used for [multi camera synced](../5_advanced_guide/multi_camera/multi_camera_synced.md).
#### Network Cameras
* **`enumerate_net_device`**
@@ -143,19 +143,19 @@ The following are the launch parameters available:
* **`net_device_ip`** / **`net_device_port`**
* Set net device's IP address and port (Usually `8090`).
> Used for [net camera](../5_advanced_guide/net_camera.md).
> Used for [net camera](../5_advanced_guide/configuration/net_camera.md).
#### Device-Specific
* **`device_preset`**
* The default value is `Default`. Only the G330 series is supported. For more information, refer to the [G330 documentation](https://www.orbbec.com/docs/g330-use-depth-presets/). The value should be one of the preset names listed [in the table](../5_advanced_guide/predefined_presets.md).
* The default value is `Default`. Only the G330 series is supported. For more information, refer to the [G330 documentation](https://www.orbbec.com/docs/g330-use-depth-presets/). The value should be one of the preset names listed [in the table](../5_advanced_guide/configuration/predefined_presets.md).
* **`enable_gmsl_trigger`** / **`gmsl_trigger_fps`**
* Enable the gmsl trigger out signal / set gmsl trigger fps. Used for [gmsl camera](../5_advanced_guide/gmsl_camera.md).
* Enable the gmsl trigger out signal / set gmsl trigger fps. Used for [gmsl camera](../5_advanced_guide/multi_camera/gmsl_camera.md).
#### Disparity
* **`disparity_to_depth_mode`**
* `HW`: use hardware disparity to depth conversion. `SW`: use software disparity to depth conversion.
* **`disparity_range_mode`**, **`disparity_search_offset`**, **`disparity_offset_config`**
* Parameters for disparity search offset. Used for [disparity search offset](../5_advanced_guide/disparity_search_offset.md).
* Parameters for disparity search offset. Used for [disparity search offset](../5_advanced_guide/configuration/disparity_search_offset.md).
#### Interleave AE Mode
* **`interleave_ae_mode`**
@@ -164,7 +164,7 @@ The following are the launch parameters available:
* Parameters to control interleave frame mode.
* **`[hdr|laser]_index[0|1]_[...]`**
* In interleave frame mode, set the 0th and 1st frame parameters of hdr or laser interleaving frames.
* *All interleave parameters are used for [interleave ae mode](../5_advanced_guide/interleave_ae_mode.md).*
* *All interleave parameters are used for [interleave ae mode](../5_advanced_guide/configuration/interleave_ae_mode.md).*
### Basic & General Parameters
@@ -0,0 +1,15 @@
### TF from coordinate A to coordinate B:
In Orbbec cameras, the origin point (0,0,0) is taken from the camera_link position
Our wrapper provide static TFs between each sensor coordinate to the camera base (camera_link)
Also, it provides TFs from each sensor ROS coordinates to its corrosponding optical coordinates.
Example of static TFs of RGB sensor and right infra sensor of Gemini335 module as it shown in rviz2:
```bash
ros2 launch orbbec_description view_model.launch.py model:=gemini_335_336.urdf.xacro
```
![module in rviz2](../image/application_guide/image2.png)
@@ -1,26 +1,42 @@
Advanced Guide
======================================================
This chapter covers advanced features of the SDK, including multi-camera synchronization, depth-color alignment, performance tuning, and more.
This chapter covers advanced features of the SDK, including multi-camera usage, performance tuning, and special configuration modes.
Performance & Optimization
------------------------------------------------------
.. toctree::
:maxdepth: 2
align_depth_color.md
benchmark.md
building_a_Debian_Package.md
configuration_of_depth_NFOV_and_WFOV_modes.md
depth_work_mode_switch.md
disparity_search_offset.md
efficient_intra_process_communication.md
fastdds_tuning.md
gmsl_camera.md
interleave_ae_mode.md
lower_cpu_usage.md
multi_camera.md
multi_camera_synced.md
multi_camera_synced_verification_tool.md
net_camera.md
point_cloud.md
predefined_presets.md
performance/benchmark.md
performance/lower_cpu_usage.md
performance/efficient_intra_process_communication.md
performance/fastdds_tuning.md
Multi-Camera
------------------------------------------------------
.. toctree::
:maxdepth: 2
multi_camera/multi_camera.md
multi_camera/multi_camera_synced.md
multi_camera/multi_camera_synced_verification_tool.md
multi_camera/gmsl_camera.md
Configuration & Modes
------------------------------------------------------
.. toctree::
:maxdepth: 2
configuration/align_depth_color.md
configuration/configuration_of_depth_NFOV_and_WFOV_modes.md
configuration/depth_work_mode_switch.md
configuration/disparity_search_offset.md
configuration/interleave_ae_mode.md
configuration/predefined_presets.md
configuration/net_camera.md
@@ -30,10 +30,10 @@ To visualize the aligned images in RViz2:
1. Launch RViz2 after running one of the above commands.
2. Select the topic for the depth to color overlay image. An example topic selection is shown here:
![Topic Selection for Depth to Color Overlay](../image/align_depth_color/image3.png)
![Topic Selection for Depth to Color Overlay](../../image/align_depth_color/image3.png)
### Example of Depth to Color Overlay
After selecting the appropriate topic in RViz2, you will be able to see the depth to color overlay image. Here's what it might look like:
![Depth to Color Overlay Image](../image/align_depth_color/image4.jpg)
![Depth to Color Overlay Image](../../image/align_depth_color/image4.jpg)
@@ -6,7 +6,7 @@
The definition of disparity search range: For any pixel *(u_l, v)* in the left image, by default, the corresponding disparity search range in the right image is *[ (u_l - 255, v)*, *(u_l, v) ]*, where the disparity search length is 256 and the maximum integer disparity is 255. If the starting point of the search is adjusted to *[ (u_l - 255 - offset, v)*, *(u_l - offset, v) ]*, the offset is defined as the disparity shift. Therefore, our disparity search range configuration includes both the disparity search length and the search position offset (which can also be referred to as the disparity shift).
![Depth Point Cloud Visualization](../image/disparity_search_offset/search_offset0.png)
![Depth Point Cloud Visualization](../../image/disparity_search_offset/search_offset0.png)
## Parameter Introduction
@@ -14,7 +14,7 @@ The interleave_ae related parameters are set in [gemini_330_series.launch.py](ht
* `interleave_skip_index` : Set 0 for skip pattern ir, set 1 for skip flood ir.
### interleave hdr
**interleave hdr**
When the `interleave_ae_mode` parameter is set to `hdr` and `interleave_frame_enable `is set to `true`, interleave hdr will be enabled
@@ -38,7 +38,7 @@ When the `interleave_ae_mode` parameter is set to `hdr` and `interleave_frame_en
* `hdr_index0_ir_ae_max_exposure` : Frame 0 ir maximum exposure value setting in AE (auto exposure).
### interleave laser
**interleave laser**
When the `interleave_ae_mode` parameter is set to `laser` and `interleave_frame_enable `is set to `true`, interleave laser will be enabled
@@ -70,11 +70,11 @@ Setting the interleave_ae parameter,`colcon build` again and run launch
ros2 launch orbbec_camera gemini_330_series.launch.py
```
#### Example Visualization
**Example Visualization**
![Depth Point Cloud Visualization](../image/interleave_ae_mode/interleave_ae0.jpeg)
![Depth Point Cloud Visualization](../../image/interleave_ae_mode/interleave_ae0.jpeg)
![Depth Point Cloud Visualization](../image/interleave_ae_mode/interleave_ae1.jpeg)
![Depth Point Cloud Visualization](../../image/interleave_ae_mode/interleave_ae1.jpeg)
## Multi_camera_synced + Interleave_ae
@@ -4,7 +4,7 @@
## Femto Mega & Gemini 435Le
### Parameter Introduction
**Parameter Introduction**
Network device settings: `enumerate_net_device` is set to true, which will automatically enumerate network devices.
@@ -14,7 +14,7 @@ If you do not want to automatically enumerate network devices,you can set `enume
* `net_device_ip` : Setting net device's IP address.
* `net_device_port` : Setting net device's port.Usually, you can set it to 8090.
### Single Net camera
**Single Net camera**
> If you need to run Gemini 435Le, you only need to replace [femto_mega.launch.py ](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/launch/femto_mega.launch.py)in the run command with [gemini435_le.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/launch/gemini435_le.launch.py)
@@ -42,7 +42,7 @@ Network device settings: `enumerate_net_device` must be set to true, set `net_de
* `net_device_ip` : Setting net device's IP address.
* `net_device_port` : Setting net device's port.Usually, you can set it to 8090.
### Single Net camera
**Single Net camera**
For [gemini_330_series.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/launch/gemini_330_series.launch.py) as an example:
@@ -34,12 +34,12 @@ First, please see how to use [multi_camera_synced](./multi_camera_synced.md).
In addition, GMSL multi-camera synced does not require Multi-Camera Sync Hub Pro, so there is no need to set the `primary` mode. Each GMSL camera is `secondary`.
### Additional Parameter Settings
**Additional Parameter Settings**
* `gmsl_trigger_fps` : set hardware soc trigger source frame rate.
* `enable_gmsl_trigger` : enable hardware soc trigger.
### Run the launch
**Run the launch**
Please refer to the configuration in [multi_gmsl_camera_synced.launch.py.](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/gmsl_camera/multi_gmsl_camera_synced.launch.py)
@@ -88,4 +88,4 @@ ros2 launch orbbec_camera multi_camera.launch.py
## Image topic frame rate too low from Multiple Cameras
Refer to the [Fast DDS Configuration](./fastdds_tuning.md) file.
Refer to the [Fast DDS Configuration](../performance/fastdds_tuning.md) file.
@@ -2,12 +2,12 @@
> The purpose of this document is to explain how to use multi-camera synced with OrbbecSDK_ROS2
## Setup instructions
### Setup instructions
* Please read the Multi-Camera Synchronization Setup Guide:[Multi-Camera Synchronization Setup](https://www.orbbec.com/docs/set-up-cameras-for-external-synchronization_v1-2/)
* Make sure the camera is correctly connected to the multi-camera synchronizer.
![Depth Point Cloud Visualization](../image/multi_camera_synced/multi_camera_synced1.png)
![Depth Point Cloud Visualization](../../image/multi_camera_synced/multi_camera_synced1.png)
### Checking camera port with OrbbecSDK_ROS2
@@ -19,7 +19,7 @@ ros2 run orbbec_camera list_devices_node
Open multi_camera_synced.launch.py, and configure the camera settings as shown below:
![Depth Point Cloud Visualization](../image/multi_camera_synced/multi_camera_synced2.png)
![Depth Point Cloud Visualization](../../image/multi_camera_synced/multi_camera_synced2.png)
1. `gemini_330_series.launch.py` is the launch file for starting the camera.
@@ -19,12 +19,12 @@
├── multi_camera_synced_verify.launch.py
```
### multicamera_sync
**multicamera_sync**
* `gemini_330_series_synced_verify.launch.py` : Single camera runs launch, which provides the camera running node for multi_camera_synced_verify.launch.py.
* `multi_camera_synced_verify.launch.py` : Multi camer synced + launch of save_rgbir tool.
#### output
**output**
> The `ouput` folder is the folder where the camera pictures are output
@@ -36,13 +36,13 @@ In the output example provided
* `DevicesInfo.txt` : Camera equipment basic information (need to be modified).
* `StreamProfileInfo.txt` : Camera video stream information (no need to modify).
#### Python
**Python**
* `Config.ini` : Configuration file for Python analysis script (need to be modified).
## Preparation for operation
### save_rgbir node
**save_rgbir node**
Edit multi_camera_synced_verify.launch.py and fill in the activated camera device,we can find that save_rgbir is started at the end.
@@ -88,7 +88,7 @@ save_rgbir is a tool for saving images. The configuration file of this tool is i
* `usb_ports` : "primary", "secondary 1", "secondary 2", "secondary 3", fill in as many usb_ports as there are cameras
* `camera_name` : The name of the camera setting, for example: camera_01
### DevicesInfo.txt
**DevicesInfo.txt**
Edit DevicesInfo.txt. Only the `primarySerialNumber`, `index` and `serialNumber` parameters need to be changed. Other parameters do not need to be changed.Refer to the example of [20250218102900](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples/multi_camera_synced_verification_tool/multicamera_sync/output/20250218102900).
@@ -96,13 +96,13 @@ Edit DevicesInfo.txt. Only the `primarySerialNumber`, `index` and `serialNumber`
* `index` : Camera index
* `serialNumber` : The SN serial number of the camera
### Config.ini
**Config.ini**
Edit Config.ini.Modify `frameRate` and `tspRangeThreshold`.
## Run this example
### Run launch and save camera pictures
**Run launch and save camera pictures**
* First terminal
@@ -118,7 +118,7 @@ ros2 service call /save_rgbir/start_capture orbbec_camera_msgs/srv/SetInt32 '{da
When the terminal displays "over", the image is saved.A new multicamera_sync folder will be generated under the workspace.
### Camera pictures naming format
**Camera pictures naming format**
Take [color_SNCP1E5420006D_Index0_g1739874543227_f0_s1739874543327_e50_d16_.jpg](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples/multi_camera_synced_verification_tool/multicamera_sync/output/20250218102900/TotalModeFrames/SNCP1E5420006D_Index0/color_SNCP1E5420006D_Index0_g1739874543227_f0_s1739874543327_e50_d16_.jpg) as an example
@@ -131,7 +131,7 @@ Take [color_SNCP1E5420006D_Index0_g1739874543227_f0_s1739874543327_e50_d16_.jpg]
* `e50` : The exposure of this frame is 50.
* `d16` : The gain of this frame is 16.
### Analyzing camera image data
**Analyzing camera image data**
You need to copy the modified [Python folder](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples/multi_camera_synced_verification_tool//multicamera_sync/Python) to the new multi_camera_synced subdirectory, and copy the modified [DevicesInfo.txt ](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples/multi_camera_synced_verification_tool/multicamera_sync/output/20250218102900/DevicesInfo.txt)and [StreamProfileInfo.txt](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples/multi_camera_synced_verification_tool//multicamera_sync/output/20250218102900/StreamProfileInfo.txt) to the same level directory as the TotalModeFrames folder.
@@ -146,13 +146,13 @@ After the operation is successful, you can view the synchronization effect in th
## Files that need to be changed
### Analysis tools
**Analysis tools**
* [multi_save_rgbir_params.json](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/config/tools/multisavergbir/multi_save_rgbir_params.json)
* [DevicesInfo.txt ](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples/multi_camera_synced_verification_tool//multicamera_sync/output/20250218102900/DevicesInfo.txt)
* [Config.ini](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples/multi_camera_synced_verification_tool//multicamera_sync/Python/Config.ini)
### Camera Configuration
**Camera Configuration**
[camera_params.yaml](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/config/camera_params.yaml)(Camera startup parameter settings)
@@ -2,8 +2,6 @@
> The goal of this tool is to benchmark the performance of various OrbbecSDK_ROS2 camera configurations. The benchmark results depend on the camera and settings used.(Currently only works with ROS2 Humble)
## Usage Instructions
### Tool Configuration ([start_benchmark_params.json](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/config/tools/startbenchmark/start_benchmark_params.json))
```json
@@ -1,20 +1,23 @@
# Efficient intra-process communication:
### Introduction
Our ROS2 Wrapper node supports zero-copy communications if loaded in the same process as a subscriber node. This can reduce copy times on image/pointcloud topics, especially with big frame resolutions and high FPS.
You will need to launch a component container and launch our node as a component together with other component nodes. Further details on "Composing multiple nodes in a single process" can be found [here](https://docs.ros.org/en/rolling/Tutorials/Composition.html).
Further details on efficient intra-process communication can be found [here](https://docs.ros.org/en/humble/Tutorials/Intra-Process-Communication.html#efficient-intra-process-communication).
## Example
### Example
### Manually loading multiple components into the same process
**Manually loading multiple components into the same process**
* Start the component:
```bash
ros2 run rclcpp_components component_container
```
* Add the wrapper:
```bash
@@ -23,13 +26,14 @@ Further details on efficient intra-process communication can be found [here](htt
Load other component nodes (consumers of the wrapper topics) in the same way.
### Using a launch file
**Using a launch file**
```bash
ros2 launch orbbec_camera gemini_intra_process_demo_launch.py
```
### Limitations
**Limitations**
* Node components are currently not supported on RCLPY
* Compressed images using `image_transport` will be disabled as this isn't supported with intra-process communication
@@ -6,7 +6,7 @@ optimizing Fast DDS to enhance image transfer efficiency.
## Adjusting System Parameters
### IP Fragmentation Time
**IP Fragmentation Time**
- **Path**: `/proc/sys/net/ipv4/ipfrag_time` (default: 30 seconds)
- **Purpose**: Defines the duration that IP fragments are kept in memory.
@@ -19,7 +19,7 @@ optimizing Fast DDS to enhance image transfer efficiency.
sudo sysctl net.ipv4.ipfrag_time=3
```
### IP Fragmentation Memory Threshold
**IP Fragmentation Memory Threshold**
- **Path**: `/proc/sys/net/ipv4/ipfrag_high_thresh` (default: 262144 bytes)
- **Purpose**: Sets the maximum memory used to reassemble IP fragments.
@@ -32,7 +32,7 @@ optimizing Fast DDS to enhance image transfer efficiency.
sudo sysctl net.ipv4.ipfrag_high_thresh=134217728
```
### Maximum Buffer Sizes
**Maximum Buffer Sizes**
- **Purpose**: Configures the maximum buffer sizes for receiving and sending data, which is critical for high-throughput
data transmission.
@@ -72,7 +72,7 @@ to [ROS 2 DDS Tuning Documentation](https://docs.ros.org/en/foxy/How-To-Guides/D
Below is an example of a Fast DDS configuration file optimized for ROS2 usage with the Orbbec camera. This configuration
enhances the overall data transmission by adjusting buffer sizes and transport settings.
### Configuration File: `shm_fastdds.xml`
**Configuration File:** `shm_fastdds.xml`
Place this file in the `$HOME` directory.
@@ -140,7 +140,7 @@ Place this file in the `$HOME` directory.
</profiles>
```
### Environment Variables
**Environment Variables**
Set the following environment variables to use the custom Fast DDS profile:
@@ -19,35 +19,43 @@ To achieve the lowest possible CPU usage in OrbbecSDK_ROS2, it is recommended to
### Test environment
#### Hardware Configuration
**Hardware Configuration**
* **CPU**: Intel i7-8700 @ 3.20GHz
* **Memory**: 24 GB
* **Storage**: Micron 2200S NVMe 256GB
* **GPU**: NVIDIA GeForce GTX 1660Ti
* **OS**: Ubuntu22.04
#### ROS Configuration
**ROS Configuration**
* **ROS Version**: ROS2 Humble
* **SDK Version**: OrbbecSDK_ROS2 v2.2.1
#### Camera Setup
**Camera Setup**
* Devices: 2x Gemini 335, 1x Gemini 336, 1x Gemini 336L
* Firmware Version: 1.4.10
### Test Setup
* **Stream Settings:**
* Depth / IR Left / IR Right: 848×480 @ 30fps
* Color: 848×480 @ 30fps
**Stream Settings:**
* Depth / IR Left / IR Right: 848×480 @ 30fps
* Color: 848×480 @ 30fps
Note: The following CPU usage data focuses on `uvc_backend`, `color_format` and various filter combinations.
### Test Results
#### `uvc_backend` Comparison (RGB format)
**`uvc_backend` Comparison (RGB format)**
| libuvc CPU Usage | v4l2 CPU Usage | Absolute Change |
| :--------------: | :------------: | :-------------: |
@@ -55,7 +63,7 @@ Note: The following CPU usage data focuses on `uvc_backend`, `color_format` and
The CPU usage can be significantly reduced with v4l2 backend. In our implementation, v4l2 works without requiring any patches to the Linux kernel, allowing users to easily switch between v4l2 and libuvc and maintaining full compatibility with standard Linux distributions.
#### `color_format` Comparison (MJPG vs RGB)
**`color_format` Comparison (MJPG vs RGB)**
| Backend | MJPG CPU Usage | RGB CPU Usage | Absolute Change |
| :-----: | :------------: | :-----------: | :-------------: |
@@ -64,7 +72,7 @@ The CPU usage can be significantly reduced with v4l2 backend. In our implementat
The CPU usage can be reduced if the RGB format is selected instead of MJPG, since the decoding of MJPG image will consume the host CPU resource.
#### Filter Configuration Impact
**Filter Configuration Impact**
| Filters Applied | libuvc CPU Usage | CPU Usage Increase | v4l2 CPU Usage | CPU Usage Increase |
| ----------------------------------------------------- | ---------------- | ------------------ | -------------- | ------------------ |
@@ -0,0 +1,10 @@
Developer Guide
======================================================
This chapter provides documents for developers and maintainers of the SDK.
.. toctree::
:maxdepth: 2
building_a_Debian_Package.md