# ros2 topic list is empty or nodes cannot see each other: ROS\_DOMAIN\_ID

> Fix ROS 2 nodes that cannot see each other: set the same ROS\_DOMAIN\_ID, check the network and firewall, and source the right setup file.

Canonical: https://roboticsengineering.in/fix/ros2-topic-list-empty-domain-id/ | Published: 2026-11-03 | Updated: 2026-11-03

**ROS 2 nodes only see each other when they use the same ROS_DOMAIN_ID and can reach each other on the network.**

## What the message means

Discovery is automatic inside a domain. Different domain numbers keep nodes apart, and a firewall can block the discovery traffic between machines.

## Fix it in this order

1. Print echo $ROS_DOMAIN_ID in both terminals and make them the same.
2. Check that both machines are on the same network and can reach each other.
3. Allow the discovery traffic through the firewall, or test with the firewall off on a safe network.
4. Make sure both sides use the same ROS 2 distribution and middleware.
5. Run the node and ros2 topic list in terminals that both sourced the setup file.

## If you see this, do this

| You see | Do this |
| --- | --- |
| List empty on a second machine | Domain ID, network or firewall. |
| Works on one machine only | Check discovery between machines. |

## Related

[ros2 command not found](https://roboticsengineering.in/fix/ros2-command-not-found-source-setup-bash/), [Gazebo and ROS 2](https://roboticsengineering.in/gazebo-ros2-simulation-tutorial/).

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.
