A high-precision path planning method based on GPS and gyroscope and application thereof
By combining GPS and gyroscope high-precision path planning methods, and utilizing PID control and multi-sensor fusion technology, the problem of unstable positioning and path planning for logistics vehicles in complex environments has been solved, achieving efficient and stable navigation and path planning.
Patent Information
- Application Number
- CN202510006590.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-01-03
AI Technical Summary
Existing logistics automation systems face problems such as unstable positioning, insufficient accuracy, slow system response, and insufficient energy efficiency in complex environments. In particular, they struggle to achieve high-precision path planning and adapt to dynamic environmental changes when GPS signals are weak or obstructed.
Combine GPS and gyroscope to calculate direction angle and distance, use PID control to correct yaw angle error, dynamically adjust motor speed, combine multi-sensor fusion technology and dynamic braking curve function to optimize the path planning process.
It improves the navigation accuracy and stability of intelligent logistics vehicles in complex environments, enhances the system's adaptability and fault tolerance, and ensures smooth driving and reliable path planning.
Smart Images

Figure CN119555066B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent logistics, and particularly relates to a high-precision path planning method based on GPS and a gyroscope and application. BACKGROUND
[0002] Under the new era background, the logistics industry plays an important role in modern society, and the demand for intelligent management and service mode is increasing. With the promotion of economic globalization, the maturity of emerging technologies such as the Internet of Things, artificial intelligence, and big data, intelligent logistics has rapidly developed and become the only way for the transformation of the logistics industry. Compared with traditional logistics, intelligent logistics has shown great advantages in reducing costs, improving efficiency, and expanding services. Under this background, intelligent logistics vehicles have emerged as the times require and have become a key tool for improving logistics efficiency, reducing operating costs, and enhancing transportation safety. In particular, embedded intelligent logistics vehicles play an important role in express delivery, autonomous driving, intelligent navigation, obstacle avoidance, and other aspects, and have technical characteristics such as real-time data processing and information control, greatly promoting the innovation and development of the logistics industry.
[0003] However, the existing background technology has some limitations. Existing logistics automation systems rely heavily on basic sensor technology and may face problems such as insufficient precision, unstable positioning, and system response lag in complex environments. Existing intelligent vehicle navigation systems may not be able to cope with high-precision path planning and dynamic environmental changes, especially in weak or blocked GPS signal conditions, where positioning accuracy is affected. In addition, the system may face problems such as insufficient energy efficiency and low system fault tolerance during long-term operation, which limit its application and popularization in a wider range of scenarios. SUMMARY
[0004] In order to improve the success rate of logistics task distribution in intelligent logistics, the present application proposes a high-precision path planning method based on GPS and a gyroscope, which solves the problem of path planning and positioning accuracy of intelligent logistics vehicles in complex environments, calculates the direction angle and distance by combining GPS and a gyroscope, and uses PID control to correct the yaw angle error. At the same time, dynamically adjust the motor speed, update the path in real time, improve the driving stability and accuracy of the vehicle, enhance the adaptability and fault tolerance of the system, and promote the efficient application of intelligent logistics.
[0005] To achieve the above-mentioned purposes, the present application provides the following technical solutions:
[0006] The present application provides a high-precision path planning method based on GPS and a gyroscope, comprising the following steps:
[0007] S1, path data collection and storage: start the intelligent car and turn on the GPS module, collect the latitude and longitude coordinate information of the current position, and store the path data in the ring buffer to the Flash memory of the single-chip microcomputer;
[0008] S2, gyroscope initialization and yaw angle calculation: initialize the gyroscope hardware and calibrate the zero drift, set the initial value of the yaw angle to the north direction, real-time obtain the yaw angle data of the gyroscope, combine the current coordinates and target point coordinates provided by the GPS, calculate the target direction angle and distance;
[0009] S3, navigation control and yaw angle error correction: compare the current yaw angle with the target direction angle, calculate the error between them, and dynamically adjust the proportional, integral and differential parameters of the PID controller according to the path complexity and vehicle speed, control the rudder to adjust the vehicle body orientation to make the yaw angle gradually approach the target direction angle, and ensure that the car drives towards the target direction;
[0010] S4, motor speed optimization and dynamic braking: based on the distance between the current position and the target point, adjust the motor speed through the dynamic braking curve function to ensure smooth driving, and gradually slow down when approaching the target point;
[0011] S5, target point distance judgment and path update: use multi-sensor fusion technology, combine GPS and ultrasonic sensor to measure the distance between the current position and the target point in real time, and judge whether the target point is reached; if not, refresh the GPS coordinates and repeat steps S2-S5 until the target point is reached; if the target point is reached, execute step S6;
[0012] S6, end judgment and stop running: judge whether the last target point is reached; if reached, stop running the car; if not, switch to the next target point and continue to refresh the GPS coordinates and repeat steps S2-S5.
[0013] As a further scheme of the application, the specific method steps of step S1 are:
[0014] S11, start the intelligent car and turn on the GPS module, receive the latitude and longitude information collected by the GPS module through the serial port, and display the collected GPS coordinate information on the screen in real time;
[0015] S12, the user controls the collection and stop of the GPS coordinates through the key, and the key triggers the saved GPS path information to be saved in the Flash storage of the single-chip microcomputer;
[0016] S13, in the path planning process, the saved GPS path data is exported from the Flash storage and loaded into the target path array for subsequent navigation.
[0017] As a further scheme of the present application, in the step S2, the target direction angle and distance are calculated by combining the current coordinates provided by the GPS with the target point coordinates, and through a direction angle calculation formula and a Haversine formula respectively.
[0018] As a further scheme of the present application, in the step S3, when dynamically adjusting the proportional, integral and differential parameters of the PID controller, the following formula is used:
[0019] K p =K p0 +α·|Δθ|, K i =K i0 +β·V, K d =K d0 +γ·|Δθ′|, where K p0 , K i0 ,
[0020] K d0 is the initial parameter, Δθ is the yaw angle error, V is the current speed, Δθ' is the change rate of the yaw angle error, and α, β, γ are adaptive adjustment coefficients.
[0021] As a further scheme of the present application, in the step S4, the dynamic braking curve function uses a quadratic Bezier curve, and the change of the motor speed is described by the following function:
[0022] v(t)=(1-t) 2 ·v0+2t(1-t)·v m +t 2 ·v f , t∈[0,1];
[0023] where v0 is the initial speed, v m is the intermediate speed, v f is the final speed of the target point, and t is a normalized time parameter; the dynamic braking adjusts the motor speed in real time through a 20 ms timer to ensure smooth driving and gradually slow down when approaching the target point.
[0024] As a further scheme of the present application, the specific steps of the step S5 are as follows:
[0025] S51, real-time acquisition of GPS and ultrasonic sensor data, calculation of the fusion distance between the current position and the target point;
[0026] S52, judgment of whether the distance between the current position and the target point exceeds 1.5 times of the maximum accuracy of the set threshold, if less than 1.5 times of the threshold, it is considered that the target point has been reached and the step S6 is executed;
[0027] S53, if the fusion distance is greater than 1.5 times of the set threshold value, it is considered that the target point is not reached, then the GPS coordinates are refreshed and steps S2-S4 are repeated until the distance to the target point is within the allowable error range, and it is considered that the target point is reached.
[0028] As a further scheme of the application, the yaw angle calculation involved in the steps S1-S6 is calculated by using a nine-axis sensor and a gradient descent-based attitude calculation algorithm to calculate the yaw angle of the Euler angle, and the algorithm flow of the attitude calculation is as follows:
[0029] T1, gyro hardware initialization and zero drift calibration: initialize the gyro hardware and clear the zero drift error, and ensure the accuracy of the starting data;
[0030] T2, start the timer and collect data: start a 5ms timer, trigger an interrupt periodically, and collect raw physical quantity data using a nine-axis sensor, including acceleration, angular velocity, and magnetic force;
[0031] T3, sensor data preprocessing: first-order low-pass filter for three-axis acceleration data, and convert three-axis gyroscope data to radian;
[0032] T4, unitization processing and error correction: unitize the acceleration and magnetometer data to ensure that the vector amplitude is 1, and make the X-axis of the navigation coordinate system point to the north, calculate and correct the error using the gradient descent method, compensate the calculation error vector, update the quaternion, and improve the attitude calculation accuracy;
[0033] T5, quaternion update and Euler angle calculation: update the quaternion according to the corrected sensor data, convert the quaternion to Euler angle, and extract the yaw angle as the navigation direction reference;
[0034] T6, high-pass filter for Euler angle: high-pass filter for Euler angle to remove low-frequency noise and ensure the accuracy and stability of the attitude angle.
[0035] As a further scheme of the application, it is applied to path planning and navigation control in intelligent logistics trolley, automatic driving system, robot navigation system, unmanned aerial vehicle navigation and intelligent warehousing system.
[0036] Compared with the prior art, the application has the beneficial technical effects:
[0037] 1. The application accurately calculates the target direction angle and yaw angle by combining the data fusion technology of GPS and gyroscope, effectively avoids path deviation and error, and ensures the stable driving of the intelligent trolley or robot in complex environment;
[0038] 2. Dynamically adjust the motor speed based on the distance between the target point and the current position, automatically slow down when approaching the target point, which not only improves the running efficiency, but also prevents collision or deviation caused by excessive speed, ensuring smooth driving;
[0039] 3. Set up an accurate judgment mechanism for the distance of the target point, combined with reasonable threshold setting, to ensure that the system will not misjudge or stop too early before reaching the target point, avoid wasting time or missing the target, and improve the reliability of path planning;
[0040] 4. Use the nine-axis sensor and the gradient descent-based attitude solving algorithm to reduce the gyroscope zero drift error, improve the accuracy of the yaw angle calculation, and enhance the anti-interference ability and stability of the system;
[0041] 5. Dynamically adjust the PID control parameters and combine the dynamic braking method of the cubic Bezier curve to optimize the path planning process and ensure smooth driving, providing an efficient and intelligent control solution for intelligent logistics carts, autonomous driving systems, and robots. BRIEF DESCRIPTION OF DRAWINGS
[0042] Fig. 1 The flowchart of the path planning method of the present application;
[0043] Fig. 2 The flowchart of the gyroscope attitude settlement of the present application;
[0044] Fig. 3 The schematic diagram of determining the navigation direction by the direction angle and the yaw angle of the present application;
[0045] Fig. 4 The man-machine interaction main interface diagram of the present application. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the implementation content of the present application, rather than all. Based on the implementation content in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0047] Embodiment one:
[0048] Please refer to Figs. 1-4 In the embodiments of the present application, a high-precision path planning method based on GPS and gyroscope is provided, including the following steps:
[0049] S1, path data acquisition and storage: start the intelligent cart and turn on the GPS module, collect the latitude and longitude coordinate information of the current position, and store the path data in the Flash memory of the single-chip microcomputer through the ring buffer;
[0050] S2, gyro initialization and yaw angle calculation: initialize the gyro hardware and calibrate the zero drift, set the initial value of the yaw angle to the north direction, obtain the gyro yaw angle data in real time, combine the current coordinates provided by the GPS with the target point coordinates, calculate the target direction angle and distance;
[0051] S3, navigation control and yaw angle error correction: compare the current yaw angle with the target direction angle, calculate the error between them (yaw angle error = current yaw angle - target direction angle), and dynamically adjust the proportional, integral and derivative parameters of the PID controller according to the path complexity and vehicle speed, control the rudder to adjust the vehicle orientation to make the yaw angle gradually approach the target direction angle, and ensure that the vehicle travels towards the target direction;
[0052] S4, motor dynamic speed regulation: based on the distance between the current position and the target point, adjust the motor speed through a dynamic braking curve function to ensure smooth travel, and gradually slow down when approaching the target point;
[0053] S5, target point distance judgment and path update: use multi-sensor fusion technology to combine GPS and ultrasonic sensors to measure the distance between the current position and the target point in real time, and determine whether the target point has been reached; if not, refresh the GPS coordinates and repeat steps S2-S5 until the target point is reached; if the target point is reached, execute step S6;
[0054] S6, end judgment and stop running: judge whether the last target point has been reached; if so, stop running the vehicle; if not, switch to the next target point and continue refreshing the GPS coordinates and repeating steps S2-S5.
[0055] This path planning method integrates GPS and gyro technology, PID control, dynamic motor speed regulation and accurate target point judgment, which can effectively improve the navigation ability of the intelligent vehicle in complex environment and ensure its stable travel. Its main advantage is that it can rely on the gyro to correct the yaw angle and improve the navigation accuracy in the case of unstable GPS signal, and through the PID control system to optimize the travel direction and the motor speed regulation technology to ensure smooth operation.
[0056] Specifically, the specific method steps of step S1 are:
[0057] S11, start the intelligent vehicle and turn on the GPS module, receive the latitude and longitude information collected by the GPS module through the serial port, and display the real-time GPS coordinates on the screen. This step ensures real-time acquisition and monitoring of the coordinates of the current position, providing basic data for subsequent navigation.
[0058] S12, the user controls the collection and stop of GPS coordinates through the key, and the key triggers the saving of the collected GPS path information to the Flash storage of the single-chip microcomputer; this step allows the user to manually control the collection and storage of data for subsequent path planning.
[0059] S13, in the path planning process, the saved GPS path data is exported from the Flash storage and loaded into the target path array for subsequent navigation. This step ensures that the path data can be accessed and applied in real time during navigation, providing continuous navigation support for the intelligent car.
[0060] Specifically, in step S2, the target direction angle and distance are calculated according to the current coordinates and target point coordinates provided by the GPS, which are calculated by using the direction angle calculation formula and the Haversine formula respectively.
[0061] Calculate the direction angle (azimuth angle or initial azimuth angle) between two latitude and longitude coordinates:
[0062] Given two latitude and longitude points A (LatA, LonA) and B (LatB, LonB), calculate the direction angle θ from A to B deg The steps are as follows:
[0063] Step 1: Convert latitude and longitude to radians:
[0064] LatA_rad = LatA·(π / 180), LonA_rad = LonA·(π / 180);
[0065] LatB_rad = LatB·(π / 180), LonB_rad = LonB·(π / 180);
[0066] Step 2: Calculate the direction angle θ (radians):
[0067] ΔLon = LonB_rad - LonA_rad is the difference in longitude;
[0068] θ = atan2(sin(ΔLon)·cos(LatB_rad), cos(LatA_rad)·sin(LatB_rad)
[0069] -sin(LatA_rad)·cos(LatB_rad)·cos(ΔLon));
[0070] Step 3: Convert the direction angle to degrees: θ deg = θ·(180 / π);
[0071] Step ④ Ensure the direction angle is within the range of 0° to 360°: If the calculated direction angle is less than 0, add 360° to ensure it is between 0° and 360°
[0072] Calculate the distance between the two latitude and longitude coordinates: Usually use the Haversine formula, the following are the detailed steps of the Haversine formula:
[0073] Step ① Convert degrees to radians: Convert latitude and longitude to radians, radians = degrees × (π / 180);
[0074] Step ② Calculate the distance using the Haversine formula: Let A point coordinates (lat1, lon1), B point coordinates (lat2, lon2), and the two coordinates have been converted to radians:
[0075]
[0076] Where R is the average radius of the earth (about 6371 kilometers), arcsin is the inverse sine function, sin2 and cos 2 Indicate the square of the sine and cosine, respectively.
[0077] Specifically, in step S3, the proportional, integral and derivative parameters of the dynamic PID controller are adjusted according to the following formula: K p = K p0 + α·|Δθ|, K i = K i0 + β·V, K d = K d0 + γ·|Δθ'|, where K p0 , K i0 , K d0 are initial parameters, Δθ is the yaw angle error, V is the current speed, Δθ' is the change rate of the yaw angle error, and α, β, γ are adaptive adjustment coefficients. The parameters of the PID controller are dynamically adjusted according to the actual situation of the system to better adapt to the current environment and system state, improve control accuracy, and ensure smooth travel of the car along the target direction.
[0078] In order to ensure that the intelligent car travels towards the correct target direction, in addition to controlling the rudder to change direction to make the yaw angle approach the target direction angle, a 5ms timer is also enabled to update the yaw angle error in real time. This not only ensures the system's rapid response to the yaw angle error, but also improves the stability and accuracy of the car, ensuring its reliable travel in complex environments.
[0079] Specifically, the dynamic braking curve function in step S4 uses a quadratic Bezier curve, and the change of motor speed is described by the following function:
[0080] v(t) = (1 - t) 2 ·v0+2t(1-t)·v m +t 2 ·v f , t ∈ [0, 1];
[0081] where v0 is the initial speed, vm is the intermediate speed, vf is the final speed of the target point, and t is the normalized time parameter; dynamic braking adjusts the motor speed in real time through a 20 ms timer to ensure smooth travel and gradually slow down when approaching the target point.
[0082] Specifically, the specific steps of step S5 are:
[0083] S51, real-time acquisition of GPS and ultrasonic sensor data, calculation of the fusion distance between the current position and the target point; the purpose of this step is to combine the data of GPS and ultrasonic sensor to calculate the distance between the current intelligent car or robot and the target point. The coordinate information provided by GPS can provide rough positioning, while the ultrasonic sensor is used to accurately measure the distance.
[0084] Through data fusion technology, combining the advantages of the two sensors, the positioning accuracy can be improved, and the errors caused by a single sensor can be reduced, so that a more accurate target point distance can be obtained.
[0085] S52, judge whether the distance between the current position and the target point exceeds 1.5 times the maximum accuracy of the set threshold value, set a threshold value, which is usually based on the maximum error value of GPS positioning accuracy or ultrasonic ranging accuracy.
[0086] By taking 1.5 times the maximum accuracy of the threshold value as the judgment standard, it can prevent misjudgment caused by too large sensor error. This setting means that if the distance between the current position and the target point is within the threshold range, it can be considered that the target point has been approached, and the subsequent stop or switching target point operation can be performed.
[0087] S53, if the fusion distance is greater than 1.5 times the set threshold value, it is considered that the target point has not been reached, and the GPS coordinates are refreshed and steps S2-S4 are repeated,
[0088] If the fused distance exceeds the set range, it is considered that the target point has not been reached. At this time, the system will continue to obtain updated GPS coordinate information, re-calculate the direction angle and plan the path (by repeating steps S2-S4), until the target point distance is within the allowable error range, and finally enter step S6.
[0089] This mechanism ensures that the car can continue to adjust the path and direction, avoiding premature stop or missing the target point, thereby improving the accuracy of path planning.
[0090] Specifically, the yaw angle calculation involved in steps S1-S6 calculates the yaw angle of the Euler angle by using the nine-axis sensor and the gradient descent-based attitude calculation algorithm, and the algorithm flow of the attitude calculation is as follows:
[0091] T1, gyro hardware initialization and zero drift calibration: initialize the gyro hardware and eliminate the zero drift error, ensure the accuracy of the starting data;
[0092] T2, start timer and data acquisition: start a 5ms timer, trigger an interrupt periodically, and use the nine-axis sensor to collect raw physical quantity data, including acceleration, angular velocity and magnetic force;
[0093] T3, sensor data preprocessing: first-order low-pass filter is performed on three-axis acceleration data, and three-axis gyroscope data is converted to radian system;
[0094] T4, unitization processing and error correction: unitize the acceleration and magnetometer data to ensure that the vector amplitude is 1, and make the X-axis of the navigation coordinate system point to the north, use the gradient descent method to calculate and correct the error, compensate the calculation error vector, update the quaternion, and improve the attitude calculation accuracy;
[0095] T5, quaternion update and Euler angle calculation: update the quaternion according to the corrected sensor data, convert the quaternion to Euler angle, and extract the yaw angle as the navigation direction reference;
[0096] T6, high-pass filtering of Euler angle: high-pass filter is performed on the Euler angle to remove low-frequency noise and ensure the accuracy and stability of the attitude angle.
[0097] Embodiment two:
[0098] The application of the high-precision path planning method based on GPS and gyroscope provided by the embodiment of the application is applied to path planning and navigation control in intelligent logistics trolley, automatic driving system, robot navigation system, unmanned aerial vehicle navigation and intelligent warehousing system. By combining GPS positioning technology and gyroscope attitude sensing, accurate navigation and path planning can be realized in complex environment, ensuring the stability and efficiency of the equipment. Especially in intelligent logistics trolley, this method can effectively improve the accuracy of end delivery and transportation efficiency, and in automatic driving and robot navigation, it can also ensure that the system continuously optimizes the path in dynamic environment and quickly responds to environmental changes, improving the safety and intelligent level of the overall system.
[0099] Although the embodiments of the application have been shown and described, it can be understood by those of ordinary skill in the art that various changes, modifications, replacements and variations can be made to these embodiments without departing from the principles and spirits of the application, and the scope of the application is defined by the appended claims and their equivalents.
Claims
1. A high-precision path planning method based on GPS and gyroscope, characterized in that: The steps include: S1. Path data collection and storage: Start the smart car and turn on the GPS module to collect the latitude and longitude coordinates of the current location, and store the path data in the Flash memory of the microcontroller through the ring buffer; S2. Gyroscope initialization and yaw angle calculation: Initialize the gyroscope hardware and calibrate the zero drift. Set the initial yaw angle to due north. Obtain gyroscope yaw angle data in real time. Combine the current coordinates provided by GPS with the target point coordinates to calculate the target direction angle and distance. S3, Navigation Control and Yaw Angle Error Correction: Compare the current yaw angle with the target heading angle, calculate the error between the two, and dynamically adjust the proportional, integral, and differential parameters of the PID controller based on the path complexity and vehicle speed. Control the servo to adjust the vehicle body direction so that the yaw angle gradually approaches the target heading angle, ensuring that the vehicle moves in the target direction. S4, Motor Speed Optimization and Dynamic Braking: Based on the distance between the current position and the target point, the motor speed is adjusted using the dynamic braking curve function to ensure smooth driving and gradually decelerate when approaching the target point; S5. Target point distance determination and path update: Utilize multi-sensor fusion technology, combine GPS and ultrasonic sensors to measure the distance between the current position and the target point in real time to determine whether the target point has been reached; if not, refresh the GPS coordinates and repeat steps S2-S5 until the target point is reached; if the target point is reached, execute step S6; S6. End judgment and stop operation: judge whether the last target point has been reached; if reached, stop the car; if not, switch to the next target point and continue to refresh the GPS coordinates and repeat steps S2-S5.
2. The high-precision path planning method based on GPS and gyroscope according to claim 1, characterized in that: The specific method steps of step S1 are: S11, start the smart car and turn on the GPS module, receive the longitude and latitude information collected by the GPS module through the serial port, and display the collected GPS coordinate information on the screen in real time; S12, the user controls the collection and stop of GPS coordinates by pressing a button, and the button triggers the saving of the collected GPS path information into the Flash memory of the microcontroller; S13. During the path planning process, the saved GPS path data is exported from the Flash memory and loaded into the target path array for subsequent navigation.
3. The high-precision path planning method based on GPS and gyroscope according to claim 1, characterized in that: In step S2, the target direction angle and distance are calculated by combining the current coordinates provided by the GPS with the target point coordinates, and the target direction angle and distance are calculated using the direction angle calculation formula and the Haversine formula respectively.
4. The high-precision path planning method based on GPS and gyroscope according to claim 1, characterized in that: The dynamic adjustment of the proportional, integral and differential parameters of the PID controller in step S3 is achieved according to the following formula: K p =K p0 +α·|Δθ|,K i =K i0 +β·V,K d =K d0 +γ·|Δθ′|, where K p0 ,K i0 , K d0 is the initial parameter, Δθ is the yaw angle error, V is the current speed, Δθ′ is the rate of change of the yaw angle error, and α, β, and γ are adaptive adjustment coefficients.
5. The high-precision path planning method based on GPS and gyroscope according to claim 1, characterized in that: The dynamic braking curve function in step S4 uses a quadratic Bezier curve, and the change in motor speed is described by the following function: v(t)=(1-t) 2 ·v0+2t(1-t)·v m +t 2 ·v f ,t∈[0,1]; Among them, v0 is the initial velocity, v m is the intermediate speed, v f is the final speed at the target point, and t is the normalized time parameter. Dynamic braking adjusts the motor speed in real time through a 20ms timer to ensure smooth driving and gradually decelerates when approaching the target point.
6. The high-precision path planning method based on GPS and gyroscope according to claim 1, characterized in that: The specific steps of step S5 are: S51, collect GPS and ultrasonic sensor data in real time, and calculate the fusion distance between the current position and the target point; S52, determining whether the distance between the current position and the target point exceeds 1.5 times the maximum accuracy of the set threshold; if it is less than 1.5 times the threshold, it is considered that the target point has been reached and step S6 is executed; S53. If the fusion distance is greater than 1.5 times the set threshold, it is considered that the target point has not been reached, and the GPS coordinates are continuously refreshed and steps S2-S4 are repeated until the distance to the target point is within the allowable error range, and the target point is considered to have been reached.
7. The high-precision path planning method based on GPS and gyroscope according to claim 1, characterized in that: The yaw angle calculation involved in steps S1-S6 uses a nine-axis sensor and a gradient descent-based attitude settlement algorithm to calculate the yaw angle of the Euler angle. The algorithm flow of the attitude settlement is as follows: T1. Gyroscope hardware initialization and zero drift calibration: Initialize the gyroscope hardware and clear the zero drift error to ensure the accuracy of the initial data; T2. Start timer and data acquisition: Start the 5ms timer, trigger interrupts regularly, and use the nine-axis sensor to collect raw physical quantity data, including acceleration, angular velocity, and magnetism; T3, sensor data preprocessing: perform first-order low-pass filtering on the three-axis acceleration data and convert the three-axis gyroscope data into radians; T4. Normalization and error correction: Normalize the acceleration and magnetometer data to ensure that the vector amplitude is 1 and that the X-axis of the navigation coordinate system points to true north. Use the gradient descent method to calculate and correct the error, compensate for the calculated error vector, and update the quaternion to improve the accuracy of the attitude solution. T5, Quaternion update and Euler angle calculation: Update the quaternion according to the corrected sensor data, convert the quaternion into Euler angles, and extract the yaw angle as a navigation direction reference; T6. Euler angle high-pass filtering: Perform high-pass filtering on the Euler angle to remove low-frequency noise and ensure the accuracy and stability of the attitude angle.
8. A high-precision path planning method based on GPS and gyroscope according to any one of claims 1 to 7, characterized in that: It is used in path planning and navigation control of intelligent logistics vehicles, autonomous driving systems, robot navigation systems, drone navigation and intelligent warehousing systems.
Citation Information
Patent Citations
Method and device for controlling attitude of rotor unmanned aerial vehicle and unmanned aerial vehicle thereof
CN107065901A
Automatic drive controller for vehicle
JP1990240705A