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

ROS remote master: can see topics but no data

asked 2020-10-07 05:20:54 -0600

lslabon gravatar image

Hello guys

I have already read through several threads like this but couldn't figure out what my issue is..

I have a robot and a remote PC. I want to visualize the lidar data of the robot in rviz on my remote PC. Now my problem is that I can see with 'rostopic list' the topic /scan but when I try 'rostopic echo /scan' on my remote PC nothing is published. When I try 'rostopic echo /scan' on the robot I can see the data - so it definetly should work!

When I tried roswtf it tells me: ERROR Could not contact the following nodes: * /hlds_laser_publisher

ERROR The following nodes should be connected but aren't: * /hlds_laser_publisher->/rviz_1602065662574712563 (/scan) * /hlds_laser_publisher->/rosout (/rosout)

ERROR Errors connecting to the following services: * service [/hlds_laser_publisher/get_loggers] appears to be malfunctioning: Unable to communicate with service [/hlds_laser_publisher/get_loggers], address [rosrpc://robot:53743] * service [/hlds_laser_publisher/set_logger_level] appears to be malfunctioning: Unable to communicate with service [/hlds_laser_publisher/set_logger_level], address [rosrpc://robot:53743]

Both are connected to the same network and can ping each other. Master is my remote PC -> bashrc network configuration is like the following:

remotePC: export ROS_MASTER_URI=http://remotePC:11311 export ROS_HOSTNAME=remotePC

robot: export ROS_MASTER_URI=http://remotePC:11311 export ROS_HOSTNAME=robot

I have added the IPs of robot and remotePCo /etc/hosts

I hope somebody can help me with this network configuration issue..

edit retag flag offensive close merge delete

Comments

checking here (http://wiki.ros.org/ROS/Tutorials/Mul..., at the end) Seems like could be that you forgot to define ROS_IP

Solrac3589 gravatar image Solrac3589  ( 2020-10-07 07:25:21 -0600 )edit

You can define ROS_IP either with export ROS_IP or with export ROS_HOSTNAME

lslabon gravatar image lslabon  ( 2020-10-08 03:44:13 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-10-07 09:35:07 -0600

afar gravatar image

Assume robot IP is = 192.168.1.10 and remote PC IP is 192.168.1.20
On the robot (the ROS master) run the following commands and then run roscore and any ros node

source /opt/ros/melodic/setup.bash  
export ROS_MASTER_URI=http://192.168.1.10:11311  
export ROS_IP=192.168.1.10

On the remote PC, apply the following settings before running your application:

source /opt/ros/melodic/setup.bash  
export ROS_MASTER_URI=http://192.168.1.10:11311  
export ROS_IP=192.168.1.20

Then try to access robot topics on your remote PC.

Also
check your firewalls on both. You can disable your firewall for a quick test:

sudo ufw disable
edit flag offensive delete link more

Comments

Omg ! Can't believe it lol

It was the firewall. Thank you guys for your help !

lslabon gravatar image lslabon  ( 2020-10-08 03:42:37 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2020-10-07 05:20:54 -0600

Seen: 1,355 times

Last updated: Oct 07 '20