docs: add Fast DDS 164 implementation plan
This commit is contained in:
@@ -174,3 +174,580 @@ source /home/hikos/Yiliao2026/config/dds/use_wsl_dds_164_link.sh
|
|||||||
- `.210` 上的 SSH 和 VS Code 管理链路保持可用。
|
- `.210` 上的 SSH 和 VS Code 管理链路保持可用。
|
||||||
- 未修改路由表、系统启动文件、现有 ROS package 或 Nav2 参数。
|
- 未修改路由表、系统启动文件、现有 ROS package 或 Nav2 参数。
|
||||||
- 所有实际修改、验证和回滚方式均记录在本文件中。
|
- 所有实际修改、验证和回滚方式均记录在本文件中。
|
||||||
|
|
||||||
|
# Fast DDS `.164` 专用链路实施计划
|
||||||
|
|
||||||
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||||
|
|
||||||
|
**Goal:** 让从专用环境启动的 WSL 与 RDKx5 ROS 2 participant 只通过 `.151 <-> .164` 交换跨主机 DDS 数据,同时保持 `.210` 的管理链路不变。
|
||||||
|
|
||||||
|
**Architecture:** 双端保持 `rmw_fastrtps_cpp` 和 Domain 22,分别加载一个 Fast DDS 默认 participant profile。profile 保留 SHM 供同主机通信,并用带接口白名单的自定义 UDPv4 transport 约束跨主机通信;sourceable Bash 脚本负责前置检查和环境变量设置。
|
||||||
|
|
||||||
|
**Tech Stack:** ROS 2 Humble、Fast DDS 2.6.x、Bash、Fast DDS XML profiles、`tcpdump`、Git。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 文件职责
|
||||||
|
|
||||||
|
- `/home/sunrise/yiliao_ws/config/dds/fastdds_rdk_164.xml`:RDKx5 participant transport,只允许 UDPv4 使用 `.164`,peer 为 WSL `.151`。
|
||||||
|
- `/home/sunrise/yiliao_ws/config/dds/use_rdk_dds_164.sh`:验证 RDKx5 网卡和 XML 后,导出 Domain、RMW 和 profile 环境变量。
|
||||||
|
- `/home/hikos/Yiliao2026/config/dds/fastdds_wsl_151.xml`:WSL participant transport,只允许 UDPv4 使用 `.151`,peer 为 RDKx5 `.164`。
|
||||||
|
- `/home/hikos/Yiliao2026/config/dds/use_wsl_dds_164_link.sh`:验证 WSL 网卡和 XML 后,导出 Domain、RMW 和 profile 环境变量。
|
||||||
|
- `/home/sunrise/yiliao_ws/docs/crucial_change/2026-07-23-fastdds-164-network-change.md`:设计、计划、实际变更、证据、提交号和回滚命令的唯一记录。
|
||||||
|
|
||||||
|
### Task 1:实施前保护与基线
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
|
||||||
|
- Modify: `/home/sunrise/yiliao_ws/docs/crucial_change/2026-07-23-fastdds-164-network-change.md`
|
||||||
|
|
||||||
|
- [ ] **Step 1:确认目标文件不会被覆盖**
|
||||||
|
|
||||||
|
在 RDKx5 执行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
for path in \
|
||||||
|
/home/sunrise/yiliao_ws/config/dds/fastdds_rdk_164.xml \
|
||||||
|
/home/sunrise/yiliao_ws/config/dds/use_rdk_dds_164.sh; do
|
||||||
|
if [ -e "$path" ]; then
|
||||||
|
echo "STOP: existing file: $path" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
在 WSL 执行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
for path in \
|
||||||
|
/home/hikos/Yiliao2026/config/dds/fastdds_wsl_151.xml \
|
||||||
|
/home/hikos/Yiliao2026/config/dds/use_wsl_dds_164_link.sh; do
|
||||||
|
if [ -e "$path" ]; then
|
||||||
|
echo "STOP: existing file: $path" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:两段命令均无输出且返回 `0`。任何文件已存在都停止实施,先将其路径、SHA-256 和内容写入本文件,不能覆盖。
|
||||||
|
|
||||||
|
- [ ] **Step 2:采集最小基线**
|
||||||
|
|
||||||
|
RDKx5:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ip -br -4 addr
|
||||||
|
ip -4 route
|
||||||
|
source /opt/ros/humble/setup.bash
|
||||||
|
python3 -c 'from rclpy.utilities import get_rmw_implementation_identifier; print(get_rmw_implementation_identifier())'
|
||||||
|
grep -n 'ROS_DOMAIN_ID' /home/sunrise/.bashrc
|
||||||
|
git -C /home/sunrise/yiliao_ws status --short
|
||||||
|
```
|
||||||
|
|
||||||
|
WSL:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ip -br -4 addr
|
||||||
|
ip -4 route get 192.168.10.164
|
||||||
|
source /opt/ros/humble/setup.bash
|
||||||
|
python3 -c 'from rclpy.utilities import get_rmw_implementation_identifier; print(get_rmw_implementation_identifier())'
|
||||||
|
git -C /home/hikos/Yiliao2026 status --short
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:RDKx5 存在 `.164` 和 `.210`,WSL 存在 `.151`,双方 RMW 均为 `rmw_fastrtps_cpp`。记录现有 dirty files,后续提交不得包含它们。
|
||||||
|
|
||||||
|
- [ ] **Step 3:把基线摘要追加到唯一变更文档**
|
||||||
|
|
||||||
|
用 `apply_patch` 在本文件末尾增加 `## 实施记录` 和 `### 实施前基线`,写入上述命令的关键输出、实施开始时间以及“目标文件原先不存在”。不要粘贴无关的大段 package 列表。
|
||||||
|
|
||||||
|
- [ ] **Step 4:提交基线记录**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /home/sunrise/yiliao_ws
|
||||||
|
git add -- docs/crucial_change/2026-07-23-fastdds-164-network-change.md
|
||||||
|
git diff --cached --check
|
||||||
|
git diff --cached --name-only
|
||||||
|
git commit -m "docs: record Fast DDS network baseline" -- \
|
||||||
|
docs/crucial_change/2026-07-23-fastdds-164-network-change.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:待提交文件列表只有该 Markdown 文档。
|
||||||
|
|
||||||
|
### Task 2:RDKx5 Fast DDS 配置
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
|
||||||
|
- Create: `/home/sunrise/yiliao_ws/config/dds/fastdds_rdk_164.xml`
|
||||||
|
- Create: `/home/sunrise/yiliao_ws/config/dds/use_rdk_dds_164.sh`
|
||||||
|
- Modify: `/home/sunrise/yiliao_ws/docs/crucial_change/2026-07-23-fastdds-164-network-change.md`
|
||||||
|
|
||||||
|
- [ ] **Step 1:运行存在性测试并确认失败**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
test -f /home/sunrise/yiliao_ws/config/dds/fastdds_rdk_164.xml && \
|
||||||
|
test -f /home/sunrise/yiliao_ws/config/dds/use_rdk_dds_164.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:返回非零,因为两个文件尚未创建。
|
||||||
|
|
||||||
|
- [ ] **Step 2:创建 RDKx5 XML**
|
||||||
|
|
||||||
|
创建目录 `/home/sunrise/yiliao_ws/config/dds`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p /home/sunrise/yiliao_ws/config/dds
|
||||||
|
```
|
||||||
|
|
||||||
|
然后用 `apply_patch` 创建 `fastdds_rdk_164.xml`,完整内容为:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
|
||||||
|
<transport_descriptors>
|
||||||
|
<transport_descriptor>
|
||||||
|
<transport_id>rdk_udp_164</transport_id>
|
||||||
|
<type>UDPv4</type>
|
||||||
|
<interfaceWhiteList>
|
||||||
|
<address>192.168.10.164</address>
|
||||||
|
</interfaceWhiteList>
|
||||||
|
</transport_descriptor>
|
||||||
|
<transport_descriptor>
|
||||||
|
<transport_id>rdk_shm</transport_id>
|
||||||
|
<type>SHM</type>
|
||||||
|
</transport_descriptor>
|
||||||
|
</transport_descriptors>
|
||||||
|
|
||||||
|
<participant profile_name="rdk_dds_164" is_default_profile="true">
|
||||||
|
<rtps>
|
||||||
|
<builtin>
|
||||||
|
<initialPeersList>
|
||||||
|
<locator>
|
||||||
|
<udpv4>
|
||||||
|
<address>192.168.10.151</address>
|
||||||
|
</udpv4>
|
||||||
|
</locator>
|
||||||
|
</initialPeersList>
|
||||||
|
</builtin>
|
||||||
|
<userTransports>
|
||||||
|
<transport_id>rdk_udp_164</transport_id>
|
||||||
|
<transport_id>rdk_shm</transport_id>
|
||||||
|
</userTransports>
|
||||||
|
<useBuiltinTransports>false</useBuiltinTransports>
|
||||||
|
</rtps>
|
||||||
|
</participant>
|
||||||
|
</profiles>
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 3:创建 RDKx5 环境脚本**
|
||||||
|
|
||||||
|
用 `apply_patch` 创建 `use_rdk_dds_164.sh`,完整内容为:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
|
||||||
|
echo "ERROR: source this file instead of executing it" >&2
|
||||||
|
exit 64
|
||||||
|
fi
|
||||||
|
|
||||||
|
_rdk_dds_profile="/home/sunrise/yiliao_ws/config/dds/fastdds_rdk_164.xml"
|
||||||
|
|
||||||
|
if ! ip -4 addr show dev wlx200db0c3fca5 2>/dev/null | grep -q 'inet 192\.168\.10\.164/'; then
|
||||||
|
echo "ERROR: wlx200db0c3fca5 does not own 192.168.10.164" >&2
|
||||||
|
unset _rdk_dds_profile
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -r "${_rdk_dds_profile}" ]]; then
|
||||||
|
echo "ERROR: unreadable Fast DDS profile: ${_rdk_dds_profile}" >&2
|
||||||
|
unset _rdk_dds_profile
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export ROS_DOMAIN_ID=22
|
||||||
|
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
|
||||||
|
export ROS_LOCALHOST_ONLY=0
|
||||||
|
export FASTRTPS_DEFAULT_PROFILES_FILE="${_rdk_dds_profile}"
|
||||||
|
export FASTDDS_DEFAULT_PROFILES_FILE="${_rdk_dds_profile}"
|
||||||
|
|
||||||
|
printf 'DDS link enabled: domain=%s rmw=%s local=192.168.10.164 profile=%s\n' \
|
||||||
|
"${ROS_DOMAIN_ID}" "${RMW_IMPLEMENTATION}" "${_rdk_dds_profile}"
|
||||||
|
unset _rdk_dds_profile
|
||||||
|
```
|
||||||
|
|
||||||
|
设置权限:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
chmod 0644 /home/sunrise/yiliao_ws/config/dds/fastdds_rdk_164.xml
|
||||||
|
chmod 0755 /home/sunrise/yiliao_ws/config/dds/use_rdk_dds_164.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 4:验证语法和 Fast DDS 实际加载**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash -n /home/sunrise/yiliao_ws/config/dds/use_rdk_dds_164.sh
|
||||||
|
python3 -c "import xml.etree.ElementTree as ET; ET.parse('/home/sunrise/yiliao_ws/config/dds/fastdds_rdk_164.xml'); print('XML well-formed')"
|
||||||
|
source /opt/ros/humble/setup.bash
|
||||||
|
source /home/sunrise/yiliao_ws/config/dds/use_rdk_dds_164.sh
|
||||||
|
python3 -c "import rclpy; rclpy.init(); n=rclpy.create_node('rdk_dds_profile_check'); print('RMW participant created'); n.destroy_node(); rclpy.shutdown()"
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:依次输出 `XML well-formed`、环境摘要和 `RMW participant created`,stderr 中没有 XML profile 或 transport 错误。
|
||||||
|
|
||||||
|
- [ ] **Step 5:记录 RDKx5 文件内容与校验值**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sha256sum \
|
||||||
|
/home/sunrise/yiliao_ws/config/dds/fastdds_rdk_164.xml \
|
||||||
|
/home/sunrise/yiliao_ws/config/dds/use_rdk_dds_164.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
用 `apply_patch` 在本文件的实施记录中加入两个文件的完整内容、权限、SHA-256 和 Step 4 的结果。
|
||||||
|
|
||||||
|
- [ ] **Step 6:只提交 RDKx5 配置和文档**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /home/sunrise/yiliao_ws
|
||||||
|
git add -- \
|
||||||
|
config/dds/fastdds_rdk_164.xml \
|
||||||
|
config/dds/use_rdk_dds_164.sh \
|
||||||
|
docs/crucial_change/2026-07-23-fastdds-164-network-change.md
|
||||||
|
git diff --cached --check
|
||||||
|
git diff --cached --name-only
|
||||||
|
git commit -m "feat: add dedicated Fast DDS 164 profile" -- \
|
||||||
|
config/dds/fastdds_rdk_164.xml \
|
||||||
|
config/dds/use_rdk_dds_164.sh \
|
||||||
|
docs/crucial_change/2026-07-23-fastdds-164-network-change.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:提交只包含上述三个路径。
|
||||||
|
|
||||||
|
### Task 3:WSL Fast DDS 配置
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
|
||||||
|
- Create: `/home/hikos/Yiliao2026/config/dds/fastdds_wsl_151.xml`
|
||||||
|
- Create: `/home/hikos/Yiliao2026/config/dds/use_wsl_dds_164_link.sh`
|
||||||
|
- Modify: `/home/sunrise/yiliao_ws/docs/crucial_change/2026-07-23-fastdds-164-network-change.md`
|
||||||
|
|
||||||
|
- [ ] **Step 1:运行存在性测试并确认失败**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
test -f /home/hikos/Yiliao2026/config/dds/fastdds_wsl_151.xml && \
|
||||||
|
test -f /home/hikos/Yiliao2026/config/dds/use_wsl_dds_164_link.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:返回非零,因为两个文件尚未创建。
|
||||||
|
|
||||||
|
- [ ] **Step 2:创建 WSL XML**
|
||||||
|
|
||||||
|
创建目录 `/home/hikos/Yiliao2026/config/dds`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p /home/hikos/Yiliao2026/config/dds
|
||||||
|
```
|
||||||
|
|
||||||
|
然后用 `apply_patch` 创建 `fastdds_wsl_151.xml`,完整内容为:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
|
||||||
|
<transport_descriptors>
|
||||||
|
<transport_descriptor>
|
||||||
|
<transport_id>wsl_udp_151</transport_id>
|
||||||
|
<type>UDPv4</type>
|
||||||
|
<interfaceWhiteList>
|
||||||
|
<address>192.168.10.151</address>
|
||||||
|
</interfaceWhiteList>
|
||||||
|
</transport_descriptor>
|
||||||
|
<transport_descriptor>
|
||||||
|
<transport_id>wsl_shm</transport_id>
|
||||||
|
<type>SHM</type>
|
||||||
|
</transport_descriptor>
|
||||||
|
</transport_descriptors>
|
||||||
|
|
||||||
|
<participant profile_name="wsl_dds_151" is_default_profile="true">
|
||||||
|
<rtps>
|
||||||
|
<builtin>
|
||||||
|
<initialPeersList>
|
||||||
|
<locator>
|
||||||
|
<udpv4>
|
||||||
|
<address>192.168.10.164</address>
|
||||||
|
</udpv4>
|
||||||
|
</locator>
|
||||||
|
</initialPeersList>
|
||||||
|
</builtin>
|
||||||
|
<userTransports>
|
||||||
|
<transport_id>wsl_udp_151</transport_id>
|
||||||
|
<transport_id>wsl_shm</transport_id>
|
||||||
|
</userTransports>
|
||||||
|
<useBuiltinTransports>false</useBuiltinTransports>
|
||||||
|
</rtps>
|
||||||
|
</participant>
|
||||||
|
</profiles>
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 3:创建 WSL 环境脚本**
|
||||||
|
|
||||||
|
用 `apply_patch` 创建 `use_wsl_dds_164_link.sh`,完整内容为:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
|
||||||
|
echo "ERROR: source this file instead of executing it" >&2
|
||||||
|
exit 64
|
||||||
|
fi
|
||||||
|
|
||||||
|
_wsl_dds_profile="/home/hikos/Yiliao2026/config/dds/fastdds_wsl_151.xml"
|
||||||
|
|
||||||
|
if ! ip -4 addr show dev eth4 2>/dev/null | grep -q 'inet 192\.168\.10\.151/'; then
|
||||||
|
echo "ERROR: eth4 does not own 192.168.10.151" >&2
|
||||||
|
unset _wsl_dds_profile
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -r "${_wsl_dds_profile}" ]]; then
|
||||||
|
echo "ERROR: unreadable Fast DDS profile: ${_wsl_dds_profile}" >&2
|
||||||
|
unset _wsl_dds_profile
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export ROS_DOMAIN_ID=22
|
||||||
|
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
|
||||||
|
export ROS_LOCALHOST_ONLY=0
|
||||||
|
export FASTRTPS_DEFAULT_PROFILES_FILE="${_wsl_dds_profile}"
|
||||||
|
export FASTDDS_DEFAULT_PROFILES_FILE="${_wsl_dds_profile}"
|
||||||
|
|
||||||
|
printf 'DDS link enabled: domain=%s rmw=%s local=192.168.10.151 peer=192.168.10.164 profile=%s\n' \
|
||||||
|
"${ROS_DOMAIN_ID}" "${RMW_IMPLEMENTATION}" "${_wsl_dds_profile}"
|
||||||
|
unset _wsl_dds_profile
|
||||||
|
```
|
||||||
|
|
||||||
|
设置权限:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
chmod 0644 /home/hikos/Yiliao2026/config/dds/fastdds_wsl_151.xml
|
||||||
|
chmod 0755 /home/hikos/Yiliao2026/config/dds/use_wsl_dds_164_link.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 4:验证语法和 Fast DDS 实际加载**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash -n /home/hikos/Yiliao2026/config/dds/use_wsl_dds_164_link.sh
|
||||||
|
python3 -c "import xml.etree.ElementTree as ET; ET.parse('/home/hikos/Yiliao2026/config/dds/fastdds_wsl_151.xml'); print('XML well-formed')"
|
||||||
|
source /opt/ros/humble/setup.bash
|
||||||
|
source /home/hikos/Yiliao2026/config/dds/use_wsl_dds_164_link.sh
|
||||||
|
python3 -c "import rclpy; rclpy.init(); n=rclpy.create_node('wsl_dds_profile_check'); print('RMW participant created'); n.destroy_node(); rclpy.shutdown()"
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:依次输出 `XML well-formed`、环境摘要和 `RMW participant created`,stderr 中没有 XML profile 或 transport 错误。
|
||||||
|
|
||||||
|
- [ ] **Step 5:记录 WSL 文件并提交**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sha256sum \
|
||||||
|
/home/hikos/Yiliao2026/config/dds/fastdds_wsl_151.xml \
|
||||||
|
/home/hikos/Yiliao2026/config/dds/use_wsl_dds_164_link.sh
|
||||||
|
cd /home/hikos/Yiliao2026
|
||||||
|
git add -- \
|
||||||
|
config/dds/fastdds_wsl_151.xml \
|
||||||
|
config/dds/use_wsl_dds_164_link.sh
|
||||||
|
git diff --cached --check
|
||||||
|
git diff --cached --name-only
|
||||||
|
git commit -m "feat: bind WSL Fast DDS to 192.168.10.151" -- \
|
||||||
|
config/dds/fastdds_wsl_151.xml \
|
||||||
|
config/dds/use_wsl_dds_164_link.sh
|
||||||
|
git rev-parse HEAD
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:提交只包含两个 WSL 配置文件。用 `apply_patch` 把文件完整内容、权限、SHA-256、加载验证结果和 WSL commit 写入 RDKx5 的唯一变更文档,然后单独提交该文档:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /home/sunrise/yiliao_ws
|
||||||
|
git add -- docs/crucial_change/2026-07-23-fastdds-164-network-change.md
|
||||||
|
git diff --cached --check
|
||||||
|
git diff --cached --name-only
|
||||||
|
git commit -m "docs: record WSL Fast DDS deployment" -- \
|
||||||
|
docs/crucial_change/2026-07-23-fastdds-164-network-change.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:RDKx5 本次提交只包含该 Markdown 文档。
|
||||||
|
|
||||||
|
### Task 4:双向通信与网卡检查
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
|
||||||
|
- Modify: `/home/sunrise/yiliao_ws/docs/crucial_change/2026-07-23-fastdds-164-network-change.md`
|
||||||
|
|
||||||
|
- [ ] **Step 1:清理 ROS 2 daemon 并加载双方环境**
|
||||||
|
|
||||||
|
RDKx5:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
source /opt/ros/humble/setup.bash
|
||||||
|
source /home/sunrise/yiliao_ws/install/setup.bash
|
||||||
|
source /home/sunrise/yiliao_ws/config/dds/use_rdk_dds_164.sh
|
||||||
|
ros2 daemon stop || true
|
||||||
|
```
|
||||||
|
|
||||||
|
WSL:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
source /opt/ros/humble/setup.bash
|
||||||
|
source /home/hikos/Yiliao2026/config/dds/use_wsl_dds_164_link.sh
|
||||||
|
ros2 daemon stop || true
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:两个终端显示 Domain 22、Fast DDS 和各自本地专用地址。
|
||||||
|
|
||||||
|
- [ ] **Step 2:验证 WSL 到 RDKx5**
|
||||||
|
|
||||||
|
先在 RDKx5 运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
timeout 20 ros2 topic echo /dds_164_smoke_20260723 std_msgs/msg/String --once
|
||||||
|
```
|
||||||
|
|
||||||
|
随后在 WSL 运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ros2 topic pub --once /dds_164_smoke_20260723 std_msgs/msg/String "{data: wsl_to_rdk}"
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:RDKx5 输出 `data: wsl_to_rdk`。
|
||||||
|
|
||||||
|
- [ ] **Step 3:验证 RDKx5 到 WSL**
|
||||||
|
|
||||||
|
先在 WSL 运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
timeout 20 ros2 topic echo /dds_164_smoke_return_20260723 std_msgs/msg/String --once
|
||||||
|
```
|
||||||
|
|
||||||
|
随后在 RDKx5 运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ros2 topic pub --once /dds_164_smoke_return_20260723 std_msgs/msg/String "{data: rdk_to_wsl}"
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:WSL 输出 `data: rdk_to_wsl`。
|
||||||
|
|
||||||
|
- [ ] **Step 4:确认 DDS 使用 `.164` 而非 `.210`**
|
||||||
|
|
||||||
|
在 RDKx5 两个终端同时开始短抓包:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo timeout 15 tcpdump -ni wlx200db0c3fca5 -c 5 'udp and host 192.168.10.151'
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo timeout 15 tcpdump -ni wlan0 -c 1 'udp and host 192.168.10.151'
|
||||||
|
```
|
||||||
|
|
||||||
|
抓包期间重复 Step 2 的一次发布。Expected:`wlx200db0c3fca5` 捕获到 UDP;`wlan0` 超时且捕获 `0 packets`。当前 SSH 命令仍能返回:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh sunrise@192.168.10.210 'echo management-link-ok'
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 5:记录并提交精简验证结果**
|
||||||
|
|
||||||
|
用 `apply_patch` 写入双向消息结果、两张网卡的抓包摘要和 `management-link-ok`。如果任一步失败,停止到 Task 6 的快速回滚,不启动 Nav2。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /home/sunrise/yiliao_ws
|
||||||
|
git add -- docs/crucial_change/2026-07-23-fastdds-164-network-change.md
|
||||||
|
git diff --cached --check
|
||||||
|
git commit -m "docs: record dedicated DDS link verification" -- \
|
||||||
|
docs/crucial_change/2026-07-23-fastdds-164-network-change.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### Task 5:实际 `obstacle_nav2` 最小验证
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
|
||||||
|
- Modify: `/home/sunrise/yiliao_ws/docs/crucial_change/2026-07-23-fastdds-164-network-change.md`
|
||||||
|
|
||||||
|
- [ ] **Step 1:安全启动 Nav2**
|
||||||
|
|
||||||
|
在已加载 RDKx5 专用 DDS 环境的终端运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ros2 launch obstacle_nav2 obstacle_nav2.launch.py enable_motion:=false
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:launch 启动,真实底盘速度输出仍映射到 `/cmd_vel_disabled`。
|
||||||
|
|
||||||
|
- [ ] **Step 2:WSL 检查关键话题**
|
||||||
|
|
||||||
|
在已加载 WSL 专用 DDS 环境的终端运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ros2 topic list | grep -E '^/obstacles$|^/local_costmap/costmap$|^/global_costmap/costmap$'
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:至少出现 `/obstacles`,并出现 local/global costmap 话题;如果当前 Nav2 使用 `costmap_raw` 命名,则记录实际名称,不修改 Nav2 参数。
|
||||||
|
|
||||||
|
- [ ] **Step 3:结束测试并记录结果**
|
||||||
|
|
||||||
|
使用 `Ctrl+C` 正常停止本次 launch。用 `apply_patch` 记录启动命令、关键话题、停止方式和最终结论;不执行运动目标、不修改 costmap 参数。
|
||||||
|
|
||||||
|
- [ ] **Step 4:提交最终记录**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /home/sunrise/yiliao_ws
|
||||||
|
git add -- docs/crucial_change/2026-07-23-fastdds-164-network-change.md
|
||||||
|
git diff --cached --check
|
||||||
|
git commit -m "docs: finalize Fast DDS 164 deployment record" -- \
|
||||||
|
docs/crucial_change/2026-07-23-fastdds-164-network-change.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### Task 6:回滚演练说明与最终核对
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
|
||||||
|
- Modify: `/home/sunrise/yiliao_ws/docs/crucial_change/2026-07-23-fastdds-164-network-change.md`
|
||||||
|
|
||||||
|
- [ ] **Step 1:写明快速回滚命令**
|
||||||
|
|
||||||
|
停止由专用环境启动的 ROS 节点后,在当前终端执行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
unset FASTRTPS_DEFAULT_PROFILES_FILE
|
||||||
|
unset FASTDDS_DEFAULT_PROFILES_FILE
|
||||||
|
unset RMW_IMPLEMENTATION
|
||||||
|
unset ROS_LOCALHOST_ONLY
|
||||||
|
export ROS_DOMAIN_ID=22
|
||||||
|
```
|
||||||
|
|
||||||
|
推荐的实际快速回滚方式是关闭该终端并新开终端,避免残留环境变量。将上述命令原样保存在实施记录中。
|
||||||
|
|
||||||
|
- [ ] **Step 2:写明文件级回滚命令,但成功时不执行**
|
||||||
|
|
||||||
|
只有用户要求撤销或部署失败时才执行。执行前分别确认四个绝对路径仍位于批准目录,然后删除具体文件,不递归删除工作空间:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rm -- \
|
||||||
|
/home/sunrise/yiliao_ws/config/dds/fastdds_rdk_164.xml \
|
||||||
|
/home/sunrise/yiliao_ws/config/dds/use_rdk_dds_164.sh
|
||||||
|
rmdir --ignore-fail-on-non-empty /home/sunrise/yiliao_ws/config/dds
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rm -- \
|
||||||
|
/home/hikos/Yiliao2026/config/dds/fastdds_wsl_151.xml \
|
||||||
|
/home/hikos/Yiliao2026/config/dds/use_wsl_dds_164_link.sh
|
||||||
|
rmdir --ignore-fail-on-non-empty /home/hikos/Yiliao2026/config/dds
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 3:最终范围核对**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git -C /home/sunrise/yiliao_ws status --short
|
||||||
|
git -C /home/sunrise/yiliao_ws log -5 --oneline
|
||||||
|
git -C /home/hikos/Yiliao2026 status --short
|
||||||
|
git -C /home/hikos/Yiliao2026 log -3 --oneline
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:新提交只涉及四个 DDS 配置文件和本 Markdown;原有 dirty files 仍保持原状态,未被暂存、修改或清理。
|
||||||
|
|||||||
Reference in New Issue
Block a user