Hi everybody,
This is the first time i'm here, so if my question is too dumb to you, please forgive me. I'm on track "Understanding Nodes" in the beginner tutorials. After changing the name of the turtlesim node via:
$ rosrun turtlesim turtlesim_node __name:=my_turtle
I opened a new terminal and run:
rosnode list
and the results are:
/my_turtle
/turtlesim
/rosout
which is undesired, since the turtlesim node had been changed to my_turtle. The ROS folks knew about it and suggested us to update ROS_HOSTNAME and i did:
$ export ROS_HOSTNAME=localhost
$ export ROS_MASTER_URI=http://localhost:11311
Now not only the problem is still not solved, but another one also occurs. I can't even run the turtlesim node which is previously valid:
$ rosrun turtlesim turtlesim_node
Here is what's wrong:
[ERROR] [1352578402.235275857]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying...
It looks like the ROS_MASTER_URI has been updated unexpectedly! The main problem now is i don't know how to set it back to default.
Most of you have completed the tutorials and some of you must have stuck on this. So, please share with me how you tackle the problem! I really appreciate that.
Originally posted by Tung Nguyen on ROS Answers with karma: 183 on 2012-11-10
Post score: 3
Original comments
Comment by tlinder on 2012-11-10:
Hi, can you ping the localhost ? If not check your Hosts-file in /etc/hosts and may reconfigure it to default. Also it is not realy needed to make use of the ROS_HOSTNAME settings, so may do not use this command for the next time.
Comment by SL Remy on 2012-11-11:
Also, where/how did you change the hostname and uri? If for some reason you have different settings in different terminals this would cause communication issues as well. To chech type echo $ROS_HOSTNAME
and echo $ROS_MASTER_URI
in all the terminals that you are using.
Comment by Tung Nguyen on 2012-11-11:
@trinighost: I changed it in the export double command above. Yes, now it returns localhost:11311 for the ROS_MASTER_URI query. Please, help me!
Comment by Tung Nguyen on 2012-11-11:
@tlinder: Yes, i still can ping the host. Yes, i will be careful next time. For this time, i tried to change the hostname to my System name, IP address but things still doesn't work!
Comment by Tung Nguyen on 2012-11-11:
@felix k: No, now it even doesn't make it to the master. ERROR: Unable to communicate with master!
Nothing is running yet.
Comment by Tung Nguyen on 2012-11-11:
@michikarg: Yep, I check self-ping but i didn't work. So i try Name Resolution as suggested and changed the Hostname and associated Master URI to the System name and the IP address. But nothing seemed to be a good choice so far!