Method for controlling vehicle, electronic equipment, vehicle and computer storage medium

By determining the steering angle increment in the two-wheel differential model and updating the heading angle within a predetermined threshold range, combined with the low-pass filter smooth output, the heading angle jump problem is solved, and the stable control and precise positioning of the vehicle are achieved.

CN120288121APending Publication Date: 2025-07-11RUILIAN XINGCHEN (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410005973.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-02
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The dual-wheel differential model has a problem of jumping in the heading angle output, resulting in frequent jumping back and forth between adding and subtracting a certain fixed angle, affecting the vehicle's driving control and positioning consistency.

Method used

By determining the angle increment of the steering angle, and judging the stability of the angle increment within a predetermined threshold range, updating the heading angle, and combining the low-pass filter to smooth heading angle output, ensuring the stability and precise positioning of the vehicle.

Benefits of technology

It improves the vehicle's driving safety and stability, provides more accurate heading angle information, and improves the vehicle's navigation and positioning performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120288121A_ABST
    Figure CN120288121A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method for controlling a vehicle, electronic equipment, the vehicle and a computer storage medium. The method comprises the steps that the angle increment of a steering angle is determined; in response to the fact that the determined angle increment is within a preset threshold range, obtaining the determined angle increment of the previous frame; in response to determining that the angle increment of the previous frame is within the preset threshold range, updating a course angle at least according to the angle increment; and controlling the vehicle according to the course angle. Therefore, the problems that the output course angle of the double-wheel differential model jumps and the resolution ratio is too large can be remarkably solved, and meanwhile the quality of the output pose can be effectively improved on the premise that the robustness of the double-wheel differential model is kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of vehicles, and more particularly, to a method for controlling a vehicle, an electronic device, a vehicle, and a computer storage medium. Background Art

[0002] As one of the classical vehicle kinematic models, the two-wheel differential model is widely used in the fields of vehicle positioning and control, such as for low-speed parking scenarios. The two-wheel differential model calculates the two-dimensional planar motion of the vehicle, including the horizontal and vertical coordinates and the heading angle, by outputting the pulse signals of the left and right wheels through a wheel speedometer. Due to the high reliability of the wheel pulse signals, the two-wheel differential model can provide accurate motion information during the calculation process. At the same time, when multiple vehicles use the same two-wheel differential model for positioning, due to the consistency of the model, a high positioning consistency can be maintained, thereby improving the motion control and coordination effects of multiple vehicles.

[0003] However, the two-wheel differential model has a problem of jump in the heading angle output. Since the two-wheel differential model only relies on the pulse signals of the left and right wheels to calculate the heading angle of the vehicle, and the wheel pulse signals are often not completely consistent in time sequence. This results in the heading angle output result frequently jumping back and forth between adding and subtracting a fixed angle. Summary of the Invention

[0004] The purpose of the present disclosure is to provide a method for controlling a vehicle, an electronic device, a vehicle, and a computer storage medium to at least partially solve the above problems and / or other potential problems existing in traditional vehicles.

[0005] The first aspect of the present disclosure provides a method for controlling a vehicle. The method includes: determining an angle increment of the steering angle; in response to the determined angle increment being within a predetermined threshold range, obtaining the determined angle increment of the previous frame; in response to determining that the angle increment of the previous frame is within the predetermined threshold range, updating the heading angle at least based on the angle increment; and controlling the vehicle according to the heading angle.

[0006] In the embodiments according to the present disclosure, precise control of the vehicle is achieved by determining the angle increment, recording the angle increment of the previous frame, and updating the heading angle based on the reliable angle increment. By judging the determined angle increment and the determined angle increment of the previous frame within a predetermined threshold range, the stability and reliability of the control process can be ensured. The method adapts to different vehicle dynamics and environmental changes, and can improve the driving safety and stability of the vehicle. Other benefits will be described in conjunction with the corresponding embodiments below.

[0007] In some embodiments, determining the angular increment includes: obtaining chassis data including a left wheel pulse word and a right wheel pulse word; determining a left wheel pulse word change amount and a right wheel pulse word change amount based on the chassis data, where the left wheel pulse word change amount indicates the difference between the left wheel pulse word and the left wheel pulse word in the previous frame of data, and the right wheel pulse word change amount indicates the difference between the right wheel pulse word and the right wheel pulse word in the previous frame of data; and determining the angular increment based on the left wheel pulse word change amount and the right wheel pulse word change amount.

[0008] In some embodiments, the method further includes: determining a vehicle displacement amount based on the left wheel pulse word change amount and the right wheel pulse word change amount; and updating the coordinate value of the vehicle according to the previous frame heading angle and the vehicle displacement amount.

[0009] In some embodiments, updating the heading angle based at least on the angular increment includes: determining a current heading angle according to the left wheel pulse word and the right wheel pulse word of the current frame in the chassis data and the initial left wheel pulse word and the initial right wheel pulse word; filtering the current heading angle; and updating the heading angle based on the filtered current heading angle.

[0010] In some embodiments, the method further includes: updating the coordinate value of the vehicle based on the filtered current heading angle and the vehicle displacement amount.

[0011] In some embodiments, the method further includes: in response to determining that the previous frame angular increment is not within a predetermined threshold range, controlling the vehicle according to the previous frame heading angle; and updating the coordinate value of the vehicle based on the filtered previous frame heading angle and the vehicle displacement amount.

[0012] A second aspect of the present disclosure provides an electronic device. The electronic device includes: at least one processing unit; and at least one memory coupled to the at least one processing unit and storing machine-executable instructions that, when executed by the at least one processing unit, cause the device to perform actions, the actions including: determining an angular increment of a steering angle; in response to the determined angular increment being within a predetermined threshold range, obtaining the determined previous frame angular increment; in response to determining that the previous frame angular increment is within a predetermined threshold range, updating the heading angle based at least on the angular increment; and controlling the vehicle according to the heading angle.

[0013] In some embodiments, determining the angular increment includes: obtaining chassis data including a left wheel pulse word and a right wheel pulse word; determining a left wheel pulse word change amount and a right wheel pulse word change amount based on the chassis data, where the left wheel pulse word change amount indicates the difference between the left wheel pulse word and the left wheel pulse word in the previous frame of data, and the right wheel pulse word change amount indicates the difference between the right wheel pulse word and the right wheel pulse word in the previous frame of data; and determining the angular increment based on the left wheel pulse word change amount and the right wheel pulse word change amount.

[0014] In some embodiments, the electronic device further includes: determining a vehicle displacement based on a left-wheel pulse word change amount and a right-wheel pulse word change amount; and updating the coordinate value of the vehicle according to the previous frame's heading angle and the vehicle displacement amount.

[0015] In some embodiments, updating the heading angle based at least on an angle increment includes: determining a current heading angle based on the left-wheel pulse word and the right-wheel pulse word of the current frame and the initial left-wheel pulse word and the initial right-wheel pulse word of the chassis data; filtering the current heading angle; and updating the heading angle based on the filtered current heading angle.

[0016] In some embodiments, the electronic device further includes: updating the coordinate value of the vehicle based on the filtered current heading angle and the vehicle displacement amount.

[0017] In some embodiments, the electronic device further includes: in response to determining that the previous frame's angle increment is not within a predetermined threshold range, controlling the vehicle according to the previous frame's heading angle; and updating the coordinate value of the vehicle based on the filtered previous frame's heading angle and the vehicle displacement amount.

[0018] A third aspect of the present disclosure provides a vehicle. The vehicle includes an electronic device according to the second aspect of the present disclosure.

[0019] A third aspect of the present disclosure provides a computer storage medium. A computer program is stored on the computer storage medium, and the computer program can be executed by a processor to implement the steps of the method according to the first aspect of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] By describing the exemplary embodiments of the present disclosure in more detail in conjunction with the accompanying drawings, the above and other objects, features, and advantages of the present disclosure will become more apparent. Among them, in the exemplary embodiments of the present disclosure, the same reference numerals generally represent the same components.

