Logo Checking Spatial Relations

Checking Spatial Relations

Tổ chức
runtime-si
checking-spatial-relations

Decides from one RGB-D view whether a spatial relation holds between two seen objects - inside, on_top_of, near or blocking - with REFLECT's point-cloud tests (minimum point distance, convex-hull containment, footprint-and-height, image-box occlusion with depth order), and routes holds / does_not_hold / not_visible. Use when a graph must branch on a scene fact such as "is the cube in the box", "is the plug on the board", "is the part near the fixture" or "is the hand blocking the camera's view of the target", with the two objects given as descriptions, masks or world point clouds.

Tổng quan

Nhà phát hànhruntime-si
Kho mãRoboSkillHub
Tên kỹ năngchecking-spatial-relations
Sao
242
Bản fork
27
Tệp đi kèm
2
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được runtime-si công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Checking Spatial Relations trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/runtime-si/RoboSkillHub/tree/main/skills/checking-spatial-relations
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/runtime-si/RoboSkillHub.git /tmp/RoboSkillHub
mkdir -p .claude/skills
cp -r /tmp/RoboSkillHub/skills/checking-spatial-relations .claude/skills/checking-spatial-relations
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Checking Spatial Relations trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Checking Spatial Relations ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Checking Spatial Relations với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

checking-spatial-relations

Answer one question of the form subject relation reference from a single RGB-D frame, the way REFLECT builds the edges of its scene graph.

Inputs

  • relation: inside, on_top_of, near or blocking (aliases: in, on, beside, next_to, close_to, occluding, covering).
  • The subject and the reference, each as one of:
    • *_points: a world-frame PointCloud (or an [N, 3] array), e.g. from a perception skill;
    • *_mask: a uint8 mask on the camera's image, back-projected with that frame's depth, intrinsics and camera-to-world pose (the math of geometry.mask_to_world_points);
    • *_description: a phrase segmented with sam3.segment_text (best mask, score at least score_min, 0.3).
  • observation (optional): an Observation; fetched with robot.get_observation when a mask or description needs one. blocking and left/right need the camera, so they are only found with one.
  • camera_name (overhead; the only camera is used if the name is absent).
  • reference_kind: auto (default), container or surface. A surface (table, board, tray) holds things on top of it, never inside it; auto calls a reference a surface when its trimmed height is under 20 mm.
  • contact_distance (0.05 m), close_distance (0.10 m), voxel (0.003 m), min_points (30).

