Skip to main content

ros2-qos-dds

Diagnose ROS 2 QoS mismatches and DDS discovery issues (RMW, domain ID, localhost-only, Cyclone/FastDDS). Use when topics have 0 subscribers despite running nodes, silent dropouts, multi-machine robots, large images/pointclouds, or the user mentions QoS, DDS, RMW_IMPLEMENTATION, ROS_DOMAIN_ID.

来源信息

仓库
guilyx/dotfiles
最近来源活动
2026年8月12日 19:39
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
ros2-qos-dds
description
Diagnose ROS 2 QoS mismatches and DDS discovery issues (RMW, domain ID, localhost-only, Cyclone/FastDDS). Use when topics have 0 subscribers despite running nodes, silent dropouts, multi-machine robots, large images/pointclouds, or the user mentions QoS, DDS, RMW_IMPLEMENTATION, ROS_DOMAIN_ID.
# ROS 2 QoS and DDS ## Compatibility (silent failure #1) | Publisher | Subscriber | OK? | |-----------|------------|-----| | RELIABLE | RELIABLE | yes | | RELIABLE | BEST_EFFORT | yes | | BEST_EFFORT | BEST_EFFORT | yes | | BEST_EFFORT | RELIABLE | **no** | Durability: `TRANSIENT_LOCAL` pub + `VOLATILE` sub → late joiners miss latch-like data. Map/static TF often need matching `TRANSIENT_LOCAL`. ## Profiles by intent - **Sensors** (camera, lidar): BEST_EFFORT, KEEP_LAST depth 1–5, VOLATILE (`SensorDataQoS`). - **Commands** (cmd_vel, goals): RELIABLE, KEEP_LAST ≥10, VOLATILE. - **Maps / latched config**: RELIABLE + TRANSIENT_LOCAL, depth 1. - Never rely on “default 10” for production — set QoS explicitly on both ends. ## Discovery / isolation ```bash export ROS_DOMAIN_ID=42 # 0–101; isolate fleets on one LAN export ROS_LOCALHOST_ONLY=1 # no off-host discovery export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp # or rmw_fastrtps_cpp ``` Same `ROS_DOMAIN_ID` + compatible RMW required across machines. Mixing RMW implementations is unsupported. ## Debug ```bash ros2 topic info /topic -v # Reliability / Durability / publishers / subscribers ros2 doctor ros2 daemon stop && ros2 daemon start ``` If `ros2 topic hz` works but your node sees nothing → almost always QoS mismatch. ## Large data - Prefer composition + intra-process (`UniquePtr` callbacks) for images/clouds in-process. - Raise DDS socket / message size (Cyclone `CYCLONEDDS_URI`) when samples exceed defaults. - Watch static arrays and nested msgs for sample-size blowups (see `ros2-interfaces`).
在 GitHub 查看