Refactor benchmark documentation and tools

This commit is contained in:
ob-yalian
2026-06-09 18:21:10 +08:00
parent 7c0991c71f
commit ca5fc3136f
13 changed files with 539 additions and 303 deletions
@@ -40,5 +40,4 @@
configuration/disparity_search_offset.md
configuration/interleave_ae_mode.md
configuration/predefined_presets.md
configuration/firmware_update_tool.md
configuration/net_camera.md
@@ -1,43 +0,0 @@
# firmware_update_tool 工具
`firmware_update_tool` 用于从 ROS 2 命令行升级设备固件或烧录 preset 文件。升级前请确认设备连接稳定;多设备连接时建议指定序列号,避免升级到错误设备。
查看帮助:
```bash
ros2 run orbbec_camera firmware_update_tool -- --help
```
升级单个设备固件:
```bash
ros2 run orbbec_camera firmware_update_tool -- \
--serial_number <SN> \
--firmware_path /path/to/firmware.bin
```
烧录 preset 文件:
```bash
ros2 run orbbec_camera firmware_update_tool -- \
--serial_number <SN> \
--preset_path /path/to/preset.bin
```
批量升级多个设备时,`--serial_number` 支持逗号分隔;如希望某个设备失败后继续处理后续设备,可增加 `--continue_on_error`。
```bash
ros2 run orbbec_camera firmware_update_tool -- \
--serial_number SN1,SN2 \
--firmware_path /path/to/firmware.bin \
--continue_on_error
```
如需开启 SDK 文件日志并同时尝试开启固件日志,可增加 `--sdk_log_level`。可选值为 `debug`、`info`、`warn`、`error`、`fatal`、`off`,默认 `off`。
```bash
ros2 run orbbec_camera firmware_update_tool -- \
--serial_number <SN> \
--preset_path /path/to/preset.bin \
--sdk_log_level debug
```
@@ -44,98 +44,9 @@ ros2 launch orbbec_camera femto_mega.launch.py enumerate_net_device:=false net_d
ros2 launch orbbec_camera multi_net_camera.launch.py
```
可以使用 `list_devices_node` 查看当前连接设备。v2.8.x 之后,该工具会额外输出固件版本、preset 列表、preset 版本、网口设备本地网卡名和 IP 来源类型(`NONE`、`LLA`、`DHCP`、`PERSISTENT`)。当某个设备枚举失败时,工具会继续枚举其他设备。
可以使用 `list_devices_node` 查看当前连接设备。该工具的输出字段和运行方式见 [设备查询与基础维护工具](../../6_benchmark/device_query_tools.md#list_devices_node)。
如需开启 SDK 和固件日志,可添加 `--sdk_log_level debug`:
```bash
ros2 run orbbec_camera list_devices_node -- --sdk_log_level debug
```
## ip_config_tool 工具
**`ip_config_tool`** 可执行文件允许您直接从 ROS 2 配置网络相机的 IP 设置,包括 DHCP、静态 IP、Force IP 和 DHCP 分配 IP 超时时间。这对于快速分配或更新 IP 地址而无需修改启动文件非常有用。
> **注意:** 通过 `set_ip` 应用的 DHCP / persistent IP 配置会写入设备。`force_ip` 是临时强制 IP,设备断电或重启后需要重新应用。
> **兼容说明**:`set_device_ip` 仍作为兼容别名保留,实际调用 `ip_config_tool`。旧参数 `old_ip` 已更名为 `current_ip`。
**示例用法**
查看帮助:
```bash
ros2 run orbbec_camera ip_config_tool -- --help
```
开启 DHCP:
```bash
ros2 run orbbec_camera ip_config_tool -- \
set_ip \
--current_ip 192.168.1.10 \
--enable_dhcp true \
--enable_persistent_ip false
```
关闭 DHCP 并设置 persistent IP:
```bash
ros2 run orbbec_camera ip_config_tool -- \
set_ip \
--current_ip 192.168.1.10 \
--enable_dhcp false \
--enable_persistent_ip true \
--new_ip 192.168.1.11 \
--mask 255.255.255.0 \
--gateway 192.168.1.1
```
同时开启 DHCP 和 persistent IP(仅支持 IP 配置 V2 的设备/固件):
```bash
ros2 run orbbec_camera ip_config_tool -- \
set_ip \
--current_ip 192.168.1.10 \
--enable_dhcp true \
--enable_persistent_ip true \
--new_ip 192.168.1.11 \
--mask 255.255.255.0 \
--gateway 192.168.1.1
```
通过 MAC 地址 Force IP:
```bash
ros2 run orbbec_camera ip_config_tool -- \
force_ip \
--force_ip_mac 54:14:FD:06:07:DA \
--new_ip 192.168.1.50 \
--mask 255.255.255.0 \
--gateway 192.168.1.1
```
设置 DHCP 分配 IP 超时时间:
```bash
ros2 run orbbec_camera ip_config_tool -- \
set_dhcp_timeout \
--current_ip 192.168.1.10 \
--timeout 10
```
**参数**
- **`current_ip`** – 设备的当前 IP 地址。
- **`enable_dhcp`** – 在 `set_ip` 或 `force_ip` 子命令中设置是否启用 DHCP。
- **`enable_persistent_ip`** – 在 `set_ip` 子命令中设置是否启用 persistent IP。
- **`new_ip`** – 要分配的 persistent IP 或 Force IP 地址。
- **`mask`** – 新 IP 的子网掩码。
- **`gateway`** – 新 IP 的网关地址。
- **`force_ip_mac`** – Force IP 目标设备 MAC 地址。
- **`timeout`** / **`dhcp_assign_ip_timeout`** – DHCP 分配 IP 超时时间,单位为秒。
- **`sdk_log_level`** – SDK 文件日志级别,可选值:`debug`、`info`、`warn`、`error`、`fatal`、`off`。非 `off` 时会同时尝试开启固件日志。
> **版本说明**:`LLA` 开关仅 Gemini 335Le 固件 `1.7.05` 及以上、Gemini 435Le 固件 `1.3.17` 及以上支持。
如需直接修改网络相机的 DHCP、persistent IP、Force IP 或 DHCP 分配 IP 超时时间,请使用第 6 章的 [网络配置工具](../../6_benchmark/network_config_tools.md)。
## 强制 IP 功能