Can't run roscore & sudo, canrunroscore
I'm using ubuntu14 LTS.
Problems:
1. When run roscore, got a mistake and an advice to ping the localhost.
2. Nearly every time I run a directive with sudo, I got a warning that unable to resolve host.
It turns out, the reason is I changed the ubuntu computer name some while ago.
Solutions: (must following this order)
1. edit ~ /Etc/hosts
Navigate to the file locaiton, and type 'sudo nautilus. 'in the terminal.
You will see these two lines at the beginning of the file:
127.0.0.1 localhost
127.0.1.1 "here is your old computer name, which you think you have changed but not"-> Change it to the current computer name.
This shoshould solve problem 2.
2. edit ~ /. Bashrc
Type 'gedit ~ /. Bashrc 'in the terminal, and add the following two lines at the end of the file:
Export ROS_HOSTNAME = "put your current computer name here"
Export ROS_MASTER_URI = http ://"Put your current computer name here"11311
This shoshould solve problem 1.