[0021] Figure 1 A simplified schematic diagram for controlling a vehicle is shown;

[0022] Figure 2 A block diagram of a method for controlling a vehicle according to an embodiment of the present disclosure is shown;

[0023] Figure 3 A schematic diagram comparing the heading angle according to an embodiment of the present disclosure with the traditional heading angle is shown;

[0024] Figure 4 is shown Figure 3 a partial enlarged view of;

[0025] Figure 5 A flowchart of a method for controlling a vehicle according to an embodiment of the present disclosure is shown; and

[0026] Figure 6 A schematic block diagram of an electronic device suitable for implementing the embodiments of the present disclosure is shown. Detailed implementation manners

[0027] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0028] In the description of the embodiments of the present disclosure, the term "comprising" and its like should be understood as an open inclusion, that is, "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. There may also be other explicit and implicit definitions hereinafter.

[0029] The principles of the present disclosure will be described below with reference to several exemplary embodiments shown in the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the description of these embodiments is only to enable those skilled in the art to better understand and then implement the present disclosure, rather than limiting the scope of the present disclosure in any way.

[0030] In addition, the term "responsive to" used herein represents a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the execution timing of the subsequent actions executed in response to the event or condition and the time when the event occurs or the condition is established are not necessarily strongly correlated. For example, in some cases, the subsequent actions can be executed immediately when the event occurs or the condition is established; while in other cases, the subsequent actions can be executed after a period of time after the event occurs or the condition is established.

[0031] The embodiments of the present disclosure may involve the user's data, data acquisition and / or use, etc. These aspects all comply with the corresponding laws, regulations and related provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user is aware and confirms. Correspondingly, when implementing the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the data or information that may be involved should be informed to the user and the user's authorization should be obtained through appropriate means according to the relevant laws and regulations. The specific informing and / or authorization methods can vary according to the actual situation and application scenarios, and the scope of the present disclosure is not limited in this regard.

[0032] As mentioned in the previous text, the two-wheel differential model has a problem of jumps in the heading angle output. In practical applications, the resolution of the wheel pulse word of a passenger car is generally about 2 cm, and the wheelbase of a passenger car is generally about 1.6 m. Based on these parameters, the angle resolution calculated by the wheel pulse is about 0.7 degrees, which means that the change amount of the heading angle at one time is at least 0.7 degrees. Of course, this resolution is only the theoretical minimum value, and in practical applications, it will also be affected by other factors, such as tire wear, road surface unevenness, etc.

