Ask Your Question
2

How to communicate other PC on ROS2

asked 2018-08-23 04:43:49 -0600

gkdixp19 gravatar image

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....

edit retag flag offensive close merge delete

Comments

1

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?

gvdhoorn gravatar imagegvdhoorn ( 2018-08-23 05:40:50 -0600 )edit

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???

gkdixp19 gravatar imagegkdixp19 ( 2018-08-23 23:08:55 -0600 )edit

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-ru...

Karsten gravatar imageKarsten ( 2018-08-24 00:46:24 -0600 )edit

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...

gkdixp19 gravatar imagegkdixp19 ( 2018-08-24 00:58:25 -0600 )edit

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.

pokitoz gravatar imagepokitoz ( 2018-08-24 05:51:34 -0600 )edit

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?

pokitoz gravatar imagepokitoz ( 2018-08-24 05:53:48 -0600 )edit

One last question, are the talker/listener communicating if they are on the same machine? (and if they are built on the same OS)

pokitoz gravatar imagepokitoz ( 2018-08-24 05:56:33 -0600 )edit

when using RTI, make sure it is configured for multicast and not for SHM.

Karsten gravatar imageKarsten ( 2018-08-24 10:44:09 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-08-27 07:56:36 -0600

gkdixp19 gravatar image

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.
edit flag offensive delete link more

Comments

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.

Karsten gravatar imageKarsten ( 2018-08-27 15:56:10 -0600 )edit

Hi could you provide more details about how to do each step? Thanks

alsora gravatar imagealsora ( 2018-08-28 15:17:19 -0600 )edit

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 ?

navrattanp gravatar imagenavrattanp ( 2019-03-12 23:59:37 -0600 )edit
1

answered 2018-08-27 14:56:59 -0600

updated 2018-08-28 03:40:36 -0600

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-ru... )
edit flag offensive delete link more

Comments

1

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.

gvdhoorn gravatar imagegvdhoorn ( 2018-08-28 03:30:45 -0600 )edit

IT IS NOT rm_filer . It is rm_filter

navrattanp gravatar imagenavrattanp ( 2019-03-15 01:51:24 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-08-23 04:43:49 -0600

Seen: 746 times

Last updated: Aug 28 '18