feat: warn at boot about tape keys ignored while the tape is off

This commit is contained in:
2026-10-30 14:21:38 +07:00
parent b00d320094
commit 775c16820b
5 changed files with 36 additions and 0 deletions

View File

@@ -40,6 +40,18 @@ actions_trolley:
# [m] σ tối đa cho bias khi mọi góc đều sáng; 0 tắt. Tăng nhận xa hơn nhưng dễ sai pose;
# giảm bỏ nhiều trường hợp. Ngưỡng lớn nguy hiểm do bias lẫn với tịnh tiến; miền 0–0.1.
tape_range_bias_all_max_std: 0.0
# Khi tape_enabled: false, bốn khoá tape dưới đây bị bỏ qua và được liệt kê lúc boot;
# có thể giữ giá trị đã chỉnh khi tháo dải. Miền giá trị vẫn được kiểm tra.
tci_trolley_tape_off:
cart_opening: 0.517
cart_depth: 0.720
leg_shape: box
leg_width: 0.030
tape_enabled: false
tape_bloom_max_angle: 0.10
tape_range_bias_sigma: 0.05
tape_plateau_min_fraction: 0.65
tape_range_bias_all_max_std: 0.02
tci_trolley_plateau:
cart_opening: 0.517 # [m] Khoảng cách chân cạnh vào của xe test.
cart_depth: 0.720 # [m] Khoảng cách chân dọc xe test.

View File

@@ -508,6 +508,15 @@ TEST(TrolleyDetectionAction, RefusesAnUnknownProfile)
EXPECT_FALSE(h->start(makeAction("DetectTrolley", "khong_co_profile_nay"), robot::Time(10.0)));
}
TEST(TrolleyDetectionAction, LoadsYamlProfileWithTapeOffAndTunedKeys)
{
Rig rig;
ASSERT_TRUE(rig.loaded);
ActionHandler* handler = rig.registry.find("DetectTrolley");
ASSERT_NE(handler, nullptr);
EXPECT_TRUE(handler->start(makeAction("DetectTrolley", "tci_trolley_tape_off"), robot::Time(10.0)));
}
TEST(TrolleyDetectionAction, LoadsPlateauFromYamlAndRejectsInvalidValue)
{
Rig rig;