CN117453621A - Unmanned aerial vehicle flight control processing method and device, unmanned aerial vehicle and storage medium - Google Patents

Unmanned aerial vehicle flight control processing method and device, unmanned aerial vehicle and storage medium Download PDF

Info

Publication number
CN117453621A
CN117453621A CN202311775772.8A CN202311775772A CN117453621A CN 117453621 A CN117453621 A CN 117453621A CN 202311775772 A CN202311775772 A CN 202311775772A CN 117453621 A CN117453621 A CN 117453621A
Authority
CN
China
Prior art keywords
unmanned aerial
aerial vehicle
file
flight control
driving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311775772.8A
Other languages
Chinese (zh)
Inventor
吴吉
刁华源
梁家宝
丁超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Radiolink Electronics Co ltd
Original Assignee
Radiolink Electronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Radiolink Electronics Co ltd filed Critical Radiolink Electronics Co ltd
Priority to CN202311775772.8A priority Critical patent/CN117453621A/en
Publication of CN117453621A publication Critical patent/CN117453621A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/75Structural analysis for program understanding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a unmanned aerial vehicle flight control processing method, a unmanned aerial vehicle flight control processing device, a unmanned aerial vehicle, a storage medium and a computer program product. The method comprises the following steps: performing bottom driving debugging on an operating system of the unmanned aerial vehicle chip to obtain a bottom driving program of the unmanned aerial vehicle chip; screening a to-be-processed driving file meeting the target file condition from the driving file of the hardware abstraction layer of the unmanned aerial vehicle chip; performing drive debugging on the to-be-processed drive file to obtain a hardware abstraction layer drive program of the unmanned aerial vehicle chip; and obtaining a target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver. By adopting the method, the development effect of peripheral drive of the unmanned aerial vehicle chip can be improved.

Description

