0
$\begingroup$

Rosanswers logo

Hello, I am a beginner of ros2, and I'm trying to send ros message from window 10 PC to Ubuntu PC. Both PC is installed ROS2 and I just implement the listener and talker of demo_nodes_cpp project in different PC.

But it can not communicate ecah other. I also check the ros node list in Ubuntu and Window. I also, used two RMW types (Fast_RTPS, RTI). When I did test the talker and listener nodes in one PC, it was worked fine, but it cannot cummunicate with other PC. There is no error or warrning message.

Is there anything that i miss for the communication in multi-PC?

please help me.... I spent 4 days for this problem....


Originally posted by gkdixp19 on ROS Answers with karma: 56 on 2018-08-23

Post score: 3


Original comments

Comment by gvdhoorn on 2018-08-23:
Can you provide a little more details on the network configuration? Are both PCs in the same network? Are they using the same IP subnet? How are the firewalls configured? Are you using the same Domain ID on all PCs?

Comment by gkdixp19 on 2018-08-23:
Yes all PC is in the same network and same IP subnet and I truned off the firewalls.

But I don't know how to check the Domain ID.... How to check???

Comment by Karsten on 2018-08-24:
Make sure you can ping both machines from each other and that talker/listener work on both machines individually. The ROS_DOMAIN_ID is an environment variable: https://discourse.ros.org/t/how-to-run-example-talker-listener-on-2-machines-with-different-ipaddr/2106

Comment by gkdixp19 on 2018-08-24:
Thank you for answer, Karsten. I checked both machines can work talker/listener, and i also, check both machines can ping each other

I set the ROS_DOMAIN_ID=1 for both machines but, it can not communicate...

Comment by pokitoz on 2018-08-24:
If you have an RTI license, you can check if the talker and listener are matching using the RTI Admin software. Or use Wireshark to check the RTPS messages. I would suggest to try using the same RMW (RTI-RTI or FastRTPS-FastRTPS) to make sure the it is not an interoperability issue.

Comment by pokitoz on 2018-08-24:
Just to make sure about the configuration you have, can you list the network interfaces you have on Windows and Ubuntu and edit your question with this information?

Comment by pokitoz on 2018-08-24:
One last question, are the talker/listener communicating if they are on the same machine? (and if they are built on the same OS)

Comment by Karsten on 2018-08-24:
when using RTI, make sure it is configured for multicast and not for SHM.

Comment by gkdixp19 on 2018-08-26:
Thank you pokitoz, I checked using RTI admin software, but there is no record or result of connection. I also check my network interface in ubuntu and window, there is only one interface in both. And, talker and listener can communicate in one machine. In every case, I use the same RMW implementatio

Comment by gkdixp19 on 2018-08-26:
Thank you Karsten. acturally, i guess, my window PC is not set to allow the mulicast. because when i did 'ping 224.0.0.1', there is error. it cannot send.

how can i set my window pc to allow multicast??

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Thank you for every answer!!

I figured out the solution of my problem.

  1. I removed all interfaces exept one in Window and Ubuntu PC.
  2. I allowed the multicast for both PC.
  3. I set the rm_filer? parameter of Ubuntu PC.

Originally posted by gkdixp19 with karma: 56 on 2018-08-27

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Karsten on 2018-08-27:
glad you managed to get it to work. Feel free to mark yours or the latest recap as a correct answer. So people who stumble upon this question via search engines can find it as a solution.

Comment by alsora on 2018-08-28:
Hi could you provide more details about how to do each step? Thanks

Comment by navrattanp on 2019-03-12:
CAN you please explain the third step . What is rm_filer ? where is it and how to set it ? Please explain I am also trying the same thing as you but I am struck ? Did you connected using ethernet cable or a router ?

Comment by anonymous53443 on 2020-04-13:
Hey. Can you explain those steps better? I'm having the same issue but I can't figure out the solution.

$\endgroup$
0
$\begingroup$

Rosanswers logo

As a simple recap from all the comments (@Karsten, @gvdhoorn). In order to communicate between two machines using ROS2 DDS:

  • Update the configuration to allow the communication in your Firewall (or disable it)
  • Look at the different networking interfaces (ifconfig on ubuntu, Ipconfig /all on windows)
  • Make sure to have the two machines under the same subnetwork (same network mask,.. )
  • Make sure that the DDS libraries are using the correct interface
  • Make sure that the DDS libraries are not using shared memory communication (versus multicast)
  • Enable your network switch to use multicast
  • Try pinging the two machines between each others
  • Export the same ROS_DOMAIN_ID (https://discourse.ros.org/t/how-to-run-example-talker-listener-on-2-machines-with-different-ipaddr/2106)

Originally posted by pokitoz with karma: 527 on 2018-08-27

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2018-08-28:
Nitpick, but: I would not recommend people to disable their firewalls. I know you have "(or update the configuration ..)" added there, but I would suggest making that the first part of the sentence. Then perhaps say something about disabling.

Many ppl only see the first part and just disable.

Comment by navrattanp on 2019-03-15:
IT IS NOT rm_filer . It is rm_filter

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.