-
Notifications
You must be signed in to change notification settings - Fork 10
/
run_rags_pioneer
executable file
·60 lines (46 loc) · 1.42 KB
/
run_rags_pioneer
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
#!/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=$!
sleep 5s
echo "Launching Gazebo..."
sleep 1s
roslaunch pioneer_gazebo rags_traffic_world.launch &
pid="$pid $!"
sleep 5s
echo "Loading initialisation parameters..."
sleep 1s
roslaunch pioneer_description rags_description.launch
roslaunch rags_ros rags_planner_config.launch
sleep 5s
echo "Launching Pioneers in Gazebo stack..."
for i in `seq 1 1`;
do
roslaunch pioneer_description generic_pioneer.launch name:=pioneer$i pose:="-x $(rosparam get /pioneer$i/x) -y $(rosparam get /pioneer$i/y) -Y $(rosparam get /pioneer$i/a)" &
pid="$pid $!"
sleep 2s
done
sleep 5s
echo "Launching map server..."
roslaunch nav_bundle map_server.launch map_name:=rags_traffic &
pid="$pid $!"
sleep 2s
echo "Launching RAGS navigation stack..."
for i in `seq 1 1`;
do
roslaunch nav_bundle single_navigation_rags.launch robot_name:=pioneer$i x:="$(rosparam get /pioneer$i/x)" y:="$(rosparam get /pioneer$i/y)" yaw:="$(rosparam get /pioneer$i/a)" &
pid="$pid $!"
sleep 2s
roslaunch rags_ros generic_rags_planner.launch robot_name:=pioneer$i &
pid="$pid $!"
sleep 5s
done
echo "Launching rviz..."
roslaunch pioneer_description rags_traffic_rviz.launch &
pid="$pid $!"
trap "echo Killing all processes.; kill -2 TERM $pid; exit" SIGINT SIGTERM
sleep 24h