Revert "feat: tiep nhan route graph (Voronoi) cho global planner + anytime ARA* schema, don doc EnvMonitor"

This reverts commit f4f99650df.
This commit is contained in:
2026-10-03 15:30:15 +07:00
parent f4f99650df
commit 490f48becb
20 changed files with 903 additions and 247 deletions

View File

@@ -157,7 +157,7 @@ struct MoveBase2Config
/// Lỗi schema của `docking_marker_profiles`, giữ lại để @ref validate chặn boot an toàn.
std::string docking_marker_profiles_error;
// --- EnvMonitor (Test/docs/move_base2/ENV_MONITOR_PLAN.md) — namespace con `env_monitor` ------------------------
// --- EnvMonitor (Test/ENV_MONITOR_PLAN.md) — namespace con `env_monitor` ------------------------
EnvMonitorConfig env_monitor; ///< lõi quyết định (stall / unreachable / contact / ngân sách).
EnvSamplingConfig env_sampling; ///< lấy mẫu ở cổng (nhịp, thân, hình học, quỹ đạo).
EnvLoggerConfig env_logger; ///< ghi JSONL cho replay/ML. Tắt mặc định.

View File

@@ -67,7 +67,7 @@ struct ControlLoopDeps
/**
* Nguồn dữ liệu của EnvMonitor (Test/docs/move_base2/ENV_MONITOR_PLAN.md). **Có thể null** — null thì EnvMonitor tắt
* Nguồn dữ liệu của EnvMonitor (Test/ENV_MONITOR_PLAN.md). **Có thể null** — null thì EnvMonitor tắt
* hoàn toàn, mọi bộ test dùng cổng giả rơi vào nhánh này.
*/
EnvironmentPort* environment = nullptr;
@@ -159,7 +159,7 @@ struct ControlLoopConfig
DockingMarkerProfiles docking_marker_profiles;
// --- EnvMonitor (Test/docs/move_base2/ENV_MONITOR_PLAN.md) — bộ giám sát môi trường duy nhất từ 6/9/2026 ----------
// --- EnvMonitor (Test/ENV_MONITOR_PLAN.md) — bộ giám sát môi trường duy nhất từ 6/9/2026 ----------
EnvMonitorConfig env_monitor;
EnvSamplingConfig env_sampling;
EnvLoggerConfig env_logger;

View File