[0033] However, since the changes in the left and right wheel pulse words cannot be completely consistent in time sequence, the output result of the heading angle frequently jumps back and forth between adding and subtracting a certain value (0.7 degrees). This jumping phenomenon will cause some problems. First, the output result of the heading angle frequently jumps back and forth between adding and subtracting a certain value, which cannot meet the process index requirements of downstream modules (such as panoramic monitoring images, parking fusion, vehicle control, etc.). This unstable change in the heading angle may affect the performance of modules such as vehicle driving control, image processing, and sensor fusion. Second, for example, when the resolution of the heading angle is 0.7 degrees, the angle change amount between frames is too large, resulting in poor smoothness of the pose output by positioning. This may cause jitter in panoramic monitoring images, jumps in fused parking spaces and obstacles, and also reduce the control accuracy.

[0034] To solve or at least partially solve the above problems or other potential problems existing in traditional vehicles, embodiments of the present disclosure provide a method for controlling a vehicle. Determine the angular increment of the steering angle through a vehicle control algorithm or a sensor. Then, in each frame, determine whether the determined angular increment is within a predetermined threshold range. If so, obtain the determined angular increment of the previous frame and record it for subsequent use. Then, determine again whether the angular increment of the previous frame is within the predetermined threshold range. If so, update the heading angle of the vehicle at least based on the angular increment. This update process can be achieved through simple addition and subtraction operations, adding or subtracting the current heading angle and the angular increment to obtain a new heading angle. Finally, control the driving direction of the vehicle according to the updated heading angle. In this way, the vehicle can adjust its own driving direction according to the change of the heading angle to achieve precise control. At the same time, this method can adapt to different vehicle dynamics and environmental changes, thereby improving the driving safety and stability of the vehicle.

[0035] It should be noted that an odometer (also known as a wheel speed meter) is a device in the vehicle chassis system that calculates the movement of the vehicle body by the rotation of the wheels. It calculates the displacement and speed of the vehicle within a certain period of time by measuring the number of pulses or speed of the wheel rotation.

[0036] The pose refers to the position and orientation of a vehicle, usually including the horizontal and vertical coordinates of the vehicle in a two-dimensional coordinate system and the heading angle. The horizontal and vertical coordinates represent the coordinates of the vehicle on the horizontal plane, and the heading angle represents the orientation of the vehicle.

[0037] The Around View Monitor (AVM) system captures images through multiple (usually four) ultra-wide-angle fish-eye lenses, and corrects and stitches the captured images through special algorithms to form a panoramic image around the object. The AVM system can help the driver better observe the environment around the vehicle when reversing, turning, etc., thereby improving safety.

[0038] First, refer to Figure 1 , which is a schematic diagram showing an exemplary environment 100 in which embodiments of the present disclosure can be implemented.

[0039] As Figure 1 shown in, the environment 100 may include a vehicle 110. In some embodiments, the vehicle 110 can be any type of vehicle 110 that can carry people and / or objects and move through a power system such as an engine, including but not limited to sedans, trucks, buses, electric vehicles, recreational vehicles, etc. The vehicle 110 is configured with electronic devices 130 such as a microprocessor or a system-on-chip (SoC). For example, the sensors configured therein can be used to obtain the speed of the vehicle 110, vehicle control operation data, driving logs, etc. in real time. Another example is the wheel speed recorder described above.

[0040] In the environment 100, the electronic device 130 can be communicatively connected to an external device 150. For example, the electronic device 130 can communicate with the external device 150 via an appropriate wireless communication method. The electronic device 130 can be any device with computing capabilities.

[0041] It should be understood that the structure and function of the environment 100 are described only for exemplary purposes and do not imply any limitation on the scope of the present disclosure.

[0042] Some exemplary embodiments of the present disclosure will be further described below with reference to the accompanying drawings.

[0043] Figure 2 A block diagram of a method 200 for controlling a vehicle 110 according to some embodiments of the present disclosure is shown. The method 200 can be implemented at a processing unit of the electronic device 130. For ease of understanding, the specific examples, numbers, or values mentioned in the following description are only exemplary and do not limit the protection scope of the present disclosure. The method 200 will be described below with reference to Figure 2 describe the method 200.

[0044] At block 210, the electronic device 130 sets the initial pose of the vehicle positioning to (0, 0, 0). In other words, at the start of the positioning process, the position of the vehicle is set to the origin of coordinates, that is, the horizontal and vertical coordinates are set to 0. At the same time, the heading angle is also set to 0 degrees, indicating that the orientation of the vehicle is consistent with the X-axis of the coordinate system. In this way, it is convenient to calculate the position and attitude of the vehicle. Secondly, setting the initial pose to the origin can simplify the implementation and processing of the positioning algorithm. At the start of the positioning process, the position and orientation of the vehicle are used as reference points and are updated in real time according to the sensor data, so as to accurately track the movement and pose changes of the vehicle. In addition, setting the initial pose to (0, 0, 0) also helps with the coordination and integration with other modules. For example, when used in conjunction with a map or path planning algorithm, the setting of the initial pose can provide consistency and compatibility, thus better realizing the positioning and navigation functions.

[0045] At block 220, the electronic device 130 obtains chassis data, which provides information on the motion state of the vehicle. In some embodiments, the chassis data includes the left wheel pulse word and the right wheel pulse word.

[0046] Based on the chassis data, the electronic device 130 can determine the change amount of the left wheel pulse word and the change amount of the right wheel pulse word. It can be understood that the change amount of the left wheel pulse word represents the difference between the left wheel pulse word in the current frame of data and the left wheel pulse word in the previous frame of data, while the change amount of the right wheel pulse word represents the difference between the right wheel pulse word in the current frame and the right wheel pulse word in the previous frame of data. By calculating these two change amounts, the motion conditions of the left and right wheels can be obtained.

[0047] Furthermore, based on the change amount of the left wheel pulse word and the change amount of the right wheel pulse word, the electronic device 130 can determine the angle increment. By analyzing and calculating the motion conditions of the left and right wheels, the steering angle change of the vehicle can be calculated. It can be understood that the angle increment represents the angle change amount of the vehicle between the current frame and the previous frame.

[0048] Furthermore, when the determined angle increment is within a predetermined threshold range, the angle increment of the previous frame can be obtained as a reference. This can help determine whether the vehicle maintains a stable steering state and can confirm the steering change trend of the vehicle. If the angle increment of the previous frame is also within the predetermined threshold range, this means that the vehicle maintains a relatively stable steering state. In this case, the heading angle of the vehicle can be updated at least according to the angle increment. By adding the current heading angle and the angle increment, the new heading angle of the vehicle in the current frame can be obtained. According to the change of the heading angle, the steering of the vehicle can be controlled. By adjusting the steering angle of the vehicle, turning, orientation, and navigation control of the vehicle can be achieved. For example, this can be achieved by manipulating the steering system of the vehicle, such as the steering wheel or the differential.

[0049] Specifically, the electronic device 130 determines the angular increment of the steering angle by parsing the chassis data packet, extracting the wheel pulse words (left_count and right_count) of the left and right wheels and the movement direction therefrom. By calculating the change amounts (left_delta_count and right_delta_count) of the left and right wheel pulse words, the positive and negative signs of the change amount of the pulse word can be determined, and then the angular increment of the steering angle can be determined.

[0050] Furthermore, the chassis data packet contains the pulse word information and movement direction of the left and right wheels. By parsing the chassis data packet, the pulse words (left_count and right_count) of the left and right wheels can be obtained, and these pulse words represent the movement displacement or rotation angle of each wheel. The change amounts (left_delta_count and right_delta_count) of the left and right wheel pulse words are calculated by subtracting the pulse word value of the previous frame from the pulse word value of the current frame, that is, the difference in the movement displacement or rotation angle of each wheel between two moments. Then, the change amount (delta_count) of the wheel pulse word can be determined by subtracting the change amount of the right wheel pulse word from the change amount of the left wheel pulse word. Of course, in some alternative embodiments, the change amount of the wheel pulse word (delta_count) can also be determined by subtracting the change amount of the left wheel pulse word from the change amount of the right wheel pulse word, and the present disclosure does not limit this. By determining the change amount of the pulse word, the angular increment of the steering angle can be further calculated to achieve precise steering control and pose estimation, which will be further elaborated hereinafter.

[0051] In some embodiments, the electronic device 130 can determine the displacement amount of the vehicle based on the change amount of the left wheel pulse word and the change amount of the right wheel pulse word. This displacement amount can represent the translational displacement of the vehicle. At the same time, the coordinate value of the vehicle can be updated by using the heading angle of the previous frame and the displacement amount of the vehicle. In other words, the heading angle is the angle at which the vehicle is currently facing. By combining the displacement amount of the vehicle with the heading angle of the previous frame, the new position of the vehicle in the coordinate system can be calculated. Specifically, the displacement components of the vehicle on the X-axis and Y-axis are calculated according to the change of the displacement amount and the heading angle of the vehicle. Then, these displacement components are added to the coordinate value of the previous frame to obtain the new coordinate value of the vehicle in the current frame. In this way, the position of the vehicle can be tracked and the movement trajectory of the vehicle can be realized to achieve precise positioning and navigation functions.

[0052] In some embodiments, the current heading angle can be determined according to the left wheel pulse word and the right wheel pulse word of the current frame in the chassis data and the initial left wheel pulse word and the initial right wheel pulse word. The left wheel pulse word and the right wheel pulse word can provide the movement information of the vehicle, and the initial left wheel pulse word and the initial right wheel pulse word are the pulse words in the initial state of the vehicle.

