Ardupilot飞控姿态角与姿态角速度控制过程分析(超长篇)

目录

摘要

本节主要记录自己学习ardupilot飞控代码的姿态角速度的控制过程
分析过程:主要从ardupilot自稳模式开始,然后到角速度控制,最后到输出PWM控制电机实现无人机的基本运动模式的过程。思考:无人机工作在自稳模式,需要输入的是什么,自稳模式工作后输出了什么,输出的值怎么传到姿态角速度控制,姿态角速度控制最后输出了的PID怎么控制无人机的?


1.自稳模式初始化

从bool Copter::set_mode(control_mode_t mode, mode_reason_t reason)函数开始
寻找自稳模式初始化:
success = stabilize_init(ignore_checks); //姿态自我稳定模式

bool Copter::stabilize_init(bool ignore_checks)
{
    // if landed and the mode we're switching from does not have manual throttle and the throttle stick is too high
	//如果着陆,我们切换的模式不能是手动控制模式并且油门值不能太高,否则返回。
    if (motors->armed() && ap.land_complete && !mode_has_manual_throttle(control_mode) &&
            (get_pilot_desired_throttle(channel_throttle->get_con
  • 15
    点赞
  • 97
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 5
    评论
角速度是物体绕某一轴旋转的速度,通常用弧度/秒表示。在引用中提到,陀螺仪可以测量物体绕三个轴的角速度角速度的方向是沿着三轴的,可以通过陀螺仪获得。在引用中,角速度信息用于进行内环角速度控制,即通过PID控制器来调整无人机的横滚、俯仰和偏航角速度。 线速度是物体在直线运动过程中的速度,通常用米/秒表示。在上述引用中,没有提到关于线速度的具体信息。 姿态是描述物体在空间中的姿势或姿态度,通常以欧拉的形式给出。在引用中,目标姿态通过欧拉的方式表示,其中euler_roll_angle表示横滚,euler_pitch_angle表示俯仰,euler_yaw_rate*_dt表示偏航姿态可以通过陀螺仪测得的角速度积分得到,但需要使用加速度计和磁力计进行校正以减小漂移误差。 综上所述,角速度是物体绕某一轴旋转的速度,线速度是物体在直线运动中的速度,姿态是描述物体的姿势或姿态度。<span class=&quot;em&quot;>1</span><span class=&quot;em&quot;>2</span><span class=&quot;em&quot;>3</span> #### 引用[.reference_title] - *1* [加速度计、磁力计求初始姿态](https://blog.csdn.net/u010949023/article/details/116046188)[target=&quot;_blank&quot; data-report-click={&quot;spm&quot;:&quot;1018.2226.3001.9630&quot;,&quot;extra&quot;:{&quot;utm_source&quot;:&quot;vip_chatgpt_common_search_pc_result&quot;,&quot;utm_medium&quot;:&quot;distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1&quot;}}] [.reference_item style=&quot;max-width: 50%&quot;] - *2* *3* [Ardupilot飞控姿态姿态角速度控制过程](https://blog.csdn.net/zhouxinlin2009/article/details/81195628)[target=&quot;_blank&quot; data-report-click={&quot;spm&quot;:&quot;1018.2226.3001.9630&quot;,&quot;extra&quot;:{&quot;utm_source&quot;:&quot;vip_chatgpt_common_search_pc_result&quot;,&quot;utm_medium&quot;:&quot;distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1&quot;}}] [.reference_item style=&quot;max-width: 50%&quot;] [ .reference_list ]
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

魔城烟雨

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值