Lift off to the next generation of robotics software... Powered by the bindings of oxygen in a trioxygen molecule.
The following helper commands are implemented to help use the software:
| Command | Comments |
|---|---|
cargo run |
Run Common |
cargo clean-logs |
Delete all log Files |
cargo gen-lib <name> |
Generates new Library |
Using mold can help with linking times.
Requires cargo-generate (Install via cargo install cargo-generate)
The Software is divided into 3 Blocks.
-
Logic: Contains all the logic necessary for stuff like data-filtering, path-planning, strategy-interfaces, etc. This is the part where the actual data-processing happens. Multiple Logic's can run at the same time, each with a different color (e.g. one for the blue team and one for the yellow team).
-
Common: Manages all the stuff, which only needs to run once like the connection to the Vision/Simulation, the GameController and our robots. Multiple Logic's and UI's can "connect" to one Common Block. Common also exposes multiple REST-API endpoints for controlling various stuff (see REST-Endpoints)
-
UI: Our visualization which is built using egui. It is used to visualize & control everything relevant. It is build to be quickly extendable and customizable.
Development on linux is straight forward. Just clone the repository and use cargo as usual.
Development on windows requires some extra steps to setup the environment:
-
Install LLVM to compile the strategy bindings. Use the following command:
winget install llvm.LLVM -
If you have problems with cargo not downloading the crates correctly, add the following to your
.cargo/config.toml(Not the config in the repository, but the one in your user folder):[net] git-fetch-with-cli = true
Enter venv
. /path/to/venv/bin/activateBuild the python module and install it in the venv
cargo stubs; maturin developTrioxide is now installed in the venv.
To develop for python you need to follow these steps:
-
Set up the development environment: To set up the development environment use a custom cargo commend:
cargo setup-python-dev-env
This requires uv to be installed on your machine. This step has to be performed only once.
-
Run a command with the venv active: To run a python command with the build trioxide module use:
cargo run-python "<python command>"For example to run the python tests:
cargo run-python pytest
Or if you want to run a custom python file. Since you need to run
run-pythonfrom the root dir in the workspace, all files will be resolves from the root dir of the workspace.cargo run-python -- python test.py
If you want to print the version of the python interpreter:
cargo run-python -- python --version
-
Develop python files with the venv: If you want to develop with the build module, you just need to activate the venv under
devtools/python-dev-env/.venv. It contains everything needed to develop. If you need new dependencies in it, update thepyproject.tomlfile underdevtools/python-dev-envand runcargo setup-python-dev-envagain.To update the stubs a full rebuild is not necessary. Just run
cargo stubsand the module should have matching stubs again.
- Generate stubs for the python module (in trioxide directory):
cargo stubs- Build the python module, generates a wheel and output it's location (in trioxide directory):
maturin build- Install the generated wheel (can also be done in a uv venv):
pip install --force-reinstall --upgrade <path to wheel>
# or
uv pip install --force-reinstall --upgrade <path to wheel>- Run trioxide via python:
python -m luhsoccer_trioxide
# or
uv run luhsoccer_trioxide