Repository navigation
Conversation
The network-backed dataclass is now EncodedGoalField. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
travel_time replaces value; GridField can be moved to a device once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One cached solve per distinct goal; the goal gradient comes from the start-seeded solve, since isotropic eikonal travel time is symmetric. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its gradient is continuous across cell edges, unlike multilinear interpolation's, so descent doesn't zig-zag; interp="linear" keeps the old grid_sample path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A signed distance transform at the cell centres, so FMMField and training can run on maps that exist only as occupancy grids. Grid interpolation moves to ntfields.grid, shared with GridField. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TBC2JbgSTTRbQQJoHPtEJx
The goal is now passed in explicitly, so an FMMField's towards(goal), or another field's, works as well as a GridField. The README describes FMMField and GridEnv. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TBC2JbgSTTRbQQJoHPtEJx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the FMM ground truth (
ntfields.gt) usable anywhere aFieldis: planners,ntfields.eval, and downstream code that takes aField. The FMM itself is unchanged: obstacles are still slow (S* from the speed model), not impassable, which matches how NTFields are trained.Changes
GoalFieldis a protocol (travel_time(q),gradient(q)), so fields that aren't networks can implementField.towards. The network-backed dataclass is nowEncodedGoalField.GridFieldis aGoalField:travel_timereplacesvalue;gradientis computed by autograd through the interpolation;to(device)moves the grid once instead of copying it per query.gt.FMMField(problem, resolution, interp, cache_size, device, default_planner="mppi"), a fullField:interp="cubic"), in 2D and 3D. Its gradient is continuous across cell edges, so descent no longer zig-zags there.interp="linear"keeps thegrid_samplepath. The interpolation lives in the newntfields.gridmodule.envs.GridEnv.from_occupancy(occupancy, resolution, origin)builds an environment from an occupancy grid (a pyrobosim or ROS map). Its distance is a signed EDT stored at the cell centres, accurate to about half a cell. This adds scipy to thegtextra.eval.travel_time_error(field, gt, goal, starts)takes anyGoalFieldas the reference, with the goal passed in explicitly.Breaking changes
GoalField(...)construction becomesEncodedGoalField(...). Annotations don't change.GridField.valueis removed; usetravel_time.travel_time_errortakes a newgoalargument.Notes
box2d/one_sphere(CPU), one solve takes 2 ms at 101² and 7–9 ms at 201².mppiplans within 0.1% of the FMM optimum in 10–16 ms (linear) or 60–80 ms (cubic). Cubic is slower because of per-op overhead atmppi's small batches.grid_sample(mode="bicubic")would make 2D cubic fast if that matters.gradient_bidirectionalsolves twice per step (0.1–0.4 s per plan in 2D). It fails on queries that are exactly point-symmetric through an obstacle: the planner keeps the symmetry, so both fronts stay on each other's ridge, where ∇T isn't defined. The gradients themselves check out: ‖∇T‖·S* has a median of 1.000 over the domain.mppiisn't affected, which is why it's the default planner.Testing
ruff, pyright and
tests/unit+tests/test_end_to_end.pyall pass (108 tests). New tests cover:FMMFieldpair queries againsttowards, caching, symmetry, and planning with both planners;GridEnvdistance against an analytic disc, cell lookups, and a 3D box;GridEnvraster agrees with the analytic scene within 2%.🤖 Generated with Claude Code
https://claude.ai/code/session_01TBC2JbgSTTRbQQJoHPtEJx