PIXhawk4 flight control study notes (1) development environment
Introduction to PIX4
PX4 is part of the Dronecode platform
- The Dronecode platform is a complete end-to-end platform for drone development, using a general industry-friendly open source license.
- These include PX4 flight software package, QGroundControl ground control station, Dronecode SDK and Dronecode Camera
Manager.
PX4 autopilot
- PX4 is a powerful open source autopilot flight software package.
- Some of the main functions of PX4 include: Control of many different vehicle frames/types, including: aircraft (multi-rotor aircraft, fixed-wing aircraft and vertical take-off and landing aircraft), ground vehicles and underwater vehicles.
- Suitable for hardware selection of vehicle controllers, sensors and other peripheral devices. Flexible and powerful flight mode and safety functions.
QGroundControl
- Dronecode ground control station is called QGroundControl.
- You can use QGroundControl to load (flash) PX4 onto the vehicle control hardware.
You can set up the vehicle, change different parameters, get real-time flight information, and create and execute fully autonomous tasks. - QGroundControl can run on Windows, Android, MacOS or Linux.
Development environment preparation
PIX4 control board
Pixhawk is a high-performance flight control board, which can be used for fixed-wing, multi-rotor, helicopter, car and other applications. It can be used for research, play, and even directly used to make products. This flight controller actually encapsulates the PX4FMU and PX4IO, and encapsulates the two parts of the PCB board in a shell. As an open source project, all the information is on GitHub, with a link https://docs.px4.io/master/en/flight_controller/pixhawk.html
Specification
processor
- 32-bit STM32F427 Cortex M4 core with FPU main processor
- Main frequency 168MHZ
- 256KB RAM
- 2MB Flash
- 32-bit STM32F103 Failsafe Coprocessor
sensor
- ST's L3GD20H 16-bit precision gyroscope
- ST's LSM303D 14-bit accelerometer and magnetometer
- Invensense's MPU6000 three-axis accelerometer and gyroscope
- MS5611 barometer from MEAS
MDK-Keil5
The code writing environment uses MDK-keil5 for
specific installation steps, please refer to the
installation and cracking of Keil MDK5
STM32CUBEMAX
STM32CubeMX is a graphical configuration tool for STM32 chips strongly recommended by ST STMicroelectronics in recent years. The purpose is to facilitate developers and allow users to use graphical wizards to generate C initialization code, which can greatly reduce development work, time and costs, and improve development efficiency. .
STM32CubeMX almost covers the full range of STM32 chips. On CubeMX, the relevant configuration can be realized through foolish operations, and finally C language code can be generated, supporting a variety of tool chains, such as MDK, IAR For ARM, TrueStudio, etc. It saves us the time to configure various peripherals, greatly When developing, we use the HAL library as the basis for learning STM32CUBMAX installation can refer to the
STM32CUBEMAX installation tutorial
QGroundControl Ground Station
QGroundControl download link
QGroundControl source code
QGroundControl source code is dual-licensed under Apache 2.0 and GPLv3. For more information, see: License.
To get the source files, do the following:
克隆存储库 (或您的分叉), 包括子模块: git clone
https://github.com/mavlink/qgroundcontrol.git --recursive
Update the submodule (do this every time you pull a new source code): git submodule update
Tip: You cannot use Github to download source files in zip form, because the zip archive does not contain the corresponding submodule source code. You must use git tools!
to sum up
Taking advantage of the winter vacation to learn PIX4, I will publish what I have learned in the form of a blog. It is a kind of supervision for myself. I welcome interested bigwigs to study together. If there is a mistake, I welcome criticism and correction.