Skip to content

踩坑GitHub ros-navigation/navigation2今天

Nav2 PathAlignCritic因offset_from_furthest阈值过高静默失效 ​

本文由 AI 根据公开内容整理,可能有误,请以原文为准:offset_from_furthest means two different things across three critics, and the one with the highest default fails silently(GitHub ros-navigation/navigation2 #6862)

状态:有绕过办法

问题 ​

Nav2中PathAlignCritic、PathFollowCritic与PathAngleCritic对offset_from_furthest处理逻辑不一致。PathAlignCritic在轨迹未达该阈值时直接返回score()导致评分完全失效且无日志提示,造成调参cost_weight无效。此外PathAngleCritic文档默认值20与源码及示例配置的4不符,误导配置。

环境 ​

ROS Navigation2 (Rolling分支)

解决办法 ​

  1. 排查PathAlignCritic失效时,检查offset_from_furthest是否过大,该参数过大会导致Critic被完全跳过而非仅钳位。
  2. 依据调优公式 prediction_horizon_s * max_speed / path_resolution / 3.0 重新计算offset_from_furthest基准值,确保其适配当前路径分辨率。
  3. 注意PathAngleCritic实际默认值为4而非文档所述20,配置时应以源码或官方示例为准。
  4. 区分三个Critic行为差异:PathFollowCritic和PathAngleCritic使用std::min钳位继续执行,仅PathAlignCritic会因阈值不足而静默退出。

讨论原作者:@skunal3318 等,版权归原作者所有。

基于本页技术方向关联的整机参数、核心零部件、实测报告与同赛道选型横评。

外部来源

本页事实对应的公开页面,以原文为准。(点击将离开本站)

  1. GitHub ros-navigation/navigation2 #6862:offset_from_furthest means two different things across three critics, and the one with the highest default fails silently ↗访问 2026-11-27