-
Notifications
You must be signed in to change notification settings - Fork 4
/
dynamic_mapping_pc.sh
62 lines (52 loc) · 1.61 KB
/
dynamic_mapping_pc.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
55
56
57
58
59
60
61
62
#!/bin/bash
export ROS_IP=10.42.0.19
export ROS_MASTER_URI=http://dagobert:11311/
echo "-----------------------------------------------------------"
echo "- Starting rviz -"
echo "-----------------------------------------------------------"
rosrun rviz rviz &
PID1="$!"
sleep 1
f_flag=
f_val=
while getopts ":f:nk" opt; do
case $opt in
f)
f_flag=1
f_val="$OPTARG"
;;
n)
n_flag=1
;;
k)
k_flag=1
;;
esac
done
if [ ! -z "$f_flag" ]; then
echo "-----------------------------------------------------------"
echo "- Starting dynamic map import from file -"
echo "-----------------------------------------------------------"
else
echo "-----------------------------------------------------------"
echo "- Starting dynamic map without file import -"
echo "-----------------------------------------------------------"
fi
rosrun dynamic_mapping main _file_name:="$f_val" &
PID2="$!"
sleep 1
if [ ! -z "$n_flag" ]; then
echo "-----------------------------------------------------------"
echo "- Starting navigation stack -"
echo "-----------------------------------------------------------"
roslaunch navigation-groovy-devel/move_base.launch
PID3="$!"
else
echo "-----------------------------------------------------------"
echo "- Starting keyboard control -"
echo "-----------------------------------------------------------"
rosrun p3at keyboard_control
PID3="$!"
fi
trap "kill $PID1 $PID2 $PID3" exit INT TERM
wait