Hi, I’m running
- Ros Kinetic under Ubuntu 16.04. The IP address are: 192.168.1.101 (master) on RPi4 - Robot
- Ros noetic, ubuntu 20.04, slave on my labtop 192.168.1.102 ,
Both are connected to the same router. I run turtlebot3_slam on the slave-labtop to read lidar data from master-rpi4. All computation task do on labtop. With internet connect to router, The ROS communication between both machines works great , I could run turtlebot3 navigation and slam on slave-labtop with lidar data from master-rpi4.
With no internet connection, the ping command responses slow from both sides and I could not run navigation or slam because slow responde data from lidar. Has anyone encountered this problem?
- Edited:
For example: rostopic echo /scan
With internet: It took 1s to show /scan data.
Without internet: It take 20 s to setup connect and get /scan info.
After lidar /scan data show, ping rate is similar. I thought the problem here, It took alot of time to set direct connecttion between publisher (Rpi4) and subscriber (labtop) when without internet. .
Thanh you aarsh_t ,I have tried to diffirent wifi router, set rosmaster on Labtop, same problem happen.
I have tried google search but could not find solution. I tried use multimaster but It does not improve Ros communication on router without internet. http://wiki.ros.org/multimaster_fkie/Tutorials/Setup%20a%20ROS%20master%20synchronization
Some topic i have found: http://wiki.ros.org/ROS/Tutorials/MultipleMachines https://answers.ros.org/question/379170/start-roscore-slower-without-internet-connection/ https://answers.ros.org/question/218739/connecting-to-a-ros-master-without-internet/
Originally posted by BaBui on ROS Answers with karma: 11 on 2022-05-19
Post score: 0
Original comments
Comment by Joe28965 on 2022-05-20:
On the second question you posted, Redhwan posted an answer to address your question. I suggest trying that and commenting on that answer if something goes wrong.
Comment by gvdhoorn on 2022-05-23:
It's possible this has to do with DNS timeouts.
Make sure you can either resolve all hostnames to their IP addresses without relying on your router, or don't use hostnames at all (by setting ROS_IP
and ROS_MASTER_URI
to IPs, instead of hostnames).
I'd recommend to use Wireshark to check what's going on in case of the slowdowns you observe.
I tried use multimaster but I does not improve Ros communication on router without internet
I'd also recommend to stay away from more complicated setups -- which multimaster_fkie
definitely is -- until you've figured out the cause of your problem, as adding more complexity typically does not help solving a problem like this.
Comment by aarsh_t on 2022-05-23:\
With no internet connection, the ping command responses slow from both sides
I do not think this can be the case. Try using different router or try connecting both via LAN for testing. I think upto 30-40ms of lag should be okay on wifi.
Try to setup the current time and update the RPi on robot.
Have you given thought that it might be due to the different versions of the ROS? I had somewhat similar issue and it got solved when I used similar version of ROS on both rosmaster and rosnode on PC.
One more thing I can think of is, Use your PC as rosmaster instead RPi, ssh to the Rpi and run nodes over there.
Comment by gvdhoorn on 2022-05-23:
Just to set this straight, as I keep seeing the terminology used here on ROS Answers:
[..] of ROS on both master and slave.
ROS is a peer-to-peer framework. By definition all nodes are equal.
There are no slaves, nor masters.
The ROS master only functions as DNS server. It is not directly involved in communication between nodes.
Comment by aarsh_t on 2022-05-23:
Haha yes, I should stop using it.
Comment by gvdhoorn on 2022-05-24:\
Thanh you aarsh_t and gvdhoorn ,I have tried to diffirent wifi router, set rosmaster on Labtop, same problem happen.
I did not suggest any of these things.
Comment by aarsh_t on 2022-05-27:
What is the ping rate with and without the internet connection? try to ping RPi from laptop terminal using ping IP_OF_RPi
Comment by BaBui on 2022-05-27:
Dear, aarsh_t , For example: rostopic echo /scan
With internet: It took 1s to get info.
Without internet: It take 20 s to setup connect and get /scan info.
After lidar /scan data show, ping rate is similar .
I thought the problem here, It took alot of time to set direct connecttion between publisher (Rpi4) and subscriber (labtop) when without internet.
Comment by aarsh_t on 2022-05-27:
Do not run any rosnode or roscore and try to ping the IP of RPi from Laptop. If the ping is same with or without the internet, then the issue is with the ros and if not, then issue is with the wifi.