Ask Your Question

The environment variable ROS_HOSTNAME

asked 2019-02-02 15:07:56 -0500

gktg1514 gravatar image

updated 2019-02-25 15:43:26 -0500

jayess gravatar image

I have two nodes which communicate with each other with the help of the master. Each node has a specific host name, and this value is stored in node environment variable ROS_HOSTNAME. I want to learn the value of the environment variable ROS_HOSTNAME of my nodes.

How can I learn them ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-02-03 00:56:40 -0500

ahendrix gravatar image

The rosnode info command will show the URI (including the hostname) that other nodes will use to reach that node.

(the node's hostname defaults to the computer's hostname, but can be overridden by the ROS_HOSTNAME and ROS_IP environment variables)

edit flag offensive delete link more

answered 2019-02-02 19:04:24 -0500

jayess gravatar image

updated 2019-02-02 19:11:21 -0500

If you want to see all of the ROS environment variables (including ROS_HOSTNAME), run

printenv | grep ROS

Just so you know, it's not associated with any nodes but rather the host that you're using such as a computer. Please see the wiki for more information.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-02-02 15:07:56 -0500

Seen: 356 times

Last updated: Feb 25 '19