# mBot 巡线遇 90 度急弯反复倒退卡住

> 原文链接：https://robotics.hellobike.com/pitfalls/2020-02-01-robotics-se-9728
> 频道：pitfalls | 更新日期：2020-02-01 | 标签：auto, stackexchange, arduino, motor, line-following
> 核心摘要：mBot 两传感器巡线在 90 度急弯卡住，可改为沿线边缘行驶并调节转向与前进速度。

# mBot 巡线遇 90 度急弯反复倒退卡住

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[How to check for a sharp angle with a line follower?](https://robotics.stackexchange.com/questions/9728/how-to-check-for-a-sharp-angle-with-a-line-follower)（Robotics Stack Exchange #9728）

**状态**：已解决

## 问题

mBot 可通过大于 90° 的线路，但从斜线进入约 90° 急弯时会错过黑线，在白区倒退找线，回到线上又继续前进错过转弯，形成反复循环。

## 环境

mBot；2 个巡线传感器，相距 5 mm；线宽 2 cm；传感器值为 0、1、2、3。

## 解决办法

1. 不再按线中心巡线，改为沿线边缘巡线：`on the right of the line` 时 `turn_left()`，`on the left of the line` 时 `go_forward()`，`on the line` 时 `turn_left()`，`not on the line` 时 `turn_right()`。
2. 调整 `turn_left()` 的角速度和 `go_forward()` 的线速度，先保持二者比例不变整体降低速度，再尝试改变二者比例，观察急弯表现。
3. 降低速度可让单位距离内获得更多传感器读数，提高采样率，可能让系统更稳定。

原问题作者：jan；采纳答案作者：Bending Unit 22。原内容依 CC BY-SA 4.0 授权，本页摘要同样依 CC BY-SA 4.0 授权。
:::

## 原始参考来源 (Sources)

- [Robotics Stack Exchange #9728：How to check for a sharp angle with a line follower?](https://robotics.stackexchange.com/questions/9728/how-to-check-for-a-sharp-angle-with-a-line-follower)