Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash alias 'ntmux' #1307

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions NaviGator/scripts/tmux_start.sh
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions scripts/setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading