diff --git a/scripts/setup.bash b/scripts/setup.bash index c56efc21f..51b08d21f 100755 --- a/scripts/setup.bash +++ b/scripts/setup.bash @@ -198,6 +198,19 @@ prettycp() { rsync --recursive --times --modify-window=2 --progress --verbose --itemize-changes --stats --human-readable "$1" "$2" } +# Disambiguation function for ROS_MASTER_URI/GAZEBO_MASTER_URI +# sets the values to calculated expr 11340+$1 and 11350+$1 respectively +disambig() { + if [ "$#" -ne 1 ]; then + printf "Usage: disambig \n\tSets the ROS_MASTER_URI and GAZEBO_MASTER_URI to 11340+ and 11350+ respectively to allow for parallel simulations" + return + fi + export ROS_MASTER_URI="http://localhost:$((11340 + $1))" + export GAZEBO_MASTER_URI="http://localhost:$((11350 + $1))" + echo "ROS_MASTER_URI=$ROS_MASTER_URI" + echo "GAZEBO_MASTER_URI=$GAZEBO_MASTER_URI" +} + mount_ssd() { sudo mkdir -p /mnt/ssd sudo mount -t exfat /dev/sda1 /mnt/ssd