Plugins

Introduction

The plugin system allows running any executable program inside the control box, and can control the robot through the SDK.

Each plugin can contain 3 components: a Web component that interacts with users on the web interface, a daemon component that auto-starts on boot and runs continuously in the background, and a cmd component that is called once when needed.

Directory Structure

plugin  Plugin Directory
├─plugin.json           Plugin configuration information
├─web                   Web component directory
│  ├─index.html         Web component entry file
│  └─...                Can store various front-end files (such as js, css, images, fonts, etc.)
├─bin                   Executable program directory
│  ├─enable.exe         Runs once when enabling the plugin (commonly used to install project dependencies)
│  ├─disable.exe        Runs once when disabling the plugin (commonly used to clean project data)
│  ├─daemon.exe         Daemon component executable program
│  ├─cmd.exe            Cmd component executable program
│  └─...                Can store various project files (such as python source code, etc.)

plugin.json

{
  "name": "claw",
  "author": "lebai.ltd",
  "description": "Control gripper",
  "homepage": "https://help.lebai.ltd"
}
  • name: Plugin name, must match the plugin directory name
  • author: Creator
  • description: Plugin overview
  • homepage: Project website, recommended to point to the plugin's usage instructions
  • auto_restart: Whether to automatically restart the daemon program after an abnormal exit

Web

Can use native HTML, or HTML generated by React, Vue, etc.

bin

Executable programs can be binary files compiled from C, Rust, etc., or shell scripts.

Open Source Plugins

camera

Connect control box camera and save images to the file system

Source: https://github.com/lebai-robotics/plugin/tree/main/cameraopen in new window

camera_calibrater

Perform camera calibration using a calibration board

Source: https://github.com/lebai-robotics/plugin/tree/main/camera_calibrateropen in new window

apriltag

Calculate AprilTag pose relative to the base using calibration results from camera_calibrater and images from camera

Source: https://github.com/lebai-robotics/plugin/tree/main/apriltagopen in new window