[0053] Continue to refer to Figure 2 In block 230, the electronic device 130 adds the left wheel pulse word change amount (left_delta_count) and the right wheel pulse word change amount (right_delta_count), then divides the sum by 2 to obtain the average value of the left and right wheel pulse word change amounts. Then, the average value of the left and right wheel pulse word change amounts is multiplied by the motion displacement corresponding to the wheel pulse word to obtain the displacement scalar (linear_dis) of the vehicle in the current period (for example, the current frame). At the same time, as mentioned above, the electronic device 130 calculates the difference (delta_count) between the left and right wheel pulse word change amounts, that is, by subtracting the right wheel pulse word change amount from the left wheel pulse word change amount (it can also be the right wheel pulse word change amount minus the left wheel pulse word change amount), the difference between the left and right wheel pulse word change amounts can be obtained. For example, the current period is 50 ms, and the embodiments of the present disclosure do not make specific limitations on this.

[0054] In block 230, if the difference (delta_count) between the left and right wheel pulse word change amounts is 0, it means that the left and right wheel pulse word change amounts are equal, that is, the vehicle has not made a steering movement in the current period, and block 240 will be executed. In this case, the output of the heading angle remains unchanged, that is, the same as the heading angle of the previous frame. Then, according to the heading angle of the previous frame, the displacement scalar (linear_dis) is decomposed and accumulated onto the horizontal and vertical coordinates.

[0055] In block 230, if the difference between the left and right wheel pulse word change amounts is greater than 0, it means that the left and right wheel pulse word change amounts are not equal, that is, the vehicle may have made a steering movement, and block 250 will be executed. In this case, it is necessary to further determine whether the difference (last_delta_count) between the valid pulse word change amounts of the previous frame is also greater than 0 to determine whether the vehicle has actually made a steering movement.

[0056] If the difference (last_delta_count) between the valid pulse word change amounts of the previous frame is greater than 0, it means that the direction of the previous steering movement is the same as the direction of the current steering movement, and block 251 will be executed. In this case, the heading angle (origin_yaw) of the current frame can be calculated. According to the low-pass filter formula, the filtered heading angle (filter_yaw) can be calculated using the heading angle of the current frame. In this way, the output of the heading angle can be updated, and the displacement scalar (linear_dis) is decomposed using the filtered heading angle and accumulated onto the horizontal and vertical coordinates of the vehicle. The low-pass filter formula will be described in detail below.

[0057] If the difference between the pulse word change amounts of the previous valid frame (last_delta_count) is less than or equal to 0, it means that the direction of the previous steering movement is different from that of the current steering movement or the vehicle has not made a steering movement, and box 240 will be executed. In this case, the output of the heading angle remains unchanged, that is, the same as the heading angle of the previous frame. Then, according to the heading angle of the previous frame, the displacement scalar (linear_dis) is decomposed and accumulated to the horizontal and vertical coordinates of the vehicle.

[0058] Continue to refer to Figure 2 , in box 230, if the difference (delta_count) between the pulse word change amounts of the left and right wheels is less than 0, it means that the pulse word change amounts of the left and right wheels are not equal, that is, the vehicle may have made a steering movement, and box 260 will be executed. In this case, it is necessary to further determine whether the difference (last_delta_count) between the pulse word change amounts of the previous valid frame is also less than 0.

[0059] If the difference (last_delta_count) between the pulse word change amounts of the previous valid frame is less than 0, it means that the direction of the previous steering movement is the same as that of the current steering movement, and box 251 will be executed. In this case, the heading angle at the current moment (origin_yaw) can be calculated. According to the low-pass filter formula, the filtered heading angle (filter_yaw) can be calculated using the heading angle at the current moment (origin_yaw). In this way, the output of the heading angle can be updated, and the displacement scalar (linear_dis) is decomposed and accumulated to the horizontal and vertical coordinates of the vehicle using the filtered heading angle (filter_yaw).

[0060] If the difference (last_delta_count) between the pulse word change amounts of the previous valid frame is greater than or equal to 0, it means that the direction of the previous steering movement is different from that of the current steering movement or the vehicle has not made a steering movement, and box 240 will be executed. In this case, the output of the heading angle remains unchanged, that is, the same as the heading angle of the previous frame. Then, according to the heading angle of the previous frame, the displacement scalar (linear_dis) is decomposed and accumulated to the horizontal and vertical coordinates of the vehicle.

[0061] In some embodiments, when it is determined that the angle increment of the previous frame is not within the predetermined threshold range, the steering of the vehicle can be controlled according to the heading angle of the previous frame. The heading angle is the direction that the vehicle is currently facing. By adjusting the steering angle of the vehicle, the heading of the vehicle can be changed.

[0062] After the method ends at block 240 and block 251, it continues at block 270. If the difference (delta_count) between the left and right wheel pulse word change amounts is not equal to 0, it means there is still a difference in the left and right wheel pulse word change amounts, that is, the vehicle may still be in continuous steering motion. In this case, the difference (delta_count) of the current left and right wheel pulse word change amounts needs to be used to update the difference (last_delta_count) of the valid pulse word change amounts in the previous frame. If the difference (delta_count) between the left and right wheel pulse word change amounts is equal to 0, block 220 is re-executed. If the difference (delta_count) between the left and right wheel pulse word change amounts is not equal to 0, block 280 is executed and the heading angle of the previous frame is updated. At the same time, as the vehicle continues to drive or stop, the above method will be repeated in a loop or end.

