fix(navigation): block desk_cubicle in nav grid with zero padding to prevent walk-through (#75)

- desk_cubicle now has blocksNavigation: true with navPadding: 0
  (tight blocking, no inflation — aisles stay clear)
- buildNavGrid reads per-item navPadding from ITEM_METADATA
- getDeskLocations targets y-5 (chair position, above desk blocked zone)
- Agents route AROUND desks instead of through them
- Chair stays passable so agents can reach their sitting position

Fixes object passthrough for desks. Other large passable items
(doors, lamps) unchanged — they remain non-blocking by design.

Co-authored-by: Neo (subagent) <neo@openclaw.local>
Co-authored-by: Luke The Dev <252071647+iamlukethedev@users.noreply.github.com>
This commit is contained in:
robotica4us-collab
2026-03-28 22:08:05 -05:00
committed by GitHub
parent 4b7b295846
commit 464a49bb6d
4 changed files with 19 additions and 16 deletions
+2 -2
View File
@@ -107,7 +107,7 @@ export const getItemBaseSize = (item: FurnitureItem) => {
* This is the single source of truth for nav-blocking behaviour. `buildNavGrid` in
* navigation.ts reads this instead of maintaining its own hardcoded type set.
*/
export const ITEM_METADATA: Record<string, { blocksNavigation: boolean }> = {
export const ITEM_METADATA: Record<string, { blocksNavigation: boolean; navPadding?: number }> = {
// ── structural ────────────────────────────────────────────────────────────
wall: { blocksNavigation: true },
door: { blocksNavigation: false }, // passable
@@ -117,7 +117,7 @@ export const ITEM_METADATA: Record<string, { blocksNavigation: boolean }> = {
couch_v: { blocksNavigation: true },
beanbag: { blocksNavigation: true }, // large floor seat (issue #4)
// ── desks / workstations ──────────────────────────────────────────────────
desk_cubicle: { blocksNavigation: false }, // agents stand at these; collision handled separately
desk_cubicle: { blocksNavigation: true, navPadding: 0 }, // blocks nav with zero padding (tight to desk body)
executive_desk: { blocksNavigation: true },
// ── tables ────────────────────────────────────────────────────────────────
round_table: { blocksNavigation: true },