Data not sent when using multiple machines
I have been trying to get communication working between multiple machines. I have followed this tutorial https://razbotics.wordpress.com/2018/... 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).
The tutorial you link hard-codes IP addresses using
ROS_IP
(and also withROS_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 ofecho $ROS_IP
.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.
Subscriptions being setup but not getting any data is the main symptom of
ROS_IP
and/orROS_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 useROS_IP
.