[0063] In the next loop, the updated difference (last_delta_count) of the valid pulse word change amounts in the previous frame can be used to determine the direction of the steering motion and perform corresponding processing and control. At the same time, by using the difference (delta_count) between the left and right wheel pulse word change amounts to update the difference (last_delta_count) of the valid pulse word change amounts in the previous frame, the difference in the left and right wheel pulse word change amounts can be tracked in real time, and the value of the difference (last_delta_count) of the valid pulse word change amounts in the previous frame can be kept consistent with the current state. In this way, the direction of the steering motion can be accurately determined, and corresponding adjustments and processing can be made during the control process to achieve smooth navigation and positioning. Through the above loop operations, the steering motion state of the vehicle can be continuously determined, and the heading angle and the horizontal and vertical coordinates of the vehicle can be updated according to different situations.

[0064] As can be seen from the above description, for the problem of frequent jumps in the heading angle output caused by inconsistent timing of the left and right wheel pulse changes, it can be improved through the angle change consistency check logic. The goal of the angle change consistency check is to solve the situation of frequent heading angle jumps when the heading angle increases or decreases by a certain value (such as plus or minus 0.7 degrees).

[0065] Exemplarily, when the change amount of the heading angle is detected to reach 0.7 degrees, the value of the heading angle is not updated immediately. Instead, first check whether the direction of the angle change amount is consistent with the direction of the previous valid angle change amount. If the directions of the valid angle change amounts are consistent for two consecutive times, then the heading angle is updated. In other words, the current heading angle is updated only when the angle changes in the same direction for two consecutive times. After the heading angle is updated, record the current valid heading angle change amount as the judgment basis for the next time period. This can update the heading angle only when the change directions are consistent for two consecutive times, thus avoiding frequent jumps in the heading angle. In this way, by introducing the angle change consistency check logic, the output of the heading angle can be effectively improved, and the problem of frequent jumps caused by inconsistent timing of the left and right wheel pulse changes can be solved, so that a smoother and more reliable heading angle output can be provided, providing a more accurate information basis for vehicle navigation and positioning.

[0066] In the embodiments of the present disclosure, for the problems of excessive angle resolution and uneven pose output, they can be improved by a low-pass filter. Select appropriate low-pass filter parameter indicators and set them according to the delay indicator requirements. In other words, in order to improve the accuracy of the heading angle, the current heading angle can be filtered. Filtering can smooth the data by removing noise and instability. Filtering the current heading angle can reduce the jitter and inaccuracy of the heading angle caused by sensor errors and instability. Based on the filtered current heading angle, the value of the heading angle can be updated. In this way, stable and accurate heading angle information can be provided, which helps to achieve the precise positioning and navigation functions of the vehicle.

[0067] In some embodiments, updating the coordinate value of the vehicle based on the filtered current heading angle and the displacement amount of the vehicle can provide accurate vehicle position information, which helps to achieve precise positioning and navigation functions. By continuously updating the coordinate value of the vehicle, the position of the vehicle can be tracked, and precise positioning and navigation control of the vehicle can be achieved.

[0068] In some embodiments, the coordinate value of the vehicle can be updated based on the filtered heading angle of the previous frame and the vehicle displacement amount. By continuously updating the coordinate value of the vehicle, the positioning and path tracking of the vehicle can be achieved, and it can be ensured that the vehicle travels along a predetermined trajectory.

[0069] Exemplarily, select a first-order low-pass Butterworth filter, set the cut-off frequency to 10 Hz, and the sampling frequency to 100 Hz. Through this filter, the heading angle can be smoothed to improve the smoothness and continuity of the output. The filtered heading angle can be calculated according to the following formula (1):

[0070] filter_yaw = 0.24523728 × origin_yaw + 0.24523728 ×

[0071] last_origin_yaw + 0.50952544 × last_filter_yaw (1) Where filter_yaw represents the filtered heading angle, origin_yaw represents the unfiltered heading angle, last_origin_yaw represents the unfiltered heading angle determined in the previous frame, and last_filter_yaw represents the filtered heading angle determined in the previous frame.

[0072] As Figure 3 and Figure 4 shown, after being processed by this method, the heading angle output can achieve a smooth effect. Line 310 represents the heading angle output by the original two-wheel differential model, while line 320 represents the processed heading angle output.

[0073] Refer to Figure 3 , it can be seen that due to the difference in the change amount of the left and right wheel pulse words, there are frequent jumps in the original heading angle of line 310. However, the processed heading angle output line 320 in the embodiments of the present disclosure shows an obvious smooth effect, and the jumping situation is effectively suppressed.

[0074] Furthermore, refer to Figure 4 , it can be more clearly observed from the local enlarged view the smooth effect of the processed heading angle output. Compared with line 310, line 320 changes more gently and does not show frequent violent fluctuations. This means that the processed heading angle output can more accurately reflect the steering movement of the vehicle and provide more stable and reliable heading angle information.

[0075] Through the above method, the pose quality of the output of the two-wheel differential model can be significantly improved. At the same time, the sudden change of the heading angle can be eliminated, making the output of the pose more continuous and smooth, and improving the performance and reliability of the entire system.