Unmanned aerial vehicle flight control processing method and device, unmanned aerial vehicle and storage medium
Technical Field
The application relates to the technical field of unmanned aerial vehicles, in particular to an unmanned aerial vehicle flight control processing method, an unmanned aerial vehicle flight control processing device, an unmanned aerial vehicle, a storage medium and a computer program product.
Background
With the wide application of unmanned aerial vehicles in the fields of agriculture, aerial photography, education and the like, research and development of unmanned aerial vehicles are increasingly important. The flight control is used as a main control board in the unmanned aerial vehicle, and has important research significance and application value in unmanned aerial vehicle research.
At present, the leading unmanned aerial vehicle flight control technology is implemented based on flight control programs such as PX4 (an open source flight control system), but the flight control programs only support foreign chips as main chips of unmanned aerial vehicle flight control, but do not support domestic chips as main chips. Therefore, aiming at the application bottleneck of the domestic chip in unmanned aerial vehicle flight control, a solution is needed to be provided.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an unmanned aerial vehicle flight control processing method, apparatus, unmanned aerial vehicle, computer-readable storage medium, and computer program product that can improve the drive development effect on an unmanned aerial vehicle chip.
In a first aspect, the present application provides a flight control processing method for an unmanned aerial vehicle. The method comprises the following steps:
performing bottom driving debugging on an operating system of the unmanned aerial vehicle chip to obtain a bottom driving program of the unmanned aerial vehicle chip;
screening a to-be-processed driving file meeting the target file condition from the driving file of the hardware abstraction layer of the unmanned aerial vehicle chip;
performing drive debugging on the to-be-processed drive file to obtain a hardware abstraction layer drive program of the unmanned aerial vehicle chip;
and obtaining the target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver.
In one embodiment, performing bottom layer driving debugging on an operating system of an unmanned aerial vehicle chip to obtain a bottom layer driving program of the unmanned aerial vehicle chip, including:
acquiring a bottom driving file of the unmanned aerial vehicle chip from the operating system;
and starting from the register, debugging the application program interface of the bottom drive file to obtain the bottom drive program of the unmanned aerial vehicle chip.
In one embodiment, screening a to-be-processed driving file meeting a target file condition from driving files of a hardware abstraction layer of the unmanned aerial vehicle chip includes:
acquiring a configuration file with a file name of halcon f.h from the configuration file of the hardware abstraction layer;
screening a drive file with a file format of cpp from the drive file of the hardware abstraction layer of the unmanned aerial vehicle chip according to the configuration file with the file name of halcon f.h;
and setting the driving file with the file format of cpp as the driving file to be processed.
In one embodiment, the driving debugging is performed on the to-be-processed driving file to obtain a hardware abstraction layer driver of the unmanned aerial vehicle chip, including:
and debugging an application program interface of the driving file with the file format of cpp to obtain a hardware abstraction layer driving program of the unmanned aerial vehicle chip.
In one embodiment, the method further comprises:
constructing branch codes by a version management tool from the operating system or the code program in the hardware abstraction layer;
and acquiring a bottom-layer driver or a hardware abstraction layer driver submitted based on the branch codes through the version management tool.
In one embodiment, after obtaining the target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver, the method further includes:
the target flight control program is sent to a flight control board of the unmanned aerial vehicle chip so that the flight control board can simulate the target flight control program;
obtaining a simulation test result returned by the flight control board based on the target flight control program;
and updating the target flight control program according to the simulation test result to obtain the updated flight control program of the unmanned aerial vehicle chip.
In one embodiment, before performing the bottom layer driving debugging on the operating system of the unmanned aerial vehicle chip to obtain the bottom layer driving program of the unmanned aerial vehicle chip, the method further includes:
establishing communication connection between the unmanned aerial vehicle chip and a development environment of the operating system;
and deploying a minimum operating system of the unmanned aerial vehicle chip on the operating system through the communication connection.
In a second aspect, the application further provides an unmanned aerial vehicle flight control processing device. The device comprises:
the bottom layer driving debugging module is used for performing bottom layer driving debugging on the operating system of the unmanned aerial vehicle chip to obtain a bottom layer driving program of the unmanned aerial vehicle chip;
the driving file screening module is used for screening the driving files to be processed meeting the target file conditions from the driving files of the hardware abstraction layer of the unmanned aerial vehicle chip;
the abstract layer debugging module is used for driving and debugging the to-be-processed driving file to obtain a hardware abstract layer driving program of the unmanned aerial vehicle chip;
and the flight control program acquisition module is used for acquiring a target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver.
In a third aspect, the present application further provides an unmanned aerial vehicle. The unmanned aerial vehicle comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the following steps when executing the computer program:
performing bottom driving debugging on an operating system of the unmanned aerial vehicle chip to obtain a bottom driving program of the unmanned aerial vehicle chip;
screening a to-be-processed driving file meeting the target file condition from the driving file of the hardware abstraction layer of the unmanned aerial vehicle chip;
performing drive debugging on the to-be-processed drive file to obtain a hardware abstraction layer drive program of the unmanned aerial vehicle chip;
and obtaining the target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
performing bottom driving debugging on an operating system of the unmanned aerial vehicle chip to obtain a bottom driving program of the unmanned aerial vehicle chip;
screening a to-be-processed driving file meeting the target file condition from the driving file of the hardware abstraction layer of the unmanned aerial vehicle chip;
performing drive debugging on the to-be-processed drive file to obtain a hardware abstraction layer drive program of the unmanned aerial vehicle chip;
and obtaining the target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
performing bottom driving debugging on an operating system of the unmanned aerial vehicle chip to obtain a bottom driving program of the unmanned aerial vehicle chip;
screening a to-be-processed driving file meeting the target file condition from the driving file of the hardware abstraction layer of the unmanned aerial vehicle chip;
performing drive debugging on the to-be-processed drive file to obtain a hardware abstraction layer drive program of the unmanned aerial vehicle chip;
and obtaining the target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver.
According to the unmanned aerial vehicle flight control processing method, the unmanned aerial vehicle flight control processing device, the unmanned aerial vehicle, the storage medium and the computer program product, the bottom layer driving debugging is carried out on the operating system of the unmanned aerial vehicle chip, and the bottom layer driving program of the unmanned aerial vehicle chip is obtained; screening a to-be-processed driving file meeting the target file condition from the driving file of the hardware abstraction layer of the unmanned aerial vehicle chip; performing drive debugging on the to-be-processed drive file to obtain a hardware abstraction layer drive program of the unmanned aerial vehicle chip; and obtaining a target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver. By adopting the method, the development of the flight control program of the unmanned aerial vehicle chip is realized by debugging the bottom layer driver of the operating system and driving and debugging the hardware abstraction layer, and the development effect of the peripheral driver of the unmanned aerial vehicle chip is improved.
Drawings
FIG. 1 is a flow chart of a method of unmanned aerial vehicle flight control processing in one embodiment;
FIG. 2 is a hierarchical block diagram of a full stack of a drone in one embodiment;
FIG. 3 is a flow chart of a bottom layer drive debugging step for an operating system of a unmanned aerial vehicle chip in one embodiment;
FIG. 4 is a flowchart illustrating steps performed by a hardware abstraction layer driver for a UAV chip according to one embodiment;
FIG. 5 is a block diagram of an unmanned aerial vehicle flight control processing device in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use, and processing of the related data are required to meet the related regulations.
In one embodiment, as shown in fig. 1, a method for processing unmanned aerial vehicle flight control is provided, and the method is applied to a terminal for illustration, and includes the following steps:
and step S101, performing bottom driving debugging on an operating system of the unmanned aerial vehicle chip to obtain a bottom driving program of the unmanned aerial vehicle chip.
The unmanned aerial vehicle chip mainly refers to a domestic unmanned aerial vehicle chip, such as a xiao Hua semiconductor HC32 chip, and of course, the unmanned aerial vehicle chip can also be a foreign unmanned aerial vehicle chip, such as an legal semiconductor chip STM32.
The operating system is an embedded operating system for providing drive development for unmanned aerial vehicle flight control; for example, the operating system may be a Chibios (an embedded operating system).
Specifically, the Chibios is a real-time operating system, and when the user layer code wants to operate the bottom peripheral of the unmanned aerial vehicle chip, a corresponding peripheral driver must be added. The terminal can debug the upper layer application program interface of each bottom layer driver of the operating system Chibios from the register, and finally, the bottom layer driver of the unmanned aerial vehicle chip is obtained after the completion of the debugging.
Step S102, screening out the to-be-processed driving files meeting the target file conditions from the driving files of the hardware abstraction layer of the unmanned aerial vehicle chip.
Wherein the hardware abstraction layer (Hardware Abstraction Layer, HAL) is an interface layer located between the operating system and the user layer for providing the user layer with an application program interface (Application Program Interface, API) for operating the hardware.
Fig. 2 is a layered structure diagram of a full stack of the unmanned aerial vehicle, wherein a preset flight control program is carried on an operating system, and a hardware abstraction layer is located in the preset flight control program. The preset flight control program may be ArduPilot (an open-source flight control program). Some of the drivers and APIs provided by the hardware abstraction layer in ArduPilot are available for the ArduPilot to run on the Chibios.
Specifically, when the user layer code of arduPilot wants to operate the bottom peripheral of the unmanned aerial vehicle chip, the code of the AP_HAL_Chibios can be called intensively to call the Chibios bottom code, however, the AP_HAL_Chibios of arduPilot only supports the STM32 chip and does not support the HC32 chip, so that a driving file in the AP_HAL_Chibios of arduPilot needs to be debugged. The terminal can screen the to-be-processed drive file needing to be modified from the drive files of the hardware abstraction layer according to the target file condition.
And step S103, driving and debugging the to-be-processed driving file to obtain a hardware abstraction layer driving program of the unmanned aerial vehicle chip.
Specifically, the terminal can drive and debug each to-be-processed driving file through collaborative development, and after the debugging is completed, the terminal obtains a hardware abstraction layer driving program of the unmanned aerial vehicle chip.
Step S104, obtaining a target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver.
Specifically, the bottom layer driver after debugging and the hardware abstraction layer driver can be compatible with the unmanned aerial vehicle chip, and when the user layer code of the unmanned aerial vehicle chip wants to operate the bottom layer peripheral equipment, the code of the AP_HAL_Chibios hardware abstraction layer can be called in a centralized way to call the Chibios bottom layer code, so that the target flight control program which can be simulated and operated on the unmanned aerial vehicle chip is obtained.
In the unmanned aerial vehicle flight control processing method, the bottom layer driving debugging is carried out on the operating system of the unmanned aerial vehicle chip, so that a bottom layer driving program of the unmanned aerial vehicle chip is obtained; screening a to-be-processed driving file meeting the target file condition from the driving file of the hardware abstraction layer of the unmanned aerial vehicle chip; performing drive debugging on the to-be-processed drive file to obtain a hardware abstraction layer drive program of the unmanned aerial vehicle chip; and obtaining a target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver. By adopting the method, the development of the flight control program of the unmanned aerial vehicle chip is realized by debugging the bottom layer driver of the operating system and driving and debugging the hardware abstraction layer, and the development effect of the peripheral driver of the unmanned aerial vehicle chip is improved.
In one embodiment, as shown in fig. 3, in step S101, the bottom layer driving debugging is performed on the operating system of the unmanned aerial vehicle chip to obtain a bottom layer driving program of the unmanned aerial vehicle chip, which specifically includes the following contents:
step S301, obtaining a bottom layer driving file of the unmanned aerial vehicle chip from the operating system.
Step S302, starting from the register, debugging the application program interface of the bottom drive file to obtain the bottom drive program of the unmanned aerial vehicle chip.
The bottom driving file is an interface for the operation system and the unmanned aerial vehicle chip to communicate, and is equivalent to an interface of hardware.
Specifically, the terminal first builds a minimal operating system of the HC32 based on the Chibios. After the minimum operating system is built, starting from the register, debugging the corresponding upper layer API in the bottom layer driving file, and finally obtaining the bottom layer driving program with the unmanned aerial vehicle chip being debugged.
In the embodiment, the bottom layer driver of the unmanned aerial vehicle chip is obtained by debugging the bottom layer driver of the operating system, so that the problem of matching of peripheral drivers of the unmanned aerial vehicle chip is solved.
In one embodiment, as shown in fig. 4, in step S102, a to-be-processed driving file satisfying the target file condition is screened from the driving files of the hardware abstraction layer of the unmanned aerial vehicle chip, which specifically includes the following contents:
in step S401, a configuration file with a file name of halconf.h is obtained from the configuration file of the hardware abstraction layer.
Step S402, screening out a drive file with a file format of cpp from the drive files of the hardware abstraction layer of the unmanned aerial vehicle chip according to the configuration file with the file name of halconf.h. In step S403, the driving file with the file format of cpp is set as the driving file to be processed.
Specifically, taking ArduPilot as an example, ap_hal_chip in ArduPilot belongs to a hardware abstraction layer. The terminal can inquire a configuration file named 'halconf h' from the configuration files contained in the AP_HAL_Chibios folder; and screening the to-be-processed drive files meeting the target file conditions from the drive files contained in the AP_HAL_Chibios file by declaring the peripheral corresponding to the unmanned aerial vehicle chip in the halonf.h file, for example, setting all the drive files with the format of 'cpp' in the AP_HAL_Chibios file as the to-be-processed drive files.
In the embodiment, the to-be-processed driving file to be debugged is screened out from the hardware abstraction layer, so that a foundation is laid for the code debugging of the abstraction layer in the subsequent step.
In one embodiment, as shown in fig. 4, step S103 is performed to drive and debug a to-be-processed driving file to obtain a hardware abstraction layer driver of the unmanned aerial vehicle chip, and specifically includes the following contents:
and step S404, debugging an application program interface of a driving file with a file format of cpp to obtain a hardware abstraction layer driving program of the unmanned aerial vehicle chip.
Specifically, the development can be assisted, the driving codes of the driving files with the formats of ". Cpp" are respectively modified, after a developer submits the debugged codes, the terminal obtains the debugged driving files, and the debugged driving files are used as abstract layer driving programs of the unmanned aerial vehicle chip.
In the embodiment, the driver of the abstract layer of the unmanned aerial vehicle chip is obtained by driving and debugging the to-be-processed driver file meeting the target file format in the hardware abstract layer, so that a foundation is laid for the subsequent step of acquiring the target flight control program, and the problem that ArduPilot and Chibios limit the type of the unmanned aerial vehicle chip is broken.
In one embodiment, the unmanned aerial vehicle flight control processing method further includes: constructing branch codes by the code program in the operating system or the hardware abstraction layer through a version management tool; the underlying driver or hardware abstraction layer driver submitted based on the branch code is obtained by a version management tool.
It can be understood that when the modification of the logic code of the to-be-processed driving file is involved, the current terminal can also send the to-be-processed driving file to the terminal device of the developer, so that a plurality of developers can cooperatively develop, the terminal receives the debugged code submitted by the terminal device of the developer, and the terminal obtains the modified file according to the debugged code.
Specifically, the terminal can construct branch codes of each to-be-processed driving file of ArduPilot through a version management tool (such as git); the developer drives and debugs the branch codes, and after the debugging is completed, the debugged codes are uploaded to the main branch of the version management tool; the terminal reads the debugged code from the main branch of the version management tool; and the terminal obtains an abstract layer driver according to the debugged codes of each to-be-processed driver file. Similarly, the branch codes of the bottom layer driving files of the Chibios can be established through a version management tool, so that the bottom layer driving files are cooperatively developed through a plurality of developers to obtain the debugged bottom layer driving files, and then the terminal obtains the bottom layer driving program.
In the embodiment, branch codes of a to-be-processed driving file and a bottom driving file are constructed; and then debugging codes submitted based on the branch codes; according to the debugged codes, an abstract layer driver and a bottom layer driver of the unmanned aerial vehicle chip are obtained, sharing and synchronization of files are realized by utilizing branch codes, a plurality of developers can assist in debugging, and the debugging efficiency of the driver of the unmanned aerial vehicle chip is improved.
In one embodiment, in step S104, after obtaining the target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver, the method further includes: the target flight control program is sent to a flight control board of the unmanned aerial vehicle chip so that the flight control board can simulate the target flight control program; obtaining a simulation test result returned by the flight control board based on the target flight control program; and updating the target flight control program according to the simulation test result to obtain the updated flight control program of the unmanned aerial vehicle chip.
The unmanned aerial vehicle chip is a core component of the flight control board and is used for achieving functions of flight control, navigation, communication and the like.
Specifically, the terminal may further send the processed target flight control program to the flight control board of the unmanned aerial vehicle chip HC32, so as to simulate the target flight control program on the flight control board of the unmanned aerial vehicle chip HC32 in real time online; the target flight control program can also be run on the flight control board of the unmanned aerial vehicle chip HC32, and the target flight control program is updated in the automatic flight setting, route planning and the like of the unmanned aerial vehicle; the terminal can also acquire a simulation test result of the target flight control program returned by the flight control board, and further debug the target flight control program based on the simulation test result to obtain an updated flight control program of the target flight control program.
In this embodiment, by sending the target flight control program to the flight control board of the unmanned aerial vehicle chip, the target flight control program can simulate, run and update functions on the flight control board of the unmanned aerial vehicle chip, thereby realizing the flight control application of the target flight control program on the unmanned aerial vehicle chip.
In one embodiment, in the step S101, the performing the bottom layer driving debugging on the operating system of the unmanned aerial vehicle chip to obtain the bottom layer driving program of the unmanned aerial vehicle chip further includes: establishing communication connection between the unmanned aerial vehicle chip and a development environment of an operating system; and deploying a minimum operating system of the unmanned aerial vehicle chip on the operating system through communication connection.
Specifically, a debugger of the unmanned aerial vehicle chip can be deployed in a development environment of an operating system; a server for deploying the debugger locally; and constructing communication connection between the unmanned aerial vehicle chip and a development environment of an operating system through the debugger and the server. After the communication connection is established, the terminal can configure a minimum operation system of a minimum unit of the unmanned aerial vehicle chip in the operation system; the minimum operating system at least comprises an interrupt vector table file, a timer file, a clock initialization file and the like. Furthermore, the terminal can debug the flight control program of the unmanned aerial vehicle chip through the minimum operating system, for example, threads and the like can be created in main functions (main functions), and then, for example, the functions of basic task scheduling, interrupt processing, peripheral drive debugging and the like are implemented.
The debugger is a microcontroller for debugging and programming the unmanned aerial vehicle chip; for example, the debugger may be a pyocd software package based on Python. The server of the debugger is a debugging tool, unlike a conventional computer server, for connecting the debugger to a target device (such as a terminal) to implement debugging and control of the target device, so that a developer can run and debug an unmanned aerial vehicle chip connected with the terminal through the terminal.
The hardware configuration files comprise configuration files such as an interrupt vector table file, a timer file, a clock initialization file and the like of the unmanned aerial vehicle chip. The interrupt vector table file is used for providing an entry address for an interrupt program; the timer file is used for providing a time reference; the clock initialization file is used for configuring a clock source of the peripheral driver.
In practical application, because the current operation system has a limitation on the type of the unmanned aerial vehicle chip, and does not support communication with some unmanned aerial vehicle chips (such as xiao Hua semiconductor HC 32), if the unmanned aerial vehicle chip is to be used as a main chip for unmanned aerial vehicle flight control, peripheral drivers of the unmanned aerial vehicle chip need to be rewritten, but cannot be debugged on the basis of the existing peripheral drivers, so that the limitations of research and development and use of the unmanned aerial vehicle chip in unmanned aerial vehicle flight control are large. Therefore, the application starts from the development environment of the operating system, uses the debugger compatible with the development environment of the operating system as a communication medium, can be respectively configured with the debugger or the associated equipment of the debugger in the development environment and the local area of the terminal, and can further realize the communication connection between the unmanned aerial vehicle chip and the development environment of the operating system through the debugger and the associated equipment.
Specifically, the development environment of the Chibios is eclipse, however eclipse only supports emulation tools of openend (an open-source on-chip debug software) and does not support communication with the unmanned aerial vehicle chip (such as HC 32). The terminal may first install the gdb server of pyocd (a debug server) locally, then install the plug-in of pyocd in eclipse, and deploy the simulation environment of HC23 in eclipse; furthermore, the terminal can perform communication connection between eclipse and HC23 through pyocd, and the terminal can also view information such as variables of a preset flight control program, values of registers and the like through eclipse in real time.
In this embodiment, the debugger of the unmanned aerial vehicle chip is deployed in the development environment of the operating system, and the server of the debugger is deployed locally, so that the communication connection between the unmanned aerial vehicle chip and the development environment of the operating system can be realized through the debugger and the server, a foundation is laid for the subsequent peripheral drive for debugging the unmanned aerial vehicle chip in the operating system, the limitation of the unmanned aerial vehicle operation chip on the unmanned aerial vehicle chip is broken, and the development efficiency of unmanned aerial vehicle flight control is improved.
In order to more clearly illustrate the unmanned aerial vehicle flight control processing method provided by the embodiment of the present disclosure, a specific embodiment is used to specifically describe the unmanned aerial vehicle flight control processing method. The other unmanned aerial vehicle flight control processing method can be applied to the terminal and specifically comprises the following steps:
step 1: and (3) building an HC32 simulation environment.
Specifically, the terminal locally installs the gdb server of the debugger pyocd, the development environment of the operating system Chibios is eclipse, a client plug-in of the debugger pyocd can also be installed in eclipse, and the simulation environment of the unmanned aerial vehicle chip HC32 is configured in ChibiOS, so that the terminal can realize the communication connection between the unmanned aerial vehicle chip HC32 and eclipse through pyocd, and can debug the preset flight control program ArduPilot of HC32 through the communication connection.
Step 2: the bottom level driver development of the Chibios.
Specifically, through communication connection, files such as an interrupt vector table, a system timer, clock initialization and the like of the HC32 are obtained, and then the files of the HC32 are added to the Chibios to obtain a minimum operating system of the HC 32. After the minimum operating system is built, each peripheral driver of the Chibios needs to be written, and each driver starts from a register and needs to debug each corresponding upper-layer API interface.
Step 3: the abstract layer code of ap_hal_chiros is debugged.
Specifically, the ap_hal_chibios belongs to the HAL layer, and all the cpp files of the ap_hal_chibios folder need to be modified again, focusing on declaring the corresponding peripheral in the halconf.h file.
Step 4: multiple persons assist in development.
Specifically, since the writing of the Chibios bottom layer driver and the AP_HAL_Chibios layer driver belong to large engineering, the workload is large, and thus assistance of multiple persons is needed, and each person is responsible for respective driver development. Code sharing and synchronization can be realized through a version management tool git, namely a new branch code is newly established for each driving code, and the driving codes are debugged and modified and then submitted to a main branch, so that each developer can share the modified driving codes.
In the embodiment, the development of the flight control program of the unmanned aerial vehicle chip is realized by debugging the bottom layer driver of the operating system and driving and debugging the hardware abstraction layer, so that the application bottleneck of the domestic chip in the flight control of the unmanned aerial vehicle is solved, and the development effect of the peripheral driver of the unmanned aerial vehicle chip is improved.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an unmanned aerial vehicle flight control processing device for realizing the unmanned aerial vehicle flight control processing method. The implementation scheme of the solution to the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitation in the embodiments of one or more unmanned aerial vehicle flight control processing devices provided below may refer to the limitation of the unmanned aerial vehicle flight control processing method hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 5, there is provided a unmanned aerial vehicle flight control processing device 500, including: the device comprises a bottom layer driving debugging module 501, a driving file screening module 502, an abstract layer debugging module 503 and a flight control program acquisition module 504, wherein:
the bottom driving debugging module 501 is configured to perform bottom driving debugging on an operating system of the unmanned aerial vehicle chip, so as to obtain a bottom driving program of the unmanned aerial vehicle chip.
The driver file screening module 502 is configured to screen a to-be-processed driver file that meets a target file condition from driver files of a hardware abstraction layer of the unmanned aerial vehicle chip.
The abstract layer debugging module 503 is configured to perform driving debugging on the to-be-processed driving file, so as to obtain a hardware abstract layer driver of the unmanned aerial vehicle chip.
And the flight control program acquisition module 504 is configured to obtain a target flight control program of the unmanned aerial vehicle chip according to the bottom driver and the hardware abstraction layer driver.
In one embodiment, the bottom layer driver debug module 501 is further configured to obtain a bottom layer driver file of the unmanned aerial vehicle chip from the operating system; and starting from the register, debugging an application program interface of the bottom driving file to obtain a bottom driving program of the unmanned aerial vehicle chip.
In one embodiment, the driver file filtering module 502 is further configured to obtain a configuration file with a file name of halcon f.h from the configuration files of the hardware abstraction layer; screening a driving file with a file format of cpp from the driving file of the hardware abstraction layer of the unmanned aerial vehicle chip according to the configuration file with the file name of halcon f.h; and setting the drive file with the file format of cpp as a drive file to be processed.
In one embodiment, the unmanned aerial vehicle flight control processing device 500 further includes an abstract layer driver debugging module, configured to debug an application program interface of a driving file with a file format of cpp, to obtain a hardware abstract layer driver of the unmanned aerial vehicle chip.
In one embodiment, the unmanned aerial vehicle flight control processing device 500 further includes a driver assistance development module for building branch codes from the code program in the operating system or the hardware abstraction layer by the version management tool; the underlying driver or hardware abstraction layer driver submitted based on the branch code is obtained by a version management tool.
In one embodiment, the unmanned aerial vehicle flight control processing device 500 further includes a flight control program simulation module, configured to send the target flight control program to a flight control board of the unmanned aerial vehicle chip, so that the flight control board performs simulation processing on the target flight control program; obtaining a simulation test result returned by the flight control board based on the target flight control program; and updating the target flight control program according to the simulation test result to obtain the updated flight control program of the unmanned aerial vehicle chip.
In one embodiment, the unmanned aerial vehicle flight control processing device 500 further includes a chip communication connection module for establishing a communication connection between the unmanned aerial vehicle chip and a development environment of an operating system; and deploying a minimum operating system of the unmanned aerial vehicle chip on the operating system through communication connection.
All or part of the modules in the unmanned aerial vehicle flight control processing device can be realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a drone, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program, when executed by the processor, implements a method of unmanned aerial vehicle flight control processing.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is also provided a unmanned aerial vehicle, including a memory and a processor, the memory storing a computer program, the processor implementing the steps of the method embodiments described above when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as Static Random access memory (Static Random access memory AccessMemory, SRAM) or dynamic Random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method for unmanned aerial vehicle flight control processing, the method comprising:
performing bottom driving debugging on an operating system of the unmanned aerial vehicle chip to obtain a bottom driving program of the unmanned aerial vehicle chip;
screening a to-be-processed driving file meeting the target file condition from the driving file of the hardware abstraction layer of the unmanned aerial vehicle chip;
performing drive debugging on the to-be-processed drive file to obtain a hardware abstraction layer drive program of the unmanned aerial vehicle chip;
and obtaining the target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver.
2. The method of claim 1, wherein the performing the bottom layer driver debug on the operating system of the unmanned aerial vehicle chip to obtain the bottom layer driver of the unmanned aerial vehicle chip comprises:
acquiring a bottom driving file of the unmanned aerial vehicle chip from the operating system;
and starting from the register, debugging the application program interface of the bottom drive file to obtain the bottom drive program of the unmanned aerial vehicle chip.
3. The method according to claim 1, wherein the screening the to-be-processed driver files satisfying the target file condition from the driver files of the hardware abstraction layer of the unmanned aerial vehicle chip includes:
acquiring a configuration file with a file name of halcon f.h from the configuration file of the hardware abstraction layer;
screening a drive file with a file format of cpp from the drive file of the hardware abstraction layer of the unmanned aerial vehicle chip according to the configuration file with the file name of halcon f.h;
and setting the driving file with the file format of cpp as the driving file to be processed.
4. The method of claim 3, wherein the performing the drive debugging on the to-be-processed drive file to obtain the hardware abstraction layer driver of the unmanned aerial vehicle chip comprises:
and debugging an application program interface of the driving file with the file format of cpp to obtain a hardware abstraction layer driving program of the unmanned aerial vehicle chip.
5. The method according to claim 1, wherein the method further comprises:
constructing branch codes by a version management tool from the operating system or the code program in the hardware abstraction layer;
and acquiring a bottom-layer driver or a hardware abstraction layer driver submitted based on the branch codes through the version management tool.
6. The method of claim 1, further comprising, after obtaining the target flight control program of the unmanned aerial vehicle chip from the underlying driver and the hardware abstraction layer driver:
the target flight control program is sent to a flight control board of the unmanned aerial vehicle chip so that the flight control board can simulate the target flight control program;
obtaining a simulation test result returned by the flight control board based on the target flight control program;
and updating the target flight control program according to the simulation test result to obtain the updated flight control program of the unmanned aerial vehicle chip.
7. The method of claim 1, further comprising, prior to performing the bottom level driver debugging on the operating system of the unmanned aerial vehicle chip to obtain the bottom level driver of the unmanned aerial vehicle chip:
establishing communication connection between the unmanned aerial vehicle chip and a development environment of the operating system;
and deploying a minimum operating system of the unmanned aerial vehicle chip on the operating system through the communication connection.
8. An unmanned aerial vehicle flight control processing apparatus, the apparatus comprising:
the bottom layer driving debugging module is used for performing bottom layer driving debugging on the operating system of the unmanned aerial vehicle chip to obtain a bottom layer driving program of the unmanned aerial vehicle chip;
the driving file screening module is used for screening the driving files to be processed meeting the target file conditions from the driving files of the hardware abstraction layer of the unmanned aerial vehicle chip;
the abstract layer debugging module is used for driving and debugging the to-be-processed driving file to obtain a hardware abstract layer driving program of the unmanned aerial vehicle chip;
and the flight control program acquisition module is used for acquiring a target flight control program of the unmanned aerial vehicle chip according to the bottom layer driver and the hardware abstraction layer driver.
9. A drone comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program implements the steps of the method of any one of claims 1 to 7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202311775772.8A 2023-12-22 2023-12-22 Unmanned aerial vehicle flight control processing method and device, unmanned aerial vehicle and storage medium Pending CN117453621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311775772.8A CN117453621A (en) 2023-12-22 2023-12-22 Unmanned aerial vehicle flight control processing method and device, unmanned aerial vehicle and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311775772.8A CN117453621A (en) 2023-12-22 2023-12-22 Unmanned aerial vehicle flight control processing method and device, unmanned aerial vehicle and storage medium

