0
$\begingroup$

Rosanswers logo

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..


Originally posted by lslabon on ROS Answers with karma: 23 on 2020-10-07

Post score: 0


Original comments

Comment by Solrac3589 on 2020-10-07:
checking here (http://wiki.ros.org/ROS/Tutorials/MultipleMachines, at the end) Seems like could be that you forgot to define ROS_IP

Comment by lslabon on 2020-10-08:
You can define ROS_IP either with export ROS_IP or with export ROS_HOSTNAME

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

Originally posted by afar with karma: 111 on 2020-10-07

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by lslabon on 2020-10-08:
Omg ! Can't believe it lol

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

$\endgroup$

Your Answer

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