定位轮是什么?What Are Tracking Wheels?
▶ 视频讲解Video Explanation
▶
VEX Auton Tutorial Part 1 — Tracking Wheels
硬件组成Hardware Components
一套定位轮系统通常包括:A tracking wheel system typically includes:
┌─────────────────────────────┐
│ 机器人俯视图 │
│ │
│ ║ ↑ y正(前) ║ │ ← 驱动轮(左右各3个)
│ ║ ┃ ┃ ║ │
│ ║ ┃竖轮 ┃ ║ │ ← 竖轮:测量前后移动
│ ║ ┃(Vertical)┃ ║ │
│ ║ ║ │
│ ║ ━━━━━━━━━━━━━━━━ ║ │ ← 横轮:测量左右移动
│ ║ (Horizontal) ║ │
│ ║ → x正(右) │
│ ║ ║ │
│ [V5 大脑] │
└─────────────────────────────┘
| 部件Component | 作用Function | 数量Qty |
|---|---|---|
| 竖轮Vertical Wheel(Vertical) | 测量前后方向移动距离Measures forward/backward movement | 1 个1 |
| 横轮Horizontal Wheel(Horizontal) | 测量左右方向移动距离Measures left/right movement | 1 个1 |
| 陀螺仪Gyroscope(IMU) | 测量旋转角度Measures rotation angle | 1 个1 |
| 旋转传感器Rotation Sensor | 装在定位轮上,读取旋转角度Mounted on tracking wheels to read rotation | 2 个2 |
坐标系约定Coordinate System Convention
在开始之前,必须先统一"方向"的定义,否则后面的公式正负号会乱:Before we start, we must agree on direction definitions — otherwise the signs in later formulas will be inconsistent:
| 约定Convention | 定义Definition |
|---|---|
| x 正方向Positive x | 机器人的右边Robot's right side |
| y 正方向Positive y | 机器人的前方(车头方向)Robot's front (heading direction) |
| θ 正方向Positive θ | 顺时针旋转Clockwise rotation |
| 竖轮正方向Vertical wheel positive | 向前滚 = 正值Rolling forward = positive |
| 横轮正方向Horizontal wheel positive | 向右滚 = 正值Rolling right = positive |
重要Important:如果你的轮子装反了(向前滚读出负值),在代码里把编码器值取反,或者在传感器设置里 reverse。不要去改公式的正负号。: If your wheel is installed backwards (rolling forward gives negative values), negate the encoder value in code or reverse it in sensor settings. Don't change the signs in the formulas.
为什么需要两个轮 + 陀螺仪?Why Two Wheels + a Gyroscope?
- 竖轮:知道机器人沿车头方向走了多远Vertical wheel: tells how far the robot moved along its heading
- 横轮:知道机器人侧向滑了多远(被撞、万向轮漂移等)Horizontal wheel: tells how far the robot slid sideways (from collisions, omni-wheel drift, etc.)
- 陀螺仪:知道机器人转了多少度Gyroscope: tells how many degrees the robot has turned
三个信息结合,就能算出机器人在场地上的精确坐标 (x, y, θ)。Combining these three pieces of information, we can calculate the robot's exact position on the field: (x, y, θ).
就像 GPS 告诉你在地图上的位置一样,定位轮告诉机器人在场地上的位置。Just like GPS tells you where you are on a map, tracking wheels tell the robot where it is on the field.
一套最基本的定位系统需要哪些?What does a basic tracking system require?