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.