Merge mapf_post into mapf and align types - #37
Conversation
0d9939c to
26e2496
Compare
Generated-by: Gemini-CLI Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
This adds solve(), derive_mapf_result(), and derive_semantic_plan() to the Scenario struct for tighter integration between MAPF solving and trajectory derivation. Generated-by: Gemini-CLI Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
…cies This allows obstacles in a Scenario to be represented as agents in the MAPFPost output, enabling traffic dependency analysis for moving objects. Generated-by: Gemini-CLI Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
- Changed edition to 2021 in mapf/Cargo.toml - Refactored 'let chains' in post module to nested 'if let' blocks - Removed unused petgraph import - Updated formatting across multiple files to match 2021 edition Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
- Move agent ID assignment from negotiate to derive_mapf_result - Remove id_to_name field from Scenario struct - Change negotiate and Scenario::solve to take shared references - Add agent_name_to_id to MapfResult and SemanticPlan - Add get_agent_id helper to SemanticPlan Generated-by: Gemini CLI Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
- Add Grid2D::from_scenario and From<&Scenario> for Grid2D - Correctly calculate grid dimensions and occupancy from Scenario data - Update allocate_trajectory to use dynamic grid dimensions - Add unit test for from_scenario constructor Generated-by: Gemini CLI Signed-off-by: Gemini CLI <gemini-cli@google.com> Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
1282d90 to
a001f0e
Compare
Proposal to switch to spatial partitioning for broad-phase collision detectionHi! I'm Uday. I had previously submitted a GSoC proposal to work on this PR, and I'm still very interested in contributing to it. As part of that proposal, I planned to implement the MAPF-POST improvements from P3GASUS, which includes replacing the current broad-phase collision detection with a more efficient spatial partitioning approach. Some references I found useful while working on this: One of the earlier blockers was supporting heterogeneous robots (robots with different sizes). That issue has since been addressed by replacing KD-trees with AABB trees in the graph creation pipeline. I implemented and benchmarked this approach here: I believe this work provides a solid foundation for implementing the same idea here. Would it be okay if I started by using this branch in my fork to develop the changes, and later opened a PR targeting the |
|
Hi @uday-kalyan-s upstream (https://github.com/arjo129/mapf_post) already has a broadphase based acceleration. I would encourage you to look at it and implement the same on this branch. |
|
Right yes I found the implementation of the AABB tree there. extremely sorry for my earlier comment. I will get to working on this branch then. |
Implemented feature
#29
Implementation description
This PR merges the mapf_post functionality into the mapf crate, as tracked in issue #29. This consolidation simplifies the codebase and aligns the types between the core MAPF utilities and the post-processing algorithms used for robust plan execution.
Motivation
Previously, mapf_post existed as a separate utility or was part of an external experimental repository. Merging it into mapf allows for tighter integration with the base traits and types of the multi-agent planning framework, facilitating a more seamless transition from planning to execution-ready semantic plans.
Key Changes
Core post Module:
Semantic Planning & Following:
Collision Detection:
Spatial Allocation:
Crate Updates:
Implementation Details
Verification
GenAI Use
We follow OSRA's policy on GenAI tools
Note the original library doesnt use gen-ai I used gen-ai to see if it could merge the two libraries and reconcile APIs.
Generated-by: Gemini-cli