CDSL (Custom Description Scripting Language) is a lightweight domain-specific language (DSL) for describing robotic movement and control instructions in a simple, human-readable format.
CDSL scripts use the .cdsl file extension. Instructions are executed sequentially, from top to bottom.
Make sure the following tools are installed:
- C++ compiler
- CMake
- Ninja
- Git
- Make
- ClangFormat (optional, for formatting)
| Command | Description |
|---|---|
make |
Build the project. This is the default target. |
make setup |
Check dependencies, initialize Git submodules, and configure the CMake build. |
make build |
Build the project using CMake and Ninja. Automatically runs setup if required. |
make clean |
Remove build files and compile_commands.json. |
make rebuild |
Clean the project, reconfigure it, and build from scratch. |
make check-deps |
Check whether the required build dependencies are installed. |
make format |
Format C/C++ source files using ClangFormat. |
The default build type is Debug. You can specify a different CMake build type:
make BUILD_TYPE=ReleaseFor a fresh clone, run:
make setup
make buildOr simply:
makeThe CDSL interpreter supports two modes:
- Script mode — Execute instructions from a
.cdslfile. - Interactive mode — Enter instructions directly in the terminal.
Create a .cdsl file containing the instructions in the order they should be executed.
For example:
move FORWARD 10
wait 2
move COMOPNENT_NAME 5
Then execute the script with:
cdsl filename.cdslThe interpreter processes instructions sequentially and stops immediately when it encounters:
- An invalid command
- An invalid value
- An invalid instruction
To validate a script without executing it, use the --check flag:
cdsl filename.cdsl --checkThis is useful for detecting errors before running a script.
Run cdsl without providing a file:
cdslThe interpreter will enter interactive mode and accept instructions directly from the terminal.
The --check flag is not available in interactive mode.
CDSL instructions generally follow one of these forms:
ACTION LABEL VALUE
or:
ACTION VALUE
The exact syntax and available instructions are documented in the language reference.
For detailed information about CDSL syntax, supported instructions, values, and semantics, see the language documentation.
.
├── CMakeLists.txt
├── Makefile
├── README.md
├── include/
├── src/
├── tests/
└── build/
The build/ directory is generated during compilation and does not need to be committed to version control.
To format the C and C++ source files:
make formatThis uses clang-format on files under:
src/
include/
To remove generated build files:
make cleanTo perform a completely fresh build:
make rebuildFor the complete CDSL language reference, see: