ROS2: communication over two machines on the same network
Hi everybody,
I am experiencing a weird problem with ROS2 foxy. Basically I have one machine that is not able to commuinate over ROS2 with others on the same network.
Let me give you some details:
MACHINE 1 (the one with the problem) Laptop DELL Ubuntu 20.04 LTS ROS2 Foxy
MACHINE 2 (this one is able to communicate with others in the same network but not with MACHINE 1) Laptop DELL Ubuntu 18.04 LTS ROS2 Foxy
Machine 1 cannot discover topic being published, and if it publish I cannot see the topics being published on Machine2(or any other machine)
I am able to ping M1 from M2 and viceversa, ROS_DOMAIN_ID is not set and even if I set it, that does not solve the problem. I would exclude that the porblem is because of the mismatch of two OS, in fact I have other machines with Ubuntu 20.024 able to communicate over ros topics.
Anybody has any clue on what's going on here?
I already tried to uninstall and reinstall ROS, that did not fix the issue
Can you please! provide all steps you have followed. Thanks
I am not sure what do you mean with all the steps I have followed. I publish a topic with ros2 topic pub /topicXYZ msg_type (e.g. ros2 topic pub /asdfg nav_msgs/msg/Path) and on the other machine I use ros2 topic echo /topicXYZ (e.g. ros2 topic echo /asdfg)
I was telling you about configuration steps, Do you have /topicXYZ msg file in other machines? If no then I would suggest to add the following msg file and build a package and try.
That message type is installed in both machines
Main Pc:
Second Pc:
This was my configuration while connecting 2 PC.
You have to include this in your bashrc file.
Thank you for your support and time but the problem was the firewall, sudo ufw disable solved the issue
make it an answer and tick it.
ROS2 does not use any of those environment variables to connect.