1.0
This commit is contained in:
@@ -18,6 +18,14 @@ static bool process_side_laser(const SensorItem_t *item, float *out_m)
|
||||
if (dist_m > PREPROC_MAX_SIDE_RANGE_M || dist_m < PREPROC_MIN_SIDE_RANGE_M) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 靠墙过近退化:
|
||||
* 侧向 VL53 在最小量程附近(例如实际 3cm、模组最小可信 4cm)时,
|
||||
* 直接判无效会让系统退化成单边观测,反而更容易贴墙。
|
||||
* 这里改成“钳位到最小可信距离”,既保留该侧存在感,又避免把不可信的超近值直接送上去。 */
|
||||
if (dist_m < PREPROC_SAT_NEAR_SIDE_RANGE_M) {
|
||||
dist_m = PREPROC_SAT_NEAR_SIDE_RANGE_M;
|
||||
}
|
||||
|
||||
*out_m = dist_m;
|
||||
return true;
|
||||
@@ -116,4 +124,4 @@ void CorridorPreproc_ExtractObs(const RobotBlackboard_t *board, uint32_t now_ms,
|
||||
if (out_obs->d_back < 0.0f) out_obs->d_back = 0.0f;
|
||||
out_obs->valid_mask |= CORRIDOR_OBS_MASK_BACK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
/* VL53L0X 侧向雷达的物理有效探测区间 (m) */
|
||||
#define PREPROC_MAX_SIDE_RANGE_M 2.0f
|
||||
#define PREPROC_MIN_SIDE_RANGE_M 0.02f
|
||||
/* 侧向 VL53 靠墙过近时的退化阈值 (m)
|
||||
* 低于此值虽然可能还有数字,但已接近最小量程区,不再作为可信几何量使用。 */
|
||||
#define PREPROC_SAT_NEAR_SIDE_RANGE_M PARAM_VL53_SIDE_SAT_NEAR_M
|
||||
|
||||
/* 前后向雷达近战盲区阈值 (m) (STP 7cm盲区 + 1cm工程裕量) */
|
||||
#define PREPROC_BLIND_ZONE_M 0.08f
|
||||
@@ -40,4 +43,4 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CORRIDOR_PREPROC_H
|
||||
#endif // CORRIDOR_PREPROC_H
|
||||
|
||||
Reference in New Issue
Block a user