Flash the px4 firmware and configure parameters for the flight controller under Optitrack (applicable to vision positioning)

Tip: After the article is written, the table of contents can be automatically generated. For how to generate it, please refer to the help document on the right.


Preface

Reference: https://blog.csdn.net/qq_42703283/article/details/115214729

  1. The flight controller uses Lei Xun X7 pro
  2. Firmware 1.12.3

1: Find firmware

PX4 firmware download address

https://github.com/PX4/PX4-Autopilot/releases

Insert image description here
My flight controller is cuav_x7pro, so I choose this firmware (it depends on your own situation)
Insert image description here

2: QGC configuration parameters

QGC download and search by yourself
下载QGroundcontrol
https://docs.qgroundcontrol.com/master/en/getting_started/quick_start.html

2.1: Flight control initialization configuration

Follow the PX4 basic configuration guide
https://docs.px4.io/master/zh/config/firmware.html
There may be only one parameter MAV_1_CONFIG at the beginning. Set it to TELEM2 and then restart the flight control.

parameter set up
MAV_1_CONFIG TELEM 2
MAV_1_MODE Onboard
SER_TEL2_BAUD 921600
For other detailed instructions, please see official documents. https://docs.px4.io/main/en/advanced_config/tuning_the_ecl_ekf.html

Special if there is no drop-down menu and only allows you to fill in numbers, you can refer to
Insert image description here

2.2: Using visual positioning as position feedback

https://docs.px4.io/master/zh/ros/external_position_estimation.html
Set the visual as feedback as follows

parameter set up
EKF2_AID_MASK 280/24; vision position fusion, vision yaw fusion, vision velocity fusion (if you are using motion capture for feedback, do not select this item because there is no velocity information)
EKF2_HGT_MODE Vision
EKF2_EV_DELAY Set as the difference between the timestamp of the pose feedback and the flight control IMU capture time. See below for details .
EKF2_EV_POS_X, EKF2_EV_POS_Y, EKF2_EV_POS_Z Set the position of the pose feedback center relative to the fuselage frame.

Disable self-tests for some useless devices

parameter set up
CBRK_AIRSPD_CHK 162128;Disable airspeed meter
CBRK_SUPPLY_CHK 894281; Disable battery check (no need to plug in the voltage check module)
CBRK_USB_CHK 197848; Disable USB inspection (otherwise it is not allowed to fly with USB)
CBRK_IO_SAFETY 22027; Disable Prearm (no need to press the safety switch)
COM_ARM_MAG_ANG -1; disable magnetometer detection

Three: PID debugging/flight log viewing

Download the flight log and upload it to the following website, you can see all the information about the flight process
https://logs.px4.io/
Usage and introduction:
https://docs.px4.io/master/en/log/flight_log_analysis. html
PID debugging tutorial:
https://docs.px4.io/master/en/config_mc/pid_tuning_guide_multicopter.html
https://blog.csdn.net/qq_42703283/article/details/122535574

Guess you like

Origin blog.csdn.net/cherish1211/article/details/131999718