Rosnode ping rosout does not work on remote machine
I have two PCs, PC1 is the robot computer, which is the master, PC2 is my workstation. Both uses ubuntu 14.4 indigo. On PC2, I am connected to the network and able to do
rostopic list
but when I do rosnode ping rosout
it gave me an error:
rosnode: node is [/rosout]
pinging /rosout with a timeout of 3.0s
ERROR: Unknown host [dhcp-59-208] for node [/rosout]
when I run rosnode info
i get the following
$ rosnode info /rosout
--------------------------------------------------------------------------------
Node [/rosout]
Publications:
* /rosout_agg [rosgraph_msgs/Log]
Subscriptions:
* /rosout [rosgraph_msgs/Log]
Services:
* /rosout/set_logger_level
* /rosout/get_loggers
contacting node http://dhcp-59-208:47096/ ...
ERROR: Communication with node[http://dhcp-59-208:47096/] failed!
So on my PC2 I have the following environments:
ROS_IP=192.168.1.100
ROS_HOSTNAME=192.168.1.100
ROS_MASTER_URI=http://192.168.1.11:11311
PC1:
ROS_IP=192.168.1.100
ROS_HOSTNAME=192.168.100
ROS_MASTER_URI=http://localhost:11311
192.168.100 is my wlan0 ip address, which is the network that pc1 and pc2 are on.
I also found someone who had the same exact issue (https://answers.ros.org/question/225097/rosnode-ping-rosout-does-not-work-on-remote-machine/ ), I am not sure what OP meant by "Using ip-addresses everywhere solved it."
Can you clarify why you deleted the question?
I figured it out soon after, turns out, i needed to add the hostname and IP addressf the robot to my pc's etc/hosts file. Should I reopen it and answer it myself?
Yes, that would be nice.
As I only see IP addresses in both
ROS_IP
andROS_HOSTNAME
in your question text this is a really strange solution.