Skip to content

Commit

Permalink
scripts/setup.bash: Add disambig for running parallel simulations on …
Browse files Browse the repository at this point in the history
…a single computer
  • Loading branch information
cbrxyz committed Nov 9, 2024
1 parent d951d28 commit 3132798
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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 <plus_factor>\n\tSets the ROS_MASTER_URI and GAZEBO_MASTER_URI to 11340+<plus_factor> and 11350+<plus_factor> 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
Expand Down

0 comments on commit 3132798

Please sign in to comment.