Skip to content

refactor: generated CDR path resampling - #4675

Closed
TomCC7 wants to merge 2 commits into
cc/feat/cdr-navigation-planningfrom
cc/feat/cdr-path-resampling
Closed

TomCC7 wants to merge 2 commits into
cc/feat/cdr-navigation-planningfrom
cc/feat/cdr-path-resampling

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 20, 2026

Copy link
Copy Markdown
Member

The existing simple/smooth path resamplers now accept generated Path and nested PoseStamped values while retaining the input value type. New generated poses carry the path Header; simple resampling retains source endpoint Headers. Resampled paths own their pose/Header values. The existing spacing, duplicate handling, smoothing and goal-orientation calculations remain shared with legacy callers.

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

Category Files Change
Path resampling 1 Generated nested fields, value construction and metadata ownership
Tests 1 Existing numeric equivalence, edge cases, exact timestamps and codec round trips
CI 1 Installed-wheel provenance and scoped checks

After installing this commit, run this offline example:

import numpy as np
from dimos.mapping.occupancy.path_resampling import simple_resample_path
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.min_cost_astar import min_cost_astar

costmap = occupancy_from_array(
    np.zeros((5, 5), dtype=np.int8), resolution=1.0,
    header=Header(frame_id="map", stamp=time_from_nanoseconds(1700000000123456789)),
)
path = min_cost_astar(costmap, goal=(4, 4), start=(0, 0))
assert path is not None
resampled = simple_resample_path(path, path.poses[-1].pose, spacing=0.25)
assert len(resampled.poses) > len(path.poses)
assert resampled.header == costmap.header

Validation: 24 source and 24 installed-wheel behavior checks; both unchanged image golden regressions; strict typing of the production file; applicable hooks; normal main wheel build; full runtime pip check (198 packages). The exact block above runs against the installed main wheel. Three project fixture archives were hash/size verified before safe extraction. No hardware, performance or GitHub CI result is claimed. Navigation/controller ports and the eventual legacy-type retirement remain subsequent work.

@TomCC7 TomCC7 closed this Oct 20, 2026
@TomCC7
TomCC7 deleted the cc/feat/cdr-path-resampling 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