mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 12:07:46 +08:00
add Chinese Document
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
### 从源码构建
|
||||
|
||||
#### 环境配置
|
||||
|
||||
根据官方指南安装 ROS 2:
|
||||
|
||||
* [ROS 2 安装指南(Ubuntu)](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
|
||||
|
||||
启用 ROS 2 自动补全:
|
||||
|
||||
```bash
|
||||
eval "$(register-python-argcomplete3 ros2)"
|
||||
eval "$(register-python-argcomplete3 colcon)"
|
||||
```
|
||||
|
||||
创建 `colcon` 工作空间:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/ros2_ws/src
|
||||
```
|
||||
|
||||
#### Linux ROS2 包装器编译
|
||||
|
||||
克隆源代码并切换到 `v2-main` 分支:
|
||||
|
||||
```bash
|
||||
cd ~/ros2_ws/src
|
||||
git clone https://github.com/orbbec/OrbbecSDK_ROS2.git
|
||||
cd OrbbecSDK_ROS2
|
||||
git checkout v2-main
|
||||
```
|
||||
|
||||
安装依赖项:
|
||||
|
||||
```bash
|
||||
sudo apt install libgflags-dev nlohmann-json3-dev \
|
||||
ros-$ROS_DISTRO-image-transport ros-${ROS_DISTRO}-image-transport-plugins ros-${ROS_DISTRO}-compressed-image-transport \
|
||||
ros-$ROS_DISTRO-image-publisher ros-$ROS_DISTRO-camera-info-manager \
|
||||
ros-$ROS_DISTRO-diagnostic-updater ros-$ROS_DISTRO-diagnostic-msgs ros-$ROS_DISTRO-statistics-msgs \
|
||||
ros-$ROS_DISTRO-backward-ros libdw-dev
|
||||
```
|
||||
|
||||
可选依赖项:
|
||||
|
||||
```bash
|
||||
# 435Le writeCustomerDate 功能:
|
||||
sudo apt install libssl-dev
|
||||
```
|
||||
|
||||
构建:
|
||||
|
||||
```bash
|
||||
cd ~/ros2_ws
|
||||
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=Release
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
安装
|
||||
======================================================
|
||||
|
||||
本章节说明如何安装 Orbbec ROS2 Python SDK,包括从源码构建、安装依赖项以及使用注册脚本。
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
build_the_package.md
|
||||
registration_script.md
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
## 注册脚本(必需)
|
||||
|
||||
为了让 Orbbec 相机在 Linux 上被正确识别,请安装 udev 规则:
|
||||
|
||||
```bash
|
||||
cd ~/ros2_ws/src/OrbbecSDK_ROS2/orbbec_camera/scripts
|
||||
sudo bash install_udev_rules.sh
|
||||
sudo udevadm control --reload-rules && sudo udevadm trigger
|
||||
```
|
||||
|
||||
此步骤对于 Linux 用户是**必需的**。
|
||||
|
||||
`注意:` 如果不执行此脚本,由于权限问题,打开设备将会失败。您需要使用 sudo(管理员权限)运行示例程序。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user