0
$\begingroup$

Rosanswers logo

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.


Originally posted by Shravista on ROS Answers with karma: 16 on 2022-09-07

Post score: 0


Original comments

Comment by ravijoshi on 2022-09-08:\

  1. How about setting ROS_MASTER_URI and ROS_IP?
  2. Additionally, people have reported that adding the hostname to the /etc/hosts file works. Please try.

Comment by Shravista on 2022-09-08:
I will share the configuration that I am using on my laptop and robot, to make it clear. I have updated the question

Comment by Shravista on 2022-09-08:
I am actually using the hosts' file.

Comment by ravijoshi on 2022-09-08:
The ROS_IP and /etc/hosts need to be configured properly. Please search here or in Google about the details.

Comment by Shravista on 2022-09-09:
combining ROS_IP and /etc/hosts together are not working for me. I have followed exactly in ros tutorials too. But still not sure.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.

https://stackoverflow.com/questions/55316801/ros-communication-from-pc-to-raspberrypi

Edit:

A suggestion from Mike Scheutzow worked better than iptables. I just tried it. Thanks for your help


Originally posted by Shravista with karma: 16 on 2022-09-12

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Mike Scheutzow on 2022-09-12:
You must reboot the machine after issuing the sudo ufw disable command.

You do not need to do anything yourself with iptables.

Comment by Shravista on 2022-09-12:
ok, Thanks. got your point.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.