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
- Print echo $ROS_DOMAIN_ID in both terminals and make them the same.
- Check that both machines are on the same network and can reach each other.
- Allow the discovery traffic through the firewall, or test with the firewall off on a safe network.
- Make sure both sides use the same ROS 2 distribution and middleware.
- 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, Gazebo and ROS 2.
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.