World frame: z up (the hub's convention), metres.

What is tested (REFLECT's SceneGraph.add_edge, in its order)

Both clouds are down-sampled on a voxel grid; d is the smallest distance from a subject point to the reference cloud.

  1. In contact when d < contact_distance:
    • inside: more than 50 % of the subject's points fall in the convex hull of the reference's (is_inside, INSIDE_THRESH). Against a surface this is on_top_of instead.
    • otherwise on_top_of: more than 70 % of the subject's points lie over the reference's xy box and more than 70 % above its top (ON_TOP_OF_THRESH).
    • otherwise under: the same test the other way round (REFLECT records the reverse edge).
  2. Close when d < close_distance: near. If no contact relation was found, the unit vector between the two boxes' centres names a direction:
    • along the camera's ray (|component| > 0.9): blocking when the subject's image box covers more than 50 % of the reference's (OCCLUDE_RATIO_THRESH) and more than 90 % of the subject's depths are no deeper than the reference's nearest point (DEPTH_THRESH);
    • else above / below (world z, > 0.9), else left_of / right_of (the camera's x, > 0.8).

relations lists everything found from the subject to the reference; measures the fractions, the distance and the point counts behind them; evidence says it in one line. The script raises only on bad arguments.

Changes from REFLECT, and why

  • Distances rescaled from a kitchen to a tabletop. REFLECT's IN_CONTACT_DISTANCE 0.1 m, CLOSE_DISTANCE 0.4 m and 0.01 m voxels are AI2-THOR room-scale (THOR units are metres). Here: contact 0.05 m, which must exceed the step a downward camera sees at a resting contact (the top of a 35-40 mm object over its support, its sides hidden) and stay under a held object's lift; close 0.10 m (a quarter, like the contact distance); voxels 3 mm, so a 30 mm cube keeps ~100 points and a cable is more than one voxel wide. The ratios (0.5, 0.7, 0.9, 0.8, 0.5, 0.9) are REFLECT's.
  • z up, and a downward camera. THOR is y-up and REFLECT took all three directions in the camera frame of a near-horizontal agent camera. Here up/down is world z, left/right and front/back the camera's x and optical axis, and the ray test comes first: for a camera looking down, "along the ray" and "above" are nearly the same vector, and the camera-specific relation (blocking) is the one a graph cannot get otherwise.
  • Boxes trimmed to the 1st-99th percentile. REFLECT took the raw bounding box of a simulated depth cloud; a real sensor's flying pixels at object edges would grow it.
  • Surfaces generalised. REFLECT renames "inside countertop / stove burner" to "on top of" by object name; here any reference under 20 mm tall (or reference_kind: surface) gets the rename.
  • near holds whenever d < close_distance, also when a contact relation was found; REFLECT kept only the stronger edge, but a graph asking "is it near" about an object inside the box wants yes.
  • Mask bleed removed. Points within 3 voxels are linked and only pieces with at least 20 % of the largest piece's points are kept (REFLECT removed radius outliers from containers only). In the twin a SAM3 cube mask beside the hand reached 0.27 m tall before this, its edge pixels on the hand.
  • REFLECT's per-name exceptions (BULKY_OBJECTS, THOR fruit slices standing upright in bowls), its merging of clouds over time and its CLIP object states are not ported; Open3D is replaced by scipy's KD-tree and Qhull.

Measured

YAM station twin, overhead camera (640x480 RGB-D, 59 deg down), SAM3 masks from the descriptions. Three scenes: the cube on the table 18 cm from the box (start), 30 mm outside its wall (beside), on its floor (inbox). 17 of 18 verdicts matched the truth:

checkstartbesideinbox
cube inside boxdoes_not_hold okdoes_not_hold okholds ok
cube near boxdoes_not_hold ok (d 177 mm)holds ok (d 25-30 mm)holds ok
cube on_top_of boxdoes_not_hold okdoes_not_hold okdoes_not_hold ok
cube on_top_of tableholds okholds okholds, truth does_not_hold
box on_top_of tableholds okholds okholds ok
cube blocking boxdoes_not_hold okdoes_not_hold okdoes_not_hold ok

The miss is REFLECT's own: on top of is footprint plus height, so a cube in a box on a table is also "on top of" the table (its points are over the table and above it, 38 mm away through the box wall, inside the contact distance).

Blocking, the hand on the camera ray. With the closed hand 8 cm in front of the cube along the ray, SAM3 no longer finds the cube (score 0.01) and all three questions route not_visible (3 scenes x 3, correct). With the hand over the box (box masks from depth, 27-43 % of the box still visible, the hand's mask from depth), box blocking hand was correctly does_not_hold (9/9), but hand blocking box and hand near box came out does_not_hold in all 18 runs although the hand hid most of the box and its fingertips were 45-77 mm from it: the smallest distance between the visible clouds was 110-162 mm (the part of the box nearest the hand is the part it hides), over the 0.10 m close distance that gates both tests. REFLECT gates blocking on proximity the same way; it accumulated clouds over many views in THOR, which one fixed camera cannot.

Real station frame (cable_frame_20261103-1421.npz, Orbbec, SAM3 masks, the 11-05 calibration levelled onto the frame's own table by 1.4 deg; the table still spans -6..+8 mm, 5th-95th percentile): 7 of 9 matched.

checktruth (by eye)verdict
cable on_top_of boarddoes_not_hold (mostly on the table)does_not_hold
cable on_top_of tableholdsholds
board on_top_of tableholdsholds
cable near boardholdsholds (15 mm)
cable blocking boarddoes_not_holddoes_not_hold
plug inside boarddoes_not_holddoes_not_hold
plug on_top_of boardholdsdoes_not_hold: SAM3's "white cable connector plug" mask was the whole cable
gripper near boarddoes_not_holdholds: SAM3's "black robot gripper" (score 0.23) masked a ring post on the board
gripper on_top_of tableholdsholds (same wrong mask: the post is over the table)

Both misses are the segmentation's, not the relation tests' (the verdicts are right for the clouds they were given); check measures and the masks when a verdict surprises. On the real table "on top of table" held through the hull rule (the levelled table is 22 mm thick with depth warp), not the height test (only 9 % of the cable's points rose above the table's 99th percentile).

Boundaries

  • One view: a subject hidden by the reference (a cube deep in an opaque box seen from the side) is not_visible, not inside; use verifying-placement for "it disappeared into the container".
  • inside needs the reference's visible points to enclose the subject: an open box seen from above does (floor + rims), a closed lid does not.
  • The relation is about the segmented clouds: a mask that bleeds onto the support moves the verdict. Check measures when a verdict surprises.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Checking Spatial Relations làm được gì?

Decides from one RGB-D view whether a spatial relation holds between two seen objects - inside, on_top_of, near or blocking - with REFLECT's point-cloud tests (minimum point distance, convex-hull containment, footprint-and-height, image-box occlusion with depth order), and routes holds / does_not_hold / not_visible. Use when a graph must branch on a scene fact such as "is the cube in the box", "is the plug on the board", "is the part near the fixture" or "is the hand blocking the camera's view of the target", with the two objects given as descriptions, masks or world point clouds.

Vì sao nên dùng Checking Spatial Relations trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Checking Spatial Relations là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Checking Spatial Relations trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/runtime-si/RoboSkillHub/tree/main/skills/checking-spatial-relations. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Checking Spatial Relations?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Checking Spatial Relations với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Checking Spatial Relations với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Checking Spatial Relations có miễn phí không?

Có. Kỹ năng này được runtime-si phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