Skip to content

refactor: generated CDR navigation safety helpers - #4677

Closed
TomCC7 wants to merge 2 commits into
cc/feat/cdr-map-renderingfrom
cc/feat/cdr-navigation-safety
Closed

TomCC7 wants to merge 2 commits into
cc/feat/cdr-map-renderingfrom
cc/feat/cdr-navigation-safety

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 20, 2026

Copy link
Copy Markdown
Member

Safe-goal searches, path lookahead/distance and obstacle-ahead checks accept generated occupancy/path values. Generated safe goals are the canonical geometry_msgs Point; legacy grid callers retain Vector3 output. Existing BFS/contiguous traversal, clearance thresholds, cached path mask behavior and distance math remain shared.

Parent: #4676. Project: https://linear.app/dimensional/project/message-encoding-refactor-05a3ddb4af3e/overview

Category Files Change
Navigation helpers 3 Generated points/nested paths and array access
Mask typing 1 Accept both grid identities for a numeric mask result
Tests 1 Both searches, rotated coordinates, unknown/blocked maps, lookahead and obstacle updates
CI 1 Installed-wheel provenance and focused checks

After installing this commit, run this offline example:

import numpy as np
from dimos.messages.geometry_msgs.msg import Point
from dimos.messages.std_msgs.msg import Header
from dimos.msgs.occupancy import occupancy_from_array
from dimos.msgs.time import time_from_nanoseconds
from dimos.navigation.go2.replanning_a_star.goal_validator import find_safe_goal

costmap = occupancy_from_array(
    np.zeros((7, 7), dtype=np.int8), resolution=1.0,
    header=Header(frame_id="map", stamp=time_from_nanoseconds(0)),
)
safe = find_safe_goal(costmap, Point(x=3, y=3, z=0))
assert safe == Point(x=3, y=3, z=0)

Validation: 51 source and 51 installed-wheel checks (17 safety/distance and 34 rendering/mask), three unchanged project-fixture safe-goal regressions, strict typing of four production files, applicable hooks, normal main wheel build, full runtime pip check (198 packages). Existing project LFS fixture was SHA256/size verified and safely extracted from cache. The exact snippet above passes against the installed main wheel. No hardware, performance or GitHub CI result is claimed. Global/local planner and controller message ports remain the next consumer layer.

@TomCC7 TomCC7 closed this Oct 20, 2026
@TomCC7
TomCC7 deleted the cc/feat/cdr-navigation-safety branch October 20, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant