1
1
#! /bin/bash
2
2
# Set LOCAL_ROBOT_NAME, LOCAL_MQTT_BROKER_IP, and LOCAL_MQTT_BROKER_PORT in your bashrc
3
3
ROBOT_NAME=$LOCAL_ROBOT_NAME
4
- MQTT_BROKER_IP=$LOCAL_MQTT_BROKER_IP
5
- MQTT_BROKER_PORT=$LOCAL_MQTT_BROKER_PORT
4
+ # ROBOT_NAME=sam
5
+ # MQTT_BROKER_IP=$LOCAL_MQTT_BROKER_IP
6
+ MQTT_BROKER_IP=20.240.40.232
7
+ # MQTT_BROKER_PORT=$LOCAL_MQTT_BROKER_PORT
8
+ MQTT_BROKER_PORT=1884
9
+ SSS_SAVE_PATH=/home/orin/sss_auto_save
6
10
7
11
SESSION=${ROBOT_NAME} _bringup
8
- USE_SIM_TIME=True
12
+ USE_SIM_TIME=False
9
13
10
14
# New variables for wasp_bt.launch and wasp_mqtt_agent.launch
11
15
AGENT_TYPE=subsurface
22
26
tmux -2 new-session -d -s $SESSION
23
27
if [ $REALSIM = " simulation" ]
24
28
then
29
+
30
+ # TODO: this can be used in both, remove from here
25
31
# Mostly static stuff that wont be giving much feedback
26
32
# for robot description launch. so we get base_link -> everything else
27
33
tmux new-window -t $SESSION :6 -n ' description'
36
42
tmux new-window -t $SESSION :0 -n ' core'
37
43
tmux select-window -t $SESSION :0
38
44
tmux send-keys " ros2 launch sam_drivers sam_core.launch robot_name:=$ROBOT_NAME " C-m
39
-
40
- tmux new-window -t $SESSION :7 -n payloads
41
- tmux select-window -t $SESSION :7
42
- tmux send-keys " ros2 launch sam_drivers sam_payloads.launch sss_out_file:=$SSS_SAVE_PATH / high_freq:=true range:=40 robot_name:=$ROBOT_NAME " C-m
43
-
44
- tmux new-window -t $SESSION :8 -n uwcomms
45
+
46
+ tmux new-window -t $SESSION :8 -n payloads
45
47
tmux select-window -t $SESSION :8
48
+ tmux send-keys " ros2 launch sam_drivers sam_payloads.launch sss_out_file:=$SSS_SAVE_PATH / high_freq:=true robot_name:=$ROBOT_NAME use_sim_time:=$USE_SIM_TIME " C-m
49
+
50
+ tmux new-window -t $SESSION :9 -n uwcomms
51
+ tmux select-window -t $SESSION :9
46
52
tmux send-keys " ros2 launch sam_drivers sam_uwcomms.launch robot_name:=$ROBOT_NAME use_sim_time:=$USE_SIM_TIME " C-m
47
53
54
+ # Mostly static stuff that wont be giving much feedback
55
+ # for robot description launch. so we get base_link -> everything else
56
+ tmux new-window -t $SESSION :10 -n ' description'
57
+ tmux select-window -t $SESSION :10
58
+ tmux send-keys " ros2 launch sam_description sam_description.launch robot_name:=$ROBOT_NAME " C-m
59
+
48
60
fi
49
61
50
62
# state estimation stuff like pressure->depth, imu->tf etc
51
63
tmux new-window -t $SESSION :1 -n ' dr'
52
64
tmux rename-window " dr"
53
65
tmux select-window -t $SESSION :1
54
- # tmux send-keys "ros2 launch sam_dead_reckoning sam_dr_launch .launch robot_name:=$ROBOT_NAME" C-m
55
- tmux send-keys " echo 'Not launching sam_dead_reckoning sam_dr_launch.launch until someone fixes it!'" C-m
66
+ tmux send-keys " ros2 launch hydrobatic_localization state_estimator .launch robot_name:=$ROBOT_NAME " C-m
67
+ # tmux send-keys "echo 'Not launching sam_dead_reckoning sam_dr_launch.launch until someone fixes it!'" C-m
56
68
57
69
# BT, action servers etc.
58
70
tmux new-window -t $SESSION :2 -n ' bt'
@@ -71,41 +83,41 @@ tmux new-window -t $SESSION:4 -n 'smcp'
71
83
tmux select-window -t $SESSION :4
72
84
tmux send-keys " ros2 launch sam_smarc_publisher default.launch robot_name:=$ROBOT_NAME " C-m
73
85
74
- # utility stuff like dubins planning and lat/lon conversions that other stuff rely on
75
- tmux new-window -t $SESSION :5 -n ' utils'
86
+ # for the mqtt bridge.
87
+ tmux new-window -t $SESSION :5 -n ' mqtt'
88
+ # Set your MQTT Broker IP and Port in your bashrc
76
89
tmux select-window -t $SESSION :5
77
- tmux send-keys " ros2 launch smarc_bringups utilities .launch robot_name:=$ROBOT_NAME " C-m
90
+ tmux send-keys " ros2 launch str_json_mqtt_bridge waraps_bridge .launch broker_addr:= $MQTT_BROKER_IP broker_port:= $MQTT_BROKER_PORT robot_name:=$ROBOT_NAME " C-m
78
91
79
- # for robot description launch. so we get base_link -> everything else
80
- tmux new-window -t $SESSION :8 -n ' description'
81
- tmux select-window -t $SESSION :8
82
- tmux send-keys " ros2 topic pub -r 1 /$ROBOT_NAME /smarc/vehicle_health std_msgs/msg/Int8 '{data: 0}' " # don't use C-m here, we want to keep the command in the window
83
-
84
- # dummy stuff to temporarily let other stuff work
85
- tmux new-window -t $SESSION :9 -n ' dummies'
86
- tmux new-window -t $SESSION :9 -n ' emergency_action'
87
- tmux select-window -t $SESSION :9
92
+ tmux new-window -t $SESSION :6 -n ' emergency'
93
+ tmux select-window -t $SESSION :6
88
94
# tmux send-keys "ros2 launch smarc_bringups dummies.launch robot_name:=$ROBOT_NAME" C-m
89
95
tmux send-keys " ros2 launch sam_emergency_action sam_emergency_action.launch robot_name:=$ROBOT_NAME " C-m
90
96
91
- # for the mqtt bridge.
92
- tmux new-window -t $SESSION :10 -n ' mqtt'
93
- # Set your MQTT Broker IP and Port in your bashrc
94
- tmux select-window -t $SESSION :10
95
- tmux send-keys " ros2 launch str_json_mqtt_bridge waraps_bridge.launch broker_addr:=$MQTT_BROKER_IP broker_port:=$MQTT_BROKER_PORT robot_name:=$ROBOT_NAME " C-m
97
+ # utility stuff like dubins planning and lat/lon conversions that other stuff rely on
98
+ # tmux new-window -t $SESSION:5 -n 'utils'
99
+ # tmux select-window -t $SESSION:5
100
+ # tmux send-keys "ros2 launch smarc_bringups utilities.launch robot_name:=$ROBOT_NAME" C-m
101
+
102
+ # for robot description launch. so we get base_link -> everything else
103
+ tmux new-window -t $SESSION :7 -n ' health'
104
+ tmux select-window -t $SESSION :7
105
+ # tmux send-keys "ros2 topic pub -r 1 /$ROBOT_NAME/smarc/vehicle_health std_msgs/msg/Int8 '{data: 0}' " # don't use C-m here, we want to keep the command in the window
106
+ tmux send-keys " ros2 launch sam_health_checker sam_rate_health_checker.launch robot_name:=$ROBOT_NAME use_sim_time:=$USE_SIM_TIME " C-m
96
107
97
108
# Launch the wasp_bt LAST, to give action servers time to start publishing heartbeats
98
109
tmux select-window -t $SESSION :2
99
110
tmux send-keys " ros2 launch wasp_bt wasp_bt.launch robot_name:=$ROBOT_NAME agent_type:=$AGENT_TYPE pulse_rate:=$PULSE_RATE use_sim_time:=$USE_SIM_TIME " C-m
100
111
101
- USERNAME=$( whoami)
102
- if [ $USERNAME != " sam" ]
103
- then
104
- echo " You are not the real sam!"
105
- ROS_IP=127.0.0.1
106
- # Maybe launch ros-tcp-bridge here?
107
- fi
112
+ # USERNAME=$(whoami)
113
+ # if [ $USERNAME != "sam" ]
114
+ # then
115
+ # echo "You are not the real sam!"
116
+ # ROS_IP=127.0.0.1
117
+ # # Maybe launch ros-tcp-bridge here?
118
+ # fi
119
+
108
120
# Set default window
109
- tmux select-window -t $SESSION :2
121
+ tmux select-window -t $SESSION :0
110
122
# attach to the new session
111
123
tmux -2 attach-session -t $SESSION
0 commit comments