本文的视频和截图均来自B站视频:[保姆级教程] INAV飞控配置使用MTF-01光流测距一体传感器实现室内悬停飞行_哔哩哔哩_bilibili
INAV的串口设置请参看视频,以下给出其他的一些关键设置:
校准后的参数区间(参考值)
PID的设置与数据的检查:
PID代码:
set nav_mc_vel_z_p = 150
set nav_mc_vel_z_i = 250
set nav_mc_vel_z_d= 25
set nav_mc_pos_xy_p = 80
set nav_mc_vel_xy_p = 50
set nav_mc_vel_xy_i = 40
set nav_mc_vel_xy_d = 60
set debug_mode = FLOW_RAW
save
1 2 3 4 5 6 7 8 9 |
set nav_mc_vel_z_p = 150 set nav_mc_vel_z_i = 250 set nav_mc_vel_z_d= 25 set nav_mc_pos_xy_p = 80 set nav_mc_vel_xy_p = 50 set nav_mc_vel_xy_i = 40 set nav_mc_vel_xy_d = 60 set debug_mode = FLOW_RAW save |
1 2 3 4 |
set inav_allow_dead_reckoning = ON set nav_max_terrain_follow_alt = 200 set inav_max_surface_altitude = 200 save |
测试效果:
修改数据协议的方法: