-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathes3.sh
More file actions
61 lines (53 loc) · 2.01 KB
/
es3.sh
File metadata and controls
61 lines (53 loc) · 2.01 KB
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
#!/bin/bash
clear
# ####################################################################
# Make sure that the file in the script folder are executable file
# ####################################################################
rosclean purge -y
cd
cp -R ~/scripts ~/turtle_ws/src/simple_navigation_goals
cd turtle_ws
catkin_make
source devel/setup.bash
export TURTLEBOT3_MODEL=burger
##################################################################################################
# Run roscore if it is not running
if pgrep -x roscore >/dev/null
then
echo "roscore is running"
else
echo "Starting roscore"
gnome-terminal -e roscore
echo "roscore started"
sleep 4
fi
##################################################################################################
# Start GAZEBO
gnome-terminal -e 'sh -c "roslaunch turtlebot3_big_house turtlebot3_big_house.launch gui:=false"'
sleep 4
echo "GAZEBO launched"
sleep 4
##################################################################################################
# Initialize pose of the robot for the init_pose
echo "Initializing the init_pose"
gnome-terminal -e 'sh -c "rosrun simple_navigation_goals init_pose.py"'
sleep 4
echo "POSE INIT launched"
sleep 4
##################################################################################################
# Initialize pose of the robot for the amcl
echo "Initializing the amcl"
gnome-terminal -e 'sh -c "rosrun simple_navigation_goals amcl_init.py"'
sleep 4
echo "AMCL INIT launched"
sleep 4
##################################################################################################
# Start the navigation with the map
echo "Starting the navigation"
gnome-terminal -e 'sh -c "roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=/home/user/Projects/Mobile_robotics/maps/map.yaml "'
sleep 4
echo "NAV launched"
sleep 4
##################################################################################################
# Start moving around
rosrun simple_navigation_goals simple_navigation_goals.py