Publications (1)

Publication Number Publication Date
CN117453621A true CN117453621A (en) 2024-01-26

Family

ID=89591508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311775772.8A Pending CN117453621A (en) 2023-12-22 2023-12-22 Unmanned aerial vehicle flight control processing method and device, unmanned aerial vehicle and storage medium

Country Status (1)

Country Link
CN (1) CN117453621A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113253640A (en) * 2021-04-25 2021-08-13 湖南航天机电设备与特种材料研究所 Flight control computer and general hardware abstraction layer thereof
CN113946370A (en) * 2020-07-16 2022-01-18 Oppo广东移动通信有限公司 Drive system, information processing method, device, and storage medium
CN115469570A (en) * 2022-07-18 2022-12-13 中国空气动力研究与发展中心空天技术研究所 Airplane flight control management system, method, medium, equipment and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113946370A (en) * 2020-07-16 2022-01-18 Oppo广东移动通信有限公司 Drive system, information processing method, device, and storage medium
CN113253640A (en) * 2021-04-25 2021-08-13 湖南航天机电设备与特种材料研究所 Flight control computer and general hardware abstraction layer thereof
CN115469570A (en) * 2022-07-18 2022-12-13 中国空气动力研究与发展中心空天技术研究所 Airplane flight control management system, method, medium, equipment and terminal

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CHOATE1992: "eclipse+armgcc+pyocd(CMSIS-DAP)进行嵌入式MCU Debug", pages 1 - 2, Retrieved from the Internet <URL:《https://blog.csdn.net/choate1992/article/details/102991107》> *
万国春 等: "《系统芯片(SOC)设计方法与实践》", 31 December 2016, 上海:同济大学出版社, pages: 287 - 288 *
郭荣佐 等: "《嵌入式系统原理》", 31 October 2008, 北京:北京航空航天大学出版社, pages: 368 - 372 *

