Logo di Gimbal Color Detect

Gimbal Color Detect

Organizzazione
espressif
gimbal_color_detect

Use the camera and ESP-DL-backed color_detect Lua module to identify a target object's color, track that color, show the camera preview on the LCD, draw a bounding box, and drive X/Y gimbal servos toward the target center.

Panoramica

Pubblicato daespressif
Repositoryesp-claw-skills-lab
Nome della skillgimbal_color_detect
Stelle
37
Fork
19
File inclusi
1
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 1

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da espressif su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Gimbal Color Detect in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/espressif/esp-claw-skills-lab/tree/master/skills/gimbal_color_detect
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/espressif/esp-claw-skills-lab.git /tmp/esp-claw-skills-lab
mkdir -p .claude/skills
cp -r /tmp/esp-claw-skills-lab/skills/gimbal_color_detect .claude/skills/gimbal_color_detect
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Gimbal Color Detect in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Gimbal Color Detect non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Gimbal Color Detect non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Gimbal Color Detect

Use this skill when the user wants esp-claw to use the camera as a visual servo target tracker.

Visible Object Rule

If the user asks to track "this object", "the object in front", "the thing in front", "这个物体", "前面这个东西", or any other visible object without naming a specific color, you MUST NOT start color tracking directly and MUST NOT fall back to the default green preset. First use the take_picture skill to capture the object, inspect the saved photo with AI vision, identify the intended foreground object's dominant visible color, tell the user the recognized color, and only then start this color tracking script with the recognized color.

If the recognized color is one of the built-in presets, pass only target_color_name. If it is not a preset, ask AI vision to return an HSV range and pass target_h_min, target_h_max, target_s_min, target_s_max, target_v_min, and target_v_max.

The built-in green preset is used only when the user gives no color and also does not refer to a specific visible object. HSV thresholds match ESP-DL: hue uses 0..180, saturation uses 0..255, and value uses 0..255. If target_h_min > target_h_max, the script treats the hue range as wrapping through 0, which is useful for red targets.

Preview display follows the esp-hello-new/examples/gimbal_base camera path by default: crop a centered 240x240 square from the board-default camera stream, and draw it centered on the 284x240 LCD. Detection runs on that same centered crop so off-screen colors do not affect the tracked box. Each display frame uses screen:begin(), draws the image and overlay, then submits with screen:present({ full = true }). Camera discovery uses camera.list_devices(); the built-in screen is opened with display.open().

Default Hardware

  • Camera device: from camera.list_devices()
  • Camera stream: board default mode from camera.open(dev_path)
  • LCD panel: from display.open()
  • X servo GPIO: 4
  • Y servo GPIO: 5
  • PWM driver: ledc, 50 Hz, 500 us .. 2500 us
  • X angle range: 0 .. 180, initial 90
  • Y angle range: 10 .. 70, initial 50
  • Runtime shape: a single async Lua job owns camera, LCD, color detection, and X/Y LEDC servos.

Start Script Args Schema

json
{
  "type": "object",
  "properties": {
    "run_seconds": {
      "type": "integer",
      "default": 0,
      "description": "0 means run until the async Lua job is stopped."
    },
    "frame_interval_ms": {
      "type": "integer",
      "default": 0,
      "description": "Extra delay after each frame. Keep 0 for maximum camera/display throughput."
    },
    "display_every_n": {
      "type": "integer",
      "default": 1
    },
    "perf_log_every_n": {
      "type": "integer",
      "default": 10,
      "description": "Print average get/convert/detect/display/loop timing every N frames. Set 0 to disable."
    },
    "display_crop_size": {
      "type": "integer",
      "default": 240,
      "description": "Centered square crop size before drawing to the LCD."
    },
    "detect_stride": {
      "type": "integer",
      "default": 4,
      "description": "Kept for compatibility. ESP-DL color detection evaluates the HSV mask for the selected source crop."
    },
    "detect_min_pixels": {
      "type": "integer",
      "default": 250,
      "description": "Minimum connected-component size, matching the ESP-DL gimbal_base detector scale."
    },
    "detect_max_blob_percent": {
      "type": "integer",
      "default": 35,
      "description": "Reject connected components larger than this percentage of the display crop."
    },
    "target_color_name": {
      "type": "string",
      "default": "green",
      "description": "Registered target color name. Built-in presets: red, orange, yellow, green, cyan, blue, purple."
    },
    "target_h_min": {
      "type": "integer",
      "description": "Custom registered target hue lower bound, 0..180. Required only when target_color_name is not a built-in preset."
    },
    "target_h_max": {
      "type": "integer",
      "description": "Custom registered target hue upper bound, 0..180. Values lower than target_h_min wrap through 0."
    },
    "target_s_min": {
      "type": "integer",
      "description": "Custom registered target saturation lower bound, 0..255."
    },
    "target_s_max": {
      "type": "integer",
      "description": "Custom registered target saturation upper bound, 0..255."
    },
    "target_v_min": {
      "type": "integer",
      "description": "Custom registered target value lower bound, 0..255."
    },
    "target_v_max": {
      "type": "integer",
      "description": "Custom registered target value upper bound, 0..255."
    },
    "deadzone_px": {
      "type": "integer",
      "default": 12
    },
    "x_gain": {
      "type": "number",
      "default": 0.035
    },
    "y_gain": {
      "type": "number",
      "default": 0.035
    },
    "max_track_step_degrees": {
      "type": "number",
      "default": 2
    },
    "x_gpio": {
      "type": "integer",
      "default": 4
    },
    "y_gpio": {
      "type": "integer",
      "default": 5
    },
    "servo_max_step_degrees": {
      "type": "number",
      "default": 2
    }
  }
}

