Skip to content

About

The next generation of robotics software for the small-size-league. Data gathering, filtering, automatic calibration, robot control, network based user interface and much more...

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

luhsoccer_trioxide 🏟️

Lift off to the next generation of robotics software... Powered by the bindings of oxygen in a trioxygen molecule.

Run the software

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.

Adding a Subcrate (lib)

Requires cargo-generate (Install via cargo install cargo-generate)

Architecture

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.

Developing trioxide

Development on linux

Development on linux is straight forward. Just clone the repository and use cargo as usual.

Development on windows

Development on windows requires some extra steps to setup the environment:

  1. Install LLVM to compile the strategy bindings. Use the following command: winget install llvm.LLVM

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

Develop python bindings in own venv

Enter venv

. /path/to/venv/bin/activate

Build the python module and install it in the venv

cargo stubs; maturin develop

Trioxide is now installed in the venv.

Develop python bindings

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-python from 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 the pyproject.toml file under devtools/python-dev-env and run cargo setup-python-dev-env again.

    To update the stubs a full rebuild is not necessary. Just run cargo stubs and the module should have matching stubs again.

Install python module locally

  1. Generate stubs for the python module (in trioxide directory):
cargo stubs
  1. Build the python module, generates a wheel and output it's location (in trioxide directory):
maturin build
  1. 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>
  1. Run trioxide via python:
python -m luhsoccer_trioxide
# or
uv run luhsoccer_trioxide

About

The next generation of robotics software for the small-size-league. Data gathering, filtering, automatic calibration, robot control, network based user interface and much more...

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages