Hi @zktlks , thankyou for bringing-up this issue.
Because you mention that you are able see the topics listed from the remote computer but not in the robot itself, and also that you have setup your ROS2 to work with a Unicast setup using the Fast-DDs, it might be the case that you might have to enable Multicast in the loopback network adapter (lo
) which could solve node discovery within the robot.
sudo ifconfig lo mulitcast
sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev lo
(source) I found this Github Issue thread informative. It also explains how to enable Multicast in the robot’s loopback network while using Fast-DDS.
opened 04:30AM - 29 Sep 16 UTC
closed 02:03PM - 12 Nov 18 UTC
I ran into a couple of for me unclear things and wanted to sort them out here.
A… ll I encountered is based on [this](https://github.com/ros2/demos/tree/master/image_tools) ROS2 demo.
**1. Disabled all network devices except loopback adapter.**
I run all publisher/subscriber only locally on my machine, using the loopback device `lo` for communicating.
When doing so, the demo application aborts directly with the following message
```
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
what(): set_option: No such device
Aborted
```
From what I understand is that there is no multicast enabled device available. Does that mean, Fast-RTPS does necessarily require a multicast enabled network interface?
**2. Enabling multicast on loopback adapter**
Given the error in 1.) I explicitly enabled the multicast functionality on the `lo`.
```
sudo ifconfig lo mulitcast
sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev lo
```
With this, the demo application successfully runs and the publisher/subscriber communication works over the `lo`.
Output from wireshark:
```
Internet Protocol Version 4, Src: 0.0.0.0, Dst: 239.255.1.4
[...]
Time to live: 1
[...]
Default port mapping: MULTICAST_USERTRAFFIC, domainId=71
[...]
fragementSize: 64964
```
**3. Enabling wireless adapter**
With both adapter enabled (`lo` and `wlan0`) I run the same demo again. The communication works just fine, however in wireshark I see RTPS communication on both devices - one multicast, one unicast.
Output from wireshark (1):
```
Internet Protocol Version 4, Src: 10.0.0.177, Dst: 239.255.1.4
[...]
Time to live: 1
[...]
Default port mapping: MULTICAST_USERTRAFFIC, domainId=71
[...]
fragementSize: 64964
```
Output from wireshark (2):
```
Internet Protocol Version 4, Src: 10.0.0.177, Dst: 10.0.0177
[...]
Time to live: 64
[...]
Default port mapping: domainId=71, participantIdx=0, nature=UNICAST_USERTRAFFIC
[...]
fragementSize: 64964
```
The actual question here now is how Fast-RTPS decides which device is going to be taken for communication and why there is traffic on both devices in 3.) with one sending data in multicast and the other in unicast.
Another reference debug step you could try to fix the communication issue in Unicast is setting Peer IP addresses, as mentioned in this forum post, where they had a similar situation to yours.