ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

data is not seen from the robot when published from the workstation.

asked 2022-09-07 14:38:58 -0500

Shravista gravatar image

updated 2022-09-09 09:47:01 -0500

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.

edit retag flag offensive close merge delete

Comments

  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.
ravijoshi gravatar image ravijoshi  ( 2022-09-08 21:39:02 -0500 )edit

I will share the configuration that I am using on my laptop and robot, to make it clear. I have updated the question

Shravista gravatar image Shravista  ( 2022-09-08 21:42:22 -0500 )edit

I am actually using the hosts' file.

Shravista gravatar image Shravista  ( 2022-09-08 21:49:00 -0500 )edit

The ROS_IP and /etc/hosts need to be configured properly. Please search here or in Google about the details.

ravijoshi gravatar image ravijoshi  ( 2022-09-08 22:49:23 -0500 )edit

combining ROS_IP and /etc/hosts together are not working for me. I have followed exactly in ros tutorials too. But still not sure.

Shravista gravatar image Shravista  ( 2022-09-09 02:35:27 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-12 00:15:17 -0500

Shravista gravatar image

updated 2022-09-12 10:53:57 -0500

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

edit flag offensive delete link more

Comments

You must reboot the machine after issuing the sudo ufw disable command.

You do not need to do anything yourself with iptables.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-09-12 10:30:43 -0500 )edit

ok, Thanks. got your point.

Shravista gravatar image Shravista  ( 2022-09-12 10:45:52 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-09-07 14:38:58 -0500

Seen: 40 times

Last updated: Sep 12 '22