Klang

⚠️

This page is currently under construction.

cargo install klang  # To install the Klang toolchain
pip install pyklang  # To install the Python frontend

Klang is a domain-specific language (DSL) for programming robots.

Klang Interface

Klang is built into K-Scale OS, and is designed to be a simple and flexible way to get started building robot applications. Right now, it is basically a glorified templating engine. Klang commands are executed by the neural interpreter described below. Here is a sample Klang program:

> wave [arm] arm {
    > wave joint [joint] twice {
        move joint [joint] on the [arm] arm to 90
        move joint [joint] on the [arm] arm to 0
    }

    " wave joint [1] twice
    " wave joint [2] twice
    " wave joint [3] twice
}

> wave both arms {
    " wave [right] arm
    " wave [left] arm
}

" wave both arms

The neural interpreter is responsible for executing these commands.