https://github.com/duckietown/Software
Raw File
Tip revision: 01ac5a5fbc47e6e9c6689fc54d10acf8615bebf4 authored by Eric Lu on 07 December 2018, 14:03:14 UTC
merge master18
Tip revision: 01ac5a5
2set_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.autolab.ethz.ch:11311/
else
	[ -z "$HOSTNAME"        ] && { echo -e "\n\nThe variable HOSTNAME is not set. I need this info for setting up ROS. \n\n\n\n"; return 2;       }
	echo "No hostname provided. Using $HOSTNAME."
	export ROS_MASTER_URI=http://$HOSTNAME.autolab.ethz.ch:11311/
fi
echo "ROS_MASTER_URI set to $ROS_MASTER_URI"
back to top