-
Notifications
You must be signed in to change notification settings - Fork 10
/
run_single_scout
executable file
·48 lines (36 loc) · 1.14 KB
/
run_single_scout
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
#!/bin/bash
PATH=$(echo $PATH | sed 's|/home/aadi-workstation/anaconda3/bin:||g')
export PATH=$PATH
my_pid=$$
echo "My process ID is $my_pid"
echo "Launching roscore..."
roscore &
pid=$!
echo "Launching Gazebo..."
sleep 10s
roslaunch pioneer_gazebo single_scout_world.launch &
pid="$pid $!"
echo "Loading initialisation parameters..."
sleep 5s
roslaunch pioneer_description scout_service_description.launch
echo "Launching scout in Gazebo stack..."
sleep 5s
roslaunch pioneer_description gazebo_scout.launch name:=scout pose:="-x $(rosparam get /pioneer1/x) -y $(rosparam get /pioneer1/y) -Y $(rosparam get /pioneer1/a)" &
pid="$pid $!"
echo "Launching map server..."
sleep 5s
roslaunch nav_bundle map_server.launch map_name:=scout_service &
pid="$pid $!"
echo "Launching navigation stack..."
sleep 5s
roslaunch nav_bundle scout_navigation.launch &
pid="$pid $!"
echo "Launching scout robot..."
sleep 5s
roslaunch scout_service scout.launch robot_name:=scout &
pid="$pid $!"
echo "Launching rviz..."
roslaunch pioneer_description scout_service_rviz.launch &
pid="$pid $!"
trap "echo Killing all processes.; kill -2 TERM $pid; exit" SIGINT SIGTERM
sleep 24h