This commit is contained in:
ob-yalian
2026-01-04 01:12:38 +00:00
parent 0771e0b0c9
commit 220b4ea0dd
481 changed files with 21273 additions and 31092 deletions
@@ -0,0 +1,203 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>高级指南 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../genindex.html" />
<link rel="search" title="搜索" href="../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">高级指南</a><ul>
<li><a class="reference internal" href="#id2">性能与优化</a></li>
<li><a class="reference internal" href="#id3">多相机</a></li>
<li><a class="reference internal" href="#id4">配置与模式</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">高级指南</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../_sources/source/camera_devices/5_advanced_guide/advanced_guide.rst.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="id1">
<h1>高级指南<a class="headerlink" href="#id1" title="Link to this heading"></a></h1>
<p>本章介绍SDK的高级功能,包括多相机使用和特殊配置模式。</p>
<section id="id2">
<h2>性能与优化<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="performance/lower_cpu_usage.html">使用Orbbec ROS包降低CPU使用率</a><ul>
<li class="toctree-l2"><a class="reference internal" href="performance/lower_cpu_usage.html#cpu">降低CPU使用率的推荐设置</a></li>
<li class="toctree-l2"><a class="reference internal" href="performance/lower_cpu_usage.html#id1">用于测试的启动文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="performance/lower_cpu_usage.html#id2">测试环境</a></li>
<li class="toctree-l2"><a class="reference internal" href="performance/lower_cpu_usage.html#id3">测试设置</a></li>
<li class="toctree-l2"><a class="reference internal" href="performance/lower_cpu_usage.html#id4">测试结果</a></li>
<li class="toctree-l2"><a class="reference internal" href="performance/lower_cpu_usage.html#id5">进一步优化</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="performance/efficient_intra_process_communication.html">高效的进程内通信:</a><ul>
<li class="toctree-l2"><a class="reference internal" href="performance/efficient_intra_process_communication.html#id2">简介</a></li>
<li class="toctree-l2"><a class="reference internal" href="performance/efficient_intra_process_communication.html#id3">示例</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="performance/fastdds_tuning.html">针对Orbbec相机与ROS2的Fast DDS优化</a><ul>
<li class="toctree-l2"><a class="reference internal" href="performance/fastdds_tuning.html#id1">调整系统参数</a></li>
<li class="toctree-l2"><a class="reference internal" href="performance/fastdds_tuning.html#fast-dds">Fast DDS配置</a></li>
</ul>
</li>
</ul>
</div>
</section>
<section id="id3">
<h2>多相机<a class="headerlink" href="#id3" title="Link to this heading"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="multi_camera/multi_camera.html">多相机</a><ul>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/multi_camera.html#id2">多相机无数据流</a></li>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/multi_camera.html#id3">多相机图像话题帧率过低</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="multi_camera/multi_camera_synced.html">多相机同步说明</a><ul>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/multi_camera_synced.html#id2">设置说明</a></li>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/multi_camera_synced.html#orbbecsdk-ros2">使用 OrbbecSDK_ROS2 检查相机端口</a></li>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/multi_camera_synced.html#id3">OrbbecSDK_ROS2 多相机同步配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/multi_camera_synced.html#id4">运行以下命令启动多相机同步</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="multi_camera/multi_camera_synced_verification_tool.html">多相机同步验证节点</a><ul>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/multi_camera_synced_verification_tool.html#id2">使用教程</a></li>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/multi_camera_synced_verification_tool.html#id5">必要系统配置</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="multi_camera/gmsl_camera.html">GMSL 相机</a><ul>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/gmsl_camera.html#id1">单个 GMSL 相机</a></li>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/gmsl_camera.html#id2">多个 GMSL 相机</a></li>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/gmsl_camera.html#id3">多个 GMSL 相机同步</a></li>
<li class="toctree-l2"><a class="reference internal" href="multi_camera/gmsl_camera.html#id4">GMSL 相机的使用限制</a></li>
</ul>
</li>
</ul>
</div>
</section>
<section id="id4">
<h2>配置与模式<a class="headerlink" href="#id4" title="Link to this heading"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="configuration/align_depth_color.html">在 ROS 2 中对齐深度到彩色</a><ul>
<li class="toctree-l2"><a class="reference internal" href="configuration/align_depth_color.html#id1">对齐和查看深度和彩色图像的命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration/align_depth_color.html#rviz2">在 RViz2 中选择话题</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration/align_depth_color.html#id2">深度到彩色叠加示例</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="configuration/configuration_of_depth_NFOV_and_WFOV_modes.html">深度 NFOV 和 WFOV 模式配置</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration/depth_work_mode_switch.html">深度工作模式切换</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration/disparity_search_offset.html">视差搜索偏移</a><ul>
<li class="toctree-l2"><a class="reference internal" href="configuration/disparity_search_offset.html#id2">功能介绍</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration/disparity_search_offset.html#id3">参数介绍</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration/disparity_search_offset.html#id4">运行启动文件</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="configuration/interleave_ae_mode.html">在 Gemini330 系列相机中使用 interleave_ae</a><ul>
<li class="toctree-l2"><a class="reference internal" href="configuration/interleave_ae_mode.html#id1">参数介绍</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration/interleave_ae_mode.html#id2">运行启动文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration/interleave_ae_mode.html#multi-camera-synced-interleave-ae">Multi_camera_synced + Interleave_ae</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="configuration/predefined_presets.html">预定义预设</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration/net_camera.html">网络相机</a><ul>
<li class="toctree-l2"><a class="reference internal" href="configuration/net_camera.html#femto-mega-gemini-435le-gemini-335le">Femto Mega &amp; Gemini 435Le &amp; Gemini 335Le</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration/net_camera.html#set-device-ip">set_device_ip 工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration/net_camera.html#ip">强制 IP 功能</a></li>
</ul>
</li>
</ul>
</div>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,146 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>在 ROS 2 中对齐深度到彩色 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">在 ROS 2 中对齐深度到彩色</a><ul>
<li><a class="reference internal" href="#id1">对齐和查看深度和彩色图像的命令</a></li>
<li><a class="reference internal" href="#rviz2">在 RViz2 中选择话题</a></li>
<li><a class="reference internal" href="#id2">深度到彩色叠加示例</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">在 ROS 2 中对齐深度到彩色</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/configuration/align_depth_color.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="ros-2">
<h1>在 ROS 2 中对齐深度到彩色<a class="headerlink" href="#ros-2" title="Link to this heading"></a></h1>
<p>本节说明如何使用 ROS 2 将深度图像与彩色图像对齐以创建叠加图像。这对于需要来自不同传感器模态的同步视觉信息的应用特别有用。</p>
<section id="id1">
<h2>对齐和查看深度和彩色图像的命令<a class="headerlink" href="#id1" title="Link to this heading"></a></h2>
<ol>
<li><p><strong>基本深度到彩色对齐:</strong></p>
<p>要简单地将深度图像对齐到彩色图像,请使用以下命令:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>gemini_330_series.launch.py<span class="w"> </span>depth_registration:<span class="o">=</span><span class="nb">true</span>
</pre></div>
</div>
<p>此命令激活深度配准功能,但不打开查看器。</p>
</li>
<li><p><strong>查看深度到彩色叠加:</strong></p>
<p>如果您希望查看深度到彩色叠加,需要使用以下命令启用查看器:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>gemini_330_series.launch.py<span class="w"> </span>depth_registration:<span class="o">=</span><span class="nb">true</span><span class="w"> </span>enable_d2c_viewer:<span class="o">=</span><span class="nb">true</span>
</pre></div>
</div>
<p>这将启动带有深度到彩色配准的相机节点并打开查看器以显示叠加图像。</p>
</li>
</ol>
</section>
<section id="rviz2">
<h2>在 RViz2 中选择话题<a class="headerlink" href="#rviz2" title="Link to this heading"></a></h2>
<p>要在 RViz2 中可视化对齐的图像:</p>
<ol>
<li><p>运行上述命令之一后启动 RViz2。</p></li>
<li><p>选择深度到彩色叠加图像的话题。话题选择示例如下所示:</p>
<p><img alt="深度到彩色叠加的话题选择" src="../../../../_images/image31.png" /></p>
</li>
</ol>
</section>
<section id="id2">
<h2>深度到彩色叠加示例<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<p>在 RViz2 中选择适当的话题后,您将能够看到深度到彩色叠加图像。它可能看起来像这样:</p>
<p><img alt="深度到彩色叠加图像" src="../../../../_images/image4.jpg" /></p>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,115 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>深度 NFOV 和 WFOV 模式配置 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">深度 NFOV 和 WFOV 模式配置</a></li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">深度 NFOV 和 WFOV 模式配置</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/configuration/configuration_of_depth_NFOV_and_WFOV_modes.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="nfov-wfov">
<h1>深度 NFOV 和 WFOV 模式配置<a class="headerlink" href="#nfov-wfov" title="Link to this heading"></a></h1>
<p>对于 Femto Mega 和 Femto Bolt 设备,NFOV 和 WFOV 模式通过在启动文件中配置深度和 IR 的分辨率来实现。</p>
<p>在启动文件中,depth_width、depth_height、ir_width、ir_height 分别表示深度的分辨率和 IR 的分辨率。</p>
<p>IR 的帧率和分辨率必须与深度保持一致。不同模式与分辨率的对应关系如下:</p>
<ul class="simple">
<li><p>NFOV unbinned:640 x 576</p></li>
<li><p>NFOV binned:320 x 288</p></li>
<li><p>WFOV unbinned:1024 x 1024</p></li>
<li><p>WFOV binned:512 x 512</p></li>
</ul>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,133 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>深度工作模式切换 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">深度工作模式切换</a></li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">深度工作模式切换</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/configuration/depth_work_mode_switch.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="id1">
<h1>深度工作模式切换<a class="headerlink" href="#id1" title="Link to this heading"></a></h1>
<p>Orbbec SDK ROS 2 支持深度工作模式切换。Gemini 2、Gemini 2 L 和 Femto 以及 Femto Bolt 相机支持深度工作模式切换。</p>
<ul class="simple">
<li><p>在启动相机之前,可以为相应的 xxx.launch.py 文件的支持配置深度工作模式(depth_work_mode)。</p></li>
<li><p>Gemini 2、Gemini 2 L 和 Gemini 2 XL 相机支持深度工作模式切换。</p></li>
<li><p>xxx.launch.py 的默认深度工作模式配置是相机的默认配置。如果需要修改,可以根据需要切换到相应的模式。</p></li>
<li><p>具体相机深度工作模式支持类型可以在深度模式的注释中找到。</p></li>
</ul>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># 深度工作模式支持如下:</span>
<span class="c1"># Unbinned Dense Default</span>
<span class="c1"># Unbinned Sparse Default</span>
<span class="c1"># Binned Sparse Default</span>
<span class="c1"># Obstacle Avoidance</span>
<span class="n">DeclareLaunchArgument</span><span class="p">(</span><span class="s1">&#39;depth_work_mode&#39;</span><span class="p">,</span> <span class="n">default_value</span><span class="o">=</span><span class="s1">&#39;&#39;</span><span class="p">)</span>
</pre></div>
</div>
<ul class="simple">
<li><p>查看深度工作模式:</p></li>
</ul>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>run<span class="w"> </span>orbbec_camera<span class="w"> </span>list_depth_work_mode_node
</pre></div>
</div>
<ul class="simple">
<li><p>示例:</p></li>
</ul>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>gemini2L.launch.py<span class="w"> </span>depth_work_mode:<span class="o">=</span><span class="s2">&quot;Unbinned Dense Default&quot;</span>
</pre></div>
</div>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>视差搜索偏移 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">视差搜索偏移</a><ul>
<li><a class="reference internal" href="#id2">功能介绍</a></li>
<li><a class="reference internal" href="#id3">参数介绍</a></li>
<li><a class="reference internal" href="#id4">运行启动文件</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">视差搜索偏移</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/configuration/disparity_search_offset.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="id1">
<h1>视差搜索偏移<a class="headerlink" href="#id1" title="Link to this heading"></a></h1>
<blockquote>
<div><p>本节介绍如何在 Gemini330 系列相机中使用 disparity_search_offset 功能(相机固件最低版本 <a class="reference external" href="https://www.orbbec.com/docs/g330-firmware-release/">1.4.60</a>)。Disparity_search_offset 仅对深度流的 1280×720、1280×800 和 640×400 分辨率有效。</p>
</div></blockquote>
<section id="id2">
<h2>功能介绍<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<p>视差搜索范围的定义:对于左图像中的任何像素 <em>(u_l, v)</em>,默认情况下,右图像中对应的视差搜索范围为 <em>[ (u_l - 255, v)</em>, <em>(u_l, v) ]</em>,其中视差搜索长度为 256,最大整数视差为 255。如果将搜索的起点调整为 <em>[ (u_l - 255 - offset, v)</em>, <em>(u_l - offset, v) ]</em>,则偏移量定义为视差偏移。因此,我们的视差搜索范围配置包括视差搜索长度和搜索位置偏移(也可称为视差偏移)。</p>
<p><img alt="深度点云可视化" src="../../../../_images/search_offset0.png" /></p>
</section>
<section id="id3">
<h2>参数介绍<a class="headerlink" href="#id3" title="Link to this heading"></a></h2>
<p>disparity_search_offset 相关参数在 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/launch/gemini_330_series.launch.py">gemini_330_series.launch.py</a> 中设置</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">disparity_range_mode</span></code>:视差搜索长度,只能设置为 64、128 和 256。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">disparity_search_offset</span></code>:视差搜索偏移值,可以设置为 0 到 127。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">disparity_offset_config</span></code>:视差搜索偏移交错帧。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">offset_index0</span></code>:帧 0 视差搜索偏移值。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">offset_index1</span></code>:帧 1 视差搜索偏移值。</p></li>
</ul>
<table border="1" class="docutils">
<thead>
<tr>
<th style="text-align: center;">视差范围模式</th>
<th style="text-align: center;">视差搜索偏移</th>
<th style="text-align: center;">倾斜墙最小深度 (mm)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">64</td>
<td style="text-align: center;">85</td>
<td style="text-align: center;">Gemini 335L 388-406</td>
</tr>
<tr>
<td style="text-align: center;">64</td>
<td style="text-align: center;">127</td>
<td style="text-align: center;">Gemini 335L 302-317</td>
</tr>
</tbody>
</table><table border="1" class="docutils">
<thead>
<tr>
<th style="text-align: center;">视差范围模式</th>
<th style="text-align: center;">视差搜索偏移</th>
<th style="text-align: center;">倾斜墙最小深度 (mm)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">128</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">Gemini 335 233-249<br />Gemini 335L 453-475</td>
</tr>
<tr>
<td style="text-align: center;">128</td>
<td style="text-align: center;">45</td>
<td style="text-align: center;">Gemini 335 172-184<br />Gemini 335L 334-349</td>
</tr>
<tr>
<td style="text-align: center;">128</td>
<td style="text-align: center;">127</td>
<td style="text-align: center;">Gemini 335 117-125<br />Gemini 335L 226-236</td>
</tr>
</tbody>
</table><table border="1" class="docutils">
<thead>
<tr>
<th style="text-align: center;">视差范围模式</th>
<th style="text-align: center;">视差搜索偏移</th>
<th style="text-align: center;">倾斜墙最小深度 (mm)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">256</td>
<td style="text-align: center;">85</td>
<td style="text-align: center;">Gemini 335L 169-178</td>
</tr>
<tr>
<td style="text-align: center;">256</td>
<td style="text-align: center;">127</td>
<td style="text-align: center;">Gemini 335L 151-158</td>
</tr>
</tbody>
</table></section>
<section id="id4">
<h2>运行启动文件<a class="headerlink" href="#id4" title="Link to this heading"></a></h2>
<p>设置 disparity_search_offset 参数,重新 <code class="docutils literal notranslate"><span class="pre">colcon</span> <span class="pre">build</span></code> 并运行启动文件</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>gemini_330_series.launch.py
</pre></div>
</div>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,166 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>在 Gemini330 系列相机中使用 interleave_ae &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">在 Gemini330 系列相机中使用 interleave_ae</a><ul>
<li><a class="reference internal" href="#id1">参数介绍</a></li>
<li><a class="reference internal" href="#id2">运行启动文件</a></li>
<li><a class="reference internal" href="#multi-camera-synced-interleave-ae">Multi_camera_synced + Interleave_ae</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">在 Gemini330 系列相机中使用 interleave_ae</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/configuration/interleave_ae_mode.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="gemini330-interleave-ae">
<h1>在 Gemini330 系列相机中使用 interleave_ae<a class="headerlink" href="#gemini330-interleave-ae" title="Link to this heading"></a></h1>
<blockquote>
<div><p>本节介绍如何在 Gemini 330 系列相机中使用 interleave_ae(相机固件最低版本 <a class="reference external" href="https://www.orbbec.com/docs/g330-firmware-release/">1.4.00</a>)</p>
</div></blockquote>
<section id="id1">
<h2>参数介绍<a class="headerlink" href="#id1" title="Link to this heading"></a></h2>
<p>interleave_ae 相关参数在 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/launch/gemini_330_series.launch.py">gemini_330_series.launch.py</a> 中设置</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">interleave_ae_mode</span></code>:设置激光或 hdr 交错。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">interleave_frame_enable</span></code>:启用交错帧模式。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">interleave_skip_enable</span></code>:启用跳帧模式。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">interleave_skip_index</span></code>:设置为 0 跳过图案 ir,设置为 1 跳过泛光 ir。</p></li>
</ul>
<p><strong>interleave hdr</strong></p>
<p>当 <code class="docutils literal notranslate"><span class="pre">interleave_ae_mode</span></code> 参数设置为 <code class="docutils literal notranslate"><span class="pre">hdr</span></code> 且 <code class="docutils literal notranslate"><span class="pre">interleave_frame_enable</span></code> 设置为 <code class="docutils literal notranslate"><span class="pre">true</span></code> 时,将启用 interleave hdr</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">hdr_index1_laser_control</span></code>:帧 1 激光开关设置。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">hdr_index1_depth_exposure</span></code>:帧 1 深度曝光值设置,非 AE 模式。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">hdr_index1_depth_gain</span></code>:帧 1 深度增益值设置,非 AE 模式。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">hdr_index1_ir_brightness</span></code>:帧 1 ir 增益值设置。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">hdr_index1_ir_ae_max_exposure</span></code>:AE(自动曝光)中帧 1 ir 最大曝光值设置。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">hdr_index0_laser_control</span></code>:帧 0 激光开关设置。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">hdr_index0_depth_exposure</span></code>:帧 0 深度曝光值设置,非 AE 模式。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">hdr_index0_depth_gain</span></code>:帧 0 深度增益值设置,非 AE 模式。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">hdr_index0_ir_brightness</span></code>:帧 0 ir 增益值设置。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">hdr_index0_ir_ae_max_exposure</span></code>:AE(自动曝光)中帧 0 ir 最大曝光值设置。</p></li>
</ul>
<p><strong>interleave laser</strong></p>
<p>当 <code class="docutils literal notranslate"><span class="pre">interleave_ae_mode</span></code> 参数设置为 <code class="docutils literal notranslate"><span class="pre">laser</span></code> 且 <code class="docutils literal notranslate"><span class="pre">interleave_frame_enable</span></code> 设置为 <code class="docutils literal notranslate"><span class="pre">true</span></code> 时,将启用 interleave laser</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">laser_index1_laser_control</span></code>:帧 1 激光开关设置。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">laser_index1_depth_exposure</span></code>:帧 1 深度曝光值设置,非 AE 模式。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">laser_index1_depth_gain</span></code>:帧 1 深度增益值设置,非 AE 模式。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">laser_index1_ir_brightness</span></code>:帧 1 ir 增益值设置。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">laser_index1_ir_ae_max_exposure</span></code>:AE(自动曝光)中帧 1 ir 最大曝光值设置。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">laser_index0_laser_control</span></code>:帧 0 激光开关设置。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">laser_index0_depth_exposure</span></code>:帧 0 深度曝光值设置,非 AE 模式。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">laser_index0_depth_gain</span></code>:帧 0 深度增益值设置,非 AE 模式。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">laser_index0_ir_brightness</span></code>:帧 0 ir 增益值设置。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">laser_index0_ir_ae_max_exposure</span></code>:AE(自动曝光)中帧 0 ir 最大曝光值设置。</p></li>
</ul>
</section>
<section id="id2">
<h2>运行启动文件<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<p>设置 interleave_ae 参数,重新 <code class="docutils literal notranslate"><span class="pre">colcon</span> <span class="pre">build</span></code> 并运行启动文件</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>gemini_330_series.launch.py
</pre></div>
</div>
<p><strong>示例可视化</strong></p>
<p><img alt="深度点云可视化" src="../../../../_images/interleave_ae0.jpeg" /></p>
<p><img alt="深度点云可视化" src="../../../../_images/interleave_ae1.jpeg" /></p>
</section>
<section id="multi-camera-synced-interleave-ae">
<h2>Multi_camera_synced + Interleave_ae<a class="headerlink" href="#multi-camera-synced-interleave-ae" title="Link to this heading"></a></h2>
<p>请参考 <a class="reference external" href="./multi_camera_synced">multi_camera_synced</a> 和 <a class="reference external" href="#%E5%8F%82%E6%95%B0%E4%BB%8B%E7%BB%8D">参数介绍</a></p>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>网络相机 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">网络相机</a><ul>
<li><a class="reference internal" href="#femto-mega-gemini-435le-gemini-335le">Femto Mega &amp; Gemini 435Le &amp; Gemini 335Le</a></li>
<li><a class="reference internal" href="#set-device-ip">set_device_ip 工具</a></li>
<li><a class="reference internal" href="#ip">强制 IP 功能</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">网络相机</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/configuration/net_camera.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="id1">
<h1>网络相机<a class="headerlink" href="#id1" title="Link to this heading"></a></h1>
<blockquote>
<div><p>本节介绍如何在 OrbbecSDK_ROS2 中使用网络相机。目前仅支持 Femto_Mega、Gemini 335Le 和 Gemini 435Le 设备,其他网络设备将在不久的将来得到支持。</p>
</div></blockquote>
<p>您可以在 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples">example</a> 中找到示例使用代码。</p>
<section id="femto-mega-gemini-435le-gemini-335le">
<h2>Femto Mega &amp; Gemini 435Le &amp; Gemini 335Le<a class="headerlink" href="#femto-mega-gemini-435le-gemini-335le" title="Link to this heading"></a></h2>
<p><strong>参数介绍</strong></p>
<p>网络设备设置:<code class="docutils literal notranslate"><span class="pre">enumerate_net_device</span></code> 设置为 true,将自动枚举网络设备。</p>
<p>如果您不想自动枚举网络设备,可以将 <code class="docutils literal notranslate"><span class="pre">enumerate_net_device</span></code> 设置为 false,将 <code class="docutils literal notranslate"><span class="pre">net_device_ip</span></code> 设置为设备的 IP 地址,并将 <code class="docutils literal notranslate"><span class="pre">net_device_port</span></code> 设置为默认值 8090。</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">enumerate_net_device</span></code>:启用自动枚举网络设备。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">net_device_ip</span></code>:设置网络设备的 IP 地址。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">net_device_port</span></code>:设置网络设备的端口。通常可以设置为 8090。</p></li>
</ul>
<p><strong>单个网络相机</strong></p>
<blockquote>
<div><p>如果您需要运行 Gemini 435Le/Gemini 335Le,只需在运行命令中将 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/launch/femto_mega.launch.py">femto_mega.launch.py</a> 替换为 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/launch/gemini435_le.launch.py">gemini435_le.launch.py</a>/<a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/launch/gemini_330_series.launch.py">gemini_330_series.launch.py</a></p>
</div></blockquote>
<p>以 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/launch/femto_mega.launch.py">femto_mega.launch.py</a> 为例:</p>
<ul class="simple">
<li><p><strong>自动枚举网络设备:</strong></p></li>
</ul>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>femto_mega.launch.py<span class="w"> </span>enumerate_net_device:<span class="o">=</span><span class="nb">true</span>
</pre></div>
</div>
<ul class="simple">
<li><p><strong>指定 IP 地址启动设备:</strong></p></li>
</ul>
<p>注意:<code class="docutils literal notranslate"><span class="pre">net_device_ip</span></code> 需要更改为设备的 IP 地址,这里是 192.168.1.10</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>femto_mega.launch.py<span class="w"> </span>enumerate_net_device:<span class="o">=</span><span class="nb">false</span><span class="w"> </span>net_device_ip:<span class="o">=</span><span class="m">192</span>.168.1.10<span class="w"> </span>net_device_port:<span class="o">=</span><span class="m">8090</span>
</pre></div>
</div>
<p><strong>多个网络相机</strong></p>
<p>以 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/net_camera/multi_net_camera.launch.py">multi_net_camera.launch.py</a> 为例:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>multi_net_camera.launch.py
</pre></div>
</div>
</section>
<section id="set-device-ip">
<h2>set_device_ip 工具<a class="headerlink" href="#set-device-ip" title="Link to this heading"></a></h2>
<p><strong><code class="docutils literal notranslate"><span class="pre">set_device_ip</span></code></strong> 可执行文件允许您直接从 ROS 2 配置网络相机的 IP 设置,包括在 DHCP 和静态 IP 之间切换,以及设置子网掩码和网关。这对于快速分配或更新 IP 地址而无需修改启动文件非常有用。</p>
<blockquote>
<div><p><strong>注意:<strong>使用 <code class="docutils literal notranslate"><span class="pre">set_device_ip</span></code> 应用的 IP 设置是</strong>永久性的</strong>,如果设备断电或重启,<strong>不会重置</strong>。</p>
</div></blockquote>
<p><strong>示例用法</strong></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>run<span class="w"> </span>orbbec_camera<span class="w"> </span>set_device_ip<span class="w"> </span>--ros-args<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span>old_ip:<span class="o">=</span><span class="m">192</span>.168.1.10<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span>dhcp:<span class="o">=</span><span class="nb">false</span><span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span>new_ip:<span class="o">=</span><span class="m">192</span>.168.1.11<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span>mask:<span class="o">=</span><span class="m">255</span>.255.255.0<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span>gateway:<span class="o">=</span><span class="m">192</span>.168.1.1
</pre></div>
</div>
<p><strong>参数</strong></p>
<ul class="simple">
<li><p><strong><code class="docutils literal notranslate"><span class="pre">old_ip</span></code></strong> – 设备的当前 IP 地址。</p></li>
<li><p><strong><code class="docutils literal notranslate"><span class="pre">dhcp</span></code></strong> – 设置为 <code class="docutils literal notranslate"><span class="pre">true</span></code> 使用 DHCP 或 <code class="docutils literal notranslate"><span class="pre">false</span></code> 使用静态 IP。</p></li>
<li><p><strong><code class="docutils literal notranslate"><span class="pre">new_ip</span></code></strong> – 禁用 DHCP 时要分配的静态 IP 地址。</p></li>
<li><p><strong><code class="docutils literal notranslate"><span class="pre">mask</span></code></strong> – 新 IP 的子网掩码。</p></li>
<li><p><strong><code class="docutils literal notranslate"><span class="pre">gateway</span></code></strong> – 新 IP 的网关地址。</p></li>
</ul>
</section>
<section id="ip">
<h2>强制 IP 功能<a class="headerlink" href="#ip" title="Link to this heading"></a></h2>
<p><strong>强制 IP</strong> 功能允许您为网络相机分配<strong>静态 IP 地址</strong>,覆盖 DHCP 设置。当连接多个网络相机时,这非常有用,您需要每个设备具有固定的 IP 以实现可靠的通信。</p>
<blockquote>
<div><p><strong>注意:<strong>如果设备断电或重启,强制 IP 配置</strong>将被重置</strong>。您需要在重启后重新应用设置。</p>
</div></blockquote>
<p><strong>参数</strong></p>
<ul class="simple">
<li><p><strong><code class="docutils literal notranslate"><span class="pre">force_ip_enable</span></code></strong> – 启用强制 IP 功能。<strong>默认值:</strong> <code class="docutils literal notranslate"><span class="pre">false</span></code></p></li>
<li><p><strong><code class="docutils literal notranslate"><span class="pre">force_ip_mac</span></code></strong> – 连接多个相机时的目标设备 MAC 地址(例如 <code class="docutils literal notranslate"><span class="pre">&quot;54:14:FD:06:07:DA&quot;</span></code>)。您可以使用 <code class="docutils literal notranslate"><span class="pre">list_devices_node</span></code> 查找每个设备的 MAC。<strong>默认值:</strong> <code class="docutils literal notranslate"><span class="pre">&quot;&quot;</span></code></p></li>
<li><p><strong><code class="docutils literal notranslate"><span class="pre">force_ip_address</span></code></strong> – 要分配的静态 IP 地址。<strong>默认值:</strong> <code class="docutils literal notranslate"><span class="pre">192.168.1.10</span></code></p></li>
<li><p><strong><code class="docutils literal notranslate"><span class="pre">force_ip_subnet_mask</span></code></strong> – 静态 IP 的子网掩码。<strong>默认值:</strong> <code class="docutils literal notranslate"><span class="pre">255.255.255.0</span></code></p></li>
<li><p><strong><code class="docutils literal notranslate"><span class="pre">force_ip_gateway</span></code></strong> – 静态 IP 的网关地址。<strong>默认值:</strong> <code class="docutils literal notranslate"><span class="pre">192.168.1.1</span></code></p></li>
</ul>
<p><strong>示例用法</strong></p>
<ul class="simple">
<li><p><strong>为特定设备启用强制 IP:</strong></p></li>
</ul>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>gemini_330_series.launch.py<span class="w"> </span><span class="se">\</span>
force_ip_enable:<span class="o">=</span><span class="nb">true</span><span class="w"> </span><span class="se">\</span>
force_ip_mac:<span class="o">=</span><span class="m">54</span>:14:FD:06:07:DA<span class="w"> </span><span class="se">\</span>
force_ip_address:<span class="o">=</span><span class="m">192</span>.168.1.50<span class="w"> </span><span class="se">\</span>
force_ip_subnet_mask:<span class="o">=</span><span class="m">255</span>.255.255.0<span class="w"> </span><span class="se">\</span>
force_ip_gateway:<span class="o">=</span><span class="m">192</span>.168.1.1<span class="w"> </span><span class="se">\</span>
net_device_ip:<span class="o">=</span><span class="m">192</span>.168.1.50<span class="w"> </span><span class="se">\</span>
net_device_port:<span class="o">=</span><span class="m">8090</span>
</pre></div>
</div>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,147 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>预定义预设 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">预定义预设</a></li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">预定义预设</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/configuration/predefined_presets.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="id1">
<h1>预定义预设<a class="headerlink" href="#id1" title="Link to this heading"></a></h1>
<table border="1" class="docutils">
<thead>
<tr>
<th>预设</th>
<th>特点</th>
<th>推荐使用场景</th>
</tr>
</thead>
<tbody>
<tr>
<td>Default</td>
<td>- 最佳视觉感知<br>- 在精度、填充率、微小物体等方面的整体性能良好</td>
<td>- 通用场景<br>- 机器人应用</td>
</tr>
<tr>
<td>Hand</td>
<td>- 清晰的手部和手指边缘</td>
<td>- 手势识别</td>
</tr>
<tr>
<td>High Accuracy</td>
<td>- 高置信度深度<br>- 几乎无噪声深度值<br>- 填充率较低</td>
<td>- 避障<br>- 物体扫描</td>
</tr>
<tr>
<td>High Density</td>
<td>- 更高填充率<br>- 更多微小物体<br>- 可能存在噪声深度值</td>
<td>- 物体识别<br>- 抓取和放置<br>- 前景和背景动画</td>
</tr>
<tr>
<td>Medium Density</td>
<td>- 填充率和精度的平衡性能<br>- 与 Default 相比:填充率较低,边缘质量更好</td>
<td>- 通用场景和 Default 的替代方案</td>
</tr>
<tr>
<td>Custom</td>
<td>- 用户自定义预设<br>- 从上述预设派生,具有自定义修改,例如后处理管道的新配置、深度 AE 功能的修改平均强度设定点等</td>
<td>- 通过使用自定义配置可获得比预定义预设更好的深度性能<br>- 适用于已建立的自定义配置</td>
</tr>
</tbody>
</table><p>根据您的具体使用场景选择合适的预设名称,并将其设置为 <code class="docutils literal notranslate"><span class="pre">device_preset</span></code> 参数的值。</p>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,173 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GMSL 相机 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">GMSL 相机</a><ul>
<li><a class="reference internal" href="#id1">单个 GMSL 相机</a></li>
<li><a class="reference internal" href="#id2">多个 GMSL 相机</a></li>
<li><a class="reference internal" href="#id3">多个 GMSL 相机同步</a></li>
<li><a class="reference internal" href="#id4">GMSL 相机的使用限制</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">GMSL 相机</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/multi_camera/gmsl_camera.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="gmsl">
<h1>GMSL 相机<a class="headerlink" href="#gmsl" title="Link to this heading"></a></h1>
<blockquote>
<div><p>本节介绍如何在 OrbbecSDK_ROS2 中使用 GMSL 相机。目前仅支持 Gemini 335Lg 和 Gemini 345Lg 设备,其他 GMSL 设备将在不久的将来得到支持。</p>
</div></blockquote>
<p>您可以在 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples">example</a> 中找到示例使用代码。</p>
<section id="id1">
<h2>单个 GMSL 相机<a class="headerlink" href="#id1" title="Link to this heading"></a></h2>
<p>GMSL 相机在 OrbbecSDK_ROS2 中的使用与通过 USB 的 Gemini 330 系列相机相同。</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>gemini_330_gmsl.launch.py
</pre></div>
</div>
</section>
<section id="id2">
<h2>多个 GMSL 相机<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<p>要获取 GMSL 相机的 <code class="docutils literal notranslate"><span class="pre">usb_port</span></code>,插入相机并在终端中运行以下命令:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>run<span class="w"> </span>orbbec_camera<span class="w"> </span>list_devices_node
</pre></div>
</div>
<p>例如,获得的 gmsl 相机 <code class="docutils literal notranslate"><span class="pre">usb_port</span></code>:<code class="docutils literal notranslate"><span class="pre">gmsl2-1</span></code></p>
<p>转到 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/gmsl_camera/multi_gmsl_camera.launch.py">multi_gmsl_camera.launch.py</a> 文件并更改 <code class="docutils literal notranslate"><span class="pre">usb_port</span></code>。</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>multi_gmsl_camera.launch.py
</pre></div>
</div>
<blockquote>
<div><p>注意:默认情况下,multi_gmsl_camera.launch.py 仅启动 color 和 depth。如果您想启动其他传感器,请转到 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/config/camera_secondary_params.yaml">camera_secondary_params.yaml</a> 进行修改。</p>
</div></blockquote>
</section>
<section id="id3">
<h2>多个 GMSL 相机同步<a class="headerlink" href="#id3" title="Link to this heading"></a></h2>
<p>首先,请查看如何使用 <a class="reference internal" href="multi_camera_synced.html"><span class="doc">multi_camera_synced</span></a>。</p>
<p>此外,GMSL 多相机同步不需要 Multi-Camera Sync Hub Pro,因此无需设置 <code class="docutils literal notranslate"><span class="pre">primary</span></code> 模式。每个 GMSL 相机都是 <code class="docutils literal notranslate"><span class="pre">secondary</span></code>。</p>
<p><strong>额外的参数设置</strong></p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">gmsl_trigger_fps</span></code>:设置硬件 soc 触发源帧率。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">enable_gmsl_trigger</span></code>:启用硬件 soc 触发。</p></li>
</ul>
<p><strong>运行启动文件</strong></p>
<p>请参考 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/gmsl_camera/multi_gmsl_camera_synced.launch.py">multi_gmsl_camera_synced.launch.py</a> 中的配置。</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>multi_gmsl_camera_synced.launch.py
</pre></div>
</div>
<blockquote>
<div><p>注意:默认情况下,multi_gmsl_camera_synced.launch.py 仅启动 color 和 depth。如果您想启动其他传感器,请转到 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/config/camera_secondary_params.yaml">camera_secondary_params.yaml</a> 进行修改。</p>
</div></blockquote>
</section>
<section id="id4">
<h2>GMSL 相机的使用限制<a class="headerlink" href="#id4" title="Link to this heading"></a></h2>
<p>GMSL 相机与各种反序列化器芯片(如 MAX9296 和 MAX92716)接口。Orbbec GMSL 相机支持多个流,包括深度、彩色、IR 和 IMU 数据,但存在某些使用限制:</p>
<ul class="simple">
<li><p>GMSL 仅支持 V4L2 和 YUYV 格式;不支持 MJPG 格式。RGB 输出源自 YUYV 格式转换。</p></li>
<li><p>Gemini-335Lg 的元数据通过单独的节点提供,而其他型号的元数据嵌入在视频帧中,这对用户保持透明。</p></li>
<li><p>当使用 Max96712 作为反序列化器芯片时,由于 Max96712 芯片的特性,在 secondary_synced 模式下必须提供多机同步触发信号。否则,在切换数据流时会发生数据流中断。</p></li>
<li><p>连接在同一个 MAX9296、MAX96712 LinkA/B 或 MAX96712 LinkC/D 上的两个相机有以下限制:</p>
<ul>
<li><p>在驱动程序版本 v1.2.02 之前,存在一个限制,即一个相机的 RGB 和另一个相机的右 IR 不能同时流式传输。在驱动程序版本 v1.2.02 之后,限制修改为一个相机的 RGB 和另一个相机的左 IR 不能同时流式传输。</p></li>
<li><p>在驱动程序版本 v1.2.02 之前,存在一个限制,即一个相机的 DEPTH 和另一个相机的左 IR 不能同时流式传输。在驱动程序版本 v1.2.02 之后,限制修改为一个相机的 DEPTH 和另一个相机的右 IR 不能同时流式传输。</p></li>
<li><p>两个相机的活动流的组合最大数量限制为四个(满足上述两个条件即可确保合规)。</p></li>
</ul>
</li>
</ul>
<p>有关更多已知限制,请参考 <a class="reference external" href="https://github.com/orbbec/MIPI_Camera_Platform_Driver/blob/main/doc/Instructions%20for%20Using%20GMSL%20Camera.md">Orbbec GMSL 相机的使用限制</a></p>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,200 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>多相机 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">多相机</a><ul>
<li><a class="reference internal" href="#id2">多相机无数据流</a></li>
<li><a class="reference internal" href="#id3">多相机图像话题帧率过低</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">多相机</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/multi_camera/multi_camera.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="id1">
<h1>多相机<a class="headerlink" href="#id1" title="Link to this heading"></a></h1>
<ul class="simple">
<li><p>要获取相机的 <code class="docutils literal notranslate"><span class="pre">usb_port</span></code>,插入相机并在终端中运行以下命令:</p></li>
</ul>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>run<span class="w"> </span>orbbec_camera<span class="w"> </span>list_devices_node
</pre></div>
</div>
<ul class="simple">
<li><p>将 <code class="docutils literal notranslate"><span class="pre">device_num</span></code> 参数设置为您拥有的相机数量。</p></li>
<li><p>转到 <code class="docutils literal notranslate"><span class="pre">OrbbecSDK_ROS2/launch/multi_xxx.launch.py</span></code> 文件并更改 <code class="docutils literal notranslate"><span class="pre">usb_port</span></code>。</p></li>
<li><p>不要忘记将 <code class="docutils literal notranslate"><span class="pre">include</span></code> 标签放在 <code class="docutils literal notranslate"><span class="pre">group</span></code> 标签内。
否则,不同相机的参数值可能会被污染。</p></li>
</ul>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">launch</span><span class="w"> </span><span class="kn">import</span> <span class="n">LaunchDescription</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">launch.actions</span><span class="w"> </span><span class="kn">import</span> <span class="n">DeclareLaunchArgument</span><span class="p">,</span> <span class="n">IncludeLaunchDescription</span><span class="p">,</span> <span class="n">GroupAction</span><span class="p">,</span> <span class="n">ExecuteProcess</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">launch.launch_description_sources</span><span class="w"> </span><span class="kn">import</span> <span class="n">PythonLaunchDescriptionSource</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">launch_ros.actions</span><span class="w"> </span><span class="kn">import</span> <span class="n">Node</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">ament_index_python.packages</span><span class="w"> </span><span class="kn">import</span> <span class="n">get_package_share_directory</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">os</span>
<span class="k">def</span><span class="w"> </span><span class="nf">generate_launch_description</span><span class="p">():</span>
<span class="c1"># Include launch files</span>
<span class="n">package_dir</span> <span class="o">=</span> <span class="n">get_package_share_directory</span><span class="p">(</span><span class="s1">&#39;orbbec_camera&#39;</span><span class="p">)</span>
<span class="n">launch_file_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">package_dir</span><span class="p">,</span> <span class="s1">&#39;launch&#39;</span><span class="p">)</span>
<span class="n">launch1_include</span> <span class="o">=</span> <span class="n">IncludeLaunchDescription</span><span class="p">(</span>
<span class="n">PythonLaunchDescriptionSource</span><span class="p">(</span>
<span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">launch_file_dir</span><span class="p">,</span> <span class="s1">&#39;gemini2L.launch.py&#39;</span><span class="p">)</span>
<span class="p">),</span>
<span class="n">launch_arguments</span><span class="o">=</span><span class="p">{</span>
<span class="s1">&#39;camera_name&#39;</span><span class="p">:</span> <span class="s1">&#39;camera_01&#39;</span><span class="p">,</span>
<span class="s1">&#39;usb_port&#39;</span><span class="p">:</span> <span class="s1">&#39;6-2.4.4.2&#39;</span><span class="p">,</span> <span class="c1"># replace your usb port here</span>
<span class="s1">&#39;device_num&#39;</span><span class="p">:</span> <span class="s1">&#39;2&#39;</span>
<span class="p">}</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
<span class="p">)</span>
<span class="n">launch2_include</span> <span class="o">=</span> <span class="n">IncludeLaunchDescription</span><span class="p">(</span>
<span class="n">PythonLaunchDescriptionSource</span><span class="p">(</span>
<span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">launch_file_dir</span><span class="p">,</span> <span class="s1">&#39;gemini2L.launch.py&#39;</span><span class="p">)</span>
<span class="p">),</span>
<span class="n">launch_arguments</span><span class="o">=</span><span class="p">{</span>
<span class="s1">&#39;camera_name&#39;</span><span class="p">:</span> <span class="s1">&#39;camera_02&#39;</span><span class="p">,</span>
<span class="s1">&#39;usb_port&#39;</span><span class="p">:</span> <span class="s1">&#39;6-2.4.1&#39;</span><span class="p">,</span> <span class="c1"># replace your usb port here</span>
<span class="s1">&#39;device_num&#39;</span><span class="p">:</span> <span class="s1">&#39;2&#39;</span>
<span class="p">}</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
<span class="p">)</span>
<span class="c1"># If you need more cameras, just add more launch_include here, and change the usb_port and device_num</span>
<span class="c1"># Launch description</span>
<span class="n">ld</span> <span class="o">=</span> <span class="n">LaunchDescription</span><span class="p">([</span>
<span class="n">GroupAction</span><span class="p">([</span><span class="n">launch1_include</span><span class="p">]),</span>
<span class="n">GroupAction</span><span class="p">([</span><span class="n">launch2_include</span><span class="p">]),</span>
<span class="p">])</span>
<span class="k">return</span> <span class="n">ld</span>
</pre></div>
</div>
<ul class="simple">
<li><p>要启动相机,运行以下命令:</p></li>
</ul>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>multi_camera.launch.py
</pre></div>
</div>
<section id="id2">
<h2>多相机无数据流<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<p><strong>电源供应不足</strong>:</p>
<ul class="simple">
<li><p>确保每个相机连接到单独的集线器。</p></li>
<li><p>使用带电源的集线器为每个相机提供足够的电力。</p></li>
</ul>
<p><strong>高分辨率</strong>:</p>
<ul class="simple">
<li><p>尝试降低分辨率以解决数据流问题。</p></li>
</ul>
<p><strong>增加 usbfs_memory_mb 值</strong>:</p>
<ul class="simple">
<li><p>将 <code class="docutils literal notranslate"><span class="pre">usbfs_memory_mb</span></code> 值增加到 128MB(这是一个参考值,可以根据系统需求进行调整)
通过运行以下命令:</p></li>
</ul>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">128</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>sudo<span class="w"> </span>tee<span class="w"> </span>/sys/module/usbcore/parameters/usbfs_memory_mb
</pre></div>
</div>
<ul class="simple">
<li><p>要使此更改永久生效,请查看<a class="reference external" href="https://github.com/OpenKinect/libfreenect2/issues/807">此链接</a>。</p></li>
</ul>
</section>
<section id="id3">
<h2>多相机图像话题帧率过低<a class="headerlink" href="#id3" title="Link to this heading"></a></h2>
<p>请参考 <a class="reference internal" href="../performance/fastdds_tuning.html"><span class="doc">Fast DDS 配置</span></a> 文件。</p>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,190 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>多相机同步说明 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">多相机同步说明</a><ul>
<li><a class="reference internal" href="#id2">设置说明</a></li>
<li><a class="reference internal" href="#orbbecsdk-ros2">使用 OrbbecSDK_ROS2 检查相机端口</a></li>
<li><a class="reference internal" href="#id3">OrbbecSDK_ROS2 多相机同步配置</a></li>
<li><a class="reference internal" href="#id4">运行以下命令启动多相机同步</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">多相机同步说明</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/multi_camera/multi_camera_synced.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="id1">
<h1>多相机同步说明<a class="headerlink" href="#id1" title="Link to this heading"></a></h1>
<blockquote>
<div><p>本文档的目的是说明如何在 OrbbecSDK_ROS2 中使用多相机同步</p>
</div></blockquote>
<section id="id2">
<h2>设置说明<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p>请阅读多相机同步设置指南:<a class="reference external" href="https://www.orbbec.com/docs/set-up-cameras-for-external-synchronization_v1-2/">多相机同步设置</a></p></li>
<li><p>确保相机正确连接到多相机同步器。</p></li>
</ul>
<p><img alt="深度点云可视化" src="../../../../_images/multi_camera_synced1.png" /></p>
</section>
<section id="orbbecsdk-ros2">
<h2>使用 OrbbecSDK_ROS2 检查相机端口<a class="headerlink" href="#orbbecsdk-ros2" title="Link to this heading"></a></h2>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>run<span class="w"> </span>orbbec_camera<span class="w"> </span>list_devices_node
</pre></div>
</div>
</section>
<section id="id3">
<h2>OrbbecSDK_ROS2 多相机同步配置<a class="headerlink" href="#id3" title="Link to this heading"></a></h2>
<p>打开 multi_camera_synced.launch.py,并按照下面所示配置相机设置:</p>
<p><img alt="深度点云可视化" src="../../../../_images/multi_camera_synced2.png" /></p>
<ol class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">gemini_330_series.launch.py</span></code> 是用于启动相机的启动文件。</p></li>
<li><p>将 <code class="docutils literal notranslate"><span class="pre">camera_name</span></code> 设置为 <code class="docutils literal notranslate"><span class="pre">G330_0</span></code>。例如,发布的彩色图像话题将是 <code class="docutils literal notranslate"><span class="pre">/G330_0/color/image_raw</span></code>。</p></li>
<li><p>将 <code class="docutils literal notranslate"><span class="pre">usb_port</span></code> 设置为 <code class="docutils literal notranslate"><span class="pre">2-2</span></code>,表示正在使用端口 <code class="docutils literal notranslate"><span class="pre">2-2</span></code> 上的相机设备。此值可以在 <code class="docutils literal notranslate"><span class="pre">ros2</span> <span class="pre">run</span> <span class="pre">orbbec_camera</span> <span class="pre">list_devices_node</span></code> 命令的输出中找到。</p></li>
<li><p>将 <code class="docutils literal notranslate"><span class="pre">device_num</span></code> 设置为 <code class="docutils literal notranslate"><span class="pre">2</span></code>,表示将使用两个相机。</p></li>
<li><p>将 <code class="docutils literal notranslate"><span class="pre">sync_mode</span></code> 设置为 <code class="docutils literal notranslate"><span class="pre">primary</span></code>,表示 <code class="docutils literal notranslate"><span class="pre">2-7</span></code> 相机设备处于主模式。多相机同步模式选项可以在下图中找到。</p></li>
<li><p>来自 <code class="docutils literal notranslate"><span class="pre">config_file_path</span></code> 的参数可以覆盖在 <code class="docutils literal notranslate"><span class="pre">gemini_330_series.launch.py</span></code> 中设置的参数(可选)。</p></li>
<li><p>对于从属相机,将 <code class="docutils literal notranslate"><span class="pre">trigger_out_enabled</span></code> 设置为 false。</p></li>
</ol>
<table border="1" class="docutils">
<thead>
<tr>
<th><strong>模式名称</strong></th>
<th><strong>设置效果说明</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>free_run</td>
<td>- 支持不同的帧率设置<br />- 8 针同步接口不支持外部输出同步相关信号</td>
</tr>
<tr>
<td>standalone(默认)</td>
<td>● 默认与 Primary 相同<br />● 内置 RGBD 帧同步<br />● 8 针同步接口默认不向外部输出信号</td>
</tr>
<tr>
<td>primary</td>
<td>● 设置为主相机<br />● 8 针同步接口向外部设备输出信号</td>
</tr>
<tr>
<td>secondary</td>
<td>● 设置为从属(被动同步;当外部有硬件连续触发信号输入且连续触发信号与当前设置的帧率匹配时,根据外部触发信号采集图像;当没有外部触发信号时,停止流)<br />● 8 针同步接口向外部设备输出信号</td>
</tr>
<tr>
<td>secondary_synced</td>
<td>● 设置为从属同步(被动同步;当外部有硬件连续触发信号输入且连续触发信号与当前设置的帧率匹配时,根据外部触发信号采集图像;当没有外部触发信号时,根据设置的帧率的内部触发信号采集图像)<br />● 8 针同步接口向外部设备输出信号</td>
</tr>
<tr>
<td>hardware_triggering</td>
<td>● 设置为硬件触发(被动触发;当外部有硬件触发信号输入且触发信号时间间隔不小于当前上限时,根据外部触发信号采集图像;当没有外部触发信号时,不采集图像)<br />● 8 针同步接口向外部设备输出信号</td>
</tr>
<tr>
<td>software_triggering</td>
<td>● 设置为软件触发(被动触发;当主机有触发命令输入且触发命令时间间隔不小于当前上限时,根据触发命令采集图像;当没有触发命令时,不采集图像)<br />● 8 针同步接口向外部设备输出信号</td>
</tr>
</tbody>
</table><ul class="simple">
<li><p>主相机应该最后启动。</p></li>
<li><p>理想情况下,启动每个相机之间应该有 2 秒的延迟。</p></li>
</ul>
</section>
<section id="id4">
<h2>运行以下命令启动多相机同步<a class="headerlink" href="#id4" title="Link to this heading"></a></h2>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>multi_camera_synced.launch.py
</pre></div>
</div>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,272 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>多相机同步验证节点 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">多相机同步验证节点</a><ul>
<li><a class="reference internal" href="#id2">使用教程</a><ul>
<li><a class="reference internal" href="#multi-camera-synced-launch-py"><strong>在 <code class="docutils literal notranslate"><span class="pre">multi_camera_synced.launch.py</span></code> 的基础上做以下修改</strong></a></li>
<li><a class="reference internal" href="#id3"><strong>参数文件修改</strong></a></li>
<li><a class="reference internal" href="#id4"><strong>启动与验证</strong></a></li>
<li><a class="reference internal" href="#launch"><strong>参考 launch 文件</strong></a></li>
</ul>
</li>
<li><a class="reference internal" href="#id5">必要系统配置</a><ul>
<li><a class="reference internal" href="#usb"><strong>提升 USB 缓冲区容量</strong></a></li>
<li><a class="reference internal" href="#fast-dds"><strong>配置 Fast DDS</strong></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">多相机同步验证节点</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/multi_camera/multi_camera_synced_verification_tool.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="id1">
<h1>多相机同步验证节点<a class="headerlink" href="#id1" title="Link to this heading"></a></h1>
<p>文件路径:<a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/multi_camera_time_sync/image_sync_example_node.cpp">image_sync_example_node.cpp</a></p>
<p>此示例节点用于 <strong>4 台 Orbbec 相机</strong> 的同步采集与时间戳验证。
它可用于验证多相机主从同步(Primary / Secondary Synced)模式下的帧对齐精度。</p>
<hr class="docutils" />
<section id="id2">
<h2>使用教程<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<section id="multi-camera-synced-launch-py">
<h3><strong>在 <code class="docutils literal notranslate"><span class="pre">multi_camera_synced.launch.py</span></code> 的基础上做以下修改</strong><a class="headerlink" href="#multi-camera-synced-launch-py" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p>增加 <code class="docutils literal notranslate"><span class="pre">launch_include</span></code> 以适配 4 台相机</p></li>
<li><p>根据设备型号选择对应的 launch 文件,如 330 系列选择 gemini_330_series.launch.py</p></li>
<li><p>命名规范:camera_name 命名方式 camera_01、camera_02、camera_03 ...</p></li>
<li><p>设置 device_num 数量为 4</p></li>
<li><p>USB 端口配置 usb_port,使用以下命令查看并绑定正确的端口
<code class="docutils literal notranslate"><span class="pre">ros2</span> <span class="pre">run</span> <span class="pre">orbbec_camera</span> <span class="pre">list_devices_node</span></code></p></li>
<li><p>同步模式设置为主从模式,一个 primary 相机,其他设置为 secondary_synced</p></li>
<li><p>启动顺序:主相机(Primary)应最后启动,以确保同步信号建立正确。</p></li>
</ul>
</section>
<hr class="docutils" />
<section id="id3">
<h3><strong>参数文件修改</strong><a class="headerlink" href="#id3" title="Link to this heading"></a></h3>
<p>修改 <code class="docutils literal notranslate"><span class="pre">config</span></code> 目录下的以下两个配置文件:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">camera_params.yaml</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">camera_secondary_params.yaml</span></code></p></li>
</ul>
<p>确保以下内容统一:</p>
<ul class="simple">
<li><p>启用 <strong>depth</strong> 与 <strong>color</strong> 流;</p></li>
<li><p>统一各相机的 <strong>帧率(fps)</strong>。</p></li>
</ul>
</section>
<hr class="docutils" />
<section id="id4">
<h3><strong>启动与验证</strong><a class="headerlink" href="#id4" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p>启动多机同步 launch: <code class="docutils literal notranslate"><span class="pre">multi_camera_synced.launch.py</span></code></p></li>
<li><p>打开新终端运行同步验证节点: <code class="docutils literal notranslate"><span class="pre">ros2</span> <span class="pre">run</span> <span class="pre">orbbec_camera</span> <span class="pre">image_sync_example_node</span></code>
该节点会输出多相机图像的时间戳差异信息,用于验证同步效果。</p></li>
</ul>
</section>
<hr class="docutils" />
<section id="launch">
<h3><strong>参考 launch 文件</strong><a class="headerlink" href="#launch" title="Link to this heading"></a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">os</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">ament_index_python.packages</span><span class="w"> </span><span class="kn">import</span> <span class="n">get_package_share_directory</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">launch</span><span class="w"> </span><span class="kn">import</span> <span class="n">LaunchDescription</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">launch_ros.actions</span><span class="w"> </span><span class="kn">import</span> <span class="n">Node</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">launch.actions</span><span class="w"> </span><span class="kn">import</span> <span class="n">IncludeLaunchDescription</span><span class="p">,</span> <span class="n">GroupAction</span><span class="p">,</span> <span class="n">TimerAction</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">launch.launch_description_sources</span><span class="w"> </span><span class="kn">import</span> <span class="n">PythonLaunchDescriptionSource</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">launch_ros.actions</span><span class="w"> </span><span class="kn">import</span> <span class="n">Node</span><span class="p">,</span> <span class="n">LoadComposableNodes</span>
<span class="k">def</span><span class="w"> </span><span class="nf">generate_launch_description</span><span class="p">():</span>
<span class="c1"># Include launch files</span>
<span class="n">package_dir</span> <span class="o">=</span> <span class="n">get_package_share_directory</span><span class="p">(</span><span class="s2">&quot;orbbec_camera&quot;</span><span class="p">)</span>
<span class="n">launch_file_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">package_dir</span><span class="p">,</span> <span class="s2">&quot;launch&quot;</span><span class="p">)</span>
<span class="n">config_file_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">package_dir</span><span class="p">,</span> <span class="s2">&quot;config&quot;</span><span class="p">)</span>
<span class="n">config_file_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">config_file_dir</span><span class="p">,</span> <span class="s2">&quot;camera_params.yaml&quot;</span><span class="p">)</span>
<span class="n">secondary_config_file_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">config_file_dir</span><span class="p">,</span> <span class="s2">&quot;camera_secondary_params.yaml&quot;</span><span class="p">)</span>
<span class="n">launch1_include</span> <span class="o">=</span> <span class="n">IncludeLaunchDescription</span><span class="p">(</span>
<span class="n">PythonLaunchDescriptionSource</span><span class="p">(</span>
<span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">launch_file_dir</span><span class="p">,</span> <span class="s2">&quot;gemini_330_series.launch.py&quot;</span><span class="p">)</span>
<span class="p">),</span>
<span class="n">launch_arguments</span><span class="o">=</span><span class="p">{</span>
<span class="s2">&quot;camera_name&quot;</span><span class="p">:</span> <span class="s2">&quot;camera_01&quot;</span><span class="p">,</span>
<span class="s2">&quot;usb_port&quot;</span><span class="p">:</span> <span class="s2">&quot;2-2.3&quot;</span><span class="p">,</span>
<span class="s2">&quot;device_num&quot;</span><span class="p">:</span> <span class="s2">&quot;4&quot;</span><span class="p">,</span>
<span class="s2">&quot;sync_mode&quot;</span><span class="p">:</span> <span class="s2">&quot;primary&quot;</span><span class="p">,</span>
<span class="s2">&quot;config_file_path&quot;</span><span class="p">:</span> <span class="n">config_file_path</span><span class="p">,</span>
<span class="s2">&quot;trigger_out_enabled&quot;</span><span class="p">:</span> <span class="s2">&quot;true&quot;</span>
<span class="p">}</span><span class="o">.</span><span class="n">items</span><span class="p">(),</span>
<span class="p">)</span>
<span class="n">launch2_include</span> <span class="o">=</span> <span class="n">IncludeLaunchDescription</span><span class="p">(</span>
<span class="n">PythonLaunchDescriptionSource</span><span class="p">(</span>
<span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">launch_file_dir</span><span class="p">,</span> <span class="s2">&quot;gemini_330_series.launch.py&quot;</span><span class="p">)</span>
<span class="p">),</span>
<span class="n">launch_arguments</span><span class="o">=</span><span class="p">{</span>
<span class="s2">&quot;camera_name&quot;</span><span class="p">:</span> <span class="s2">&quot;camera_02&quot;</span><span class="p">,</span>
<span class="s2">&quot;usb_port&quot;</span><span class="p">:</span> <span class="s2">&quot;2-1&quot;</span><span class="p">,</span>
<span class="s2">&quot;device_num&quot;</span><span class="p">:</span> <span class="s2">&quot;4&quot;</span><span class="p">,</span>
<span class="s2">&quot;sync_mode&quot;</span><span class="p">:</span> <span class="s2">&quot;secondary_synced&quot;</span><span class="p">,</span>
<span class="s2">&quot;config_file_path&quot;</span><span class="p">:</span> <span class="n">secondary_config_file_path</span><span class="p">,</span>
<span class="s2">&quot;trigger_out_enabled&quot;</span><span class="p">:</span> <span class="s2">&quot;false&quot;</span>
<span class="p">}</span><span class="o">.</span><span class="n">items</span><span class="p">(),</span>
<span class="p">)</span>
<span class="n">launch3_include</span> <span class="o">=</span> <span class="n">IncludeLaunchDescription</span><span class="p">(</span>
<span class="n">PythonLaunchDescriptionSource</span><span class="p">(</span>
<span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">launch_file_dir</span><span class="p">,</span> <span class="s2">&quot;gemini_330_series.launch.py&quot;</span><span class="p">)</span>
<span class="p">),</span>
<span class="n">launch_arguments</span><span class="o">=</span><span class="p">{</span>
<span class="s2">&quot;camera_name&quot;</span><span class="p">:</span> <span class="s2">&quot;camera_03&quot;</span><span class="p">,</span>
<span class="s2">&quot;usb_port&quot;</span><span class="p">:</span> <span class="s2">&quot;2-3&quot;</span><span class="p">,</span>
<span class="s2">&quot;device_num&quot;</span><span class="p">:</span> <span class="s2">&quot;4&quot;</span><span class="p">,</span>
<span class="s2">&quot;sync_mode&quot;</span><span class="p">:</span> <span class="s2">&quot;secondary_synced&quot;</span><span class="p">,</span>
<span class="s2">&quot;config_file_path&quot;</span><span class="p">:</span> <span class="n">secondary_config_file_path</span><span class="p">,</span>
<span class="s2">&quot;trigger_out_enabled&quot;</span><span class="p">:</span> <span class="s2">&quot;false&quot;</span>
<span class="p">}</span><span class="o">.</span><span class="n">items</span><span class="p">(),</span>
<span class="p">)</span>
<span class="n">launch4_include</span> <span class="o">=</span> <span class="n">IncludeLaunchDescription</span><span class="p">(</span>
<span class="n">PythonLaunchDescriptionSource</span><span class="p">(</span>
<span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">launch_file_dir</span><span class="p">,</span> <span class="s2">&quot;gemini_330_series.launch.py&quot;</span><span class="p">)</span>
<span class="p">),</span>
<span class="n">launch_arguments</span><span class="o">=</span><span class="p">{</span>
<span class="s2">&quot;camera_name&quot;</span><span class="p">:</span> <span class="s2">&quot;camera_04&quot;</span><span class="p">,</span>
<span class="s2">&quot;usb_port&quot;</span><span class="p">:</span> <span class="s2">&quot;2-4&quot;</span><span class="p">,</span>
<span class="s2">&quot;device_num&quot;</span><span class="p">:</span> <span class="s2">&quot;4&quot;</span><span class="p">,</span>
<span class="s2">&quot;sync_mode&quot;</span><span class="p">:</span> <span class="s2">&quot;secondary_synced&quot;</span><span class="p">,</span>
<span class="s2">&quot;config_file_path&quot;</span><span class="p">:</span> <span class="n">secondary_config_file_path</span><span class="p">,</span>
<span class="s2">&quot;trigger_out_enabled&quot;</span><span class="p">:</span> <span class="s2">&quot;false&quot;</span>
<span class="p">}</span><span class="o">.</span><span class="n">items</span><span class="p">(),</span>
<span class="p">)</span>
<span class="c1"># Launch description</span>
<span class="n">ld</span> <span class="o">=</span> <span class="n">LaunchDescription</span><span class="p">(</span>
<span class="p">[</span>
<span class="n">TimerAction</span><span class="p">(</span><span class="n">period</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">actions</span><span class="o">=</span><span class="p">[</span><span class="n">GroupAction</span><span class="p">([</span><span class="n">launch2_include</span><span class="p">])]),</span>
<span class="n">TimerAction</span><span class="p">(</span><span class="n">period</span><span class="o">=</span><span class="mf">2.0</span><span class="p">,</span> <span class="n">actions</span><span class="o">=</span><span class="p">[</span><span class="n">GroupAction</span><span class="p">([</span><span class="n">launch3_include</span><span class="p">])]),</span>
<span class="n">TimerAction</span><span class="p">(</span><span class="n">period</span><span class="o">=</span><span class="mf">4.0</span><span class="p">,</span> <span class="n">actions</span><span class="o">=</span><span class="p">[</span><span class="n">GroupAction</span><span class="p">([</span><span class="n">launch4_include</span><span class="p">])]),</span>
<span class="n">TimerAction</span><span class="p">(</span><span class="n">period</span><span class="o">=</span><span class="mf">6.0</span><span class="p">,</span> <span class="n">actions</span><span class="o">=</span><span class="p">[</span><span class="n">GroupAction</span><span class="p">([</span><span class="n">launch1_include</span><span class="p">])]),</span>
<span class="c1"># The primary camera should be launched at last</span>
<span class="p">]</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">ld</span>
</pre></div>
</div>
</section>
</section>
<hr class="docutils" />
<section id="id5">
<h2>必要系统配置<a class="headerlink" href="#id5" title="Link to this heading"></a></h2>
<section id="usb">
<h3><strong>提升 USB 缓冲区容量</strong><a class="headerlink" href="#usb" title="Link to this heading"></a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">echo</span> <span class="mi">512</span> <span class="o">|</span> <span class="n">sudo</span> <span class="n">tee</span> <span class="o">/</span><span class="n">sys</span><span class="o">/</span><span class="n">module</span><span class="o">/</span><span class="n">usbcore</span><span class="o">/</span><span class="n">parameters</span><span class="o">/</span><span class="n">usbfs_memory_mb</span>
</pre></div>
</div>
</section>
<section id="fast-dds">
<h3><strong>配置 Fast DDS</strong><a class="headerlink" href="#fast-dds" title="Link to this heading"></a></h3>
<p>优化 ROS2 节点间通信延迟,可以有效减少图像传输延迟,<a class="reference internal" href="../performance/fastdds_tuning.html"><span class="doc">配置过程见此章节</span></a>。</p>
</section>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,142 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>高效的进程内通信: &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">高效的进程内通信:</a><ul>
<li><a class="reference internal" href="#id2">简介</a></li>
<li><a class="reference internal" href="#id3">示例</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">高效的进程内通信:</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/performance/efficient_intra_process_communication.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="id1">
<h1>高效的进程内通信:<a class="headerlink" href="#id1" title="Link to this heading"></a></h1>
<section id="id2">
<h2>简介<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<p>如果我们的ROS2封装器节点与订阅者节点加载在同一进程中,它支持零拷贝通信。这可以减少图像/点云话题的拷贝时间,特别是在大帧分辨率和高FPS的情况下。</p>
<p>您需要启动一个组件容器,并将我们的节点作为组件与其他组件节点一起启动。有关&quot;在单个进程中组合多个节点&quot;的更多详细信息,请参见 <a class="reference external" href="https://docs.ros.org/en/rolling/Tutorials/Composition.html">此处</a>。</p>
<p>有关高效进程内通信的更多详细信息,请参见 <a class="reference external" href="https://docs.ros.org/en/humble/Tutorials/Intra-Process-Communication.html#efficient-intra-process-communication">此处</a>。</p>
</section>
<section id="id3">
<h2>示例<a class="headerlink" href="#id3" title="Link to this heading"></a></h2>
<p><strong>手动将多个组件加载到同一进程中</strong></p>
<ul>
<li><p>启动组件:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>run<span class="w"> </span>rclcpp_components<span class="w"> </span>component_container
</pre></div>
</div>
</li>
<li><p>添加封装器:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>component<span class="w"> </span>load<span class="w"> </span>/ComponentManager<span class="w"> </span>orbbec_camera<span class="w"> </span>orbbec_camera::OBCameraNodeDriver<span class="w"> </span>-e<span class="w"> </span>use_intra_process_comms:<span class="o">=</span><span class="nb">true</span>
</pre></div>
</div>
<p>以相同方式加载其他组件节点(封装器话题的消费者)。</p>
</li>
</ul>
<p><strong>使用启动文件</strong></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ros2<span class="w"> </span>launch<span class="w"> </span>orbbec_camera<span class="w"> </span>gemini_intra_process_demo_launch.py
</pre></div>
</div>
<p><strong>限制</strong></p>
<ul class="simple">
<li><p>RCLPY目前不支持节点组件</p></li>
<li><p>使用 <code class="docutils literal notranslate"><span class="pre">image_transport</span></code> 的压缩图像将被禁用,因为进程内通信不支持此功能</p></li>
</ul>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,239 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>针对Orbbec相机与ROS2的Fast DDS优化 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">针对Orbbec相机与ROS2的Fast DDS优化</a><ul>
<li><a class="reference internal" href="#id1">调整系统参数</a></li>
<li><a class="reference internal" href="#fast-dds">Fast DDS配置</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">针对Orbbec相机与ROS2的Fast DDS优化</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/performance/fastdds_tuning.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="orbbecros2fast-dds">
<h1>针对Orbbec相机与ROS2的Fast DDS优化<a class="headerlink" href="#orbbecros2fast-dds" title="Link to this heading"></a></h1>
<p>使用默认配置时,Fast DDS表现出次优的传输效率,导致在ROS2中使用Orbbec相机时图像传输延迟显著。本文档提供了优化Fast DDS以提高图像传输效率的指导。</p>
<section id="id1">
<h2>调整系统参数<a class="headerlink" href="#id1" title="Link to this heading"></a></h2>
<p><strong>IP分片时间</strong></p>
<ul>
<li><p><strong>路径</strong>: <code class="docutils literal notranslate"><span class="pre">/proc/sys/net/ipv4/ipfrag_time</span></code>(默认值:30秒)</p></li>
<li><p><strong>目的</strong>: 定义IP分片保留在内存中的持续时间。</p></li>
<li><p><strong>调整</strong>: 减少此值以缩短未接收到分片的时间窗口,这有助于减少延迟。考虑到您环境的具体需求,因为此设置会影响所有传入的分片。</p>
<p><strong>示例</strong>: 设置为3秒。</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>sysctl<span class="w"> </span>net.ipv4.ipfrag_time<span class="o">=</span><span class="m">3</span>
</pre></div>
</div>
</li>
</ul>
<p><strong>IP分片内存阈值</strong></p>
<ul>
<li><p><strong>路径</strong>: <code class="docutils literal notranslate"><span class="pre">/proc/sys/net/ipv4/ipfrag_high_thresh</span></code>(默认值:262144字节)</p></li>
<li><p><strong>目的</strong>: 设置用于重组IP分片的最大内存。</p></li>
<li><p><strong>调整</strong>: 增加此值以允许更多内存用于分片重组,这可以改善较大数据包的处理。</p>
<p><strong>示例</strong>: 增加到128 MB。</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>sysctl<span class="w"> </span>net.ipv4.ipfrag_high_thresh<span class="o">=</span><span class="m">134217728</span>
</pre></div>
</div>
</li>
</ul>
<p><strong>最大缓冲区大小</strong></p>
<ul>
<li><p><strong>目的</strong>: 配置接收和发送数据的最大缓冲区大小,这对高吞吐量数据传输至关重要。</p></li>
<li><p><strong>调整</strong>: 设置接收和发送操作的最大缓冲区大小。</p>
<p><strong>命令</strong>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>sysctl<span class="w"> </span>-w<span class="w"> </span>net.core.rmem_max<span class="o">=</span><span class="m">2147483647</span>
sudo<span class="w"> </span>sysctl<span class="w"> </span>-w<span class="w"> </span>net.core.rmem_default<span class="o">=</span><span class="m">2147483647</span>
sudo<span class="w"> </span>sysctl<span class="w"> </span>-w<span class="w"> </span>net.core.wmem_max<span class="o">=</span><span class="m">2147483647</span>
sudo<span class="w"> </span>sysctl<span class="w"> </span>-w<span class="w"> </span>net.core.wmem_default<span class="o">=</span><span class="m">2147483647</span>
</pre></div>
</div>
</li>
</ul>
<p>或者,通过将这些设置添加到 <code class="docutils literal notranslate"><span class="pre">/etc/sysctl.d/10-fastrtps-max.conf</span></code> 文件中使其永久生效。</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>gedit<span class="w"> </span>/etc/sysctl.d/10-fastrtps-max.conf
</pre></div>
</div>
<p>将以下行添加到文件中:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>net.core.rmem_max<span class="o">=</span><span class="m">2147483647</span>
net.core.rmem_default<span class="o">=</span><span class="m">2147483647</span>
net.core.wmem_max<span class="o">=</span><span class="m">2147483647</span>
net.core.wmem_default<span class="o">=</span><span class="m">2147483647</span>
</pre></div>
</div>
<p>然后保存并退出文件。运行 <code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">sysctl</span> <span class="pre">-p</span></code> 以应用更改。</p>
<p>有关详细指导,请参考 <a class="reference external" href="https://docs.ros.org/en/foxy/How-To-Guides/DDS-tuning.html">ROS 2 DDS调优文档</a>。</p>
</section>
<section id="fast-dds">
<h2>Fast DDS配置<a class="headerlink" href="#fast-dds" title="Link to this heading"></a></h2>
<p>以下是针对Orbbec相机与ROS2使用而优化的Fast DDS配置文件示例。此配置通过调整缓冲区大小和传输设置来增强整体数据传输。</p>
<p><strong>配置文件:</strong> <code class="docutils literal notranslate"><span class="pre">shm_fastdds.xml</span></code></p>
<p>将此文件放在 <code class="docutils literal notranslate"><span class="pre">$HOME</span></code> 目录中。</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;profiles</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">&quot;http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;transport_descriptors&gt;</span>
<span class="w"> </span><span class="nt">&lt;transport_descriptor&gt;</span>
<span class="w"> </span><span class="nt">&lt;transport_id&gt;</span>UDP_transport<span class="nt">&lt;/transport_id&gt;</span>
<span class="w"> </span><span class="nt">&lt;type&gt;</span>UDPv4<span class="nt">&lt;/type&gt;</span>
<span class="w"> </span><span class="nt">&lt;maxInitialPeersRange&gt;</span>10<span class="nt">&lt;/maxInitialPeersRange&gt;</span>
<span class="w"> </span><span class="nt">&lt;maxMessageSize&gt;</span>65000<span class="nt">&lt;/maxMessageSize&gt;</span>
<span class="w"> </span><span class="nt">&lt;sendBufferSize&gt;</span>1048576<span class="nt">&lt;/sendBufferSize&gt;</span>
<span class="w"> </span><span class="nt">&lt;receiveBufferSize&gt;</span>1048576<span class="nt">&lt;/receiveBufferSize&gt;</span>
<span class="w"> </span><span class="nt">&lt;/transport_descriptor&gt;</span>
<span class="w"> </span><span class="nt">&lt;/transport_descriptors&gt;</span>
<span class="w"> </span><span class="nt">&lt;participant</span><span class="w"> </span><span class="na">profile_name=</span><span class="s">&quot;participant_profile_ros2&quot;</span><span class="w"> </span><span class="na">is_default_profile=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;rtps&gt;</span>
<span class="w"> </span><span class="nt">&lt;name&gt;</span>profile_for_ros2_context<span class="nt">&lt;/name&gt;</span>
<span class="w"> </span><span class="nt">&lt;userTransports&gt;</span>
<span class="w"> </span><span class="nt">&lt;transport_id&gt;</span>UDP_transport<span class="nt">&lt;/transport_id&gt;</span>
<span class="w"> </span><span class="nt">&lt;/userTransports&gt;</span>
<span class="w"> </span><span class="nt">&lt;useBuiltinTransports&gt;</span>false<span class="nt">&lt;/useBuiltinTransports&gt;</span>
<span class="w"> </span><span class="nt">&lt;sendSocketBufferSize&gt;</span>1048576<span class="nt">&lt;/sendSocketBufferSize&gt;</span>
<span class="w"> </span><span class="nt">&lt;listenSocketBufferSize&gt;</span>1048576<span class="nt">&lt;/listenSocketBufferSize&gt;</span>
<span class="w"> </span><span class="nt">&lt;builtin&gt;</span>
<span class="w"> </span><span class="nt">&lt;initialPeersList&gt;</span>
<span class="w"> </span><span class="nt">&lt;locator&gt;</span>
<span class="w"> </span><span class="nt">&lt;udpv4&gt;</span>
<span class="w"> </span><span class="nt">&lt;address&gt;</span>127.0.0.1<span class="nt">&lt;/address&gt;</span>
<span class="w"> </span><span class="nt">&lt;/udpv4&gt;</span>
<span class="w"> </span><span class="nt">&lt;/locator&gt;</span>
<span class="w"> </span><span class="nt">&lt;/initialPeersList&gt;</span>
<span class="w"> </span><span class="nt">&lt;/builtin&gt;</span>
<span class="w"> </span><span class="nt">&lt;/rtps&gt;</span>
<span class="w"> </span><span class="nt">&lt;/participant&gt;</span>
<span class="w"> </span><span class="nt">&lt;data_writer</span><span class="w"> </span><span class="na">profile_name=</span><span class="s">&quot;default publisher profile&quot;</span><span class="w"> </span><span class="na">is_default_profile=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;qos&gt;</span>
<span class="w"> </span><span class="nt">&lt;publishMode&gt;</span>
<span class="w"> </span><span class="nt">&lt;kind&gt;</span>ASYNCHRONOUS<span class="nt">&lt;/kind&gt;</span>
<span class="w"> </span><span class="nt">&lt;/publishMode&gt;</span>
<span class="w"> </span><span class="nt">&lt;latencyBudget&gt;</span>
<span class="w"> </span><span class="nt">&lt;duration&gt;</span>
<span class="w"> </span><span class="nt">&lt;sec&gt;</span>0<span class="nt">&lt;/sec&gt;</span>
<span class="w"> </span><span class="nt">&lt;nanosec&gt;</span>1000000<span class="nt">&lt;/nanosec&gt;</span>
<span class="w"> </span><span class="nt">&lt;/duration&gt;</span>
<span class="w"> </span><span class="nt">&lt;/latencyBudget&gt;</span>
<span class="w"> </span><span class="nt">&lt;/qos&gt;</span>
<span class="w"> </span><span class="nt">&lt;historyMemoryPolicy&gt;</span>PREALLOCATED_WITH_REALLOC<span class="nt">&lt;/historyMemoryPolicy&gt;</span>
<span class="w"> </span><span class="nt">&lt;/data_writer&gt;</span>
<span class="w"> </span><span class="nt">&lt;data_reader</span><span class="w"> </span><span class="na">profile_name=</span><span class="s">&quot;default subscription profile&quot;</span><span class="w"> </span><span class="na">is_default_profile=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;qos&gt;</span>
<span class="w"> </span><span class="nt">&lt;data_sharing&gt;</span>
<span class="w"> </span><span class="nt">&lt;kind&gt;</span>AUTOMATIC<span class="nt">&lt;/kind&gt;</span>
<span class="w"> </span><span class="nt">&lt;/data_sharing&gt;</span>
<span class="w"> </span><span class="nt">&lt;latencyBudget&gt;</span>
<span class="w"> </span><span class="nt">&lt;duration&gt;</span>
<span class="w"> </span><span class="nt">&lt;sec&gt;</span>0<span class="nt">&lt;/sec&gt;</span>
<span class="w"> </span><span class="nt">&lt;nanosec&gt;</span>1000000<span class="nt">&lt;/nanosec&gt;</span>
<span class="w"> </span><span class="nt">&lt;/duration&gt;</span>
<span class="w"> </span><span class="nt">&lt;/latencyBudget&gt;</span>
<span class="w"> </span><span class="nt">&lt;/qos&gt;</span>
<span class="w"> </span><span class="nt">&lt;historyMemoryPolicy&gt;</span>PREALLOCATED_WITH_REALLOC<span class="nt">&lt;/historyMemoryPolicy&gt;</span>
<span class="w"> </span><span class="nt">&lt;/data_reader&gt;</span>
<span class="nt">&lt;/profiles&gt;</span>
</pre></div>
</div>
<p><strong>环境变量</strong></p>
<p>设置以下环境变量以使用自定义Fast DDS配置文件:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span><span class="w"> </span><span class="nv">RMW_IMPLEMENTATION</span><span class="o">=</span>rmw_fastrtps_cpp
<span class="nb">export</span><span class="w"> </span><span class="nv">FASTRTPS_DEFAULT_PROFILES_FILE</span><span class="o">=</span><span class="nv">$HOME</span>/shm_fastdds.xml
<span class="nb">export</span><span class="w"> </span><span class="nv">RMW_FASTRTPS_USE_QOS_FROM_XML</span><span class="o">=</span><span class="m">1</span>
</pre></div>
</div>
<p>此配置旨在优化数据流并减少传输延迟,提高Orbbec相机系统在ROS2环境中的响应性和可靠性。</p>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
@@ -0,0 +1,304 @@
<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" data-content_root="../../../../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>使用Orbbec ROS包降低CPU使用率 &mdash; OrbbecSDK V2 ROS2 封装 文档</title>
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=63de077d" />
<link rel="shortcut icon" href="../../../../_static/orbbec_footerlogo_3d_world.svg"/>
<script src="../../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../../_static/documentation_options.js?v=7d86a446"></script>
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/translations.js?v=beaddf03"></script>
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../../../../genindex.html" />
<link rel="search" title="搜索" href="../../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../../index.html" class="icon icon-home">
OrbbecSDK V2 ROS2 封装
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="搜索文档" aria-label="搜索文档" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="导航菜单">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">使用Orbbec ROS包降低CPU使用率</a><ul>
<li><a class="reference internal" href="#cpu">降低CPU使用率的推荐设置</a></li>
<li><a class="reference internal" href="#id1">用于测试的启动文件</a></li>
<li><a class="reference internal" href="#id2">测试环境</a></li>
<li><a class="reference internal" href="#id3">测试设置</a></li>
<li><a class="reference internal" href="#id4">测试结果</a></li>
<li><a class="reference internal" href="#id5">进一步优化</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="移动版导航菜单" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">OrbbecSDK V2 ROS2 封装</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="页面导航">
<ul class="wy-breadcrumbs">
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">使用Orbbec ROS包降低CPU使用率</li>
<li class="wy-breadcrumbs-aside">
<a href="../../../../_sources/source/camera_devices/5_advanced_guide/performance/lower_cpu_usage.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="lang-switch" style="margin:0 0 1em 0; font-size:0.9em;"><a class="lang-other" href="#">English</a> | <a class="lang-current" href="#">中文</a></div><script>(function(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);})();</script><section id="orbbec-roscpu">
<h1>使用Orbbec ROS包降低CPU使用率<a class="headerlink" href="#orbbec-roscpu" title="Link to this heading"></a></h1>
<p>您可以在 <a class="reference external" href="https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples">示例</a> 中找到使用示例代码。</p>
<p>本文档概述了在使用 <strong>Gemini 330系列相机</strong> 的 <strong>OrbbecSDK_ROS2 v2</strong> 环境中最小化CPU使用率的策略。固件版本必须 <strong>不低于1.4.10</strong>,且 <code class="docutils literal notranslate"><span class="pre">device</span></code> 应设置为 <strong>Default</strong>。</p>
<section id="cpu">
<h2>降低CPU使用率的推荐设置<a class="headerlink" href="#cpu" title="Link to this heading"></a></h2>
<p>要在OrbbecSDK_ROS2中实现最低的CPU使用率,建议配置以下参数。</p>
<table border="1" class="docutils">
<thead>
<tr>
<th style="text-align: center;">参数</th>
<th style="text-align: center;">推荐值</th>
<th style="text-align: center;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;"><code>uvc_backend</code></td>
<td style="text-align: center;"><code>v4l2</code></td>
<td style="text-align: center;">与 <code>libuvc</code> 相比CPU使用率更低</td>
</tr>
<tr>
<td style="text-align: center;"><code>color_format</code></td>
<td style="text-align: center;"><code>RGB</code></td>
<td style="text-align: center;">CPU使用率低于 <code>MJPG</code></td>
</tr>
<tr>
<td style="text-align: center;"><code>filter</code></td>
<td style="text-align: center;">仅使用 <code>hardware_noise_removal_filter</code></td>
<td style="text-align: center;">其他滤波器会显著增加CPU使用率</td>
</tr>
</tbody>
</table></section>
<section id="id1">
<h2>用于测试的启动文件<a class="headerlink" href="#id1" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">gemini_330_series_lower_cpu_usage.launch.py</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">multi_camera_lower_cpu_usage.launch.py</span></code></p></li>
</ul>
</section>
<section id="id2">
<h2>测试环境<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<p><strong>硬件配置</strong></p>
<ul class="simple">
<li><p><strong>CPU</strong>: Intel i7-8700 &#64; 3.20GHz</p></li>
<li><p><strong>内存</strong>: 24 GB</p></li>
<li><p><strong>存储</strong>: Micron 2200S NVMe 256GB</p></li>
<li><p><strong>GPU</strong>: NVIDIA GeForce GTX 1660Ti</p></li>
<li><p><strong>操作系统</strong>: Ubuntu22.04</p></li>
</ul>
<p><strong>ROS配置</strong></p>
<ul class="simple">
<li><p><strong>ROS版本</strong>: ROS2 Humble</p></li>
<li><p><strong>SDK版本</strong>: OrbbecSDK_ROS2 v2.2.1</p></li>
</ul>
<p><strong>相机设置</strong></p>
<ul class="simple">
<li><p>设备: 2x Gemini 335, 1x Gemini 336, 1x Gemini 336L</p></li>
<li><p>固件版本: 1.4.10</p></li>
</ul>
</section>
<section id="id3">
<h2>测试设置<a class="headerlink" href="#id3" title="Link to this heading"></a></h2>
<p><strong>数据流设置:</strong></p>
<ul class="simple">
<li><p>深度/左IR/右IR: 848×480 &#64; 30fps</p></li>
<li><p>彩色: 848×480 &#64; 30fps</p></li>
</ul>
<p>注意:以下CPU使用率数据重点关注 <code class="docutils literal notranslate"><span class="pre">uvc_backend</span></code>、<code class="docutils literal notranslate"><span class="pre">color_format</span></code> 和各种滤波器组合。</p>
</section>
<section id="id4">
<h2>测试结果<a class="headerlink" href="#id4" title="Link to this heading"></a></h2>
<p><strong><code class="docutils literal notranslate"><span class="pre">uvc_backend</span></code> 对比(RGB格式)</strong></p>
<table border="1" class="docutils">
<thead>
<tr>
<th style="text-align: center;">libuvc CPU使用率</th>
<th style="text-align: center;">v4l2 CPU使用率</th>
<th style="text-align: center;">绝对变化</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">182.8%</td>
<td style="text-align: center;">118.8%</td>
<td style="text-align: center;">-64.0%</td>
</tr>
</tbody>
</table><p>使用v4l2后端可以显著降低CPU使用率。在我们的实现中,v4l2无需对Linux内核进行任何补丁即可工作,允许用户轻松在v4l2和libuvc之间切换,并保持与标准Linux发行版的完全兼容性。</p>
<p><strong><code class="docutils literal notranslate"><span class="pre">color_format</span></code> 对比(MJPG vs RGB)</strong></p>
<table border="1" class="docutils">
<thead>
<tr>
<th style="text-align: center;">后端</th>
<th style="text-align: center;">MJPG CPU使用率</th>
<th style="text-align: center;">RGB CPU使用率</th>
<th style="text-align: center;">绝对变化</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">libuvc</td>
<td style="text-align: center;">347.7%</td>
<td style="text-align: center;">182.8%</td>
<td style="text-align: center;">-164.9%</td>
</tr>
<tr>
<td style="text-align: center;">v4l2</td>
<td style="text-align: center;">170.0%</td>
<td style="text-align: center;">118.8%</td>
<td style="text-align: center;">-51.2%</td>
</tr>
</tbody>
</table><p>如果选择RGB格式而不是MJPG,可以降低CPU使用率,因为MJPG图像的解码会消耗主机CPU资源。</p>
<p><strong>滤波器配置影响</strong></p>
<table border="1" class="docutils">
<thead>
<tr>
<th>应用的滤波器</th>
<th>libuvc CPU使用率</th>
<th>CPU使用率增加</th>
<th>v4l2 CPU使用率</th>
<th>CPU使用率增加</th>
</tr>
</thead>
<tbody>
<tr>
<td>无滤波器(基准)</td>
<td>182.8%</td>
<td>0.0%(基准)</td>
<td>118.8%</td>
<td>0.0%(基准)</td>
</tr>
<tr>
<td><code>(软件)noise_removal_filter</code></td>
<td>218.0%</td>
<td>+35.2%</td>
<td>128.5%</td>
<td>+9.7%</td>
</tr>
<tr>
<td><code>(软件)noise_removal_filter + spatial_filter</code></td>
<td>469.6%</td>
<td>+286.8%</td>
<td>336.7%</td>
<td>+217.9%</td>
</tr>
<tr>
<td><code>hardware_noise_removal_filter</code></td>
<td>186.3%</td>
<td>+3.5%</td>
<td>115.4%</td>
<td>-3.4%</td>
</tr>
<tr>
<td><code>hardware_noise_removal_filter + spatial_filter</code></td>
<td>251.3%</td>
<td>+68.5%</td>
<td>152.5%</td>
<td>+33.7%</td>
</tr>
</tbody>
</table><p>根据测试结果,仅使用 <code class="docutils literal notranslate"><span class="pre">hardware_noise_removal_filter</span></code> 相比无滤波器基准,对 <code class="docutils literal notranslate"><span class="pre">libuvc</span></code>(+3.5%)和 <code class="docutils literal notranslate"><span class="pre">v4l2</span></code>(-3.4%)的CPU使用率变化可以忽略不计,因为此滤波器在相机硬件内部运行。相比之下,其他滤波器在主机系统上执行。将 <code class="docutils literal notranslate"><span class="pre">spatial_filter</span></code> 添加到硬件滤波器会导致CPU使用率适度增加,而应用基于软件的 <code class="docutils literal notranslate"><span class="pre">noise_removal_filter</span></code>——无论是单独使用还是与 <code class="docutils literal notranslate"><span class="pre">spatial_filter</span></code> 结合——都会显著增加CPU负载。为保持较低的CPU使用率,建议避免使用基于软件的滤波器,仅依赖 <code class="docutils literal notranslate"><span class="pre">hardware_noise_removal_filter</span></code>。</p>
</section>
<section id="id5">
<h2>进一步优化<a class="headerlink" href="#id5" title="Link to this heading"></a></h2>
<table border="1" class="docutils">
<thead>
<tr>
<th style="text-align: center;">参数</th>
<th style="text-align: center;">推荐值</th>
<th style="text-align: center;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;"><code>depth_registration</code></td>
<td style="text-align: center;"><code>false</code> 或 <code>true</code> 配合 <code>align_mode=HW</code></td>
<td style="text-align: center;">软件对齐消耗更多CPU</td>
</tr>
<tr>
<td style="text-align: center;"><code>enable_point_cloud</code></td>
<td style="text-align: center;"><code>false</code></td>
<td style="text-align: center;">禁用点云可降低CPU使用率</td>
</tr>
<tr>
<td style="text-align: center;"><code>enable_colored_point_cloud</code></td>
<td style="text-align: center;"><code>false</code></td>
<td style="text-align: center;">禁用彩色点云可降低CPU使用率</td>
</tr>
</tbody>
</table></section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 版权所有 2025, 奥比中光科技集团股份有限公司 www.orbbec.com.。
<span class="lastupdated">最后更新于 2026年01月04日 01:12:35.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>