[0076] Figure 5 shows a flowchart of a method for controlling a vehicle according to an embodiment of the present disclosure. In some embodiments, the method 500 may be implemented by a processor of an electronic device 130 communicating with an external device 150 or the control system of the external device 150 itself or other appropriate devices. For ease of understanding, the specific examples, numbers or values mentioned in the following description are merely exemplary and do not limit the protection scope of the present disclosure. In the following, the method 500 will be described by taking the implementation by the electronic device 130 as an example.

[0077] As Figure 5As shown, at block 510, the electronic device 130 determines the angular increment of the steering angle. At block 520, in response to the determined angular increment being within a predetermined threshold range, the electronic device 130 obtains the determined angular increment of the previous frame.

[0078] Continuing to execute the method 500, at block 530, in response to determining that the angular increment of the previous frame is within a predetermined threshold range, the electronic device 130 updates the heading angle at least based on the angular increment. Finally, at block 540, the electronic device 130 controls the vehicle based on the heading angle.

[0079] In some embodiments, the electronic device 130 determining the angular increment includes: obtaining chassis data including a left wheel pulse word and a right wheel pulse word; determining a left wheel pulse word change amount and a right wheel pulse word change amount based on the chassis data, where the left wheel pulse word change amount indicates the difference between the left wheel pulse word and the left wheel pulse word in the previous frame of data, and the right wheel pulse word change amount indicates the difference between the right wheel pulse word and the right wheel pulse word in the previous frame of data; and determining the angular increment based on the left wheel pulse word change amount and the right wheel pulse word change amount.

[0080] In some embodiments, the method further includes: determining a vehicle displacement amount based on the left wheel pulse word change amount and the right wheel pulse word change amount; and updating the coordinate value of the vehicle according to the previous frame heading angle and the vehicle displacement amount.

[0081] In some embodiments, the electronic device 130 updating the heading angle at least based on the angular increment includes: determining the current heading angle according to the left wheel pulse word and the right wheel pulse word of the current frame in the chassis data and the initial left wheel pulse word and the initial right wheel pulse word; filtering the current heading angle; and updating the heading angle based on the filtered current heading angle.

[0082] In some embodiments, the method further includes: updating the coordinate value of the vehicle based on the filtered current heading angle and the vehicle displacement amount.

[0083] In some embodiments, the method further includes: in response to determining that the angular increment of the previous frame is not within a predetermined threshold range, controlling the vehicle according to the previous frame heading angle; and updating the coordinate value of the vehicle based on the filtered previous frame heading angle and the vehicle displacement amount.

[0084] The method according to an embodiment of the present disclosure solves the problem of serious jump in the heading angle output in the two-wheel differential model by combining the angular change consistency check. Secondly, a low-pass filter is used to smooth the output of the heading angle to solve the inherent characteristic of excessive angular resolution, so that the heading angle can be smoothed, reducing the high-frequency noise and oscillation of the output, and improving the continuity and smoothness of the output.

[0085] Figure 6FIG. 600 shows a schematic block diagram of an electronic device 600 suitable for implementing embodiments of the present disclosure. The electronic device 600 may be the electronic device 130 communicating with the external device 150 mentioned above, or the control system of the external device 150 itself, or other suitable devices. As Figure 6 shown, the electronic device 600 includes at least one processing unit and at least one memory. The at least one processing unit may employ a central processing unit (CPU) 601, which may execute various appropriate actions and processes according to computer program instructions stored in the read-only memory (ROM) 602 or computer program instructions loaded from the storage unit into the random access memory (RAM) 603. In the RAM 603, various programs and data required for device operation may also be stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.

[0086] Multiple components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, such as a touch screen, buttons, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, optical disc, etc.; and a communication unit 609, such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0087] The various processes and processes described above, such as the processes mentioned above, may be executed by the processing unit 601. For example, in some embodiments, the processes 510, 520, 530, and 540 may be implemented as computer software programs, which are tangibly contained in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the CPU 601, one or more actions of the processes 510, 520, and 530 described above may be executed.

[0088] Embodiments of the present disclosure relate to methods, electronic devices, and / or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions for performing various aspects of the present disclosure loaded thereon.

[0089] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, (but is not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punched card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed to be a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.

[0090] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to respective computing / processing devices, or can be downloaded to an external computer or an external storage device through a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include a copper transmission cable, an optical fiber transmission, a wireless transmission, a router, a firewall, a switch, a gateway computer, and / or an edge server. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0091] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine - related instructions, microcode, firmware instructions, state - setting data, or source code or object code written in any combination of one or more programming languages, including object - oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer - readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand - alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server 130. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via an Internet service provider through the Internet). In some embodiments, by using the state information of the computer - readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field - programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer - readable program instructions to implement various aspects of the present disclosure.

[0092] Aspects of the present disclosure are described herein with reference to the flowchart and / or block diagram of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer - readable program instructions.

