https://github.com/duckietown/Software
Raw File
Tip revision: cbd06e0d5a642974eadd979433cb6fc04c70d150 authored by Liam Paull on 22 February 2019, 20:22:14 UTC
Merge branch 'master18' into devel-auto-localization-merged-master18
Tip revision: cbd06e0
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