spatial-reasoning

Computes 3D placement transforms, collision checks, and layout math for OpenUSD scenes.

4.0k|530|Updated May 28, 2025
One-click install
npx skills add https://github.com/isaac-sim/IsaacSim --skill spatial-reasoning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spatial-reasoning
Source: https://github.com/isaac-sim/IsaacSim/tree/main/skills/spatial-reasoning
Command: npx skills add https://github.com/isaac-sim/IsaacSim --skill spatial-reasoning

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, and includes scripts (resource) components.

What problem does it solve?

Placing assets correctly in OpenUSD scenes requires handling metersPerUnit conversions, transform matrix ordering, bounding-box offsets, and collision-free layout planning, where small math errors silently break scenes.

Core Features & Use Cases

  • USD Placement Math: Correct TRS matrix composition, metersPerUnit detection via Usd.Stage.Open, bbox offset correction, and look-at camera rotation for Z-up stages.
  • Layout & Collision Algorithms: Uniform grid and R-tree spatial indexing, SAT/GJK collision detection, A* pathfinding with Catmull-Rom smoothing, Dubins paths, and MaxRects bin packing.
  • Warehouse Domain Knowledge: OSHA/NFPA/RMI aisle and rack standards, ABC SKU classification, occupancy validation, and render file-size sanity checks.
  • Use Case: When building a warehouse layout in Isaac Sim, use this Skill to place racks and conveyors at correct real-world scale, verify no zone overlaps, and position cameras inside the layout for valid renders.

Quick Start

Use the spatial-reasoning skill to place this USD asset at coordinates (30, 45) with correct metersPerUnit scaling and verify it does not collide with existing zones.

Frequently Asked Questions about spatial-reasoning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I place a USD asset at the correct scale in Isaac Sim?

Open the asset with Usd.Stage.Open and read its metersPerUnit with UsdGeom.GetStageMetersPerUnit, then compose the transform as Translate * Rotate * Scale matrices. Never use Sdf.Layer.FindOrOpen, which fails silently on binary .usd crate files.

Why does my USD asset render 100x too small or invisible?

The asset's metersPerUnit likely differs from your assumed scale factor. Compute the real-world size with UsdGeom.BBoxCache and multiply by metersPerUnit; if raw dimensions exceed 1000 the asset is in centimeters and needs a 0.01 scale.

What is the correct transform matrix order in OpenUSD?

Use Translate * Rotate * Scale so scale converts units first, rotation orients the asset, and translation positions it. Reversing the order scales the translation vector, turning a 3m offset into 0.03m for centimeter-scale assets.

How do I detect collisions between placed objects in a warehouse layout?

Use a uniform SpatialGrid for O(1) overlap queries on 2D floor plans, or SAT for oriented bounding boxes and GJK for arbitrary convex polygons. The included scripts implement all three approaches.

Why do all my Isaac Sim renders have identical file sizes?

Identical byte counts across views mean the camera path switch silently failed. Create a fresh camera prim for each shot using stage.RemovePrim plus UsdGeom.Camera.Define instead of reassigning the viewport camera path.

Can I convert coordinates between USD, Unity, and Unreal?

Yes. USD is Z-up right-handed meters, Unity is Y-up left-handed meters, and Unreal is Z-up left-handed centimeters. The skill provides conversion functions that swap axes, negate handedness, and scale by 100 as needed.