Skip to content

Latest commit

 

History

History
82 lines (55 loc) · 3.73 KB

README.md

File metadata and controls

82 lines (55 loc) · 3.73 KB

🌩 Dies 🌩

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.

Getting Started

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 and libssl-dev packages: sudo apt install libudev-dev libssl-dev pkg-config clang.

To run Dies locally, simply use cargo run -- <options>.

Debugging hanging issues

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.

Web UI Development

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>

Crates

Dies is split into several crates, each with a specific purpose:

  • dies-core: Contains the most widely used types and traits. Should be kept slim.
  • dies-executor: Contains the Executor, TeamController, PlayerController, Role, and Strategy types.
  • dies-basestation-client: Contains the BasestationClient type.
  • dies-ssl-client: Contains the SSLClient type.
  • dies-protos: Contains the protobuf definitions used for communication with the game controller and vision.
  • dies-simulator: Contains the Simulator type, which can be used to replace the SSLClient and BasestationClient with a simulator for testing.
  • dies-world: Contains the World type, which is used to represent the state of the game world, as well as filters and processors for incoming data.
  • dies-webui: Contains the backend for the web interface, which can be used to monitor and control the AI. The frotend is in the webui directory.
  • dies-cli: Contains the command line interface for running the AI. This is the main entry point for the framework.