@@ -2,7 +2,7 @@
*
* Software License Agreement (BSD License)
*
* move_base2 — lõi quyết định của EnvMonitor (Test/docs/move_base2/ENV_MONITOR_PLAN.md §2.3, P2).
* move_base2 — lõi quyết định của EnvMonitor (Test/ENV_MONITOR_PLAN.md §2.3, P2).
*
* Thuần: không costmap, không TF, không log, không cấp phát sau `configure`. Vào là một @ref EnvSample
* mỗi control cycle (feature đã tính ở cổng bằng `grid_analysis`), ra là một @ref EnvVerdict: các cờ
@@ -33,7 +33,7 @@ namespace move_base2
/**
* @struct EnvMonitorConfig
* @brief Tham số lõi. Đơn vị trong tên hoặc comment. Mọi ngưỡng số là GIÁ TRỊ KHỞI ĐIỂM rút từ hai bag
* sim 5/9/2026 (Test/docs/move_base2/ENV_MONITOR_PLAN.md §4.4); chốt lại bằng shadow/replay, không bằng tay.
* sim 5/9/2026 (ENV_MONITOR_PLAN.md §4.4); chốt lại bằng shadow/replay, không bằng tay.
*/
struct EnvMonitorConfig
{

View File

@@ -2,7 +2,7 @@
*
* Software License Agreement (BSD License)
*
* move_base2 — phân tích hình học trên local costmap cho EnvMonitor (Test/docs/move_base2/ENV_MONITOR_PLAN.md, P1).
* move_base2 — phân tích hình học trên local costmap cho EnvMonitor (Test/ENV_MONITOR_PLAN.md, P1).
*
* Hàm thuần trên `robot_costmap_2d::Costmap2D`, không giữ trạng thái ngoài @ref GridScratch (bộ đệm
* tái dùng để không cấp phát trong control loop). Không log, không TF, không quyết định gì — người
@@ -156,7 +156,7 @@ struct CostToGoParams
/**
* @struct CostToGoResult
* @brief Kết quả @ref costToGo — thước đo tiến độ địa trắc (v1 trong Test/docs/move_base2/ENV_MONITOR_PLAN.md §4.4).
* @brief Kết quả @ref costToGo — thước đo tiến độ địa trắc (v1 trong ENV_MONITOR_PLAN.md §4.4).
*/
struct CostToGoResult
{

View File

@@ -2,7 +2,7 @@
*
* Software License Agreement (BSD License)
*
* move_base2 — ghi feature + verdict của EnvMonitor ra JSONL (Test/docs/move_base2/ENV_MONITOR_PLAN.md §2.6).
* move_base2 — ghi feature + verdict của EnvMonitor ra JSONL (Test/ENV_MONITOR_PLAN.md §2.6).
*
* Mục đích: replay offline để chỉnh ngưỡng không cần sim, và là dữ liệu huấn luyện ML sau này. Mỗi
* dòng là một tick nặng (5 Hz) hoặc một sườn sự kiện. Tắt mặc định; khi tắt không cấp phát, không mở

View File

@@ -190,7 +190,6 @@ public:
std::vector<robot_geometry_msgs::Point> getRobotFootprint() override;
void addStaticMap(const std::string& topic, robot_nav_msgs::OccupancyGrid map) override;
void addRouteGraph(const std::string& topic, robot_sensor_msgs::RouteGraph graph) override;
void addLaserScan(const std::string& topic,
robot_sensor_msgs::LaserScan laser_scan) override;
void addPointCloud(const std::string& topic,

View File

@@ -4,7 +4,7 @@
*
* move_base2 — cổng môi trường cho EnvMonitor: "quanh robot lúc này trông thế nào".
*
* Kế thừa vai trò của `PathCheckPort` (Test/docs/move_base2/ENV_MONITOR_PLAN.md §2.5): lõi hỏi, hạ tầng trả lời.
* Kế thừa vai trò của `PathCheckPort` (Test/ENV_MONITOR_PLAN.md §2.5): lõi hỏi, hạ tầng trả lời.
* Cổng lo costmap + TF; toán nằm ở `core/grid_analysis`; quyết định nằm ở `core/env_monitor`. Nhờ vậy
* `ControlLoop` kiểm được bằng cổng giả (mặc định = "không kết luận được").
*

View File

@@ -29,11 +29,6 @@
#include <move_base2/io/runtime_stats.h>
#include <move_base2/ports/planner_port.h>
namespace robot_sensor_ports
{
class SensorReader;
} // namespace robot_sensor_ports
namespace robot_costmap_2d
{
class Costmap2D;
@@ -155,18 +150,6 @@ public:
*/
void attachStatusBoard(ComponentStatusBoard* board);
/**
* @brief Cấp kho cảm biến dùng chung cho global planner nào khai nhận nó (route graph tiêm từ
* host là ca đầu tiên). Phải gọi TRƯỚC @ref configure: planner nạp trong configure() và đọc
* kho ngay trong initialize(). Planner không kế thừa `robot_sensor_ports::SensorConsumer`
* thì không có gì xảy ra — cùng cơ chế `dynamic_cast` với ControllerRunner.
* @param reader Non-owning, được phép null. Sống lâu hơn mọi planner instance.
*/
void setSensorReader(const robot_sensor_ports::SensorReader* reader)
{
sensors_ = reader;
}
/**
* @brief Tắt việc khoá costmap mutex quanh makePlan — CHỈ dành cho unit test.
*
@@ -241,9 +224,6 @@ private:
/// @brief Nạp @p name nếu chưa có trong cache. @return nullptr khi thất bại (đã log lý do).
robot_nav_core::BaseGlobalPlanner* acquire(const std::string& name);
/// @brief Trao reader cho planner nếu nó là SensorConsumer. Gọi TRƯỚC initialize() của instance.
void attachSensors(robot_nav_core::BaseGlobalPlanner* planner) const;
/// @brief Thân thread: ngủ tới khi có yêu cầu, chạy plugin, đặt kết quả vào hộp thư.
void threadBody();
@@ -258,9 +238,6 @@ private:
/// Khoá costmap mutex quanh makePlan. Chỉ unit test với costmap placeholder mới được tắt.
bool costmap_lock_enabled_ = true;
/// Kho cảm biến dùng chung, non-owning, null = không có kho. Đặt qua @ref setSensorReader.
const robot_sensor_ports::SensorReader* sensors_ = nullptr;
/// Telemetry non-owning, null = tắt đo. Chỉ đọc sau khi @ref attachStats.
RuntimeStats* stats_ = nullptr;
ComponentStatusBoard* status_board_ = nullptr; ///< Non-owning, null = không khai.