feat: 3d path planning#2310
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Greptile SummaryThis PR adds a multi-level surface (MLS) 3D path planner implemented as a Rust native module. It extracts walkable surfaces from a voxelized point cloud, places graph nodes at local wall-distance maxima via NMS, builds Voronoi-boundary edges between nodes, and plans paths with Dijkstra over the resulting sparse node graph.
Confidence Score: 5/5The planner itself is safe to merge; the two findings are in the evaluator (test harness) and a node-placement edge case for narrow parallel surfaces. The core Rust pipeline — surface extraction, 4-connected adjacency, multi-source Dijkstra, Voronoi edge construction, and waypoint assembly — is correct and covered by unit tests. The two observations are a stale-response acceptance window in the Python evaluator (only affects correctness of the automated evaluation scores, not the planner itself) and a 3D NMS suppression concern for closely-stacked parallel surfaces (a known limitation for the initial release, which explicitly defers incremental building and path optimization).
Important Files Changed
Sequence DiagramsequenceDiagram
participant PC2 as PointCloud2 (global map)
participant Rust as MlsPlanner (Rust)
participant Py as MLSPlannerNative (Python)
participant Click as ClickStartGoalRouter
PC2->>Rust: on_global_map(PointCloud2)
Note over Rust: voxelize → extract_surfaces<br/>(morphological close per z-slice)
Note over Rust: build_surface_cells (4-connected, step-threshold)
Note over Rust: place_nodes (wall Dijkstra + 3D NMS)
Note over Rust: build_node_edges (Voronoi Dijkstra)
Rust-->>Py: surface_map (PointCloud2)
Rust-->>Py: nodes (PointCloud2)
Rust-->>Py: node_edges (Path / LineSegments3D)
Click->>Rust: on_start_pose(PoseStamped)
Rust-->>Py: path (empty, to clear stale viz)
Click->>Rust: on_goal_pose(PoseStamped)
Note over Rust: snap start+goal to surface<br/>walk_preds → nearest node<br/>Dijkstra on node graph<br/>assemble_waypoints
Rust-->>Py: path (nav_msgs/Path)
Reviews (2): Last reviewed commit: "Fix" | Re-trigger Greptile |
Problem
3d multi level path planning
Closes DIM-XXX
Solution
Added the MLS planner (multi level surface). The idea is to place high level nodes on the surfaces of the map and connect neighboring nodes. Then we can do planning on these nodes which is much faster and has cached paths than planning on the surface directly.
Not included yet:
How to Test
cargo testdimos run path-planner-eval, then click start and goal positions on the surfaceArtifact generation on entire input voxel map (2M voxels) takes ~200ms. Planning takes 0.28ms.
Contributor License Agreement