Skip to content

DelftMercurians/Dies

Repository files navigation

🌩 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.

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

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

If you are connected to the team VPN, you can run your local copy of Dies on the server. For now, this will only work on Linux. First of all make sure you have ssh and rsync and that your public key is added to the server. Then, you can run the following command:

./run.sh <options>

The following options are required:

  • -m: Mode: sim for simulation, irl for real robot. irl-test allows manual control of the robot over the web interface.

See http://docs.delftmercurians.nl/ for the latest documentation.

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-serial-client: Contains the SerialClient 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 SerialClient 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.