ros / catkin

A CMake-based build system that is used to build all packages in ROS.
http://wiki.ros.org/catkin
BSD 3-Clause "New" or "Revised" License
321 stars 280 forks source link

In env.sh, set ROS_HOSTNAME to automatically use "`hostname`.local" #1128

Closed takanotume24 closed 2 years ago

takanotume24 commented 3 years ago

I think it would be useful to add the following to env.sh.in.

Use case : If the <node> tag in the .launch file is used with the machine option, the remote machine will specify env.sh as the env-loader, but since this file is auto-generated by catkin, it will be erased by catkin clean. However, this file is automatically generated by catkin, so it will be deleted by catkin clean. The minimum value that must be specified in env.sh is ROS_HOSTNAME. (In my environment, ROS_MASTER_URI is not necessary.) So, it would be useful if ROS_HOSTNAME contains a valid default value. How about using the ".local" address, which is made available by avahi-daemon, a commonly used mdns?

I'm new to ROS, so I may not understand the concept of ROS as well as I should. Please point out any mistakes in what I wrote above. Thank you very much.