Plugins

Introduction

The plugin system allows any executable program to run inside the chassis and can control the robot through the SDK. Each plugin can contain 3 components: a Web component that interacts with users through the web interface, a daemon component that auto-starts and runs continuously in the background, and a cmd component that is called once when used.

Directory Structure

plugin  Plugin Directory  
├─plugin.json           Plugin configuration information
├─web                   Web component directory
│  ├─index.html         Web component entry file
│  └─...                Can store various frontend files (js, css, images, fonts, etc.)
├─bin                   Executable program directory
│  ├─enable.exe         Runs once when enabling plugin (commonly used for installing project dependencies)
│  ├─disable.exe        Runs once when disabling plugin (commonly used for cleaning project data)
│  ├─daemon.exe         Daemon component executable
│  ├─cmd.exe            CMD component executable  
│  └─...                Can store various project files (such as Python source code)

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 plugin usage instructions
  • auto_restart: Whether to automatically restart the daemon program after abnormal exit

Web

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

bin

Can be compiled into a binary executable file, or a shell script.

Open Source Plugins

camera

Connects to the chassis camera and saves the image to the file system Source: https://github.com/lebai-robotics/plugin/tree/main/cameraopen in new window

camera_calibrater

Calibrates the camera and calculates the intrinsic and relative parameters Source: https://github.com/lebai-robotics/plugin/tree/main/camera_calibrateropen in new window

apriltag

Uses calibration results from camera_calibrater and images from camera to calculate AprilTag pose relative to the base Source: https://github.com/lebai-robotics/plugin/tree/main/apriltagopen in new window