# 四旋翼横向移动如何补偿偏航角

> 原文链接：https://robotics.hellobike.com/pitfalls/2014-01-28-robotics-se-2371
> 频道：pitfalls | 更新日期：2014-01-28 | 标签：auto, stackexchange, quadcopter, gyroscope, movement, dynamics
> 核心摘要：将世界坐标系下的滚转和俯仰按偏航角旋转到机体系即可补偿 yaw。

# 四旋翼横向移动如何补偿偏航角

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[Compensating for Yaw in Lateral Quadcopter Movement](https://robotics.stackexchange.com/questions/2371/compensating-for-yaw-in-lateral-quadcopter-movement)（Robotics Stack Exchange #2371）

**状态**：已解决

## 问题

提问者已在 `yaw=0°` 时求得横向移动所需的 `roll` 和 `pitch`，但不知道在其他 `yaw` 下如何调整。

## 环境

Linux / ROS 机器人软件与控制通用开发环境

## 解决办法

1. 将世界坐标系下的 `roll`、`pitch` 记为 `phi_world`、`theta_world`，偏航角记为 `psi`。
2. 用 `phi_vehicle = phi_world*cos(psi) - theta_world*sin(psi)` 计算机体系 `roll`。
3. 用 `theta_vehicle = phi_world*sin(psi) + theta_world*cos(psi)` 计算机体系 `pitch`。

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

## 原始参考来源 (Sources)

- [Robotics Stack Exchange #2371：Compensating for Yaw in Lateral Quadcopter Movement](https://robotics.stackexchange.com/questions/2371/compensating-for-yaw-in-lateral-quadcopter-movement)