-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux-cgras-headless.sh
More file actions
executable file
·86 lines (68 loc) · 4.19 KB
/
tmux-cgras-headless.sh
File metadata and controls
executable file
·86 lines (68 loc) · 4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
TNAME="Nuc-Command"
sleep 20
tmux has-session -t $TNAME 2>/dev/null
if [ $? != 0 ]; then
tmux new-session -d -s $TNAME -n "core"
# 4 pane layout
# ROS core, UR Controller, Planner, rviz
tmux split-window -v -t $TNAME:core
tmux split-window -h -t $TNAME:core
tmux select-pane -t $TNAME:core.1
tmux split-window -h -t $TNAME:core
tmux select-pane -t $TNAME:core
#tmux send-keys -t $TNAME:core.0 C-c
tmux send-keys -t $TNAME:core.0 "echo 'CGRAS ROBOT LAUNCH TERMINAL'" C-m
tmux send-keys -t $TNAME:core.0 "source /home/qcr/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:core.0 "roslaunch cgras_moveit_config cgras_robot.launch" C-m
sleep 2.0
#tmux send-keys -t $TNAME:core.1 C-c
tmux send-keys -t $TNAME:core.1 "echo 'MOVEIT LAUNCH TERMINAL'" C-m
tmux send-keys -t $TNAME:core.1 "source /home/qcr/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:core.1 "roslaunch cgras_moveit_config moveit_planning_execution.launch" C-m
sleep 2.0
#tmux send-keys -t $TNAME:core.2 C-c
tmux send-keys -t $TNAME:core.2 "echo 'UR CONTROL RESETTER TERMINAL'" C-m
tmux send-keys -t $TNAME:core.2 "source /home/qcr/cgras2025_ws/devel_isolated/setup.bash" C-m
#tmux send-keys -t $TNAME:core.2 "python3 /home/qcr/cgras2025_ws/src/cgras_dev_scripts/navigation-debugger.py" C-m
tmux send-keys -t $TNAME:core.2 "cd /home/qcr/cgras2025_ws/src/cgras_dev_scripts" C-m
sleep 2.0
#tmux send-keys -t $TNAME:core.3 C-c
tmux send-keys -t $TNAME:core.3 "echo 'CGRAS MANIPULATION SERVER TERMINAL'" C-m
tmux send-keys -t $TNAME:core.3 "source /home/qcr/cgras2025_ws/devel_isolated/setup.bash" C-m
#tmux send-keys -t $TNAME:core.3 "/home/qcr/cgras2025_ws/src/cgras_dev_scripts/reset-ur-controller.sh && rosrun cgras_robot_manipulator ros_server.py" C-m
tmux send-keys -t $TNAME:core.3 "rosrun cgras_robot_manipulator ros_server.py" C-m
sleep 2.0
tmux new-window -t $TNAME -n "calibration"
# 4 pane layout
# FRAMOS, handeye service, Charuco detector, (late addition...) Robot Recovery
tmux split-window -v -t $TNAME:calibration
tmux split-window -h -t $TNAME:calibration
tmux select-pane -t $TNAME:calibration.1
tmux split-window -h -t $TNAME:calibration
tmux select-pane -t $TNAME:calibration
#tmux send-keys -t $TNAME:calibration.0 C-c
tmux send-keys -t $TNAME:calibration.0 "echo 'FRAMOS LAUNCH TERMINAL'" C-m
tmux send-keys -t $TNAME:calibration.0 "source /home/qcr/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:calibration.0 "roslaunch realsense2_camera framos_rs_camera.launch" C-m
#tmux send-keys -t $TNAME:calibration.1 C-c
tmux send-keys -t $TNAME:calibration.1 "echo 'HANDEYE CALIBRATION SERVER TERMINAL'" C-m
tmux send-keys -t $TNAME:calibration.1 "source /home/qcr/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:calibration.1 "rosrun handeye handeye_server.py" C-m
#tmux send-keys -t $TNAME:calibration.2 C-c
tmux send-keys -t $TNAME:calibration.2 "echo 'APRILTAG DETECTOR TERMINAL'" C-m
tmux send-keys -t $TNAME:calibration.2 "source /home/qcr/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:calibration.2 "rosrun moveit_calibration_detector moveit_calibration_detector_node" C-m
#tmux send-keys -t $TNAME:calibration.3 C-c <-- Original for all the commands
tmux send-keys -t $TNAME:calibration.3 "echo 'ROBOT RESET / LIGHT CONTROL TERMINAL'" C-m
tmux send-keys -t $TNAME:calibration.3 "source /home/qcr/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:calibration.3 "python3 /home/qcr/cgras2025_ws/src/cgras_dev_scripts/robot-reset-recovery-node.py" C-m
tmux set-option -t $TNAME status on
tmux set-option -t $TNAME status-style fg=white,bg=black
tmux set-option -t $TNAME status-left "#[fg=green]#S #[fg=yellow]: #W - "
tmux set-option -t $TNAME status-left-length 40
tmux set-option -t $TNAME status-right "#[fg=cyan]%d %b %R"
tmux set-window-option -t $TNAME window-status-style fg=cyan,bg=black
tmux set-window-option -t $TNAME window-status-current-style fg=white,bg=black
tmux select-window -t $TNAME:core
fi