Skip to main content

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)
  • 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

  1. Run Scripts: Use the runtime.py module to execute Wandelscript programs.
  2. Extend Functionality: Add new plugins or built-ins to customize the scripting environment.
  3. Examples: Refer to the /examples folder 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wandelscript-0.2.2.tar.gz (116.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wandelscript-0.2.2-py3-none-any.whl (161.3 kB view details)

Uploaded Python 3

File details

Details for the file wandelscript-0.2.2.tar.gz.

File metadata

  • Download URL: wandelscript-0.2.2.tar.gz
  • Upload date:
  • Size: 116.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for wandelscript-0.2.2.tar.gz
Algorithm Hash digest
SHA256 80b2dafe5a26c64c386308001ababd3c4d264b971fdd03bf5357c036ddd76c83
MD5 a9e3f7843a95019c49a9a05fdbde3ca5
BLAKE2b-256 49b2e712f4a6e34fd8bf9e8dc97e8c5adc414d4674c42b01dc773bb9859f3e9d

See more details on using hashes here.

File details

Details for the file wandelscript-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: wandelscript-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 161.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for wandelscript-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bd291baff4243c3b37d6a1b573c021e90b6700624a1dcdb2d1e48891fdd780c9
MD5 fe15fa050659e2836dcc7d640a34e0c3
BLAKE2b-256 d8c9c159321c45929dbcc0e02b92651fe655993717345371a766e4a2e77f65dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page