# 6 📐 校准

## 准备校准 <a href="#id-5.2-prepare-for-calibration" id="id-5.2-prepare-for-calibration"></a>

{% hint style="danger" %}
千万不要在第一次校准前把腿装到舵机上。

当舵机断电时，它们的输出轴可能被转到随机的角度，如果这时装上了腿，机器人并不知道这些腿的指向。当机器人上电时，这些腿可能互相冲撞或卡在机身上。长期堵转可能会损坏舵机。
{% endhint %}

机器人的关节需要校准才能继续使用。确保所有的舵机已按正确的方向连接到了主板的正确的位置上，电池正在供电（猫图标的黄色LED 在发光），并且所有的腿和头没有装在舵机上，这些舵机都可以自由旋转。

我们的校准流程会给主板发送一个校准指令，并把所有关节转向已知的角度。您可以把腿按最接近校准姿势的状态安装到关节舵机上，再用软件进行校准。

## 进入校准状态

{% hint style="info" %}
在安装腿和头前必须先进入*校准状态*，然后将头和腿部组件安装在舵机输出轴的齿轮上，但不要拧上螺丝，

进入*校准状态*有5种方法：

* 长按电池上按钮，将机器人身体左/右侧立开机，机器人会自动进入校准状态。下图为机器人进入校准状态并安装好腿部组件的图片。 \
  ![](https://3409079605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPQ2vWEZUH7ol6XE55o-1608594363%2Fuploads%2FGTeZH2CsvwzISZxrjk6x%2Fimage.png?alt=media\&token=a15afe42-78d4-4d93-ac09-3363ec488a5d)

* 使用移动端应用 **Petoi** App 进入校准界面

* 使用 Petoi 桌面应用程序中 **关节校准** 子程序
  * 如果您已经用串口适配器连接了机器人和电脑，点击“**关节校准**”按钮会自动进入校准状态
  * 点击校准界面中的“**校准位**”按钮

* 在Arduino IDE的串口监视器中，输入串口命令“**c**”&#x20;

* 按下遥控器上的校准按钮 ![](https://3409079605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPQ2vWEZUH7ol6XE55o-1608594363%2Fuploads%2F0AwAMc8o1umgfIkL4CH2%2FCali_btn.png?alt=media\&token=e1d04158-699d-4ff0-906c-3670381f09bb)（3,3 - 第 3 行，第 3 列）
  {% endhint %}

### 头部安装 <a href="#install-the-head" id="install-the-head"></a>

在校准中位状态下，将头尽量与中轴线重合，把底部的舵机输出齿插到脖子的舵臂上。

![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPQ2vWEZUH7ol6XE55o-887967055%2Fuploads%2FTA3mChdgvI00SrUjwxWF%2Fassets_bittle_cali_head01.jpeg?alt=media\&token=b83798da-da31-4a3f-86d3-c5b0f5f86f20)

向下压头部，使其牢牢固定在脖子上

![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPQ2vWEZUH7ol6XE55o-887967055%2Fuploads%2FFIHY8Rg2swh18iqJ1IWy%2Fassets_bittle_cali_head02.jpeg?alt=media\&token=0abf5909-959f-4cc5-9a4b-4bcb6baa606f)

### 安装大腿，小腿

取出已经局部组装好的大腿，小腿，在Bittle通电并处于校准状态的情况下，分别安装到2个舵机的输出齿。躯干、大腿、小腿请尽可能保持垂直安装，小腿请勿装反，如图所示：

![](https://3409079605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPQ2vWEZUH7ol6XE55o-1608594363%2Fuploads%2FMiSuih56fMuwrQQto3o3%2Fassets_bittle_cali_leg01.jpeg?alt=media\&token=d9725a89-f808-4160-b470-a5cca7c92f86)

可以借助三角尺或套件中搭配的L形尺作为参考并进行安装。

![](https://3409079605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPQ2vWEZUH7ol6XE55o-1608594363%2Fuploads%2FfknHNK2nNlb4R17VvWwK%2Fassets_bittle_-MSGw-I0q_j0kHosz8nz_-MSGx1sAobtzY1ucuddF_53.jpeg?alt=media\&token=ad0998e4-31bc-4b11-9abc-77cfc56ac8c2)

通过使用软件，有3种方式可以进入校准状态并对关节进行微调。

* 使用移动应用 [Petoi](https://docs.petoi.com/chinese/shou-ji-ying-yong/guan-jie-jiao-zhun)
* 使用 [Petoi 桌面应用程序](https://docs.petoi.com/chinese/zhuo-mian-ying-yong/guan-jie-jiao-zhun)
* 使用 [Arduino IDE](https://docs.petoi.com/chinese/arduino-ide/shi-yong-arduino-ide-jiao-zhun-duo-ji)

校准 Bittle 的详细步骤，请参考文档中心的[关节校准](https://docs.petoi.com/chinese/guan-jie-jiao-zhun)。&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bittle.petoi.com/zhong-wen/6-jiao-zhun.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
