# Can someone show me an example of remote node discovery using ros2 command?

**URL:** <https://discourse.openrobotics.org/t/can-someone-show-me-an-example-of-remote-node-discovery-using-ros2-command/4654>\
**Category:** ROS General\
**Tags:** ros2\
**Created:** [May 1, 2018, 7:25am UTC](https://discourse.openrobotics.org/t/can-someone-show-me-an-example-of-remote-node-discovery-using-ros2-command/4654 "2018-05-01T07:25:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![djyifly](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@djyifly](https://discourse.openrobotics.org/u/djyifly)\
**Post date:** [May 1, 2018, 7:25am UTC](https://discourse.openrobotics.org/t/can-someone-show-me-an-example-of-remote-node-discovery-using-ros2-command/4654/1 "2018-05-01T07:25:39Z")

</div>

Hi, I have just installed ROS2 on two different hosts (different sub-network, different version operating system, etc), and on one of them I have:

ROS\_VERSION=2  
ROS\_DISTRO=ardent  
ROS\_DOMAIN\_ID=12345

on the other of them I have:

ROS\_VERSION=2  
ROS\_DISTRO=bouncy  
ROS\_DOMAIN\_ID=12345

I can reach the second host from the first host via ssh.

Then I run

ros2 run demo\_nodes\_cpp talker

on one of them, I can see “ros2 topic list” and “ros2 node list” find out about the talker on that same host, but if I run these commands on the other host then they show nothing.

I am certain that the FastRTPS RMW implementation has been built in both installations.

Can someone show me an example command for discovery of remote ros2 node and topic that I can try on these two hosts? Thanks!

---

<div class="post-metadata">

**Author:** ![wjwwood](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/wjwwood/32/13715_2.png) [@wjwwood](https://discourse.openrobotics.org/u/wjwwood)\
**Post date:** [May 1, 2018, 8:14am UTC](https://discourse.openrobotics.org/t/can-someone-show-me-an-example-of-remote-node-discovery-using-ros2-command/4654/2 "2018-05-01T08:14:04Z")

</div>

First, I would recommend using the same ROS 2 version of both sides (I see you’re using Ardent and Bouncy, which is just master right now).

Second, makes sure multicast UDP is working between machines. You can use `netcat` to check, see:

> <https://serverfault.com/questions/294207/how-can-i-test-multicast-udp-connectivity-between-two-servers/315564#315564>

If that works and discovery still isn’t happening, then consider filing an issue because that might be a bug.

---

<div class="post-metadata">

**Author:** ![codebot](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/codebot/32/125_2.png) [@codebot](https://discourse.openrobotics.org/u/codebot)\
**Post date:** [May 1, 2018, 1:45pm UTC](https://discourse.openrobotics.org/t/can-someone-show-me-an-example-of-remote-node-discovery-using-ros2-command/4654/3 "2018-05-01T13:45:30Z")

</div>

In addition to what @wjwwood suggested, I would suggest trying a much lower value of ROS\_DOMAIN\_ID, say something less than 100.

---

<div class="post-metadata">

**Author:** ![rsterner](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/rsterner/32/1821_2.png) [@rsterner](https://discourse.openrobotics.org/u/rsterner)\
**Post date:** [May 1, 2018, 2:26pm UTC](https://discourse.openrobotics.org/t/can-someone-show-me-an-example-of-remote-node-discovery-using-ros2-command/4654/4 "2018-05-01T14:26:20Z")

</div>

At least with RTI’s version of DDS you cannot go that high with domain IDs. Their maximum recommended Domain ID is 232.  
[Max RTI DDS Domain ID](https://community.rti.com/static/documentation/connext-dds/5.3.0/doc/manuals/connext_dds/html_files/RTI_ConnextDDS_CoreLibraries_UsersManual/Content/UsersManual/ChoosingDomainID.htm)

---

<div class="post-metadata">

**Author:** ![djyifly](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@djyifly](https://discourse.openrobotics.org/u/djyifly)\
**Post date:** [May 1, 2018, 11:25pm UTC](https://discourse.openrobotics.org/t/can-someone-show-me-an-example-of-remote-node-discovery-using-ros2-command/4654/5 "2018-05-01T23:25:10Z")

</div>

Thanks! I see that UDP is not working between them, I will try to get that set up. Thanks very much again!

---

<div class="post-metadata">

**Author:** ![djyifly](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@djyifly](https://discourse.openrobotics.org/u/djyifly)\
**Post date:** [May 5, 2018, 1:04pm UTC](https://discourse.openrobotics.org/t/can-someone-show-me-an-example-of-remote-node-discovery-using-ros2-command/4654/6 "2018-05-05T13:04:56Z")

</div>

Now, the ROS2 version of both sides are same and ROS\_DOMAIN\_ID=10. The iperf show the multicast UDP is working. But when I run talker on one host, the listener on the other host can not get any message. The inner network address is 192.168.0.103 and 192.168.0.104.  
Can someone show me an example command for discovery of remote ros2 node and topic that I can try on these two hosts? Thanks!
