forked from PathPlanning/Continuous-CBS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_logs.sh
More file actions
29 lines (22 loc) · 871 Bytes
/
Copy pathgenerate_logs.sh
File metadata and controls
29 lines (22 loc) · 871 Bytes
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
#!/bin/bash
#Make sure you've followed the readme to build CCBS before running this!!
# Define the paths to your Python script and C++ executable
GENERATE_TASKS_SCRIPT="path/to/generate_tasks.py"
CCBS_EXECUTABLE="path/to/CCBS"
# Check if the required number of arguments is provided
if [ $# -ne 5 ]; then
#Do not include the .xml for task_name as this is used as the start of the task name and will have an id appended
#E.g.,
echo "Usage: $0 'map_name' 'task_name' 'number_of_agents' 'number_of_tasks' 'config'"
exit 1
fi
MAP_NAME="$1"
TASK_NAME="$2"
NUMBER_OF_AGENTS="$3"
NUMBER_OF_TASKS="$4"
CONFIG="$5"
python3 generate_tasks.py --map $MAP_NAME --agents $NUMBER_OF_AGENTS --name $TASK_NAME --num_tasks $NUMBER_OF_TASKS
for ((id = 0; id < NUMBER_OF_TASKS; id++)); do
TASK_FILE="${TASK_NAME}_${id}.xml"
./CCBS "$MAP_NAME" "$TASK_FILE" "$CONFIG"
done