-
Notifications
You must be signed in to change notification settings - Fork 2
/
Multilabel_Record_synthetic.sh
executable file
·40 lines (40 loc) · 1.3 KB
/
Multilabel_Record_synthetic.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
35
36
37
38
39
40
#!/bin/bash
arg1=$1
arg2=$2
arg3=$3
arg4=$4
# degree value
theta1=$(($arg1))
theta2=$(($arg3))
# degree name
thetaname1=$arg2
thetaname2=$arg4
dir1=data_1407
dir2=data_1607
END=82
for ((i=END;i<=END;i++)); do
cd /home/zdai/repos/DeepAOANet/${dir1}
for bagfile1 in deg_*.bag; do
csvname1="${bagfile1%.*}"
degname1="${csvname1#*_}"
cd /home/zdai/repos/DeepAOANet/${dir2}
for bagfile2 in deg_*.bag; do
csvname2="${bagfile2%.*}"
degname2="${csvname2#*_}"
if [ "$thetaname1" == "$degname1" ] && [ "$thetaname2" == "$degname2" ]; then
echo $theta1
echo $theta2
python3 /home/zdai/repos/DeepAOANet/Multilabel_Create_Synthetic.py --theta1 $theta1 --theta2 $theta2 &
cd /home/zdai/repos/DeepAOANet/data_multi-${END}
rosbag record -O ${degname1}_multi-${degname2}.bag -e "/kerberos/R_(.*)" __name:=my_bag &
sleep 2
cd /home/zdai/repos/DeepAOANet/${dir1}
rosbag play -r 0.7 ${csvname1}.bag /kerberos/iq_arr:=/IQ1 &
cd /home/zdai/repos/DeepAOANet/${dir2}
rosbag play -r 0.6 ${csvname2}.bag /kerberos/iq_arr:=/IQ2
sleep 6
rosnode kill -a
fi
done
done
done