diff --git a/src/io/sensor_gateway.cpp b/src/io/sensor_gateway.cpp index 6cf7475..d43e30f 100644 --- a/src/io/sensor_gateway.cpp +++ b/src/io/sensor_gateway.cpp @@ -279,6 +279,10 @@ void SensorGateway::pushStaticMap(const std::string& name, const robot_nav_msgs: dispatchTo(global_costmap_, map, robot_costmap_2d::LayerType::STATIC_LAYER, name, stats_); dispatchTo(global_costmap_, map, robot_costmap_2d::LayerType::PREFERRED_LAYER, name, stats_); dispatchTo(global_costmap_, map, robot_costmap_2d::LayerType::UNPREFERRED_LAYER, name, stats_); + // Sau STATIC_LAYER có chủ đích: StaticLayer resize master theo map mới ngay trong callback, nên + // DirectionalLayer kiểm geometry của grid hướng trên master đã đúng kích thước. Layer tự lọc theo + // topic: map_topic đưa nó về PENDING, direction_topic là grid hướng. Chỉ global costmap có layer này. + dispatchTo(global_costmap_, map, robot_costmap_2d::LayerType::DIRECTIONAL_LAYER, name, stats_); dispatchTo(local_costmap_, map, robot_costmap_2d::LayerType::STATIC_LAYER, name, stats_); dispatchTo(local_costmap_, map, robot_costmap_2d::LayerType::PREFERRED_LAYER, name, stats_);