In Roman mythology Dies (dai-ez) was the personification of day and the mother of Mercury.
Dies is the framework powering the Delft Mercurian's RoboCup AI. It consists of a core written in Rust, which includes a physics simulator, networking, vision data processing, game state management, and a Python API and executor. Strategies -- the high-level logic that governs the player's behaviors -- are written in Python and can be run in a separate process, allowing for hot reloading and easy debugging.
See http://docs.delftmercurians.nl/ for the latest documentation.
You'll need the following dependencies on your system:
- Stable Rust toolchain. Use rustup if you can.
- On Linux, you'll need to install the
pkg-config
,clang
,libudev-dev
andlibssl-dev
packages:sudo apt install libudev-dev libssl-dev pkg-config clang
.
To run Dies locally, simply use cargo run -- <options>
.
If you are experiencing hanging issues, you can use tokio-console
to see the state of running tasks. To do this, you need to install tokio-console
:
cargo install --locked tokio-console
Then while Dies is running, you can run:
tokio-console
You will see a top
-like interface that shows the state of all running tasks. You can use q
to quit.
If you do not indent to make changes to the Typescript code of the web UI, feel free to skip this section.
If you want to work on the web UI (./webui
) you will also need:
- Node.JS v18+ - Recommended to use
fnm
for installing it. - cargo-make - Install with
cargo install cargo-make
.
Then you will need to install the web dependencies
cd webui
npm install
To build the webui after making changes in ./webui
:
# From the project root:
cargo make webui
You can also pass the --web-build
flag to ./run.sh
for the same effect (you still need all the other dependencies):
./run.sh --web-build <options>
Dies is split into several crates, each with a specific purpose:
- : Contains the most widely used types and traits. Should be kept slim.
- : Contains the
Executor
,TeamController
,PlayerController
,Role
, andStrategy
types. - : Contains the
BasestationClient
type. - : Contains the
SSLClient
type. - : Contains the protobuf definitions used for communication with the game controller and vision.
- : Contains the
Simulator
type, which can be used to replace theSSLClient
andBasestationClient
with a simulator for testing. - : Contains the
World
type, which is used to represent the state of the game world, as well as filters and processors for incoming data. - : Contains the backend for the web interface, which can be used to monitor and control the AI. The frotend is in the
webui
directory. - : Contains the command line interface for running the AI. This is the main entry point for the framework.