-
Notifications
You must be signed in to change notification settings - Fork 23
/
run_greet_and_follow.sh
executable file
·46 lines (37 loc) · 1.06 KB
/
run_greet_and_follow.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
41
42
43
44
45
46
#/bin/bash
TYPE="quadcopter"
LEAD="agent.0"
N=10
FOLLOWERS=2
NT=0
TARGETS=1
SCRIPTS_DIR=`dirname $0`
SCRIPT="$SCRIPTS_DIR/greet_and_follow.mf"
LOG_LEVEL=1
if [ $# -ge 1 ]; then
if [ "$1" == "help" ] || [ "$1" == "-h" ]; then
echo "$0 [type=quad] [targets=1] [followers=2] [num agents=10] [no-transport]"
exit 0
fi
TYPE="$1"
if [ $# -ge 2 ]; then
TARGETS=$2
fi
if [ $# -ge 3 ]; then
FOLLOWERS=$3
fi
if [ $# -ge 4 ]; then
N=$4
fi
if [ $# -ge 5 ]; then
NT=1
fi
fi
if [ $NT -eq 1 ]; then
echo gams_controller -mc $N -n $N -nt -p osc-$TYPE -0 ".targets=$TARGETS;.followers=$FOLLOWERS" -M $SCRIPT -z 4 --gams-level $LOG_LEVEL
gams_controller -mc $N -n $N -nt -p osc-$TYPE -0 ".targets=$TARGETS;.followers=$FOLLOWERS" -M $SCRIPT -z 4 --gams-level $LOG_LEVEL
else
echo gams_controller -mc $N -n $N -p osc-$TYPE -0 ".targets=$TARGETS;.followers=$FOLLOWERS" -M $SCRIPT -z 4 --gams-level $LOG_LEVEL
gams_controller -mc $N -n $N -p osc-$TYPE -0 ".targets=$TARGETS;.followers=$FOLLOWERS" -M $SCRIPT -z 4 --gams-level $LOG_LEVEL
fi
exit 0