Closed jim-v closed 6 years ago
The hostname change should be handled with pifi now as of version 0.4.0.
Simply use sudo pifi set-hostname NEW_HOSTNAME
, this should greatly simplify the documentation.
I tested pifi 0.4.0 on a magni running the 2017-11-12 image, and changing the hostname worked as expected. After that, I was able to view images, echo topics, etc. on my laptop, after I updated ROS_MASTER_URI
to point to the new name.
@anfederman @jrlandau Can you update the documentation to use pifi to set the hostname?
done. Please check that I've got it right. It's in workstation setup.
On Sat, Dec 23, 2017 at 7:51 AM, Rohan Agrawal notifications@github.com wrote:
@anfederman https://github.com/anfederman @jrlandau https://github.com/jrlandau Can you update the documentation to use pifi to set the hostname?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/UbiquityRobotics/learn/issues/10#issuecomment-353733251, or mute the thread https://github.com/notifications/unsubscribe-auth/ADxmjIDlktoGlaVrIhPrBXrZ0S-9qxM-ks5tDSGCgaJpZM4QzlyH .
@jrlandau I think that setting the hostname should be earlier, pehaps during the network connection step, that way you can have multiple robots on your network and be able to address them all.
The actual process you have in the workstation setup to set the hostname looks alright.
done.
On Sat, Dec 23, 2017 at 11:37 PM, Rohan Agrawal notifications@github.com wrote:
@jrlandau https://github.com/jrlandau I think that setting the hostname should be earlier, pehaps during the network connection step, that way you can have multiple robots on your network and be able to address them all.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/UbiquityRobotics/learn/issues/10#issuecomment-353770094, or mute the thread https://github.com/notifications/unsubscribe-auth/ADxmjGUSKexQTSsBNYFrDfaWyXq9uHQVks5tDf8fgaJpZM4QzlyH .
The documentation tells the user to append lines to the hosts file. https://github.com/UbiquityRobotics/learn/edit/master/doing_more/workstation_setup.md#L64
The purpose of the hosts file is to provide name to IP address resolution in both directions. It is necessary to have an entry for the host's own name so it can connect to itself. However, when the name associated with the host's IP address is looked up, the first entry that matches will be returned, which, will contain the old name if these instructions are followed. Therefore it is better to edit the hosts file and replace the old entry. Also note that the addresses associated with the loopback interface are in the 127 network, not 128.
Also, it is considered good practice to have a single entry for each IP address, containing the official hostname and aliases, e.g.:
Type
man 5 hosts
for more information.