Need help publishing to ROS topics from a 2nd machine
I just added a 2nd machine to my ROS network and went through all of the appropriate tutorials on making sure the two could ping each other ( http://wiki.ros.org/ROS/NetworkSetup#... ). On my second machine i have exported the master URI and can echo ros topics running on the master just fine. When i try to publish onto a new topic from the second machine, the master can see the new topic exists, but if i try to echo it the master is unable to receive any information.
This forum seemed to address my exact problem, ( http://answers.ros.org/question/90536... ). They suggest adding the master computer to the etc/host file on the 2nd machine. My problem now is that i can't seem to properly edit the etc/host files! Can anyone provide a good tutorial on how to do this? I have tried several different ways and i'm sure i'm not doing it properly. <--edit 7/10/17: I'm led to believe this is not the real issue. See edit below
Thanks!
EDIT: Okay i have editing the /etc/host file and can now successfully ping the host machine from the 2nd machine via its alias. I can also export ROS_MASTER_URI=alias:11311 and can access the ROS network from the 2nd machine. Still have the same problem though: 2nd publishes to a new topic, master sees new topic, but when master echoes new topic nothing is received
"My problem now is that i can't seem to properly edit the etc/host files!"
Can you elaborate? How are you trying to edit
/etc/hosts
? What happens?I think i got it to work since i can now ping the master from the 2nd machine via its alias, and can also export ROS_MASTER_URI using the master alias. So editing the /etc/hosts file may not be my problem anymore. I will update my question to reflect this. Thanks
You need to edit the /etc/hosts file for both machines!