Use BFS instead of A* for proximity graph-depth filtering (#1756)

* Use BFS instead of A* for proximity graph-depth filtering

* refactored name of the function, added performance test comparison

---------

Co-authored-by: matlabbe <[email protected]>
This commit is contained in:
Torjus Iveland
2026-08-29 22:41:13 -07:00
committed by GitHub
co-authored by matlabbe
parent 8732a2cdc2
commit 9279ab68ca
5 changed files with 394 additions and 6 deletions
+14
View File
@@ -137,6 +137,20 @@ IF(BUILD_PERF_TESTS)
set_tests_properties(test_bayesfilter_perf PROPERTIES
TIMEOUT ${_perf_timeout}
LABELS "performance")
# Comparison of the two ways of getting the graph depth of every node of a map, which
# is what the RGBD/ProximityMaxGraphDepth filtering needs: one graph::computePath()
# (A*) per candidate against one graph::computePathDepths() (BFS) for all of them,
# over spiral graphs, where the straight line to the goal tells A* nothing:
# bin/test_graph_perf
# bin/test_graph_perf --gtest_filter=*ProximityLinks*
add_executable(test_graph_perf perf_graph.cpp)
target_link_libraries(test_graph_perf gtest_main rtabmap_core)
add_test(NAME test_graph_perf COMMAND test_graph_perf)
set_tests_properties(test_graph_perf PROPERTIES
TIMEOUT ${_perf_timeout}
LABELS "performance")
ENDIF(BUILD_PERF_TESTS)
# Rtabmap end-to-end replay of sample DBs (test data fetched by