# Nav2目标更新时误报NavigatorMutex错误日志

> 原文链接：https://robotics.hellobike.com/pitfalls/2026-11-09-navigation2-6756
> 频道：pitfalls | 更新日期：2026-11-09 | 标签：auto, github-issue, navigation2
> 核心摘要：同一导航器更新目标时误报互斥锁错误，通过合并PR #6646修复抢占逻辑解决。

# Nav2目标更新时误报NavigatorMutex错误日志

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[False NavigatorMutex error on goal update with the same navigator](https://github.com/ros-navigation/navigation2/issues/6756)（GitHub ros-navigation/navigation2 #6756）

**状态**：已解决

## 问题

在 `bt_navigator` 运行 `NavigateThroughPoses` 行为树时，若客户端在任务执行中更新相同目标，系统会误报 `[NavigatorMutex]: Major error! Navigation requested while another navigation task is in progress!`。

## 环境

Ubuntu 24.04.5 LTS, Intel Core 7 240H, ROS2 Jazzy, navigation2 main分支(20b9fa3e), rmw_zenoh_cpp

## 解决办法

1. 确认该问题由 PR #6279 引入的抢占逻辑缺陷导致，与 Issue #6644 相关
2. 应用或合并 PR #6646 中的修复代码，该补丁修正了 `NavigatorMuxer::startNavigating` 中对当前导航器状态的判断逻辑
3. 重新编译 `nav2_bt_navigator` 包并运行 `test_navigate_through_poses_goal_update` 测试验证错误日志消除

讨论原作者：@odemirs 等，版权归原作者所有。
:::

## 原始参考来源 (Sources)

- [GitHub ros-navigation/navigation2 #6756：False NavigatorMutex error on goal update with the same navigator](https://github.com/ros-navigation/navigation2/issues/6756)