Skip to main content
Builds and installs axol-rt, the real-time core that controls the motors for teleop and every other command that moves the arms. Axol can’t control hardware without it. axol provision runs it for you. Run it yourself to rebuild:

What it does

  1. Installs Rust if needed. If cargo isn’t on your PATH or in ~/.cargo/bin, it installs a minimal Rust toolchain with rustup into ~/.cargo. This doesn’t need sudo.
  2. Gets the source code. In a development checkout it builds rust/axol-rt. Otherwise it downloads the source that matches the installed axol version into ~/.almond/axol-rt-src.
  3. Builds and installs the binary. In a development checkout the binary stays in rust/axol-rt/target/release/. Otherwise it goes in UV_TOOL_BIN_DIR if that is set, or in ~/.local/bin/axol-rt. The hosted installer puts it in /usr/local/bin/axol-rt. Running it again at the same version skips the build.
  4. Grants permissions. It gives the binary permission to run at real-time priority (CAP_SYS_NICE) and to lock its memory (CAP_IPC_LOCK). This needs root, so it may ask for your sudo password. Without sudo, it prints the sudo setcap command to run once.
Each step is skipped when its work is already done.

Building from other source

If rt.install can’t find the right source, such as when axol was installed from a wheel file, set AXOL_RT_SOURCE to a checkout path, or to <git url>@<branch|tag|commit>. Setting it always rebuilds.

Which binary runs

Axol uses the first axol-rt it finds, in this order:
  1. the path in AXOL_RT_BIN
  2. the build in the current development checkout
  3. axol-rt on your PATH

If arming fails

  • Version mismatch. axol and axol-rt must come from the same version. If they don’t, axol-rt refuses to start before any motor moves, and the session fails with axol-rt … refused the configuration and exited. Run axol rt.install, or run cargo build --release in rust/axol-rt in a development checkout.
  • No real-time priority. axol-rt won’t arm the motors if it can’t get real-time priority. Run axol rt.install again to restore its permissions.
If axol-rt can’t lock its memory, it logs a warning and runs anyway.
When axol provision runs this step and it fails, provision finishes the other steps and then exits with code 1. Run axol rt.install by itself to see the full error.