Data not sent when using multiple machines

asked 2020-05-09 11:03:32 -0500

zells gravatar image

I have been trying to get communication working between multiple machines. I have followed this tutorial and at first it worked, but then stopped all of a sudden. I have configured .bashrc so that rpi uses master on pc, and it even shows the rostopic when I start the turtle_teleop_key, but no data is sent. If i start another node on the pc, the rpi node gets kicked off and vice versa, but node from rpi doesn't send any data. The pc is running ubuntu with melodic and rpi has the ubiquityrobot image (kinetic).

edit retag flag offensive close merge delete


The tutorial you link hard-codes IP addresses using ROS_IP (and also with ROS_HOSTNAME, which should not be set to an IP at all).

It's possible your RPi doesn't have the IP address any more it had earlier. Incorrect settings for ROS_IP are the main cause of what you describe.

I'd check with ip addr show what the IP address is of your RPi and compare it with the output of echo $ROS_IP.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-09 14:16:33 -0500 )edit

I have tried using both, hard-coded ip and flexible ip (ubuntu@qbiquityrobot.local). The flexible one worked at first but then stopped without me changing anything. The thing is that the RPI knows about ros master on PC and connects, but fails to send any data. For example, when i run boxturtle, it shows the node connected and in rqt_graph everything is normal but it isn't registering any key presses.

zells gravatar image zells  ( 2020-05-10 02:07:02 -0500 )edit

Subscriptions being setup but not getting any data is the main symptom of ROS_IP and/or ROS_HOSTNAME not being set correctly.

You haven't confirmed whether the value you had their previously was indeed with a different IP.

You'll either have to make sure you have a working DNS and then use ROS_HOSTNAME, or configure fixed IPs and then use ROS_IP.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-10 03:56:36 -0500 )edit