1
$\begingroup$

I am trying to communicate to a Turtlebot 4 from my laptop. I set up the Discovery server as the documentation says and usually I can drive the robot around. However, every time I start anything with ROS2, my laptop loses connection to the WLAN I'm using. I can no longer ping the RPi on the Turtlebot. Sometimes the connection comes back within a few seconds, but sometimes it never does and I have to restart NetworkManager.

Separate from the Turtlebot 4, if I start one of the nav2 launch files, such as ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False I immediately lose connection and cannot ping any other devices on the network (including the gateway).

It seems like any time I start something ROS2 related, I lose connection. Sometimes it comes back, sometimes it doesn't.

I found this thread on the Discourse that I think is related, but I don't know enough about networking and the discovery process to know if this is my issue: https://discourse.ros.org/t/unconfigured-dds-considered-harmful-to-networks/25689/24

I'm at a university where we can only run 5GHz band networks, but my network is not connected to the Internet and it's only a couple devices on it so I'm not sure if it's the same use case as that Discourse thread.

Has anyone else experienced this, and did anything work to fix it?

Edit: If I unset the ROS_DISCOVER_SERVER variable and set ROS_LOCALHOST_ONLY to 1, then I have no issues with connectivity when starting ROS nodes. If I set ROS_LOCALHOST_ONLY to 0, then I see a very tiny gap in connectivity before it comes back. So it seems the issue is with the Discovery server config.

Edit 2: Just wanted to note that all devices on the network lose connectivity, not just the one starting the ROS2 node. This is on a run-of-the-mill retail router with only 5 devices connected to it.

Edit 3: It appears that this is only happening when the Turtlebot's Pi is on the network. If I remove it from the network and change the discovery server URI to another device, then I don't lose connection. As soon as the TB4 comes back onto the network though (regardless of the ROS_DISCOVERY_URI value, all devices seem to lose connection to each other when I start ROS2 nodes.

$\endgroup$
3
  • $\begingroup$ I am not really sure about it, could you try to change the ROS DOMAIN ID? $\endgroup$ Commented Feb 21 at 16:42
  • $\begingroup$ You shouldn't need to set up a discovery server just for this, but I do recommend at least restricting the interfaces that DDS is using to just your wireless interface using a configuration file for the particular DDS flavor that you are using. If you continue to have trouble, you might want to try using Zenoh (zenoh.io) with a Zenoh Router installed on both devices. $\endgroup$ Commented Feb 22 at 23:38
  • $\begingroup$ @JoshuaWhitley I'm not clear on how to set up the config file for this. On the config page, I don't see anything about restricting the interfaces. $\endgroup$ Commented Feb 23 at 20:37

1 Answer 1

1
$\begingroup$

I replaced the Raspberry Pi, and that seemed to fix the issue. I will get a blip in ping time for a few seconds, but then everything resumes as normal.

Edit: Nope, actually it was my router. I replaced my router, and everything has worked fine for months.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.