Skip to main content

ros2-multi-machine

Multi-host / container ROS 2 discovery — multicast vs unicast, Fast DDS Discovery Server, Cyclone peers, ROS_AUTOMATIC_DISCOVERY_RANGE, Docker host network. Use when robots do not see each other, containers isolate DDS, or WAN/multicast is blocked.

ソース情報

リポジトリ
guilyx/dotfiles
ソースの最終更新活動
2026年8月12日 19:39
検出された SKILL.md の言語
英語
スター
0
フォーク
0

インストール方法

デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。

ソースファイルを確認

インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。

SKILL.md を表示中

SKILL.md
ソースの指示 · 読み取り専用プレビュー
name
ros2-multi-machine
description
Multi-host / container ROS 2 discovery — multicast vs unicast, Fast DDS Discovery Server, Cyclone peers, ROS_AUTOMATIC_DISCOVERY_RANGE, Docker host network. Use when robots do not see each other, containers isolate DDS, or WAN/multicast is blocked.
# ROS 2 Multi-Machine Discovery Same `ROS_DOMAIN_ID` and **same RMW** on every host. Mixing FastDDS ↔ Cyclone = no graph. ## Isolation knobs | Knob | Effect | |------|--------| | `ROS_DOMAIN_ID` (0–101) | Logical bus | | `ROS_LOCALHOST_ONLY=1` | No off-host (Humble) | | `ROS_AUTOMATIC_DISCOVERY_RANGE` (Jazzy+) | `OFF` / `LOCALHOST` / `SUBNET` / `SYSTEM_DEFAULT` | | `ROS_STATIC_PEERS` (Jazzy+) | Unicast peer list when multicast is dead | Default multicast discovery **fails** on many clouds, Wi-Fi AP isolation, Docker bridge, and VPNs. ## Fast DDS Discovery Server When multicast is blocked, run one (or two) Discovery Servers; clients point at them (`FASTRTPS_DEFAULT_PROFILES_FILE` / `ROS_DISCOVERY_SERVER=10.0.0.1:11811`). - Server must be reachable **unicast** from all robots. - Restarting the server drops the graph until clients rediscover — treat it like DNS. - Super-client vs client: robots that must see each other all need to know the server address. ## Cyclone `CYCLONEDDS_URI` XML: - `AllowMulticast=false` + `<Peers><Peer address="host"/></Peers>` for unicast - Pin `NetworkInterface` (wrong NIC = silent empty graph) - Docker: `network_mode: host` **or** explicit peers + `/dev/shm` for intra-host large data ## Containers - Bridge NAT + multicast = pain. Prefer host network on Linux robots. - Shared memory zero-copy does not cross containers unless `/dev/shm` is shared **and** RMW is configured for it. - `ROS_LOCALHOST_ONLY=1` inside a container is a common "why can't the other pod see me". ## Debug ```bash ros2 doctor ros2 multicast receive # on A ros2 multicast send # on B getent hosts <peer> ``` If multicast test fails, do not debug QoS yet — fix discovery first (`ros2-qos-dds` is the next layer).
GitHubで見る