https://github.com/duckietown/Software
Raw File
Tip revision: 07775e2efc27fb10175e3715817f892bf04cf3a0 authored by Liam Paull on 09 December 2017, 13:56:21 UTC
Merge pull request #285 from duckietown/liam-devel
Tip revision: 07775e2
set_ros_master.sh
#!/usr/bin/env bash
echo "Setting ROS_MASTER_URI..."
if [ $# -gt 0 ]; then
	# provided a hostname, use it as ROS_MASTER_URI
	export ROS_MASTER_URI=http://$1.local:11311/
else
	echo "No hostname provided. Using $HOSTNAME."
	export ROS_MASTER_URI=http://$HOSTNAME.local:11311/
fi
echo "ROS_MASTER_URI set to $ROS_MASTER_URI"
back to top