Skip to content

Commit

Permalink
[1.9.x][doc][fix]:Update the path description in doc/tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
3Ddaiwei committed Feb 26, 2024
1 parent 3c799ca commit 3fc4774
Show file tree
Hide file tree
Showing 20 changed files with 59 additions and 68 deletions.
59 changes: 26 additions & 33 deletions doc/tutorial/Chinese/Environment_Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 的私有协议,需要安装私有的驱动。
Expand All @@ -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)
Expand All @@ -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)

Expand All @@ -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)

Expand All @@ -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
```

成功执行安装脚本后,再接入设备时生效(已接入的设备需要重新拔插)。
Expand All @@ -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
Expand Down Expand Up @@ -200,7 +194,6 @@ cd install/bin
sudo ./OBHelloOrbbec
```


# 常见 FAQ

[常见问题 FAQ](https://developer.orbbec.com.cn/technical_library.html?id=59)
Binary file modified doc/tutorial/Chinese/Image/orbbec_driver_000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/Chinese/Image/orbbec_metadata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/Chinese/Image/orbbec_sample_005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/Chinese/Image/orbbec_sample_007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/Chinese/Image/orbbec_sample_008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/Chinese/Image/orbbec_sample_009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/Chinese/Image/orbbec_sample_013.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/Chinese/Image/orbbec_sample_linux_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/Chinese/Image/orbbec_sample_linux_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 33 additions & 35 deletions doc/tutorial/English/Environment_Configuration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- 本文档面向开发者 -->

# introduction

This document introduces the installation of OrbbecSDK dependencies and the compilation instructions of OrbbecSDK Sample.
Expand Down Expand Up @@ -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:
Expand All @@ -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)

Expand All @@ -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)

Expand All @@ -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'
```

Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand Down
Binary file modified doc/tutorial/English/Image/orbbec_driver_000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/English/Image/orbbec_metadata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/English/Image/orbbec_sample_005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/English/Image/orbbec_sample_007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/English/Image/orbbec_sample_008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/English/Image/orbbec_sample_009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/English/Image/orbbec_sample_013.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/English/Image/orbbec_sample_linux_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/tutorial/English/Image/orbbec_sample_linux_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3fc4774

Please sign in to comment.