Wandelscript definition, parser, type checker & runtime
Project description
Wandelscript
Introduction
Wandelscript is a robust framework designed for defining, parsing, type checking, and executing advanced scripting capabilities for robot automation. It integrates grammar-based parsing, runtime execution, and plugin extensibility, making it suitable for complex robot programming scenarios.
Features
- Grammar Parsing: The Wandelscript grammar is defined and easily extensible. It is powered by ANTLR4 to generate efficient parsers.
- Runtime Execution: Includes a runtime environment capable of executing Wandelscript programs with support for custom plugins and built-in functions.
- Extensible Plugins: Supports adding custom functionality via Python-based plugins for robot control, kinematics, vision, and more.
- Built-in Libraries: Provides libraries for mathematical operations, string manipulations, pose interpolations, and interaction with industrial systems like OPC UA.
- Examples: Comprehensive example scripts are available to demonstrate use cases such as collision handling, multi-robot coordination, and TCP manipulation.
- Testing: Includes a set of unit tests to validate the functionality of the built-in components and plugins.
Grammar
The Wandelscript grammar is defined under /wandelscript/grammar. To generate the parser, use the following command:
cd wandelscript/grammar && poetry run antlr4 -Dlanguage=Python3 -visitor *.g4
Structure
The repository is organized as follows:
- Core Modules:
runtime.py: Implements the execution context for Wandelscript.action_queue.py: Manages motion and action queues for robots.exception.py: Defines custom exceptions for Wandelscript.datatypes.py: Includes type definitions and helper functions.models.py: Contains data models for serialization and execution.metamodel.py: Facilitates runtime extensions and plugin registration.
- Built-ins: Found under
wandelscript/builtins, these are pre-defined plugins for:- Kinematics (
kinematics.py) - Math operations (
math.py) - String manipulation (
string.py) - Robotics control (
controller.py,collider.py)
- Kinematics (
- Plugins: Add custom features like image processing or complex robot motions, defined in
plugins_addons.py. - Examples: Demonstrates Wandelscript's capabilities with real-world use cases in
wandelscript/examples/.
Dependencies
The project uses the Poetry dependency manager. Install the dependencies using:
poetry install
Key dependencies:
- Python 3.10+
- ANTLR4 for grammar processing
- wandelbots-nova for data types and interaction with robot
- Pydantic for data validation
- Additional libraries for AI streaming, OPC UA, and geometric algebra.
Usage
- Run Scripts: Use the
runtime.pymodule to execute Wandelscript programs. - Extend Functionality: Add new plugins or built-ins to customize the scripting environment.
- Examples: Refer to the
/examplesfolder for sample Wandelscript files.
Contributing
Contributions are welcome! Here’s how you can help:
- Report bugs or suggest features via the issue tracker.
- Submit pull requests to improve code or documentation.
- Share example use cases or applications of Wandelscript.
Contact
Authors and contributors:
- Christoph Biering: Email
- Daniel Vorberg
- Dirk Sonnemann: Email
- Andreas Langenhagen: Email
- Mahsum Demir: Email
Feel free to reach out with questions, suggestions, or feedback!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wandelscript-0.1.0.tar.gz.
File metadata
- Download URL: wandelscript-0.1.0.tar.gz
- Upload date:
- Size: 116.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c056c97d7b9c69ec73f3322b9b28354661914c26998fa539df673a5f9cc96ed2
|
|
| MD5 |
05a4f5ce130622c1da9c916dd23f20a5
|
|
| BLAKE2b-256 |
99b151616d4c0fea4e5dca774dd82617ee988935d512257c5291e9a1f4571339
|
File details
Details for the file wandelscript-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wandelscript-0.1.0-py3-none-any.whl
- Upload date:
- Size: 161.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5bc60c0a92b62d91229336834cdc953bc44302df07e2f600576e375bd4731d4
|
|
| MD5 |
9c229ac3f06797c326b8ed290c177b29
|
|
| BLAKE2b-256 |
926f2b6929a27043d581fa6a7cd8d490e3ec5f34f0d0b712f4d3ab26acaff712
|