diff --git a/doc/tutorial/Chinese/Environment_Configuration.md b/doc/tutorial/Chinese/Environment_Configuration.md index 08b2357c..a84af50e 100644 --- a/doc/tutorial/Chinese/Environment_Configuration.md +++ b/doc/tutorial/Chinese/Environment_Configuration.md @@ -7,6 +7,7 @@ Orbbec SDK 兼容标准 UVC 协议,支持的硬件设备符合标准 UVC 规格,Gemini2、Femto 、Femto W、Femto Mega、Astra+、Astra2、Gemini2 L 这些模组使用的标准的 UVC 协议,因此不需要安装额外的驱动程序。 # windows 环境配置 + ## 1. 安装私有驱动 openni 私有驱动的目录如下:双击以下. exe 图片目录,安装驱动程序。Dabai、Dabai DCW、Dabai DW、Astra mini Pro、Astra Pro Plus、A1 Pro、Gemini E、Gemini E Lite、Gemini 这些是使用的 openni 的私有协议,需要安装私有的驱动。 @@ -27,15 +28,15 @@ openni 私有驱动的目录如下:双击以下. exe 图片目录,安装驱 ![image3](Image/orbbec_opencv_003.png) ## 3. metadata 时间戳注册 + 现在因为Windows 系统机制,对于 UVC 协议设备,如果需要拿到时间戳等 metadata 信息,需要先往注册表完成注册。可依据 obsensor_metadata_win10.md 文档指引执行 obsensor_metadata_win10.ps1 脚本自动完成。 ![image4](Image/orbbec_metadata.png) - ## 4. windows 编译说明 + 软件依赖:VisualStudio2019、cmake 3.10 及以上版本 * 下载 / 获取我们的 SDK 软件包,以 1.5.7 版本为例介绍 windows 如何编译。 - * 打开 Cmake,将 “Examples” 文件夹设置为代码路径,“Examples”下的 “build” 文件夹设置为生成二进制文件的路径,如下图所示。如 Examples 下无 build,需要新建该文件夹。 ![image5](Image/orbbec_sample_005.png) @@ -49,7 +50,7 @@ openni 私有驱动的目录如下:双击以下. exe 图片目录,安装驱 ![image7](Image/orbbec_sample_007.png) * 可以通过以下两种方式打开 Sample 工程 -方法一:通过 cmake,点击 “Open Project” 按钮,打开 Visual Studio 工程 + 方法一:通过 cmake,点击 “Open Project” 按钮,打开 Visual Studio 工程 ![image8](Image/orbbec_sample_008.png) @@ -58,16 +59,12 @@ openni 私有驱动的目录如下:双击以下. exe 图片目录,安装驱 ![image9](Image/orbbec_sample_009.png) * 打开 Examples 工程界面如下所示: -![image10](Image/orbbec_sample_010.png) - + ![image10](Image/orbbec_sample_010.png) * 选择你想要运行的工程,右键点击并将其“设置为启动项目”, 在运行选项处选择 release 和 64 位版本。 - * 将设备连接到主机。 - * 将 bin 目录下的 dll 文件和配置文件拷贝到编译生成的 bin 路径下 -![image13](Image/orbbec_sample_013.png) - -* 运行 HelloOrbbec 工程,结果如下所示,至此第一个 Example 就运行成功了。 + ![image13](Image/orbbec_sample_013.png) +* 运行 OBHelloOrbbec 工程,结果如下所示,至此第一个 Example 就运行成功了。 ![image14](Image/orbbec_sample_014.png) @@ -79,25 +76,25 @@ openni 私有驱动的目录如下:双击以下. exe 图片目录,安装驱 * 安装 libudev 库: -``` bash +```bash sudo apt install libudev-dev ``` * 安装 libusb 库: -``` bash +```bash sudo apt install libusb-dev ``` ## 2、USB 访问权限配置 -Linux 系统默认对 USB 设备的直接访问需要 root 权限,可以通过 rules 配置文件解决。在 OrbbecSDK 发布的文件解压后,在 Script 目录下会有一个 “99-obsensor-libusb.rules” 配置文件和 “install.sh” 安装脚本,通过 sudo 命令执行 “install.sh” 脚本,即可完成 rules 配置文件的安装。 +Linux 系统默认对 USB 设备的直接访问需要 root 权限,可以通过 rules 配置文件解决。在 OrbbecSDK 发布的文件解压后,在 Script 目录下会有一个 “99-obsensor-libusb.rules” 配置文件和 “install_udev_rules.sh” 安装脚本,通过 sudo 命令执行 “install_udev_rules.sh” 脚本,即可完成 rules 配置文件的安装。 ![image15](Image/orbbec_sample_linux_001.png) -方法如下: 首先修改 “install.sh” 安装脚本的执行权限。 +方法如下: 首先修改 “install_udev_rules.sh” 安装脚本的执行权限。 -``` bash -sudo chmod +x ./install.sh -sudo ./install.sh +```bash +sudo chmod +x ./install_udev_rules.sh +sudo ./install_udev_rules.sh ``` 成功执行安装脚本后,再接入设备时生效(已接入的设备需要重新拔插)。 @@ -124,44 +121,41 @@ sudo sh -c 'echo 128> /sys/module/usbcore/parameters/usbfs_memory_mb' 对于 GRUB2(最常见): - 1. 打开 `/etc/default/grub`, 将:`GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"`(或引号内的其他内容,取决于您的系统)替换为:`GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=128"` +1. 打开 `/etc/default/grub`, 将:`GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"`(或引号内的其他内容,取决于您的系统)替换为:`GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=128"` +2. 更新 grub - 2. 更新 grub - - ```bash - sudo update-grub - ``` - - 3. 重启你的系统 + ```bash + sudo update-grub + ``` +3. 重启你的系统 其他引导加载程序:配置其他引导加载程序的附加内核参数,请参阅您的引导加载程序手册。 ## 4. 验证设备状态 * 环境准备:ubuntu18.04 x64 desktop - * 以 Astra + 为例,使用 USB 3.0 Type-C 数据线,用于与 PC 机连接。 - * 使用 lsusb 命令,查看是否 PC 系统有正确识别到相机。 ![image16](Image/orbbec_sample_linux_002.png) * 通过 PID&VID 来判断相机是否正常被识别 -VID:2bc5 PID:0536(彩色相机) -VID:2bc5 PID:0636(深度相机) + VID:2bc5 PID:0536(彩色相机) + VID:2bc5 PID:0636(深度相机) ## 5. Linux Sample 编译 -在 Examples 目录下新建一个 build 目录,如下: +在 OrbbecSDK 目录下新建一个 build 目录,如下: ![image17](Image/orbbec_sample_linux_003.png) -``` bash +```bash +cd OrbbecSDK +mkdir build cd build cmake .. make ``` - # Mac 环境配置 ### 安装 Xcode 和 Homebrew @@ -200,7 +194,6 @@ cd install/bin sudo ./OBHelloOrbbec ``` - # 常见 FAQ [常见问题 FAQ](https://developer.orbbec.com.cn/technical_library.html?id=59) diff --git a/doc/tutorial/Chinese/Image/orbbec_driver_000.png b/doc/tutorial/Chinese/Image/orbbec_driver_000.png index 33d445dd..a47e594f 100644 Binary files a/doc/tutorial/Chinese/Image/orbbec_driver_000.png and b/doc/tutorial/Chinese/Image/orbbec_driver_000.png differ diff --git a/doc/tutorial/Chinese/Image/orbbec_metadata.png b/doc/tutorial/Chinese/Image/orbbec_metadata.png index ba48e9d5..262051e5 100644 Binary files a/doc/tutorial/Chinese/Image/orbbec_metadata.png and b/doc/tutorial/Chinese/Image/orbbec_metadata.png differ diff --git a/doc/tutorial/Chinese/Image/orbbec_sample_005.png b/doc/tutorial/Chinese/Image/orbbec_sample_005.png index 19c9fdcb..fedfcf4e 100644 Binary files a/doc/tutorial/Chinese/Image/orbbec_sample_005.png and b/doc/tutorial/Chinese/Image/orbbec_sample_005.png differ diff --git a/doc/tutorial/Chinese/Image/orbbec_sample_007.png b/doc/tutorial/Chinese/Image/orbbec_sample_007.png index 108a6b07..20093827 100644 Binary files a/doc/tutorial/Chinese/Image/orbbec_sample_007.png and b/doc/tutorial/Chinese/Image/orbbec_sample_007.png differ diff --git a/doc/tutorial/Chinese/Image/orbbec_sample_008.png b/doc/tutorial/Chinese/Image/orbbec_sample_008.png index 49b71980..06f4e34b 100644 Binary files a/doc/tutorial/Chinese/Image/orbbec_sample_008.png and b/doc/tutorial/Chinese/Image/orbbec_sample_008.png differ diff --git a/doc/tutorial/Chinese/Image/orbbec_sample_009.png b/doc/tutorial/Chinese/Image/orbbec_sample_009.png index 0b35b9ff..5065456c 100644 Binary files a/doc/tutorial/Chinese/Image/orbbec_sample_009.png and b/doc/tutorial/Chinese/Image/orbbec_sample_009.png differ diff --git a/doc/tutorial/Chinese/Image/orbbec_sample_013.png b/doc/tutorial/Chinese/Image/orbbec_sample_013.png index 955a85ee..874576bb 100644 Binary files a/doc/tutorial/Chinese/Image/orbbec_sample_013.png and b/doc/tutorial/Chinese/Image/orbbec_sample_013.png differ diff --git a/doc/tutorial/Chinese/Image/orbbec_sample_linux_001.png b/doc/tutorial/Chinese/Image/orbbec_sample_linux_001.png index da7231d8..bdde21ac 100644 Binary files a/doc/tutorial/Chinese/Image/orbbec_sample_linux_001.png and b/doc/tutorial/Chinese/Image/orbbec_sample_linux_001.png differ diff --git a/doc/tutorial/Chinese/Image/orbbec_sample_linux_003.png b/doc/tutorial/Chinese/Image/orbbec_sample_linux_003.png index f6bc66dc..3299b949 100644 Binary files a/doc/tutorial/Chinese/Image/orbbec_sample_linux_003.png and b/doc/tutorial/Chinese/Image/orbbec_sample_linux_003.png differ diff --git a/doc/tutorial/English/Environment_Configuration.md b/doc/tutorial/English/Environment_Configuration.md index 5a288cad..395e3c44 100644 --- a/doc/tutorial/English/Environment_Configuration.md +++ b/doc/tutorial/English/Environment_Configuration.md @@ -1,4 +1,5 @@ + # introduction This document introduces the installation of OrbbecSDK dependencies and the compilation instructions of OrbbecSDK Sample. @@ -41,10 +42,8 @@ Now due to the Windows system mechanism, for UVC protocol devices, if you need t Software dependency: VisualStudio2019, cmake 3.10 and above. * Download OrbbecSDK software package. Take version 1.5.7 as an example to explain how Windows compiles. - * Open Cmake and set the "Examples" folder as the code path, and the "build" folder under "Examples" as the path to generate the binary file, as shown in the figure below. If there is no build under Examples, you need to create a new folder. - ![6](Image/orbbec_sample_005.png) * Click "Configure" and select the corresponding Visual Studio version and platform version, then click "Finish", as shown below: @@ -70,14 +69,10 @@ Method 2: In the folder, directly start the Visual Studio project in Examples/bu ![11](Image/orbbec_sample_010.png) * Select the project you want to run, right click and "set as startup project", select release and 64-bit version at the run option. - - * Connect the device to the host - * Copy the dll files from the bin directory of the Examples folder to the build folder where the generated executables located at. -![13](Image/orbbec_sample_013.png) - -* run the HelloOrbbec project + ![13](Image/orbbec_sample_013.png) +* run the OBHelloOrbbec project ![14](Image/orbbec_sample_014.png) @@ -87,27 +82,26 @@ Method 2: In the folder, directly start the Visual Studio project in Examples/bu * Install libudev library: - ``` bash - sudo apt install libudev-dev - ``` - + ```bash + sudo apt install libudev-dev + ``` * Install libusb library: - ``` bash - sudo apt install libusb-dev - ``` + ```bash + sudo apt install libusb-dev + ``` ## 2. USB access rights configuration -By default, direct access to USB devices in Linux systems requires root privileges, which can be resolved through the rules configuration file. After the files released by OrbbecSDK are decompressed, there will be a "99-obsensor-libusb.rules" configuration file and "install.sh" installation script in the Script directory. +By default, direct access to USB devices in Linux systems requires root privileges, which can be resolved through the rules configuration file. After the files released by OrbbecSDK are decompressed, there will be a "99-obsensor-libusb.rules" configuration file and "install_udev_rules.sh" installation script in the Script directory. ![20](Image/orbbec_sample_linux_001.png) -Run the "install.sh" script through the sudo command to complete the rules Installation of configuration files. +Run the "install_udev_rules.sh" script through the sudo command to complete the rules Installation of configuration files. -``` bash -sudo chmod +x ./install.sh -sudo ./install.sh - ``` +```bash +sudo chmod +x ./install_udev_rules.sh +sudo ./install_udev_rules.sh +``` ## 3. Increasing the USBFS buffer size (Optional) @@ -121,7 +115,7 @@ cat /sys/module/usbcore/parameters/usbfs_memory_mb ### Increase the USBFS buffer size until the next reboot (here: example value 128) -``` bash +```bash sudo sh -c 'echo 128 > /sys/module/usbcore/parameters/usbfs_memory_mb' ``` @@ -131,24 +125,20 @@ To increase the buffer size permanently, add the kernel parameter usbcore.usbfs_ For GRUB2 (most common): - 1. Open /etc/default/grub. Replace: `GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"` (or other contents within the quotation marks depending on your system) with: `GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=128"` - - 2. Update grub - - ``` bash - sudo update-grub - ``` +1. Open /etc/default/grub. Replace: `GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"` (or other contents within the quotation marks depending on your system) with: `GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=128"` +2. Update grub - 3. reboot your system + ```bash + sudo update-grub + ``` +3. reboot your system Other bootloaders: configure additional kernel parameters of other bootloaders, please see the manual of your bootloader. ## 4. Verify device status * Environment preparation: ubuntu18.04 x64 desktop - * Take Astra+ as an example, use USB 3.0 Type-C data cable to connect with PC. - * Use the lsusb command to check if the PC system correctly recognizes the camera. ![21](Image/orbbec_sample_linux_002.png) @@ -162,23 +152,28 @@ VID: 2bc5 PID: 0636 (depth camera) ## 5. Linux Sample compile -Create a build directory in the Examples directory, as follows: +Create a build directory in the OrbbecSDK directory, as follows: ![image17](Image/orbbec_sample_linux_003.png) -``` bash +```bash +cd OrbbecSDK +mkdir build cd build cmake .. make ``` + # MacOS ### Install Xcode and Homebrew + 1. **Install Xcode**: + - Xcode is the official development tool provided by Apple, which includes the C++ compiler. - You can download it for free from the Mac App Store. - Installing Xcode will also install the Command Line Tools, which include the GCC compiler and other development tools. - 2. **Install Homebrew**: + - Homebrew is a package manager for macOS, useful for installing various development tools and libraries. - To install Homebrew, execute the following command in the terminal: ```bash @@ -189,10 +184,13 @@ make These steps will set up the fundamental tools needed for C++ development on macOS. ### Install Dependency + ```bash brew install cmake opencv ``` + ### Compile and run the sample + ```bash cd OrbbecSDK mkdir build diff --git a/doc/tutorial/English/Image/orbbec_driver_000.png b/doc/tutorial/English/Image/orbbec_driver_000.png index 33d445dd..a47e594f 100644 Binary files a/doc/tutorial/English/Image/orbbec_driver_000.png and b/doc/tutorial/English/Image/orbbec_driver_000.png differ diff --git a/doc/tutorial/English/Image/orbbec_metadata.png b/doc/tutorial/English/Image/orbbec_metadata.png index ba48e9d5..262051e5 100644 Binary files a/doc/tutorial/English/Image/orbbec_metadata.png and b/doc/tutorial/English/Image/orbbec_metadata.png differ diff --git a/doc/tutorial/English/Image/orbbec_sample_005.png b/doc/tutorial/English/Image/orbbec_sample_005.png index 19c9fdcb..fedfcf4e 100644 Binary files a/doc/tutorial/English/Image/orbbec_sample_005.png and b/doc/tutorial/English/Image/orbbec_sample_005.png differ diff --git a/doc/tutorial/English/Image/orbbec_sample_007.png b/doc/tutorial/English/Image/orbbec_sample_007.png index 108a6b07..20093827 100644 Binary files a/doc/tutorial/English/Image/orbbec_sample_007.png and b/doc/tutorial/English/Image/orbbec_sample_007.png differ diff --git a/doc/tutorial/English/Image/orbbec_sample_008.png b/doc/tutorial/English/Image/orbbec_sample_008.png index 49b71980..06f4e34b 100644 Binary files a/doc/tutorial/English/Image/orbbec_sample_008.png and b/doc/tutorial/English/Image/orbbec_sample_008.png differ diff --git a/doc/tutorial/English/Image/orbbec_sample_009.png b/doc/tutorial/English/Image/orbbec_sample_009.png index 0b35b9ff..5065456c 100644 Binary files a/doc/tutorial/English/Image/orbbec_sample_009.png and b/doc/tutorial/English/Image/orbbec_sample_009.png differ diff --git a/doc/tutorial/English/Image/orbbec_sample_013.png b/doc/tutorial/English/Image/orbbec_sample_013.png index 955a85ee..874576bb 100644 Binary files a/doc/tutorial/English/Image/orbbec_sample_013.png and b/doc/tutorial/English/Image/orbbec_sample_013.png differ diff --git a/doc/tutorial/English/Image/orbbec_sample_linux_001.png b/doc/tutorial/English/Image/orbbec_sample_linux_001.png index da7231d8..bdde21ac 100644 Binary files a/doc/tutorial/English/Image/orbbec_sample_linux_001.png and b/doc/tutorial/English/Image/orbbec_sample_linux_001.png differ diff --git a/doc/tutorial/English/Image/orbbec_sample_linux_003.png b/doc/tutorial/English/Image/orbbec_sample_linux_003.png index f6bc66dc..3299b949 100644 Binary files a/doc/tutorial/English/Image/orbbec_sample_linux_003.png and b/doc/tutorial/English/Image/orbbec_sample_linux_003.png differ