Add KD-tree conflict detection benchmark slice#40
Add KD-tree conflict detection benchmark slice#40ArizmendiWan wants to merge 1 commit intoopen-rmf:mainfrom
Conversation
Signed-off-by: ArizmendiWan <2311602492@qq.com>
There was a problem hiding this comment.
This is somewhat interesting. However, as Dijkstra said pre-mature optimization is the root of all evil. I opened #41 out of curiosity to see if such a kd-tree collision check is actually valueable here. I took the collision checking code and integrated it with the negotiation code. I then ran benchmarks on both branches and had gemini write a small summary of the resultant data.
TBH, from what I see, there are really small gains from using such a method. I suspect the bottleneck is elsewhere - that being said this is still a welcome addition. Perhaps a lower hanging fruit would be to switch from optimal search during the conflict negotiation to Explicit-Estimation Search or Focal Search.
Thank you for your feedbacks! I reproduced your results from the benchmark branch and also ran additional experiments with focal search. I think your conclusion is correct, conflict detection is not the main bottleneck in many scenarios. From my experiments, more than 70% of the latency comes from high-level negotiation and low-level replanning, which also caused some cases to timeout. I also tested focal search. It helps in some cases, but it is not robust enough by itself. For example, it still fails on cases such as empty-32-32:S1:a5, room-32-32-4:S10:a20, and several other difficult instances. I plan to focus next on reducing the number of replans or making each replan cheaper. |

This PR adds a first slice for evaluating faster conflict detection in
mapfnegotiation by introducing an experimental KD-tree broad phase for proposal conflict checks.What Changed
ConflictDetectionAlgorithm::{Baseline, KdTree}anddetect_conflicts_for_proposals(...)Why
This is meant to test whether a spatial broad phase can reduce candidate pair enumeration before exact conflict checking, especially in sparse workloads, without changing planner semantics.
Verification
Run locally with:
Observed comparison from the report example:
GenAI Use
Generated-by:
OpenAI Codex (v0.115.0) with GPT-5.4