Visual Servoing logo

Visual Servoing

Organization
google-deepmind
visual-servoing

Aligns an eye-in-hand physical or simulated robot arm end-effector (SO-101, I2RT YAM, or MuJoCo robot grippers) and grasp orientation to sub-millimeter precision using robot IBVS (analytical hover-plane ray alignment or CPU OpenCV feature-matching IBVS). Use only for closed-loop eye-in-hand robot gripper visual servoing before grasping or manipulation. Don't use for non-robot microscope, telescope/PTZ, AR glasses, or homography tasks.

Overview

Publishergoogle-deepmind
Repositoryrobotics-antigravity-plugin
Skill namevisual-servoing
Stars
490
Forks
45
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by google-deepmind on GitHub. Read the source before you install it.

Installation

Install the Visual Servoing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/google-deepmind/robotics-antigravity-plugin/tree/main/plugins/robotics/skills/visual-servoing
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/google-deepmind/robotics-antigravity-plugin.git /tmp/robotics-antigravity-plugin
mkdir -p .claude/skills
cp -r /tmp/robotics-antigravity-plugin/plugins/robotics/skills/visual-servoing .claude/skills/visual-servoing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Visual Servoing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Visual Servoing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Visual Servoing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Eye-in-Hand Visual Servoing (Ibvs)

Use bundled Ibvs (opencv-python numpy, CPU only, no GPU or torch) with calibrated camera intrinsics (fx_px, fy_px, cx_px, cy_px) and hand-eye extrinsics T_ee_cam (T_ee_cam and T_world_cam use OpenCV pinhole axes +X right, +Y down, +Z forward; from MJCF use mp.get_camera_poses_opencv, never raw cam_xmat; if exact K/T_ee_cam are absent, estimate K from approximate FOV and align closed-loop with a 2-nudge empirical Jacobian at 1-2 cm hover clearance per workspace-calibration):

  1. Choose the Visual Frontend by Target Texture:
    • Smooth / Low-Texture Objects: Segment the target foreground mask (passing an optional roi_mask to exclude any robot/gripper geoms visible in the FOV) and extract pose features via Ibvs.ray_plane_contour_pose or Ibvs.pca_contour_target(..., min_aspect=1.0, roi_mask=roi_mask, prev_theta_rad=...). Use det["anisotropy"] (eigval_max / eigval_min) to decide whether wrist yaw alignment is required vs. keeping neutral wrist roll on symmetric objects.
    • Textured Objects (CPU match_keypoints): Call m = match_keypoints(img_cur, img_goal, detector="sift", mask_cur=target_mask) ("orb" is faster; pass masks to exclude gripper fingers). It keeps Lowe-ratio matches with RANSAC homography inliers and returns m["u_px"], m["v_px"] -> m["u_goal_px"], m["v_goal_px"] for compute_step, or None when fewer than min_inliers survive (re-detect the target instead of servoing on bad matches).
  2. Analytical Hover-Plane Alignment (Known Support Plane z_plane_m, 2 Steps to < 1 mm):
    • Compute the optimal unoccluded hover clearance analytically from T_ee_cam via Ibvs.principal_ray_hover_distance(T_ee_cam, approach_axis_ee)["hover_distance_m"] (clamped to safe workspace clearance h_hover).
    • At hover, compute T_world_cam = T_world_ee(q_actual) @ T_ee_cam from measured joint states and call target = Ibvs.ray_plane_contour_pose(mask, fx_px, fy_px, cx_px, cy_px, T_world_cam, z_plane_m, roi_mask=roi_mask, prev_yaw_rad=...) (which back-projects the contour onto z_plane_m first with arc-length weighting so tilted-camera perspective never biases the 3D midpoint).
    • Command the robot's IK solver to (target["x_m"], target["y_m"]) (aligning jaw yaw to target["yaw_rad"] when target["anisotropy"] >= 2.0) until metric XY error ||(x_ee, y_ee) - (target["x_m"], target["y_m"])|| < pos_tol_m (or pixel error against servo.project_ee_point(h_actual * approach_axis_ee, T_ee_cam) converges).
  3. Full 6-DOF IBVS Velocity Step (Unknown Plane or Non-Planar Approach):
    • Pair each frame timestamp t_img with q_actual(t_img), instantiate servo = Ibvs(fx_px, fy_px, cx_px, cy_px) with depth z_depth_m (from aligned RGB-D or two-view triangulation), call step = servo.compute_step(u_px, v_px, z_depth_m, u_goal_px, v_goal_px, T_ee_cam), and integrate T_target = T_world_ee @ Ibvs.se3_exp(step["v_ee"], dt_s) into differential IK until step["converged"].
  4. Loop Protocol:
    • Fresh frame per step: Discard buffered frames before each capture, recompute T_world_cam from q_actual at capture time, and wait for each commanded step to finish before the next capture.
    • Iteration cap: Stop after ~10 hover-plane corrections or ~200 IBVS velocity steps without convergence; re-localize and re-plan instead of continuing.
    • Target lost: If detection returns None or the contour touches the image border, never extrapolate the last target. Retract 3–5 cm along -approach_axis_ee to widen the view and re-detect; if still lost, return to the look pose and re-localize with an object-localization skill.
    • Camera occlusion near the goal: If the gripper, tool, or held object will block the camera before the goal, stop servoing at the last pose where the target is fully visible and finish with a short, task-appropriate open-loop move. If the camera stays clear, servo all the way to the goal.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Visual Servoing AI skill do?

Aligns an eye-in-hand physical or simulated robot arm end-effector (SO-101, I2RT YAM, or MuJoCo robot grippers) and grasp orientation to sub-millimeter precision using robot IBVS (analytical hover-plane ray alignment or CPU OpenCV feature-matching IBVS). Use only for closed-loop eye-in-hand robot gripper visual servoing before grasping or manipulation. Don't use for non-robot microscope, telescope/PTZ, AR glasses, or homography tasks.

Why use Visual Servoing on TypingMind?

Because you install it once and use it with any model. Visual Servoing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Visual Servoing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/google-deepmind/robotics-antigravity-plugin/tree/main/plugins/robotics/skills/visual-servoing. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Visual Servoing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Visual Servoing?

As many as you like. As long as a model supports skills, you can use Visual Servoing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Visual Servoing AI skill free?

Yes. It is published on GitHub by google-deepmind under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