-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstart_dynamic.sh
34 lines (24 loc) · 984 Bytes
/
start_dynamic.sh
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
#!/bin/bash
export ROS_MASTER_URI=http://localhost:11311/
#export ROS_IP=192.168.0.15 # only for home office
cd ./maps
echo "-----------------------------------------------------------"
echo "- Start ROSCORE -"
echo "-----------------------------------------------------------"
roscore &
PID1="$!"
sleep 5
echo "-----------------------------------------------------------"
echo "- Starting dynamic map import -"
echo "-----------------------------------------------------------"
rosrun dynamic_mapping main map.header & #dynamic_mapping import
PID2="$!"
sleep 3
echo "-----------------------------------------------------------"
echo "- Starting Dynamic mapping export -"
echo "-----------------------------------------------------------"
rosrun dynamic_mapping map_export -f exported_map #dynamic_mapping export
PID3="$!"
sleep 5
trap "kill $PID1 $PID2 $PID3" exit INT TERM
wait