refactor: xoá PathMonitor và PathCheckPort, EnvMonitor là bộ giám sát duy nhất; gộp refreshSnapshot
Xoá hạ tầng giám sát cũ đã tắt từ 5/9 (path_monitor/enabled: false), −2947 dòng: - ControlLoop: PathMonitorConfig, updatePathMonitor / updateProgressMonitor / applyCollisionGuard / planIsBlocked / resetPathMonitor / rebuildPlanArcLength, toàn bộ member bốn phép đo, luật "plan mới bẩn thì giữ plan cũ" trong collectPlannerResult. Bốn cổng StateMachineInput giữ nguyên (off_path không còn nguồn, đặt false). - ports/path_check_port.h, CostmapPathCheck trong NavigationRuntime. - plan_inspector: bỏ checkPlan / checkMotion / PlanBlockResult / MotionCheckParams / MotionBlockResult; giữ planarTransform, nearestIndex, trackedNearestIndex, crossTrackError. - Config: readPathMonitor, MoveBase2Config::path_monitor, validate; xoá config/runtime/path_monitor_params.yaml; comment YAML/state_machine đổi sang tên verdict EnvMonitor. - Test: FakePathCheckPort, 30 test WalkingSkeletonPathMonitor/CollisionGuard, 13 test PlanInspectorCheck/Motion, 2 test validate thân guard. P0(b): ControlLoop::step() gọi EnvironmentPort::refresh() một lần đầu cycle (không phụ thuộc env_monitor/enabled); ControllerRunner::setSnapshotRefreshedByLoop(true) làm ba refreshSnapshot() trong runner thành no-op — monitor và controller đọc cùng một lưới, một bản copy mỗi cycle. Test: env_monitor 43, grid_analysis 33, plan_inspector 11, walking_skeleton 57, config_validation 32, scenario 12, state_machine 100, navigation_server 56, controller_runner 28, velocity_arbiter 29, planner_runner 31 — pass. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017xXjFjr2DQ6rhmhHSW4fk4
This commit is contained in:
@@ -55,33 +55,6 @@ TEST(MoveBase2Config, DefaultsAreValid)
|
||||
EXPECT_TRUE(config.validate(error)) << error;
|
||||
}
|
||||
|
||||
TEST(MoveBase2Config, RejectsAPartiallyDeclaredCollisionBody)
|
||||
{
|
||||
// Thân guard: cả ba offset = 0 (lấy từ footprint costmap) hoặc cả ba > 0. Khai hai bỏ một là mũi
|
||||
// dò tâm hoặc hông không dò — config sai, không phải "mặc định".
|
||||
MoveBase2Config config = minimalValid();
|
||||
config.path_monitor.enabled = true;
|
||||
config.path_monitor.collision_enabled = true;
|
||||
config.path_monitor.collision_front_offset = 0.58; // [m]
|
||||
config.path_monitor.collision_rear_offset = 0.58; // [m]
|
||||
config.path_monitor.collision_side_offset = 0.0;
|
||||
std::string error;
|
||||
EXPECT_FALSE(config.validate(error));
|
||||
EXPECT_NE(error.find("collision_side_offset"), std::string::npos) << error;
|
||||
}
|
||||
|
||||
TEST(MoveBase2Config, AcceptsACollisionBodyTakenFromTheCostmapFootprint)
|
||||
{
|
||||
MoveBase2Config config = minimalValid();
|
||||
config.path_monitor.enabled = true;
|
||||
config.path_monitor.collision_enabled = true;
|
||||
config.path_monitor.collision_front_offset = 0.0;
|
||||
config.path_monitor.collision_rear_offset = 0.0;
|
||||
config.path_monitor.collision_side_offset = 0.0;
|
||||
std::string error;
|
||||
EXPECT_TRUE(config.validate(error)) << error;
|
||||
}
|
||||
|
||||
TEST(MoveBase2Config, RejectsRecoveryEnabledWithNoBehaviorLoaded)
|
||||
{
|
||||
// Ràng buộc thứ tự khởi tạo: RecoveryRunner không nạp được behavior nào mà
|
||||
|
||||
Reference in New Issue
Block a user