Compare commits
3 Commits
feature/de
...
75af8ccf12
| Author | SHA1 | Date | |
|---|---|---|---|
| 75af8ccf12 | |||
| c3c64919d3 | |||
| ea7f9659b8 |
@@ -11,7 +11,7 @@ Khi cần đổi hành vi: sửa tài liệu này trước, sửa test, rồi m
|
||||
| State | Ai phát cmd_vel | Vào state khi | Ra khi |
|
||||
|---|---|---|---|
|
||||
| `IDLE` | không ai (0) | khởi động; cycle ngay sau một state terminal | có `NavigationRequest` đang chờ → `PLANNING`; yêu cầu chỉ-có-action (`has_goal == false`, D8) → `EXECUTING_ACTIONS`; yêu cầu không có goal lẫn action → `ABORTED` (tự vệ) |
|
||||
| `PLANNING` | không ai (0) | nhận yêu cầu; recovery của `planning_failed` (hoặc lượt leo thang từ chính `PLANNING`) vừa chạy xong; tiếp tục sau tạm dừng | có plan hợp lệ → `CONTROLLING`; global planner chính fail/plan rỗng và có backup chưa dùng → đổi sang backup, lập plan lại; backup fail (hoặc không có backup) / quá `planner_patience` / quá `max_planning_retries` → còn pose thì `RECOVERING(planning_failed)`, **mất pose thì `RECOVERING(controlling_failed)`** — mất dữ liệu dùng ngân sách dữ liệu, không phải ngân sách "không tìm được đường" |
|
||||
| `PLANNING` | không ai (0) | nhận yêu cầu; recovery của `planning_failed` (hoặc lượt leo thang từ chính `PLANNING`) vừa chạy xong; tiếp tục sau tạm dừng | có plan hợp lệ → `CONTROLLING`; global planner chính fail/plan rỗng, chặng là profile `position` và có backup chưa dùng → đổi sang backup, lập plan lại; backup fail (hoặc không có backup) / quá `planner_patience` / quá `max_planning_retries` → còn pose thì `RECOVERING(planning_failed)`, **mất pose thì `RECOVERING(controlling_failed)`** — mất dữ liệu dùng ngân sách dữ liệu, không phải ngân sách "không tìm được đường" |
|
||||
| `CONTROLLING` | **local planner** | có plan hợp lệ; recovery leo thang từ `CONTROLLING` vừa xong (bám tiếp plan cũ, hoặc áp path detour); tiếp tục sau tạm dừng | `isGoalReached` → `SUCCEEDED` (hết action) hoặc `EXECUTING_ACTIONS` (còn action — D8); quá `controller_patience` → `RECOVERING(controlling_failed)`; quá `oscillation_timeout` → `RECOVERING(oscillation)`. **Không sinh được lệnh (kể cả mất pose) thì KHÔNG đổi state** (contract 2026-08-04): robot dừng tại chỗ, ở nguyên `CONTROLLING` chờ đồng hồ kiên nhẫn; plan mới trong lúc chạy đến từ replan nền theo `planner_frequency` và được thay tại chỗ |
|
||||
| `RECOVERING` | **recovery behavior** | ba trigger ở trên | tick trả `succeeded`/`failed` → cursor của **route thuộc trigger đó** tăng 1, rồi (2026-08-04b): behavior nộp path detour (`kPath`) → `CONTROLLING` áp path đó; trigger `planning_failed` hoặc leo thang từ `PLANNING` → `PLANNING` lập plan lại; còn lại (controlling/oscillation từ `CONTROLLING`) → `CONTROLLING` bám tiếp plan cũ, KHÔNG replan; hết route khi định vào → `ABORTED` |
|
||||
| `EXECUTING_ACTIONS` | không ai (0) — **D8** | tới goal mà yêu cầu còn action; nhận yêu cầu `has_goal == false` | action xong mà còn action kế → start action kế (ở nguyên state); action cuối `succeeded` → `SUCCEEDED`; một action `failed` → `ABORTED` (không qua recovery); quá `action_patience` (nếu bật) → cancel action + `ABORTED`; `cancel()` → `CANCELLING`; `pause()` → `PAUSING` → `PAUSED` (không huỷ action) |
|
||||
@@ -103,7 +103,11 @@ Từ 2026-08-04, replan trong lúc chạy và recovery là **hai cơ chế tách
|
||||
|
||||
`backup_global_planner` là một alias tùy chọn ở root config. Khi global planner active trả `false`
|
||||
hoặc plan rỗng, `ControlLoop` đổi sang alias này **một lần duy nhất cho mỗi request**, giữ nguyên
|
||||
local planner và state `PLANNING`. Lượt backup thành công đi bình thường vào `CONTROLLING`; lượt
|
||||
local planner và state `PLANNING`. **Chỉ áp cho profile `position`**: `docking`, `go_straight`,
|
||||
`rotate` fail thì không đổi planner mà đi thẳng `PlannerFeedback::kFailed` (log WARN `backup '...'
|
||||
is reserved for profile position`). Lý do (robot KIT 26/10): DockPlanner fail vì robot đứng quá gần
|
||||
dock, SBPL dựng đường thẳng tới pose tiếp xúc và robot bám đường đó vào dock, bỏ qua cusp và đoạn
|
||||
lùi thẳng. Lượt backup thành công đi bình thường vào `CONTROLLING`; lượt
|
||||
backup fail mới được đưa vào `PlannerFeedback::kFailed`, nên state machine đi theo recovery hiện có.
|
||||
|
||||
Backup dùng overload `makePlan(start, goal, plan)` (không mang VDA5050 `Order`) để
|
||||
|
||||
@@ -112,6 +112,9 @@ struct SensorGatewayStats
|
||||
*
|
||||
* ## Khác biệt có chủ đích so với `move_base` cũ
|
||||
*
|
||||
* - **`DEPTH_CAMERA_LAYER` chỉ nhận `PointCloud2`** (không nhận `LaserScan`, `PointCloud`,
|
||||
* `DepthCameraData`), song song với `VOXEL_LAYER`: `DepthCameraObstacleLayer` có loại riêng và
|
||||
* chỉ dùng cloud đã lọc của camera.
|
||||
* - **Lọc layer chỉ theo `getType()`.** Bản cũ dùng `getType() == type || getName() == name`. Vế
|
||||
* tên là code chết trong thực tế (tên layer là `obstacles`/`inflation`, tên sensor là
|
||||
* `/b_scan`/`/map` — hai tập không giao nhau) nhưng lại là một cái bẫy: đặt tên một layer trùng
|
||||
|
||||
@@ -655,10 +655,27 @@ void ControlLoop::collectPlannerResult()
|
||||
// Fallback thuộc policy của control loop, không phải recovery: planner chính đã kết thúc nên
|
||||
// worker rảnh để nạp/chạy SBPL ngay cycle này. Chỉ thử một lần cho cả request; backup fail thì
|
||||
// giữ kFailed để state machine đi đúng đường recovery hiện có.
|
||||
//
|
||||
// Backup CHỈ dành cho profile position: goal trần không có edge làm CustomPlanner fail, và SBPL
|
||||
// là đường lùi hợp lệ cho một chặng đi tới pose. Docking/go_straight/rotate thì SBPL không giữ
|
||||
// được hình học của chặng — đo 26/10 trên robot KIT: DockPlanner fail vì robot đứng quá gần
|
||||
// dock, SBPL dựng đường thẳng tới pose tiếp xúc, robot bám đường đó vào dock không qua cusp và
|
||||
// đoạn lùi thẳng. Ba profile đó fail thì đi thẳng route planning_failed như khi không có backup.
|
||||
if (!backup_global_planner_active_ && !config_.backup_global_planner_name.empty())
|
||||
{
|
||||
const std::string failed_planner = deps_.planner->activePlanner();
|
||||
if (deps_.planner->swapPlanner(config_.backup_global_planner_name))
|
||||
if (active_request_.profile != MotionProfile::kPosition)
|
||||
{
|
||||
// Không gắn [debug], không tắt được: đây là bằng chứng duy nhất trong log rằng lỗi planner
|
||||
// của chặng này cố ý không được cứu bằng backup.
|
||||
robot::log_warning("[move_base2] global planner '%s' failed for mission %llu (profile %s); "
|
||||
"backup '%s' is reserved for profile position; starting recovery.\n",
|
||||
failed_planner.c_str(),
|
||||
static_cast<unsigned long long>(active_request_.mission_sequence_id),
|
||||
toString(active_request_.profile),
|
||||
config_.backup_global_planner_name.c_str());
|
||||
}
|
||||
else if (deps_.planner->swapPlanner(config_.backup_global_planner_name))
|
||||
{
|
||||
backup_global_planner_active_ = true;
|
||||
planner_feedback_ = PlannerFeedback::kIdle;
|
||||
@@ -669,11 +686,13 @@ void ControlLoop::collectPlannerResult()
|
||||
config_.backup_global_planner_name.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
// Không có backup chạy được thì failure gốc vẫn phải đi recovery, không được để robot chờ.
|
||||
robot::log_error("[move_base2] global planner '%s' failed and backup '%s' could not be "
|
||||
"loaded; starting recovery.\n",
|
||||
failed_planner.c_str(), config_.backup_global_planner_name.c_str());
|
||||
else
|
||||
{
|
||||
// Không có backup chạy được thì failure gốc vẫn phải đi recovery, không được để robot chờ.
|
||||
robot::log_error("[move_base2] global planner '%s' failed and backup '%s' could not be "
|
||||
"loaded; starting recovery.\n",
|
||||
failed_planner.c_str(), config_.backup_global_planner_name.c_str());
|
||||
}
|
||||
}
|
||||
planner_feedback_ = PlannerFeedback::kFailed;
|
||||
return;
|
||||
|
||||
@@ -44,6 +44,8 @@ const char* toString(robot_costmap_2d::LayerType type)
|
||||
return "PreferredLayer";
|
||||
case robot_costmap_2d::LayerType::UNPREFERRED_LAYER:
|
||||
return "UnpreferredLayer";
|
||||
case robot_costmap_2d::LayerType::DEPTH_CAMERA_LAYER:
|
||||
return "DepthCameraObstacleLayer";
|
||||
case robot_costmap_2d::LayerType::UNKNOWN:
|
||||
break;
|
||||
}
|
||||
@@ -331,6 +333,9 @@ void SensorGateway::pushPointCloud2(const std::string& name,
|
||||
ScopedSection timer(telemetry_, section_cloud_);
|
||||
dispatchTo(local_costmap_, cloud, robot_costmap_2d::LayerType::VOXEL_LAYER, name, stats_);
|
||||
dispatchTo(global_costmap_, cloud, robot_costmap_2d::LayerType::VOXEL_LAYER, name, stats_);
|
||||
// DepthCameraObstacleLayer has its own type and marks from the camera's PointCloud2.
|
||||
dispatchTo(local_costmap_, cloud, robot_costmap_2d::LayerType::DEPTH_CAMERA_LAYER, name, stats_);
|
||||
dispatchTo(global_costmap_, cloud, robot_costmap_2d::LayerType::DEPTH_CAMERA_LAYER, name, stats_);
|
||||
}
|
||||
|
||||
void SensorGateway::pushDepthCameraData(const std::string& topic,
|
||||
|
||||
@@ -43,14 +43,22 @@ bool isFinitePose(const robot_geometry_msgs::PoseStamped& pose)
|
||||
/// hai công thức khác nhau, trùng tên là mời gọi đặt nhầm giá trị.
|
||||
///
|
||||
/// `dock_anchor` khai goal pose của marker nằm ở tâm footprint dock (`center`) hay ngay trên mặt
|
||||
/// tiếp cận (`face`). `face` thì DockPlanner bỏ qua `footprint_dock` hoàn toàn.
|
||||
/// tiếp cận (`face`). `mating_edge` dùng goal đã offset tới pose base_link lúc dock xong;
|
||||
/// `face` và `mating_edge` khiến DockPlanner bỏ qua `footprint_dock` hoàn toàn.
|
||||
/// `dock_face_offset` và `dock_pivot_safety_margin` là override DockPlanner chỉ có tác dụng với
|
||||
/// `dock_anchor: mating_edge`; khai với `center` hoặc `face` khiến DockPlanner từ chối khởi tạo.
|
||||
/// Nếu marker sau không khai, giá trị cũ được đặt YAML null để plugin trở về mặc định.
|
||||
///
|
||||
/// KHÔNG có `terminal_direction` ở đây, và cố ý như vậy: chiều chạy của đoạn thẳng cuối được SUY RA
|
||||
/// từ phía robot đứng so với goal (`dock_calc.cpp`), vì tầng trên đã offset goal sao cho base_link
|
||||
/// dừng đúng tại đó khi manơ hoàn tất. Một khoá cho phép marker ép chiều khác sẽ mâu thuẫn với
|
||||
/// chính vị trí goal, nên khoá đó đã được gỡ thay vì hiện thực.
|
||||
constexpr const char* kMarkerPlannerParams[] = {
|
||||
"footprint_dock", "dock_anchor"
|
||||
"footprint_dock", "dock_anchor", "dock_face_offset", "dock_pivot_safety_margin"
|
||||
};
|
||||
|
||||
constexpr const char* kOptionalMarkerPlannerParams[] = {
|
||||
"dock_face_offset", "dock_pivot_safety_margin"
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -312,36 +320,54 @@ bool PlannerRunner::bindDockingMarker(const std::string& marker, const std::stri
|
||||
}
|
||||
|
||||
const std::string profile_ns = "docking_marker_profiles/" + marker;
|
||||
if (!nh_.hasParam(profile_ns))
|
||||
{
|
||||
// Marker hợp lệ nhưng không có profile riêng: cặp planner mặc định, không có gì để chép. Không
|
||||
// phải lỗi — `maker_sources` mới là allow-list, bảng profile chỉ là override.
|
||||
return true;
|
||||
}
|
||||
const bool has_profile = nh_.hasParam(profile_ns);
|
||||
|
||||
// Namespace phải được kiểm TRƯỚC khi dựng NodeHandle: `robot::NodeHandle` không báo lỗi khi
|
||||
// namespace không resolve được mà lặng lẽ rơi về namespace cha. Bỏ qua bước này thì marker gõ sai
|
||||
// sẽ đọc `footprint` ở ROOT — tức footprint ROBOT — rồi dùng nó làm kích thước trạm dock.
|
||||
robot::NodeHandle marker_nh(nh_, profile_ns);
|
||||
robot::NodeHandle planner_nh(nh_, planner_name);
|
||||
if (marker_nh.getNamespace() == nh_.getNamespace() ||
|
||||
planner_nh.getNamespace() == nh_.getNamespace())
|
||||
const bool marker_namespace_invalid =
|
||||
has_profile && marker_nh.getNamespace() == nh_.getNamespace();
|
||||
const bool planner_namespace_invalid =
|
||||
planner_nh.getNamespace() == nh_.getNamespace();
|
||||
if (marker_namespace_invalid || (has_profile && planner_namespace_invalid))
|
||||
{
|
||||
robot::log_error("[move_base2] PlannerRunner: namespace '%s' or '%s' does not resolve in the "
|
||||
"param tree; refusing to bind marker '%s'.\n",
|
||||
profile_ns.c_str(), planner_name.c_str(), marker.c_str());
|
||||
return false;
|
||||
}
|
||||
if (!has_profile && planner_namespace_invalid)
|
||||
{
|
||||
// Marker hợp lệ nhưng không có profile riêng: giữ nguyên hành vi cũ nếu planner namespace
|
||||
// chưa tồn tại; không có nơi an toàn để xoá override per-marker.
|
||||
return true;
|
||||
}
|
||||
|
||||
bool copied = false;
|
||||
for (const char* key : kMarkerPlannerParams)
|
||||
if (has_profile)
|
||||
{
|
||||
copied = copyParamNode(marker_nh, planner_nh, key) || copied;
|
||||
for (const char* key : kMarkerPlannerParams)
|
||||
{
|
||||
copied = copyParamNode(marker_nh, planner_nh, key) || copied;
|
||||
}
|
||||
}
|
||||
|
||||
for (const char* key : kOptionalMarkerPlannerParams)
|
||||
{
|
||||
if ((!has_profile || !marker_nh.hasParam(key)) && planner_nh.hasParam(key))
|
||||
{
|
||||
// Không để override rò sang marker trước: DockPlannerConfig đọc YAML null như chưa khai.
|
||||
// footprint_dock và dock_anchor giữ nguyên cách xử lý cũ.
|
||||
planner_nh.setParam(key, YAML::Node(YAML::NodeType::Null));
|
||||
copied = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!copied)
|
||||
{
|
||||
return true; // Profile có tồn tại nhưng không khai khoá nào của planner — giữ nguyên cấu hình.
|
||||
return true; // Không có khoá planner mới hoặc override tuỳ chọn nào cần xoá.
|
||||
}
|
||||
|
||||
// Dựng lại instance CHỈ khi marker nối vào planner này thực sự đổi. Dock lại đúng marker cũ thì
|
||||
|
||||
@@ -774,6 +774,51 @@ TEST(PlannerRunnerDockingMarker, ProfileWithoutFootprintDockIsAcceptedAndChanges
|
||||
EXPECT_EQ(pluginInitializeCount(), before);
|
||||
}
|
||||
|
||||
TEST(PlannerRunnerDockingMarker, CopiesAndClearsOptionalDockOverridesPerMarker)
|
||||
{
|
||||
Fixture fixture;
|
||||
ASSERT_TRUE(fixture.ok()) << fixture.error();
|
||||
|
||||
robot::NodeHandle nh;
|
||||
// Create isolated profiles in the shared test parameter tree so this test does not alter the
|
||||
// checked-in fixture or affect the existing dock_a/dock_b footprint tests.
|
||||
nh.setParam("docking_marker_profiles/dock_override/dock_face_offset", 0.40);
|
||||
nh.setParam("docking_marker_profiles/dock_override/dock_pivot_safety_margin", 0.10);
|
||||
nh.setParam("docking_marker_profiles/dock_no_override/global_planner",
|
||||
YAML::Node("TestPlannerOk"));
|
||||
|
||||
const std::size_t before = pluginInitializeCount();
|
||||
ASSERT_TRUE(fixture.runner_.bindDockingMarker("dock_override", "TestPlannerOk"));
|
||||
YAML::Node copied_face_offset;
|
||||
YAML::Node copied_margin;
|
||||
ASSERT_TRUE(nh.getParam("TestPlannerOk/dock_face_offset", copied_face_offset));
|
||||
ASSERT_TRUE(nh.getParam("TestPlannerOk/dock_pivot_safety_margin", copied_margin));
|
||||
EXPECT_DOUBLE_EQ(copied_face_offset.as<double>(), 0.40);
|
||||
EXPECT_DOUBLE_EQ(copied_margin.as<double>(), 0.10);
|
||||
ASSERT_TRUE(fixture.runner_.swapPlanner("TestPlannerOk"));
|
||||
EXPECT_EQ(pluginInitializeCount(), before + 1);
|
||||
|
||||
ASSERT_TRUE(fixture.runner_.bindDockingMarker("dock_no_override", "TestPlannerOk"));
|
||||
YAML::Node cleared_face_offset;
|
||||
YAML::Node cleared_margin;
|
||||
ASSERT_TRUE(nh.getParam("TestPlannerOk/dock_face_offset", cleared_face_offset));
|
||||
ASSERT_TRUE(nh.getParam("TestPlannerOk/dock_pivot_safety_margin", cleared_margin));
|
||||
EXPECT_TRUE(cleared_face_offset.IsNull());
|
||||
EXPECT_TRUE(cleared_margin.IsNull());
|
||||
ASSERT_TRUE(fixture.runner_.swapPlanner("TestPlannerOk"));
|
||||
EXPECT_EQ(pluginInitializeCount(), before + 2);
|
||||
|
||||
ASSERT_TRUE(fixture.runner_.bindDockingMarker("dock_override", "TestPlannerOk"));
|
||||
YAML::Node restored_face_offset;
|
||||
YAML::Node restored_margin;
|
||||
ASSERT_TRUE(nh.getParam("TestPlannerOk/dock_face_offset", restored_face_offset));
|
||||
ASSERT_TRUE(nh.getParam("TestPlannerOk/dock_pivot_safety_margin", restored_margin));
|
||||
EXPECT_DOUBLE_EQ(restored_face_offset.as<double>(), 0.40);
|
||||
EXPECT_DOUBLE_EQ(restored_margin.as<double>(), 0.10);
|
||||
ASSERT_TRUE(fixture.runner_.swapPlanner("TestPlannerOk"));
|
||||
EXPECT_EQ(pluginInitializeCount(), before + 3);
|
||||
}
|
||||
|
||||
TEST(PlannerRunnerDockingMarker, EmptyMarkerOrPlannerNameIsANoOp)
|
||||
{
|
||||
Fixture fixture;
|
||||
|
||||
@@ -220,6 +220,27 @@ TEST(SensorGateway, ObstacleDataGoesOnlyToVoxelLayers)
|
||||
EXPECT_EQ(inflation->count(), 0U);
|
||||
}
|
||||
|
||||
TEST(SensorGateway, DepthCameraLayerGetsPointCloud2Only)
|
||||
{
|
||||
// DepthCameraObstacleLayer has its own LayerType: it must get the camera cloud, and neither the
|
||||
// depth image (it does not use it) nor anything meant for the lidar layers.
|
||||
Bench bench;
|
||||
SpyPtr depth_layer = bench.addLocal(LayerType::DEPTH_CAMERA_LAYER, "depth_obstacles");
|
||||
SpyPtr global_depth = bench.addGlobal(LayerType::DEPTH_CAMERA_LAYER, "depth_obstacles");
|
||||
SpyPtr voxel = bench.addLocal(LayerType::VOXEL_LAYER, "lidar_obstacles");
|
||||
bench.attach();
|
||||
|
||||
bench.gateway().pushLaserScan("/f_scan", makeScan());
|
||||
bench.gateway().pushPointCloud("/pc", robot_sensor_msgs::PointCloud());
|
||||
bench.gateway().pushPointCloud2("/camera/depth/points_proc", robot_sensor_msgs::PointCloud2());
|
||||
bench.gateway().pushDepthCameraData("/camera/depth/data", makeDepth());
|
||||
|
||||
ASSERT_EQ(depth_layer->count(), 1U);
|
||||
EXPECT_TRUE(*depth_layer->records()[0].type == typeid(robot_sensor_msgs::PointCloud2));
|
||||
EXPECT_EQ(global_depth->count(), 1U);
|
||||
EXPECT_EQ(voxel->count(), 4U); // the voxel layers keep getting everything, as before
|
||||
}
|
||||
|
||||
TEST(SensorGateway, LayerNamedAfterATopicDoesNotReceiveTheSample)
|
||||
{
|
||||
// Hồi quy cho C5. Bản `move_base` cũ lọc bằng
|
||||
|
||||
@@ -596,6 +596,39 @@ TEST(ControlLoop, BackupPlannerFailureEscalatesToRecovery)
|
||||
EXPECT_EQ(fixture.recovery_.lastTrigger(), RecoveryTrigger::kPlanningFailed);
|
||||
}
|
||||
|
||||
// Backup chỉ dành cho position. Docking/go_straight/rotate fail thì đi thẳng recovery, planner chính
|
||||
// giữ nguyên — robot KIT 26/10: SBPL thay DockPlanner dựng đường thẳng vào dock, bỏ qua cusp.
|
||||
TEST(ControlLoop, NonPositionPlannerFailureSkipsBackup)
|
||||
{
|
||||
for (const MotionProfile profile :
|
||||
{MotionProfile::kDocking, MotionProfile::kGoStraight, MotionProfile::kRotate})
|
||||
{
|
||||
SCOPED_TRACE(toString(profile));
|
||||
ControlLoopConfig config = baseConfig();
|
||||
config.backup_global_planner_name = "FakeBackupGlobalPlanner";
|
||||
config.state_machine.max_planning_retries = 0;
|
||||
Fixture fixture(config);
|
||||
fixture.planner_.setScript({PlannerScript::kFail, PlannerScript::kFail});
|
||||
fixture.recovery_.setScript({RecoveryScript::kRunning});
|
||||
|
||||
std::string reason;
|
||||
NavigationRequest request = makeRequest(3.0, 73);
|
||||
request.profile = profile;
|
||||
ASSERT_TRUE(fixture.loop_.submit(request, reason)) << reason;
|
||||
|
||||
for (int i = 0; i < 20 && fixture.loop_.state() != NavigationState::kRecovering; ++i)
|
||||
{
|
||||
fixture.stepOnce();
|
||||
}
|
||||
|
||||
EXPECT_EQ(fixture.planner_.activePlanner(), "FakeGlobalPlanner");
|
||||
EXPECT_EQ(fixture.planner_.makePlanCount(), 1u);
|
||||
EXPECT_EQ(fixture.loop_.state(), NavigationState::kRecovering);
|
||||
EXPECT_EQ(fixture.recovery_.startCount(), 1u);
|
||||
EXPECT_EQ(fixture.recovery_.lastTrigger(), RecoveryTrigger::kPlanningFailed);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(ControlLoop, PlannerFailureDrivesRecoveryThenSucceeds)
|
||||
{
|
||||
// Kịch bản thật: planner bế tắc cho tới khi recovery gỡ được thế, sau đó lập plan bình thường.
|
||||
|
||||
Reference in New Issue
Block a user