Skip to content

踩坑GitHub ros-navigation/navigation22 天前

Nav2 GracefulController原地旋转时角速度突破v_angular_max上限 ​

本文由 AI 根据公开内容整理,可能有误,请以原文为准:Graceful controller doesn't obey the max angular velocity param(GitHub ros-navigation/navigation2 #6842)

状态:有绕过办法

问题 ​

Nav2 GracefulController在目标点xy容差内但航向误差较大时进入rotateToTarget(),输出角速度超过配置的v_angular_max。实测v_angular_max设为1.0时峰值达2.333 rad/s。

环境 ​

Ubuntu 26.04.1 LTS (ROS容器),ROS2 Lyrical apt二进制版,nav2_graceful_controller 1.5.2-2resolute.20260921.021123,rmw_cyclonedds_cpp 4.1.

解决办法 ​

  1. 定位nav2_graceful_controller源码中rotateToTarget()函数内vel.angular.z赋值逻辑。
  2. 在现有std::max(..., v_angular_min_in_place)计算后,增加std::min(result, params_->v_angular_max)调用以强制钳位上限。
  3. 确保正负方向均受v_angular_max约束,防止copysign处理后数值再次越界。
  4. 编写单元测试调用rotateToTarget(3.0)验证角速度输出严格不超过v_angular_max。
  5. 向navigation2仓库提交PR修复该边界检查缺失问题。

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

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

外部来源

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

  1. GitHub ros-navigation/navigation2 #6842:Graceful controller doesn't obey the max angular velocity param ↗访问 2026-11-24