home / skills / bdambrosio / cognitive_workbench / debug-get-voxel-grid

This skill helps you inspect an agent-relative voxel grid for debugging by returning a formatted grid and structured coordinates.

npx playbooks add skill bdambrosio/cognitive_workbench --skill debug-get-voxel-grid

Review the files below or copy the command above to add this skill to your agents.

Files (2)
Skill.md
824 B
---
name: debug-get-voxel-grid
type: python
hidden: true
description: "Debug tool: Get observed voxel grid with agent-relative coordinates"
---

# debug-get-voxel-grid

Debug tool for testing coordinate system. Returns the observed voxel grid with agent-relative coordinates.

## Input

- `radius`: Optional integer radius (default: 2)

## Output

Returns uniform return format with:
- `value`: Formatted voxel grid text
- `data`: Structured voxel grid dict with:
  - `center`: `{x, y, z, yaw}` (absolute coordinates)
  - `radius`: int
  - `cells`: List of `{dx, dy, dz, solid, block_id, support}` (agent-relative coordinates)

## Notes

- Hidden from planner catalog (debug/testing only)
- Coordinates are agent-relative: dx=right/left, dz=forward/back
- Accessible via direct `{"type": "debug-get-voxel-grid"}` invocation

Overview

This skill is a debug tool that returns the observed voxel grid using agent-relative coordinates. It helps inspect the local environment around an agent and verify coordinate and occupancy conventions. Use it during development and testing to visualize what the agent perceives and how grid cells are reported.

How this skill works

The skill samples a cubic voxel region around the agent and returns both a human-readable text grid and a structured data object. Output includes the absolute center pose (x, y, z, yaw), the requested radius, and a list of cells with agent-relative coordinates (dx, dy, dz) plus occupancy fields: solid, block_id, and support. Invoke the skill directly with an optional radius parameter (default 2).

When to use it

  • Verify agent-relative coordinate mapping (dx = right/left, dz = forward/back).
  • Inspect local occupancy to debug pathfinding or collision logic.
  • Validate perception or voxelization outputs during environment changes.
  • Confirm block IDs and support flags for physics/placement rules.
  • Quickly visualize the immediate surroundings while developing agents.

Best practices

  • Start with a small radius (2–4) to keep output readable during iteration.
  • Compare the formatted text grid with the structured cells list to detect mapping errors.
  • Use consistent agent poses when reproducing bugs so center and yaw remain stable.
  • Log outputs alongside timestamps and agent state for traceability.
  • Avoid relying on this tool in production planners; use it for debugging only.

Example use cases

  • Run before and after a perception change to confirm voxelization updates correctly.
  • Check that forward/back and right/left axes match simulation conventions when integrating new sensors.
  • Diagnose unexpected collisions by examining which cells report solid=true nearby.
  • Confirm support flags under blocks before attempting placement or removal actions.

FAQ

How do I request a different radius?

Pass an integer radius in the input; if omitted the skill uses radius=2.

What coordinate frame do dx/dz use?

Coordinates are agent-relative: dx is lateral (right positive), dz is longitudinal (forward positive).