File tree 1 file changed +51
-0
lines changed
catkin_ws/src/slam_project
1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Run before launching anything to allow collision between vehicle and environment
4
+ mkdir -p ~ /.gazebo/
5
+ curl -L https://s3-us-west-1.amazonaws.com/udacity-robotics/Term+2+Resources/P3+Resources/models.tar.gz | tar zx -C ~ /.gazebo/
6
+
7
+ echo ' '
8
+ read -p ' Would you like to clear the previous map database? (y/n): ' ansinput
9
+
10
+ if [ “$ansinput ” = “y” ]
11
+ then
12
+ printf ' \n Map deleted \n'
13
+ rm -f ~ /.ros/rtabmap.db
14
+
15
+ elif [ “$ansinput ” = “n” ]
16
+ then
17
+ printf ' \n Map kept \n'
18
+
19
+ else
20
+ echo ' Warning: Not an acceptable option. Choose (y/n).
21
+ '
22
+ fi
23
+
24
+ echo ' '
25
+
26
+ read -p ' Enter target world destination or d for default: ' input_choice
27
+
28
+ if [ “$input_choice ” = “d” ]
29
+ then
30
+ x-terminal-emulator -x roslaunch slam_project world.launch world_file:=/home/workspace/catkin_ws/src/slam_project/worlds/kitchen_dining.world 2> /dev/null &
31
+
32
+ else
33
+ x-terminal-emulator -x roslaunch slam_project world.launch world_file:=$input_choice 2> /dev/null &
34
+ fi
35
+
36
+ sleep 3 &&
37
+
38
+ x-terminal-emulator -x roslaunch slam_project teleop.launch 2> /dev/null &
39
+
40
+ sleep 3 &&
41
+
42
+ echo ' '
43
+ read -p ' Press any key to continue to mapping... ' -n1 -s
44
+
45
+ x-terminal-emulator -x roslaunch slam_project mapping.launch simulation:=true 2> /dev/null &
46
+ sleep 3 &&
47
+ x-terminal-emulator -e roslaunch slam_project rviz.launch 2> /dev/null
48
+
49
+ echo ' '
50
+ echo ' Script Completed'
51
+ echo ' '
You can’t perform that action at this time.
0 commit comments