-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrtab_run
executable file
·47 lines (33 loc) · 1.08 KB
/
rtab_run
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
#! /bin/bash
echo ' '
read -p 'Would you like to clear the previous map database? (y/n): ' ansinput
if [ “$ansinput” = “y” ]
then
printf '\n Map deleted \n'
rm -f ~/.ros/rtabmap.db
elif [ “$ansinput” = “n” ]
then
printf '\n Map kept \n'
else
echo 'Warning: Not an acceptable option. Choose (y/n).
'
fi
echo ' '
read -p 'Enter target world destination or d for default: ' input_choice
if [ “$input_choice” = “d” ]
then
x-terminal-emulator -x roslaunch slam_project world.launch world_file:=/home/nvidia/catkin_ws/src/slam_project/worlds/kitchen_dining.world 2>/dev/null &
else
x-terminal-emulator -x roslaunch slam_project world.launch world_file:=$input_choice 2>/dev/null &
fi
sleep 3 &&
x-terminal-emulator -x roslaunch slam_project teleop.launch 2>/dev/null &
sleep 3 &&
echo ' '
read -p 'Press any key to continue to mapping... ' -n1 -s
x-terminal-emulator -x roslaunch slam_project mapping.launch simulation:=true 2>/dev/null &
sleep 3 &&
x-terminal-emulator -e roslaunch slam_project rviz.launch 2>/dev/null
echo ' '
echo 'Script Completed'
echo ' '