ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I'll answer your question to best of my ability.
localhost
:
127.0.0.1
is the loopback address (also known as localhost).0.0.0.0
is a non-routable meta-address used to designate an invalid, unknown or non applicable target (a no particular address placeholder).
That tutorial that you linked to is incorrect. ROS_HOSTNAME
is for hostnames such as localhost
, not IP addresses as that's what ROS_IP is for.
You can use either ROS_IP
or ROS_HOSTNAME
. If you have both set, ROS_HOSTNAME
will take precedence.
2 | No.2 Revision |
I'll answer your question to best of my ability.
localhost
:
127.0.0.1
is the loopback address (also known as localhost).0.0.0.0
is a non-routable meta-address used to designate an invalid, unknown or non applicable target (a no particular address placeholder).
That tutorial that you linked to is incorrect. ROS_HOSTNAME
is for hostnames such as localhost
, not IP addresses as that's what ROS_IP is for.
You can use either ROS_IP
or ROS_HOSTNAME
. If you have both set, ROS_HOSTNAME
will take precedence.
3 | No.3 Revision |
I'll answer your question to best of my ability.
localhost
:
127.0.0.1
is the loopback address (also known as localhost).0.0.0.0
is a non-routable meta-address used to designate an invalid, unknown or non applicable target (a no particular address placeholder).
That tutorial that you linked to is incorrect. ROS_HOSTNAME
is for hostnames such as localhost
, not IP addresses as that's what ROS_IP is for.
You can use either ROS_IP
or ROS_HOSTNAME
. If you have both set, ROS_HOSTNAME
will take precedence.
As for the bottom line, it's a matter of preference as to which to use. I prefer ROS_HOSTNAME
because I can use it in launch files in the <machine>
tag and it's easier to remember hostnames vs. IP addresses.