From 929ce11384566174a6c838588999d4b5f84bcacf Mon Sep 17 00:00:00 2001 From: duongtd Date: Tue, 22 Sep 2026 16:03:06 +0700 Subject: [PATCH] fix: sot navigation.h khi dong bo route graph - addRouteGraph() chua co trong BaseNavigation pnkx_nav_core khong phai submodule nen khong tu keo theo T800_ws (commit c52cbe5). Thieu ham nay + include RouteGraph.h lam move_base2 (NavigationServer::addRouteGraph override) khong match virtual nao trong base, build vo tai navigation_server.cpp/move_base2_plugin.cpp ("marked override but does not override"). Ap dung tay dung noi dung T800_ws pnkx_nav_core. --- .../include/move_base_core/navigation.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Navigations/Cores/move_base_core/include/move_base_core/navigation.h b/src/Navigations/Cores/move_base_core/include/move_base_core/navigation.h index 977059d..7a9057c 100755 --- a/src/Navigations/Cores/move_base_core/include/move_base_core/navigation.h +++ b/src/Navigations/Cores/move_base_core/include/move_base_core/navigation.h @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -252,6 +253,21 @@ namespace robot */ virtual void addStaticMap(const std::string &topic, robot_nav_msgs::OccupancyGrid map) = 0; + /** + * @brief Hand in a route graph compiled offline from the static map (see + * robot_sensor_msgs/RouteGraph). Optional: a global planner that can use one reads + * it from the shared sensor store; without it every planner behaves as before. + * + * @param topic Store KEY, same rule as @ref addStaticMap: must match an entry in + * `sensor_store_params.yaml` (by convention `/route_graph`) and the topic the + * consumer is configured with. Unknown key = dropped with one log line. + * @param graph The graph. Its `width/height/resolution/origin` and `map_hash` must + * describe the map passed to @ref addStaticMap; the consumer verifies that + * against its live static layer and rejects a mismatch. Push it AFTER the + * static map it belongs to. + */ + virtual void addRouteGraph(const std::string &topic, robot_sensor_msgs::RouteGraph graph) = 0; + /** * @brief Add a laser scan to the navigation system. * @param topic Logical topic this scan arrives on. See @ref addStaticMap for what