-
Notifications
You must be signed in to change notification settings - Fork 0
/
romap_launch.sh
executable file
·54 lines (48 loc) · 1.49 KB
/
romap_launch.sh
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
#!/bin/bash
# Launch variables for ROS
export ROS_MASTER_URI=http://tegra-ubuntu:11311
export ROS_HOSTNAME=$HOSTNAME
while true
do
HEIGHT=11
WIDTH=40
CHOICE_HEIGHT=5
BACKTITLE="3D-ROMAP Launcher"
TITLE="3D-ROMAP Control Panel"
FOOENU="Select an option below:"
OPTIONS=(1 "Enter Jetson password"
2 "Run roscore server"
3 "Run 3D-ROMAP"
4 "SSH to Jetson"
5 "Exit")
CHOICE=$(dialog --clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)
clear
case $CHOICE in
1)
echo "Enter login password to Jetson computer: "
read -s JETSON
;;
2)
xterm -bg black -fg white -hold -e sshpass -p "$JETSON" ssh nvidia@tegra-ubuntu \
'source /opt/ros/kinetic/setup.bash ; source ~/catkin_ws/devel/setup.bash ; roscore' &
;;
3)
xterm -bg black -fg white -hold -e sshpass -p "$JETSON" ssh nvidia@tegra-ubuntu \
'source /opt/ros/kinetic/setup.bash ; source ~/catkin_ws/devel/setup.bash ; sh mapper.sh' &
xterm -bg black -fg white -hold -e "sh 3D-ROMAP.sh" &
rviz &
;;
4)
xterm -bg black -fg white -hold -e sshpass -p "$JETSON" ssh nvidia@tegra-ubuntu &
;;
5) export JETSON=$NULL ;
break
;;
esac
done