-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux-calibration.sh
More file actions
executable file
·76 lines (62 loc) · 3.15 KB
/
tmux-calibration.sh
File metadata and controls
executable file
·76 lines (62 loc) · 3.15 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
#!/bin/bash
TNAME="Calibration"
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
tmux split-window -h
tmux select-pane -t 1
tmux split-window -h
tmux select-pane -t 1
tmux send-keys -t $TNAME:core C-c
tmux send-keys -t $TNAME:core "source ~/cgras2025_ws/devel_isolated/setup.bash" C-m
#tmux send-keys -t $TNAME:core "roscore" C-m
sleep 1.0
tmux send-keys -t $TNAME:core.2 C-c
tmux send-keys -t $TNAME:core.2 "source ~/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:core.2 "roslaunch cgras_moveit_config cgras_robot.launch" C-m
sleep 2.0
tmux send-keys -t $TNAME:core.3 C-c
tmux send-keys -t $TNAME:core.3 "source ~/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:core.3 "roslaunch cgras_moveit_config moveit_planning_execution.launch" C-m
sleep 2.0
tmux send-keys -t $TNAME:core.4 C-c
tmux send-keys -t $TNAME:core.4 "source ~/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:core.4 "roslaunch cgras_moveit_config moveit_rviz.launch" C-m
sleep 2.0
tmux new-window -t $TNAME -n "calibration"
# 4 pane layout
# FRAMOS, handeye service, calibration move script, Charuco detector
tmux split-window -v
tmux split-window -h
tmux select-pane -t 1
tmux split-window -h
tmux select-pane -t 1
tmux send-keys -t $TNAME:calibration.1 C-c
tmux send-keys -t $TNAME:calibration.1 "source ~/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:calibration.1 "roslaunch realsense2_camera framos_rs_camera.launch" C-m
tmux send-keys -t $TNAME:calibration.2 C-c
tmux send-keys -t $TNAME:calibration.2 "source ~/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:calibration.2 "rosrun handeye handeye_server.py" C-m
tmux send-keys -t $TNAME:calibration.3 C-c
# NOTE: Sourcing a different build workspace for the calibration detector
tmux send-keys -t $TNAME:calibration.3 "source ~/cgras2025_ws/devel_isolated/setup.bash" C-m
tmux send-keys -t $TNAME:calibration.3 "rosrun moveit_calibration_detector moveit_calibration_detector_node" C-m
tmux send-keys -t $TNAME:calibration.4 C-c
tmux send-keys -t $TNAME:calibration.4 "source ~/cgras2025_ws/devel_isolated/setup.bash" C-m
# NOTE: NOT Running automatically
tmux send-keys -t $TNAME:calibration.4 "cd ~/cgras2025_ws/src/scripts" C-m
tmux send-keys -t $TNAME:calibration.4 "python3 ./calibration-movement-framos.py"
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:calibration
tmux select-pane -t 4
fi
tmux attach-session -t $TNAME