diff --git a/NaviGator/scripts/tmux_start.sh b/NaviGator/scripts/tmux_start.sh new file mode 100755 index 000000000..86bbd27c4 --- /dev/null +++ b/NaviGator/scripts/tmux_start.sh @@ -0,0 +1,25 @@ +#!/bin/bash +if tmux has-session -t auto; then + tmux a -t auto +else + # First window (panes) + tmux new-session -d -s auto + tmux send-keys -t auto:0.0 'roslaunch navigator_launch master.launch --screen' Enter + tmux split-window -h -t auto + tmux split-window -v -t auto + + # Second window (alarms, other panes) + sleep 1.5 + tmux new-window -t auto + tmux split-window -h -t auto:1 + tmux split-window -v -t auto:1 + tmux split-window -v -t auto:1.0 + tmux send-keys 'amonitor kill' Enter + tmux split-window -h + tmux send-keys 'amonitor hw-kill' Enter + tmux select-pane -t auto:1.0 + + # Return to the first window + tmux select-window -t auto:0 + tmux a -t auto +fi diff --git a/scripts/setup.bash b/scripts/setup.bash index 40dec2169..fd8215be7 100755 --- a/scripts/setup.bash +++ b/scripts/setup.bash @@ -91,6 +91,7 @@ alias gazebogui="rosrun gazebo_ros gzclient __name:=gzclient" # Preflight aliases alias preflight='python3 $MIL_REPO/mil_common/utils/mil_tools/scripts/mil-preflight/main.py' +alias ntmux='$MIL_REPO/NaviGator/scripts/tmux_start.sh' # Process killing aliases alias killgazebo="killall -9 gzserver && killall -9 gzclient"