[0093] These computer - readable program instructions can be provided to a processing unit of a general - purpose computer, a special - purpose computer, or other programmable data - processing apparatus to produce a machine such that when the instructions are executed by the processing unit of the computer or other programmable data - processing apparatus, a device is created that implements the functions / acts specified in one or more blocks of the flowchart and / or block diagram. These computer - readable program instructions can also be stored in a computer - readable storage medium, which causes a computer, a programmable data - processing apparatus, and / or other devices to operate in a particular manner. Thus, the computer - readable medium storing the instructions includes a manufacture that includes instructions for implementing various aspects of the functions / acts specified in one or more blocks of the flowchart and / or block diagram.

[0094] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other devices to produce a computer-implemented process such that the instructions executed on the computer, other programmable data processing apparatus, or other devices implement the functions / acts specified in one or more boxes of the flowchart and / or block diagram.

[0095] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of code, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by special-purpose hardware-based systems that perform the specified functions or acts, or by combinations of special-purpose hardware and computer instructions.

[0096] The embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or the technical improvement of technologies in the market, or to enable other ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for controlling a vehicle, comprising: Determining an angular increment of a steering angle; In response to the determined angular increment being within a predetermined threshold range, obtaining the determined angular increment of the previous frame; In response to determining that the angular increment of the previous frame is within the predetermined threshold range, updating a heading angle at least based on the angular increment; And Controlling the vehicle based on the heading angle.

2. The method according to claim 1, wherein determining the angular increment comprises: Obtaining chassis data including a left-wheel pulse word and a right-wheel pulse word; Based on the chassis data, determining a left-wheel pulse word change amount and a right-wheel pulse word change amount, where the left-wheel pulse word change amount indicates a difference between the left-wheel pulse word and the left-wheel pulse word in the previous frame of data, and the right-wheel pulse word change amount indicates a difference between the right-wheel pulse word and the right-wheel pulse word in the previous frame of data; And Based on the left-wheel pulse word change amount and the right-wheel pulse word change amount, determining the angular increment.

3. The method according to claim 2, further comprising: Based on the left-wheel pulse word change amount and the right-wheel pulse word change amount, determining a vehicle displacement amount; And Updating coordinate values of the vehicle based on the previous frame heading angle and the vehicle displacement amount.

4. The method according to claim 3, wherein updating the heading angle at least based on the angular increment comprises: Determining a current heading angle based on the left-wheel pulse word and the right-wheel pulse word of the current frame of the chassis data and an initial left-wheel pulse word and an initial right-wheel pulse word; Filtering the current heading angle; And Updating the heading angle based on the filtered current heading angle.

5. The method according to claim 4, further comprising: Updating the coordinate values of the vehicle based on the filtered current heading angle and the vehicle displacement amount.

6. The method according to any one of claims 1-5, further comprising: In response to determining that the angular increment of the previous frame is not within the predetermined threshold range, controlling the vehicle based on the previous frame heading angle; And Updating the coordinate values of the vehicle based on the filtered previous frame heading angle and the vehicle displacement amount.

7. An electronic device, comprising: At least one processing unit; And At least one memory coupled to the at least one processing unit and storing machine-executable instructions, which when executed by the at least one processing unit cause the device to perform actions, the actions including: Determining an angular increment of a steering angle; In response to the determined angular increment being within a predetermined threshold range, obtaining the determined angular increment of the previous frame; In response to determining that the angular increment of the previous frame is within the predetermined threshold range, updating a heading angle at least based on the angular increment; and Controlling the vehicle based on the heading angle.

8. The electronic device according to claim 7, wherein determining the angular increment comprises: Obtaining chassis data including a left-wheel pulse word and a right-wheel pulse word; Determine the change amount of the left-wheel pulse word and the change amount of the right-wheel pulse word based on the chassis data, where the change amount of the left-wheel pulse word indicates the difference between the left-wheel pulse word and the left-wheel pulse word in the previous frame of data, and the change amount of the right-wheel pulse word indicates the difference between the right-wheel pulse word and the right-wheel pulse word in the previous frame of data; And Determine the angle increment based on the change amount of the left-wheel pulse word and the change amount of the right-wheel pulse word.

9. The electronic device according to claim 8, further comprising: Determine the vehicle displacement based on the change amount of the left-wheel pulse word and the change amount of the right-wheel pulse word; And Update the coordinate value of the vehicle according to the previous frame of heading angle and the vehicle displacement.

10. The electronic device according to claim 9, wherein updating the heading angle at least according to the angle increment comprises: Determine the current heading angle according to the left-wheel pulse word and the right-wheel pulse word in the current frame of the chassis data and the initial left-wheel pulse word and the initial right-wheel pulse word; Filter the current heading angle; And Update the heading angle based on the filtered current heading angle.

11. The electronic device according to claim 10, further comprising: Update the coordinate value of the vehicle based on the filtered current heading angle and the vehicle displacement.

12. The electronic device according to any one of claims 7-11, further comprising: In response to determining that the previous frame of angle increment is not within the predetermined threshold range, control the vehicle according to the previous frame of heading angle; And Update the coordinate value of the vehicle based on the filtered previous frame of heading angle and the vehicle displacement.

13. A vehicle comprising the electronic device according to any one of claims 7-12.

14. A computer-readable storage medium, on which a computer program is stored, and the computer program can be executed by a processor to implement the method according to any one of claims 1-6.