Similar Documents

Publication Publication Date Title
CN113312879B (en) Chip circuit function verification system, method, device and storage medium
US9710233B2 (en) Application model for implementing composite applications
KR102368200B1 (en) Selection of code modules for device design
CN111984269B (en) Method for providing application construction service and application construction platform
CN109933348A (en) The update method and device of Bootloader in a kind of electronic control unit
CN114253657A (en) Orchestrator execution plan using distributed ledgers
WO2015019074A1 (en) Automated application test system
US11568232B2 (en) Deep learning FPGA converter
CN111984270A (en) Application deployment method and system
CN110119282A (en) A kind of internet-of-things terminal and system based on general-purpose built-in type computer
CN117453621A (en) Unmanned aerial vehicle flight control processing method and device, unmanned aerial vehicle and storage medium
US20110246158A1 (en) Method for simulating a complex system with construction of at least one model including at least one modelled router, corresponding computer software package and storage means
CN110908644A (en) Configuration method and device of state node, computer equipment and storage medium
CN114692056A (en) Target page generation method and device, computer equipment and storage medium
CN115829229A (en) Production process verification method and device of business product and computer equipment
CN105227608A (en) For developing the method and apparatus enriching internet, applications
JPWO2011055417A1 (en) Software library reconstruction apparatus and method, and navigation apparatus using the same
CN108334313A (en) Continuous integrating method, apparatus and code management system for large-scale SOC research and development
CN111158645B (en) System and method for providing an integrated development environment
CN114756293A (en) Service processing method, device, computer equipment and storage medium
CN115136120A (en) Database synchronization test method and device, computer equipment and storage medium
Padmanabhan Test path identification for internet of things using transaction based specification
KR101726663B1 (en) Method and System for automated I/O-port linking framework between the models using the concept of cloud or cloud-computing in Model Based Design under the block diagram environment
CN116627496B (en) UVM-based register model construction and verification method, system and electronic equipment
CN111061460B (en) Universal software development platform based on embedded system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination