- Download Visual Studio Code or VSCodium
- if VSCode runs inside of a Flatpak you need to add the following into
settings.json
underterminal.integrated.profiles.linux
:
"bash (outside flatpak)": { "path": "/usr/bin/flatpak-spawn", "icon": "terminal-bash", "args": [ "--host", "--env=TERM=xterm-256color", "bash" ] },
- if VSCode runs inside of a Flatpak you need to add the following into
- Clone repository
- create a venv with Python 3.10
- activate the venv
python -m pip install -r requirements.txt
pre-commit install
to activate git hook that runs auto formatting and linting on commit
Install dependencies on Ubuntu 22.04+ or Debian 11+:
sudo apt-get update
sudo apt-get install cmake build-essential libboost-all-dev python3-dev python3-pybind11
Install dependencies on Fedora 38+:
sudo dnf install cmake boost-devel python3.10-devel pybind11-devel
For all other Linux environments it's recommended to use Distrobox.
- activate the python environment
- Using
compile.sh
:
./compile.sh
If compiling doesn't work try deleting the build directory.
./lifelong --inputFile ../example_problems/random.domain/random_20.json -o test.json
python3 benchmark.py --planner "astar" --iterations 200 --config '{"restarts": ["True", "False"]}'
python3 benchmark.py --help
usage: benchmark.py [-h] [--rebuild] [--planner PLANNER] [--iterations [ITERATIONS]] [--config CONFIG]
optional arguments:
-h, --help show this help message and exit
--rebuild Use when you want to rebuild the program
--planner PLANNER name of the desired planner
--iterations [ITERATIONS]
Specify the number of iterations(steps)
--config CONFIG Configurations to try out. Each possible combination of configs will be set as os environment variables and tested. - Use this to test out different parameters of your planner.
Benchmark tool will generate different plots in Output/ folder.
- clone PlanViz into the same directory as swp-robot-runners
- visualize the run with PlanViz by providing the map and the generated "log" file
test.json
:- in ./build:
python3 ../../PlanViz/script/plan_viz.py --map ../example_problems/random.domain/maps/random-32-32-20.map --plan ./test.json --grid --aid --static --ca
It is not that easy to debug our Python MapfPlanner since it is called each second by the compiled c++ scirpt. Hence we need a remote-debugging server.
import debugpy
Add the following lines:
# to wait for debugger connection:
debugpy.listen(('localhost', 5678))
print("Waiting for debugger attach")
debugpy.wait_for_client()
- call
python3 benchmark.py
or any other thing that calls our planner. - In VsCode (while having pyMAPFPlanner.py open):
- Click on the Debug-Button
- Click "Run and Debug"
- Click "Remote Attach"
- Enter localhost as IP
- Enter 5678 as Port
- start debugging :)
- Follow these steps from the IntellJ documentation, ignore all the other steps:
import pydevd_pycharm
- Add line:
pydevd_pycharm.settrace('localhost', port=12345, stdoutToServer=True, stderrToServer=True)
Original Readme:
Log in to the competition website with a GitHub account, and we will automatically create a private GitHub submission repo for you.
The repo will be the place where you submit codes. In the My Submission
page, you can click "My Repo" to open your GitHub submission repo page.
Clone your submission repo to your local machine. The repo contains starter codes to help you prepare your submission.
$ git clone git@github.com:your_submission_repo_address
$ cd your_submission_repo
- cmake >= 3.16
- libboost >= 1.49.0
- Python3 and pybind11 (for python interface user)
Install dependencies on Ubuntu or Debian Linux:
sudo apt-get update
sudo apt-get install build-essential libboost-all-dev python3-dev python3-pybind11
Homebrew is recomanded for installing dependencies on Mac OS.
Using compile.sh
:
./compile.sh
Using cmake:
mkdir build
cmake -B build ./ -DCMAKE_BUILD_TYPE=Release
make -C build -j
Running the start-kit using commands:
./build/lifelong --inputFile the_input_file_name -o output_file_location
for example:
./build/lifelong --inputFile ./example_problems/random.domain/random_20.json -o test.json
more info on help:
./build/lifelong --help
If you are a Windows user, the most straightforward method to utilize our start-kits is by employing the WSL (Windows Subsystem for Linux) subsystem. Follow these steps:
- Install WSL, please refer to https://learn.microsoft.com/en-us/windows/wsl/install
- Open a shell in WSL and execute the following commands to install the necessary tools (CMake, GCC, Boost, pip, Pybind11):
sudo apt-get update
sudo apt-get install cmake g++ libboost-all-dev python3-pip python3-pybind11
- Employ the commands provided above to compile the start-kit.
While it's technically possible to use our start-kit with Cygwin, Mingw, and MSVC, doing so would be more complex compared to using WSL. You would likely need to configure the environment yourself.
If your private start-kit copy repo was created before a start-kit upgrade, you could run the ./upgrade_start_kit.sh
to upgrade your start-kit to the latest version.
You can check version.txt
to know the current version of your start-kit.
The upgrade_start_kit.sh
will check which file is marked as an upgrade needed and pull those files from the start-kit. It will pull and stage the files, but not commit them. This allows you to review the changes before committing them.
For files stated as unmodifiable in Parepare_Your_Planner.md, you always commit their changes.
The upgrade may overwrite some of your changes to CMakeLists.txt
, compile.sh
, and apt.txt
, you could compare the difference using git diff
and decide whether to revert some modifications or partially accept changes on these files.
The upgrade script will not touch any participants' created file, python/pyMAPFPlanner.py
, inc/MAPFPlanner.h
and src/MAPFPlanner.cpp
. So that participants' implementations should not be influenced by the start-kit upgrade.
Please refer to the Input_Output_Format.md.
Please refer to the Prepare_Your_Planner.md.
We provide a visualisation tool written in Python: https://github.com/MAPF-Competition/PlanViz. It is able to visualise the output of the start-kit program and help participants debug the implementations.
Please refer to the project website for more information. Also the document Debug_and_Visualise_Your_Planner which provides helpful hints for interpreting and diagnosing planner output.
Please refer to the Submission_Instruction.md.