Search code examples
network-programmingraspberry-piros

data is not seen from the ros robot when published from the workstation (laptop)?


I have followed this tutorial from this link https://www.youtube.com/watch?v=YMG6D... for setting up and troubleshooting the ros networks. I have modified it precisely the same way as it is provided in the video. But when sending the rostopic data from the laptop to the robot, the robot cannot receive the data, but the rostopic list will shows the topic name. I have tried disabling the firewall too, but this has no effect. What could be the possible solution to this?

OS in robot: ubiquityrobot images: ubuntu 16.04. OS in laptop: ubuntu 16.04. ROS distro : kinetic

PS:

  1. I have tried using roswtf, and I have understood that two nodes are unable to establish a connection. But don't know what is blocking the rosnode to publish the data when running from the workstation.
  2. However topic publisher data from robot is received from the workstation.
  3. HOSTNAME and IP are set as described in the youtube link mentioned above.

Edit 1:

  1. workstation configuration

.bashrc - > last lines

export ROS_MASTER_URI=http://ubiquityrobot.local:11311
ROS_HOSTNAME=$(hostname).local
#ROS_IP=0.0.0.0

/etc/hosts -> file

127.0.0.1   localhost
127.0.1.1   maisa-K53E    
10.42.0.1   ubiquityrobot.local
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
  1. robot side

.bashrc -> last line

ROS_IP=0.0.0.0

/etc/hosts -> lines

127.0.0.1  localhost
10.42.0.201  maisa-K53E

::1        localhost ip6-localhost ip6-loopback
ff02::1    ip6-allnodes
ff02::2    ip6-allrouters

127.0.1.1    ubiquityrobot ubiquityrobot.local

roswtf output: https://drive.google.com/file/d/1aSdPzWWtV0FwyZBTCkgjQu1knXXOJFIm/view?usp=sharing

.

Edit 2: When publishing data on a topic from robot, we can see the topic as well as the data sent from the robot in the workstation but not vice-versa.


Solution

  • We have solved the problem. This is because of the firewall. Even though we have disabled the firewall using sudo ufw disable, it didn't work in our case. It seems, we have to change the rules using iptables. Interestingly, this is observed in some Linux machines only. The following link helped.

    ROS communication from PC to RaspberryPi

    Edit:

    After disabling the firewall, I haven't rebooted the computer. Now it works fine after reboot.