diff --git a/docs/conf.py b/docs/conf.py index 6927898d..cc28e247 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,27 +1,200 @@ # Configuration file for the Sphinx documentation builder. # -# For the full list of built-in configuration values, see the documentation: +# This file only contains a selection of the most common options. For a full +# list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + +import os +import shutil +import sphinx + +import recommonmark +from recommonmark.transform import AutoStructify + +# import sphinx_book_theme +# import sphinx_rtd_theme +# import furo + + +#choice theme default +# html_theme = 'sphinx_book_theme' +html_theme = 'sphinx_rtd_theme' +# html_theme = "furo" + # -- Project information ----------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'OrbbecSDK V2 ROS2 Wrapper' -copyright = '2025, ORBBEC yalian' -author = 'ORBBEC yalian' +# project = """ +# OrbbecSDK ROS2 documentation +# """ +copyright = '2025, ORBBEC INC. www.orbbec.com.' +author = 'ORBBEC INC. www.orbbec.com.' + # -- General configuration --------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration +# The master toctree document. +master_doc = 'index' -extensions = [] +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['recommonmark', + 'sphinx_markdown_tables', + 'sphinx.ext.autosectionlabel', + +# 'myst_parser', +] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +source_suffix = ['.rst', 'rest', '.md', '.MD'] + + +# Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +# language = 'zh_CN' +language = 'en' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - # -- Options for HTML output ------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = 'alabaster' -html_static_path = ['_static'] +# html_logo = "source/_static/orbbec_logo2.png" +# html_favicon = "source/_static/orbbec_logo2.png" + +#html_logo = "source/_static/orbbec-light_no_colour.svg" +html_favicon = "source/_static/orbbec_footerlogo_3d_world.svg" +# html_logo = "source/_static/orbbec_footerlogo_3d_world.svg" +# html_favicon = "source/_static/orbbec_footerlogo_3d_world.svg" + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['source/_static','source/images'] + +html_extra_path = ['source/images'] + +html_theme_options = { + # 'analytics_id': 'G-EVD5Z6G6NH', + 'collapse_navigation': False, + # 启用导航栏的“粘性”头部,这样导航栏会固定在页面顶部 + 'sticky_navigation': True, + # 配置导航栏的深度,-1 表示显示所有层级的标题 + 'navigation_depth': 5, + # 'show_navbar_depth': 4, + # 导航栏显示+号 + 'collapse_navigation': False, + + # 'analytics_anonymize_ip': False, + # 'logo_only': False, + # 'display_version': True, + # 'prev_next_buttons_location': 'bottom', + # 'style_external_links': False, + # 'vcs_pageview_mode': '', + # 'style_nav_header_background': 'white', + # # Toc options + # 'collapse_navigation': True, + # 'sticky_navigation': True, + # 'navigation_depth': 5, + # 'includehidden': True, + # 'titles_only': False +} + + + + + + +# # 添加自定义的 JavaScript 文件 +# html_js_files = ["theme.js"] + + +# #不需要添加_static目录,加了会不起作用 +html_css_files = ["custom.css"] + +# 与文档无关的其他资源的路径,由于无需构建此文件夹的文件,会自动忽略 +# 默认情况下,此路径下的文件会输出到生成的html的根目录 +# html_extra_path = ["_extra"] + +# 在页面底部显示上一次更新于某某时间 +html_last_updated_fmt = "%Y-%m-%d %H:%M:%S" + +# 以下为 sphinx_book_theme 的主题配置/定制(sphinx_book_theme) +# html_theme_options = { +# # ----------------主题内容中导航栏的功能按钮配置-------- +# # 添加存储库链接 +# "repository_url": "https://github.com/Eugene-Forest/NoteBook", +# # 添加按钮以链接到存储库 +# "use_repository_button": True, +# # 要添加按钮以打开有关当前页面的问题 +# "use_issues_button": True, +# # 添加一个按钮来建议编辑 +# "use_edit_page_button": True, +# # 默认情况下,编辑按钮将指向master分支,但如果您想更改此设置,请使用以下配置 +# "repository_branch": "main", +# # 默认情况下,编辑按钮将指向存储库的根目录;而我们 sphinx项目的 doc文件其实是在 source 文件夹下的,包括 conf.py 和 index(.rst) 主目录 +# "path_to_docs": "source", +# # 您可以添加 use_download_button 按钮,允许用户以多种格式下载当前查看的页面 +# "use_download_button": True, + +# # --------------------------右侧辅助栏配置--------- +# # 重命名右侧边栏页内目录名,标题的默认值为Contents。 +# "toc_title": "页内目录", +# # 通常,右侧边栏页内目录中仅显示页面的第 2 级标题,只有当它们是活动部分的一部分时(在屏幕上滚动时),才会显示更深的级别。可以使用以下配置显示更深的级别,指示应显示多少级别 +# "show_toc_level": 2, + +# # --------------------------左侧边栏配置-------------- +# # logo 配置 +# "logo_only": True, +# # 控制左侧边栏列表的深度展开,默认值为1,它仅显示文档的顶级部分 +# "show_navbar_depth": 1, +# # 自定义侧边栏页脚,默认为 Theme by the Executable Book Project +# # "extra_navbar": "
Your HTML
", +# "home_page_in_toc": True, +# # ------------------------- 单页模式 ----------------- +# # 如果您的文档只有一个页面,并且您不需要左侧导航栏,那么您可以 使用以下配置将其配置sphinx-book-theme 为以单页模式运行 +# # "single_page": True, +# } + +# 是否显示页面下方的由sphinx创建, 默认为True +html_show_sphinx = False + +# Function to copy video files to output directory +def setup(app): + app.connect('build-finished', copy_videos) + +def copy_videos(app, exception): + if exception is None: # Only copy if build succeeded + src_dir = os.path.join(app.srcdir, '_static/videos') + dest_dir = os.path.join(app.outdir, '_static/videos') + if os.path.exists(src_dir): + shutil.copytree(src_dir, dest_dir) + +# 20201030 +def setup(app): + app.add_config_value('recommonmark_config', { + 'url_resolver': lambda url: github_doc_root + url, + 'auto_toc_tree_section': 'Contents', + }, True) + app.add_transform(AutoStructify) diff --git a/docs/index.rst b/docs/index.rst index 7a050be4..e58482a8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,6 +12,12 @@ documentation for details. .. toctree:: - :maxdepth: 2 - :caption: Contents: + :maxdepth: 3 + :numbered: + source/1_overview/overview.rst + source/2_installation/installation.rst + source/3_quickstarts/quickstarts.rst + source/4_application_guide/application_guide.rst + source/5_advanced_guide/advanced_guide.rst + source/6_FAQ/FAQ.rst diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100755 index 00000000..ea30deb3 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,20 @@ +# markdown suport +recommonmark +# markdown table suport +sphinx-markdown-tables + +# theme default rtd + +# crate-docs-theme +sphinx-rtd-theme + +doc8 +docutils +pip +sphinx +sphinx-copybutton +sphinx-lint +sphinx-multiversion +sphinx-rtd-theme +sphinx-tabs +sphinxcontrib-mermaid \ No newline at end of file diff --git a/docs/source/1_overview/introduction.md b/docs/source/1_overview/introduction.md index d4061ecd..378fe943 100644 --- a/docs/source/1_overview/introduction.md +++ b/docs/source/1_overview/introduction.md @@ -8,59 +8,30 @@ If you are a user in China, it is recommended to use [gitee Repo](https://gitee. ## Support Hardware Products -This document is based on the v2-main branch code, which is a Python Wrapper built on Orbbec SDK v2. It supports the following devices. -If your device is included in this supported list, we recommend using the v2-main branch. If not, you can use the main branch instead. +The following devices are supported by the OrbbecSDK ROS2 Wrapper v2-main branch. More devices support will be added in the near future. If you can not find your device in the table below, try the [main](https://github.com/orbbec/OrbbecSDK_ROS2) branch. -| **Products List** | **Minimal Firmware Version** | -|-------------------|------------------------------| -| Gemini 435Le | 1.2.04 | -| Gemini 335Le | 1.5.31 | -| Gemini 330 | 1.2.20 | -| Gemini 330L | 1.2.20 | -| Gemini 335 | 1.2.20 | -| Gemini 335L | 1.2.20 | -| Gemini 336 | 1.2.20 | -| Gemini 336L | 1.2.20 | -| Gemini 335Lg | 1.3.46 | -| Femto Bolt | 1.1.2 | -| Femto Mega | 1.3.0 | -| Femto Mega I | 2.0.4 | -| Astra 2 | 2.8.20 | -| Gemini 2 L | 1.4.53 | -| Gemini 2 | 1.4.92 | -| Gemini 215 | 1.0.9 | -| Gemini 210 | 1.0.9 | +For optimal performance, we strongly recommend updating to the latest firmware version. This ensures that you benefit from the most recent enhancements and bug fixes. -the main branch supports the following devices: - - -| **Products List** | **Minimal Firmware Version** | -|-------------------|-----------------------------| -| Gemini 330 | 1.2.20 | -| Gemini 330L | 1.2.20 | -| Gemini 335 | 1.2.20 | -| Gemini 335L | 1.2.20 | -| Gemini 336 | 1.2.20 | -| Gemini 336L | 1.2.20 | -| Femto Bolt | 1.0.6 | -| Femto Mega | 1.1.7 | -| Femto Mega I | 2.0.2 | -| Gemini 2 XL | Obox: V1.2.5 VL:1.4.54 | -| Astra 2 | 2.8.20 | -| Gemini 2 L | 1.4.32 | -| Gemini 2 | 1.4.60 | -| Astra+ | 1.0.19 | -| Femto | 1.6.7 | -| Femto W | 1.1.8 | -| DaBai | 2436 | -| DaBai DCW | 2460 | -| DaBai DW | 2606 | -| Astra Mini Pro | 1007 | -| Gemini E | 3460 | -| Gemini E Lite | 3606 | -| Gemini | 3018 | -| Astra Mini S Pro | 1005 | +| Product List | Minimal Firmware Version | **Launch File** | +| :------------- | :----------------------- | :-------------------------- | +| Gemini 435Le | 1.2.04 | gemini435_le.launch.py | +| Gemini 335 | 1.2.20 | gemini_330_series.launch.py | +| Gemini 336 | 1.2.20 | gemini_330_series.launch.py | +| Gemini 335L | 1.2.20 | gemini_330_series.launch.py | +| Gemini 336L | 1.2.20 | gemini_330_series.launch.py | +| Gemini 335Lg | 1.3.46 | gemini_330_series.launch.py | +| Gemini 335Le | 1.5.31 | gemini_330_series.launch.py | +| Gemini 330 | 1.2.20 | gemini_330_series.launch.py | +| Gemini 330L | 1.2.20 | gemini_330_series.launch.py | +| Gemini 2 | 1.4.92 | gemini2.launch.py | +| Gemini 2 L | 1.4.53 | gemini2L.launch.py | +| Femto Bolt | 1.1.2 | femto_bolt.launch.py | +| Femto Mega | 1.3.0 | femto_mega.launch.py | +| Astra 2 | 2.8.20 | astra2.launch.py | +| Astra Mini Pro | 2.0.01 | astra.launch.py | +All launch files are essentially similar, with the primary difference being the default values of the parameters set +for different models within the same series. Differences in USB standards, such as USB 2.0 versus USB 3.0, may require adjustments to these parameters. If you encounter a startup failure, please carefully review the specification manual. Pay special attention to the resolution settings in the launch file, as well as other parameters, to ensure compatibility and optimal performance. ## Support Platforms diff --git a/docs/source/1_overview/overview.rst b/docs/source/1_overview/overview.rst new file mode 100644 index 00000000..a79b9f4c --- /dev/null +++ b/docs/source/1_overview/overview.rst @@ -0,0 +1,11 @@ +Overview +====================================================== + +This chapter provides an overview of the Orbbec SDK, including supported products, main features, and architecture. + +.. toctree:: + :maxdepth: 2 + + introduction.md + orbbecsdk_overview.md + diff --git a/docs/source/2_installation/build_the_package.md b/docs/source/2_installation/build_the_package.md index 4dacc472..02368207 100644 --- a/docs/source/2_installation/build_the_package.md +++ b/docs/source/2_installation/build_the_package.md @@ -1,7 +1,5 @@ ### 2.2. Build from Source -If no wheel package is available, or if you want to build with the latest source code, follow these steps: - #### 2.2.1. Environment Install ROS 2 according to the official guide: @@ -49,4 +47,3 @@ cd ~/ros2_ws colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=Release ``` - diff --git a/docs/source/2_installation/installation.rst b/docs/source/2_installation/installation.rst new file mode 100644 index 00000000..a603dbd1 --- /dev/null +++ b/docs/source/2_installation/installation.rst @@ -0,0 +1,11 @@ +Installation +====================================================== + +This chapter explains how to install the Orbbec ROS2 Python SDK, including building from source, installing dependencies, and using registration scripts. + +.. toctree:: + :maxdepth: 2 + + build_the_package.md + registration_script.md + diff --git a/docs/source/3_quickstarts/quickstart.md b/docs/source/3_quickstarts/quickstart.md new file mode 100644 index 00000000..62b000a7 --- /dev/null +++ b/docs/source/3_quickstarts/quickstart.md @@ -0,0 +1,92 @@ +## QuickStarts + +### 3.1. Introduction + +This section provides a quick start to using the Orbbec ROS 2 wrapper. +You will learn how to: + +* Launch a camera node. +* Visualize depth/color streams in **RViz2**. +* Interact with topics and services using **ROS 2 CLI tools**. + +--- + +### 3.2. Build your First Camera Application + +#### Step 1: Source ROS 2 and Workspace + +Make sure ROS 2 and your workspace environment are sourced: + +```bash +source /opt/ros/$ROS_DISTRO/setup.bash +source ~/ros2_ws/install/setup.bash +``` + +#### Step 2: Launch the Camera Node + +- On terminal 1 + +```bash +. ./install/setup.bash +ros2 run orbbec_camera list_devices_node #Check if the camera is connected +ros2 launch orbbec_camera gemini_330_series.launch.py # Or other launch file, see below table +``` + +If you have multiple cameras connected, you can specify the **serial number**: + +```bash +ros2 launch orbbec_camera gemini_330_series.launch.py serial_number:=