Tool Call Inputs

Start color tracking:

json
{
  "path": "{CUR_SKILL_DIR}/scripts/start_gimbal_color_detect.lua",
  "args": {},
  "timeout_ms": 0,
  "name": "gimbal_color_detect",
  "exclusive": "gimbal_color_detect",
  "replace": false
}

Start tracking a built-in blue preset:

json
{
  "path": "{CUR_SKILL_DIR}/scripts/start_gimbal_color_detect.lua",
  "args": {
    "target_color_name": "blue"
  },
  "timeout_ms": 0,
  "name": "gimbal_color_detect",
  "exclusive": "gimbal_color_detect",
  "replace": false
}

Start tracking a custom AI-returned color:

json
{
  "path": "{CUR_SKILL_DIR}/scripts/start_gimbal_color_detect.lua",
  "args": {
    "target_color_name": "custom teal",
    "target_h_min": 78,
    "target_h_max": 92,
    "target_s_min": 64,
    "target_s_max": 255,
    "target_v_min": 46,
    "target_v_max": 255
  },
  "timeout_ms": 0,
  "name": "gimbal_color_detect",
  "exclusive": "gimbal_color_detect",
  "replace": false
}

When the user says "track this object" / "追踪这个物体", activate the take_picture skill and follow its own script instructions. Pass filename: "gimbal_target.jpg" and skip_frames: 3; resolve its script path from that skill's directory, not this package.

After this call returns the saved JPEG path, inspect that image with AI vision. Then start start_gimbal_color_detect.lua using the recognized preset color or custom HSV range. Do not skip the photo and do not start with empty args for a visible-object request.

Stop color tracking:

json
{
  "name": "gimbal_color_detect",
  "wait_ms": 2000
}

Recommended Flow

  1. Activate board_hardware_info first when the user wants pin validation.
  2. If the user refers to a visible object instead of naming a color, run the take_picture skill first. Use a simple filename such as gimbal_target.jpg.
  3. Inspect the saved photo with AI vision and identify the intended foreground object's dominant visible color.
  4. Tell the user the recognized color before starting tracking.
  5. If the recognized color is one of red, orange, yellow, green, cyan, blue, or purple, register it by passing only target_color_name.
  6. If the recognized color is not one of those presets, ask AI vision for a practical HSV range and register it with target_color_name plus target_h_min, target_h_max, target_s_min, target_s_max, target_v_min, and target_v_max.
  7. If the user gives no color and does not refer to a specific visible object, run the tracker with no color args; it defaults to the built-in green preset.
  8. Run the tracking script with lua_run_script_async.
  9. Use timeout_ms: 0, name: "gimbal_color_detect", exclusive: "gimbal_color_detect", and replace: false.
  10. Tune x_gain / y_gain signs if servo direction is reversed on a specific mount.

Color Registration Hints

The script has built-in presets for these colors. When AI identifies one of these names, pass only target_color_name; do not pass HSV values unless you need to override the preset for local lighting. For red, the preset uses a hue range that wraps through 0. Chinese names 红色, 橙色, 黄色, 绿色, 青色, 蓝色, and 紫色 are accepted as aliases.

Colortarget_h_mintarget_h_maxNotes
red17010Wraps through 0
orange824Often needs higher target_s_min
yellow2240Sensitive to warm lighting
green5088Default when no color is specified
cyan82100Narrow if blue objects also appear
blue95130Use lower target_v_min for dark blue
purple128158Includes violet/magenta edge

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Gimbal Color Detect?

Use the camera and ESP-DL-backed color_detect Lua module to identify a target object's color, track that color, show the camera preview on the LCD, draw a bounding box, and drive X/Y gimbal servos toward the target center.

Perché usare Gimbal Color Detect su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Gimbal Color Detect è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Gimbal Color Detect in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/espressif/esp-claw-skills-lab/tree/master/skills/gimbal_color_detect. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Gimbal Color Detect?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Gimbal Color Detect?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Gimbal Color Detect: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Gimbal Color Detect è gratuita?

Sì. È pubblicata su GitHub da espressif con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