Trajectory tracking method and device
Through the determination of pure tracking algorithm and target reference point, the steering angle and rotation speed of the vehicle are adjusted, and the problems of complexity and error of four-wheel drive vehicle trajectory tracking algorithm in the prior art are solved, and high-precision trajectory tracking control is achieved.
Patent Information
- Application Number
- CN202411072340.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-14
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-01
AI Technical Summary
The existing four-wheel drive vehicle trajectory tracking algorithm is complex in calculations and has large errors, making it difficult to achieve high-precision trajectory tracking.
Using a pure tracking algorithm, the target reference point and expected speed are determined by obtaining reference data and the current state of the vehicle, and the speed of the vehicle's front wheels are adjusted to achieve accurate trajectory tracking.
It improves the accuracy and accuracy of trajectory tracking, reduces errors, and realizes trajectory tracking control for four-wheel drive.
Smart Images

Figure CN118877016A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving, and more specifically to a trajectory tracking method and device. Background Art
[0002] Trajectory tracking refers to controlling the vehicle's actuators on the basis of ensuring the vehicle's safe driving, so that the vehicle moves along a given reference trajectory according to a given state (including vehicle heading angle, vehicle speed, front wheel steering angle, etc.). The existing algorithm for tracking the trajectory of four-wheel drive vehicles is the MPC (Model Predictive Control) algorithm, which is complex in calculation and has large errors. Summary of the invention
[0003] The object of the present invention is to provide a trajectory tracking method and device, which utilize a pure tracking algorithm to perform trajectory tracking control on a four-wheel drive vehicle to improve its trajectory tracking accuracy.
[0004] Based on the above purpose, the present invention provides a trajectory tracking method, comprising:
[0005] Acquiring reference data, wherein the reference data includes a reference track to be tracked and a body heading angle, a speed, and a front wheel steering angle of the vehicle on the reference track;
[0006] Get the current position and heading angle of the vehicle;
[0007] Determine a nearest reference point according to the current position of the vehicle, and determine a target reference point on the reference track according to the nearest reference point and a preset foresight distance, wherein the nearest reference point is a point on the reference track that is closest to the current position of the vehicle, and the target reference point is located in front of the nearest reference point and the distance between the target reference point and the nearest reference point is the foresight distance;
[0008] Determine the vehicle body heading angle, speed, and front wheel steering angle of the vehicle at the target reference point and the vehicle front wheel steering angle at the nearest reference point according to the vehicle body heading angle, speed, and front wheel steering angle on the reference trajectory;
[0009] Determining a current heading error of the vehicle according to the position of the target reference point, the current position of the vehicle and the current body heading angle;
[0010] Determining a desired front wheel steering angle according to a current heading error of the vehicle, a wheelbase of the vehicle, a current heading error of the vehicle, a front wheel steering angle of the vehicle at the nearest reference point, and a preset feedforward proportional coefficient;
[0011] Determine the expected rotation speeds of the four wheels of the vehicle respectively according to the vehicle body heading angle on the reference trajectory, the target reference point, the speed of the vehicle at the target reference point, the expected front wheel steering angle and the front wheel track of the vehicle;
[0012] Sending the desired front wheel steering angle and the desired rotational speeds of the four wheels of the vehicle to the vehicle actuator to adjust the front wheel steering angle of the vehicle to the desired front wheel steering angle, and adjust the rotational speeds of the four wheels of the vehicle to their respective desired rotational speeds;
[0013] When the vehicle moves to the target reference point, the target reference point is used as the current position to determine whether the current position is the end point of the reference trajectory. If so, a stop movement command is sent to the vehicle actuator to stop the vehicle; if not, the target reference point is re-determined based on the current position, and the front wheel steering angle and the rotation speed of the four wheels of the vehicle are readjusted.
[0014] Furthermore, the current heading error of the vehicle satisfies the following relationship:
[0015]
[0016] Where ρ is the current heading error of the vehicle, x ref,obj and ref,obj are the x-coordinate and y-coordinate of the target reference point in the world coordinate system, respectively. real and real are the x-coordinate and y-coordinate of the vehicle’s current position in the world coordinate system, ψ real is the current body heading angle of the vehicle.
[0017] Furthermore, the desired front wheel steering angle satisfies the following relationship:
[0018]
[0019] Where δ is the desired front wheel steering angle, k is the feedforward proportional coefficient, L is the wheelbase, and L p is the forward distance, ρ is the current heading error of the vehicle, δ ref is the front wheel steering angle of the vehicle at the nearest reference point.
[0020] Further, the expected rotation speeds of the four wheels of the vehicle are determined respectively according to the vehicle body heading angle on the reference trajectory, the target reference point, the speed of the vehicle at the target reference point, the expected front wheel steering angle and the front wheel track of the vehicle, specifically including:
[0021] Determining the yaw angular velocity of the vehicle at the target reference point according to the body heading angle of the vehicle on the reference trajectory and the target reference point;
[0022] determining the desired speeds of the four wheels of the vehicle according to the yaw rate of the vehicle at the target reference point, the speed of the vehicle at the target reference point, the desired front wheel steering angle and the front wheel track of the vehicle;
[0023] Desired rotational speeds for the four wheels of the vehicle are determined based on the desired speeds for the four wheels of the vehicle.
[0024] Furthermore, the desired speeds of the four wheels of the vehicle satisfy the following relationship:
[0025]
[0026]
[0027]
[0028]
[0029] Among them, v fl is the desired speed of the left front wheel, v fr The desired speed of the right front wheel is, v rl is the desired speed of the left rear wheel, v rr is the desired speed of the right rear wheel, δ is the desired front wheel steering angle, w is the front wheel track, r ref,obj is the yaw angular velocity of the vehicle at the target reference point.
[0030] Another aspect of the present invention provides a trajectory tracking device, comprising:
[0031] A first acquisition module is used to acquire reference data, wherein the reference data includes a reference track to be tracked and a body heading angle, a speed and a front wheel steering angle of the vehicle on the reference track;
[0032] The second acquisition module is used to acquire the current position and current body heading angle of the vehicle;
[0033] A first determination module is used to determine a nearest reference point according to a current position of the vehicle, and to determine a target reference point on the reference track according to the nearest reference point and a preset foresight distance, wherein the nearest reference point is a point on the reference track that is closest to the current position of the vehicle, and the target reference point is located in front of the nearest reference point and the distance between the target reference point and the nearest reference point is the foresight distance;
[0034] A second determination module is used to determine the vehicle body heading angle, speed of the vehicle at the target reference point and the front wheel steering angle of the vehicle at the nearest reference point according to the vehicle body heading angle, speed and front wheel steering angle of the vehicle on the reference trajectory;
[0035] A third determination module is used to determine a current heading error of the vehicle according to the position of the target reference point, the current position of the vehicle and the current body heading angle;
[0036] a fourth determination module, configured to determine a desired front wheel steering angle according to a current heading error of the vehicle, a wheelbase of the vehicle, a current heading error of the vehicle, a front wheel steering angle of the vehicle at the nearest reference point, and a preset feedforward proportional coefficient;
[0037] a fifth determination module, configured to respectively determine the expected rotation speeds of the four wheels of the vehicle according to the vehicle body heading angle on the reference trajectory, the target reference point, the speed of the vehicle at the target reference point, the expected front wheel steering angle, and the front wheel track of the vehicle;
[0038] A sending module, used for sending the desired front wheel steering angle and the desired rotation speeds of the four wheels of the vehicle to the vehicle actuator, so as to adjust the front wheel steering angle of the vehicle to the desired front wheel steering angle, and adjust the rotation speeds of the four wheels of the vehicle to their respective desired rotation speeds;
[0039] The judgment module is used to use the target reference point as the current position when the vehicle moves to the target reference point, and judge whether the current position is the end point of the reference trajectory. If so, a stop movement instruction is sent to the vehicle actuator to stop the vehicle; if not, the target reference point is re-determined according to the current position, and the front wheel steering angle and the rotation speed of the four wheels of the vehicle are readjusted.
[0040] Furthermore, the current heading error of the vehicle satisfies the following relationship:
[0041]
[0042] Where ρ is the current heading error of the vehicle, x ref,obj and ref,obj are the x-coordinate and y-coordinate of the target reference point in the world coordinate system, respectively. real and real are the x-coordinate and y-coordinate of the vehicle’s current position in the world coordinate system, ψ real is the current body heading angle of the vehicle.
[0043] Furthermore, the desired front wheel steering angle satisfies the following relationship:
[0044]
[0045] Where δ is the desired front wheel steering angle, k is the feedforward proportional coefficient, L is the wheelbase, and L p is the forward distance, ρ is the current heading error of the vehicle, δ ref is the front wheel steering angle of the vehicle at the nearest reference point.
[0046] Further, the expected rotation speeds of the four wheels of the vehicle are determined respectively according to the vehicle body heading angle on the reference trajectory, the target reference point, the speed of the vehicle at the target reference point, the expected front wheel steering angle and the front wheel track of the vehicle, specifically including:
[0047] Determining the yaw angular velocity of the vehicle at the target reference point according to the body heading angle of the vehicle on the reference trajectory and the target reference point;
[0048] determining the desired speeds of the four wheels of the vehicle according to the yaw rate of the vehicle at the target reference point, the speed of the vehicle at the target reference point, the desired front wheel steering angle and the front wheel track of the vehicle;
[0049] Desired rotational speeds for the four wheels of the vehicle are determined based on the desired speeds for the four wheels of the vehicle.
[0050] Furthermore, the desired speeds of the four wheels of the vehicle satisfy the following relationship:
[0051]
[0052]
[0053]
[0054]
[0055] Among them, v fl is the desired speed of the left front wheel, v fr The desired speed of the right front wheel is, v rl is the desired speed of the left rear wheel, v rr is the desired speed of the right rear wheel, δ is the desired front wheel steering angle, w is the front wheel track, r ref,obj is the yaw angular velocity of the vehicle at the target reference point.
[0056] The trajectory tracking method and device of the present invention determine the target reference point based on a preset forward-looking distance, and then determine the expected front wheel steering angle of the vehicle and the expected rotation speed of the four wheels based on a preset feedforward proportional coefficient to control the vehicle to move to the target reference point, thereby realizing four-wheel drive trajectory tracking with small error and high tracking accuracy; by calibrating the forward-looking distance and the feedforward proportional coefficient, the error can be further reduced and the accuracy of the trajectory tracking method can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 is a flow chart of a trajectory tracking method according to an embodiment of the present invention;
[0058] Figure 2A schematic diagram of a trajectory tracking result obtained after trajectory tracking is performed using the trajectory tracking method according to an embodiment of the present invention;
[0059] Figure 3 It is a structural block diagram of a trajectory tracking device according to another embodiment of the present invention. DETAILED DESCRIPTION
[0060] The preferred embodiments of the present invention are given below in conjunction with the accompanying drawings and described in detail.
[0061] like Figure 1 As shown, an embodiment of the present invention provides a trajectory tracking method, which is applied to a controller, and the controller is connected to an actuator of a vehicle. The method includes the following steps:
[0062] S100: Acquire reference data, wherein the reference data includes a reference track to be tracked and a vehicle body heading angle, speed, and front wheel steering angle of the vehicle on the reference track.
[0063] In some embodiments, the reference trajectory to be tracked can be a curve in the world coordinate system, that is, y=S(x), where y is the y-axis coordinate in the world coordinate system, and x is the x-axis coordinate in the world coordinate system. The coordinates (i.e., position) of any point on the reference trajectory of the vehicle can be obtained according to the reference trajectory of the vehicle; the vehicle body heading angle, speed, and front wheel steering angle on the reference trajectory are all functions related to the position, for example, the vehicle body heading angle ψ ref =f(x,y), speed v ref =g(x,y)Front wheel steering angleδ ref =h(x, y), according to the vehicle's body heading angle, speed and front wheel steering angle on the reference trajectory, the vehicle's body heading angle, speed and front wheel steering angle at any position on the reference trajectory can be obtained.
[0064] In some embodiments, the reference data may be predetermined and input into the controller, or may be automatically generated by the controller according to real-time road conditions.
[0065] S200: Acquire the current position and current vehicle heading angle of the vehicle.
[0066] The real-time data of the vehicle (including the current position and the current body heading angle) can be obtained by the motion capture system. The motion capture system can capture the x, y and z axis data in the world coordinate system representing the vehicle position and the data representing the orientation, that is, the quaternion data. The change in the body heading angle can be calculated by obtaining the change in the quaternion data at each moment relative to the quaternion data at the previous moment. The current body heading angle is calculated by the change in the current orientation relative to the initial orientation. The controller is connected to the motion capture system, so that it can receive the real-time data obtained by the motion capture system.
[0067] S300: Determine a target reference point on a reference track according to the current position of the vehicle and a preset forward sight distance.
[0068] In some embodiments, step S300 specifically includes steps S310-S320:
[0069] S310: Determine a nearest reference point according to the current position of the vehicle, wherein the nearest reference point is a point on the reference trajectory that is closest to the current position of the vehicle.
[0070] The current position of the vehicle may be on the reference track or not. When it is on the reference track, the nearest reference point is the current position itself. When it is not on the reference track, the nearest reference point and the current position are two different points.
[0071] S320: Determine a target reference point on the reference trajectory according to the nearest reference point and a preset foresight distance, wherein the target reference point is located in front of the nearest reference point and the distance between the target reference point and the nearest reference point is the foresight distance.
[0072] In some embodiments, it is assumed that the foresight distance is L p , you can use the nearest reference point as the center of the circle, and then p Draw a circle with radius , and the point on the reference trajectory that intersects with the circle and is in front of the nearest reference point is the target reference point.
[0073] S400: Determine the vehicle body heading angle, speed of the vehicle at the target reference point and the front wheel steering angle of the vehicle at the nearest reference point according to the vehicle body heading angle, speed and front wheel steering angle of the vehicle on the reference trajectory.
[0074] After determining the nearest reference point and the target reference point, substitute their coordinates into the expressions of the vehicle's body heading angle, speed, and front wheel steering angle on the reference trajectory to obtain the vehicle's body heading angle, speed, and front wheel steering angle at the nearest reference point and the target reference point.
[0075] S500: Determine a current heading error of the vehicle according to the position of the target reference point, the current position of the vehicle and the current vehicle body heading angle.
[0076] Assume that the position of the target reference point is (x ref,obj ,y ref,obj ), the current position of the vehicle is (x real ,y real ), the current heading angle of the vehicle is ψ real , the current heading error of the vehicle is ρ, then:
[0077]
[0078] S600: Determine a desired front wheel steering angle according to a current heading error of the vehicle, a wheelbase of the vehicle, a current heading error of the vehicle, a front wheel steering angle of the vehicle at a nearest reference point, and a preset feedforward proportional coefficient.
[0079] Assume that the front wheel steering angle of the vehicle at the nearest reference point is δ ref , the wheelbase of the vehicle is L, the preset feedforward proportional coefficient is k, and the expected front wheel steering angle is δ, then:
[0080]
[0081] S700: Determine the expected rotation speeds of the four wheels of the vehicle respectively according to the vehicle body heading angle on the reference trajectory, the target reference point, the speed of the vehicle at the target reference point, the expected front wheel steering angle and the front wheel track of the vehicle.
[0082] In some embodiments, step S700 specifically includes steps S710-S730:
[0083] S710: Determine the yaw angular velocity of the vehicle at the target reference point according to the vehicle body heading angle on the reference trajectory and the target reference point.
[0084] The yaw rate of the vehicle is the derivative of the vehicle heading angle. For example, if the yaw rate of the vehicle on the reference trajectory is r ref ,but:
[0085] r ref (x,y)=ψ′ ref =f′(x,y)
[0086] The yaw rate r of the vehicle at the target reference point ref,obj Then:
[0087] r ref,obj =r ref (x ref,obj ,y ref,obj )
[0088] S720: Determine the expected speeds of the four wheels of the vehicle according to the yaw rate of the vehicle at the target reference point, the speed of the vehicle at the target reference point, the expected front wheel steering angle, and the front wheel track of the vehicle.
[0089] Assume that the desired speed of the left front wheel of the vehicle is v fl , the desired speed of the right front wheel is v fr , the desired speed of the left rear wheel is v rl , the desired speed of the right rear wheel is v rr , w is the front wheel track (i.e. the distance between the two front wheels), then the calculation formula for the expected speed of the four wheels is as follows:
[0090]
[0091]
[0092]
[0093]
[0094] S730: Determine the expected rotation speeds of the four wheels of the vehicle according to the speeds of the four wheels of the vehicle.
[0095] Assume that the desired speed of the left front wheel of the vehicle is ω fl , the expected speed of the right front wheel is ω fr , the expected speed of the left rear wheel is ω rl , the expected speed of the right rear wheel is ω rr , then the calculation formula for the expected speed of the four wheels is as follows:
[0096] ω fl =v fl / R fl
[0097] ω fr =v fr / R fr
[0098] ω rl =v rl / R rl
[0099] ω rr =v rr / R rr
[0100] Among them, R fl is the radius of the left front wheel, R fr is the radius of the right front wheel, R rl is the radius of the left rear wheel, R rr is the radius of the right rear wheel.
[0101] S800: Sending the desired front wheel steering angle and the desired rotational speeds of the four wheels of the vehicle to the vehicle actuator to adjust the front wheel steering angle of the vehicle to the desired front wheel steering angle, and adjust the rotational speeds of the four wheels of the vehicle to their respective desired rotational speeds.
[0102] After the controller sends the desired front wheel steering angle and the rotational speed of the vehicle's four wheels to the vehicle actuator, the vehicle actuator will rotate the vehicle's front wheels to the desired front wheel steering angle, and then adjust the rotational speeds of the four wheels to their respective desired rotational speeds. After the adjustment is completed, the vehicle will move toward the target reference point.
[0103] S900: When the vehicle moves to the target reference point, the target reference point is used as the current position to determine whether the current position is the end point of the reference trajectory. If so, a stop movement instruction is sent to the vehicle actuator to stop the vehicle; if not, the target reference point is re-determined based on the current position, and the front wheel steering angle and the rotation speed of the four wheels of the vehicle are readjusted.
[0104] The controller can obtain the current position of the vehicle in real time and compare it with the target reference point. When the two are close (for example, when the distance between the current position and the target reference point is less than a preset threshold), it means that the vehicle has moved to the target reference point; then it can be determined whether the current position is the end point of the reference trajectory (similarly, when the distance between the current position and the end point of the reference trajectory is less than a preset threshold, it can be considered that the end point has been reached, otherwise it has not reached the end point). If so, it means that the trajectory tracking has been completed and the vehicle can be controlled to stop moving; if not, re-execute steps S200-S800 to redefine the target reference point, and adjust the front wheel steering angle and the rotation speed of the four wheels of the vehicle to move the vehicle to the redetermined target reference point, and so on, so that the vehicle can move along the reference trajectory all the time.
[0105] In an exemplary embodiment, the front sight distance L p =0.3m, feedforward proportional coefficient k = 0.5, the trajectory tracking result is as follows Figure 2 As shown, Figure 2 In the figure, the red solid line is the actual trajectory of the vehicle, and the red dotted line is the reference trajectory. It can be seen from the figure that the actual trajectory basically coincides with the reference trajectory, and the error is small, indicating that the trajectory tracking method of the present invention has a high accuracy.
[0106] The trajectory tracking method of the embodiment of the present invention determines the target reference point based on a preset forward-looking distance, and then determines the expected front wheel steering angle of the vehicle and the expected rotation speed of the four wheels based on a preset feedforward proportional coefficient to control the vehicle to move to the target reference point, thereby realizing four-wheel drive trajectory tracking; by calibrating the forward-looking distance and the feedforward proportional coefficient, the error can be reduced and the accuracy of the trajectory tracking method can be improved.
[0107] like Figure 3 As shown, on the other hand, the present invention provides a trajectory tracking device, which is applied to a controller, and the controller is connected to a vehicle actuator. The device includes a first acquisition module 10, a second acquisition module 20, a first determination module 30, a second determination module 40, a third determination module 50, a fourth determination module 60, a fifth determination module 70, a sending module 80 and a judgment module 90.
[0108] The first acquisition module 10 is used to acquire reference data, wherein the reference data includes a reference track to be tracked and a body heading angle, a speed and a front wheel steering angle of the vehicle on the reference track.
[0109] The second acquisition module 20 is used to acquire the current position and current vehicle body heading angle of the vehicle.
[0110] The first determination module 30 is used to determine the nearest reference point according to the current position of the vehicle, and to determine the target reference point on the reference trajectory according to the nearest reference point and a preset foresight distance, wherein the nearest reference point is the point on the reference trajectory closest to the current position of the vehicle, and the target reference point is located in front of the nearest reference point and the distance from the nearest reference point is the foresight distance.
[0111] The second determination module 40 is used to determine the vehicle body heading angle, speed of the vehicle at the target reference point and the front wheel steering angle of the vehicle at the nearest reference point according to the vehicle body heading angle, speed and front wheel steering angle of the vehicle on the reference trajectory.
[0112] The third determination module 50 is used to determine the current heading error of the vehicle according to the position of the target reference point, the current position of the vehicle and the current vehicle body heading angle.
[0113] The fourth determination module 60 is used to determine the expected front wheel steering angle according to the current heading error of the vehicle, the wheelbase of the vehicle, the current heading error of the vehicle, the front wheel steering angle of the vehicle at the nearest reference point and a preset feedforward proportional coefficient.
[0114] The fifth determination module 70 is used to determine the expected rotation speeds of the four wheels of the vehicle according to the vehicle body heading angle on the reference trajectory, the target reference point, the speed of the vehicle at the target reference point, the expected front wheel steering angle and the front wheel track of the vehicle.
[0115] In some embodiments, the fifth determining module 70 is specifically configured to:
[0116] Determine the yaw angular velocity of the vehicle at the target reference point according to the vehicle body heading angle on the reference trajectory and the target reference point;
[0117] determining desired speeds of four wheels of the vehicle based on the yaw rate of the vehicle at the target reference point, the speed of the vehicle at the target reference point, the desired front wheel steering angle, and the front wheel track of the vehicle;
[0118] Desired rotational speeds for the four wheels of the vehicle are determined based on the speeds of the four wheels of the vehicle.
[0119] The sending module 80 is used to send the desired front wheel steering angle and the desired rotational speed of the four wheels of the vehicle to the vehicle actuator to adjust the front wheel steering angle of the vehicle to the desired front wheel steering angle and adjust the rotational speed of the four wheels of the vehicle to their respective desired rotational speeds.
[0120] The judgment module 90 is used to determine whether the current position is the end point of the reference trajectory when the vehicle moves to the target reference point, using the target reference point as the current position. If so, a stop movement instruction is sent to the vehicle actuator to stop the vehicle; if not, the target reference point is re-determined according to the current position, and the front wheel steering angle and the rotation speed of the four wheels of the vehicle are readjusted.
[0121] The trajectory tracking device of the embodiment of the present invention determines the target reference point based on a preset forward-looking distance, and then determines the expected front wheel steering angle of the vehicle and the expected rotation speed of the four wheels based on a preset feedforward proportional coefficient to control the vehicle to move to the target reference point, thereby realizing four-wheel drive trajectory tracking; by calibrating the forward-looking distance and the feedforward proportional coefficient, the error can be reduced and the accuracy of the trajectory tracking method can be improved.
[0122] Yet another embodiment of the present invention provides a readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute the steps of the trajectory tracking method in the above embodiment of the present invention.
[0123] Another embodiment of the present invention provides an electronic device, which includes a memory and a processor. The memory stores executable code. When the processor executes the executable code, it performs the steps of the trajectory tracking method in the above embodiment of the present invention.
[0124] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0125] For the convenience of description, the above device is described as being divided into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0126] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0127] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0128] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0130] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0131] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0132] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0133] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0134] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0135] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0136] Each embodiment of the present invention is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0137] The above is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. The above embodiment of the present invention can also be modified in various ways. That is, all simple, equivalent changes and modifications made according to the claims and the description of the present invention fall within the scope of protection of the claims of the present invention. The contents not described in detail in the present invention are all conventional technical contents.
Claims
1. A trajectory tracking method, characterized in that: include: Acquiring reference data, wherein the reference data includes a reference track to be tracked and a body heading angle, a speed, and a front wheel steering angle of the vehicle on the reference track; Get the current position and heading angle of the vehicle; Determine a nearest reference point according to the current position of the vehicle, and determine a target reference point on the reference track according to the nearest reference point and a preset foresight distance, wherein the nearest reference point is a point on the reference track that is closest to the current position of the vehicle, and the target reference point is located in front of the nearest reference point and the distance between the target reference point and the nearest reference point is the foresight distance; Determine the vehicle body heading angle, speed, and front wheel steering angle of the vehicle at the target reference point and the vehicle front wheel steering angle at the nearest reference point according to the vehicle body heading angle, speed, and front wheel steering angle on the reference trajectory; Determining a current heading error of the vehicle according to the position of the target reference point, the current position of the vehicle and the current body heading angle; Determining a desired front wheel steering angle according to a current heading error of the vehicle, a wheelbase of the vehicle, a current heading error of the vehicle, a front wheel steering angle of the vehicle at the nearest reference point, and a preset feedforward proportional coefficient; Determine the expected rotation speeds of the four wheels of the vehicle respectively according to the vehicle body heading angle on the reference trajectory, the target reference point, the speed of the vehicle at the target reference point, the expected front wheel steering angle and the front wheel track of the vehicle; Sending the desired front wheel steering angle and the desired rotational speeds of the four wheels of the vehicle to a vehicle actuator to adjust the front wheel steering angle of the vehicle to the desired front wheel steering angle, and adjust the rotational speeds of the four wheels of the vehicle to their respective desired rotational speeds; When the vehicle moves to the target reference point, the target reference point is used as the current position to determine whether the current position is the end point of the reference trajectory. If so, a stop movement command is sent to the vehicle actuator to stop the vehicle; if not, the target reference point is re-determined based on the current position, and the front wheel steering angle and the rotation speed of the four wheels of the vehicle are readjusted.
2. The trajectory tracking method according to claim 1, characterized in that: The current heading error of the vehicle satisfies the following relationship: Where ρ is the current heading error of the vehicle, x ref,obj and ref,obj are the x-coordinate and y-coordinate of the target reference point in the world coordinate system, respectively. real and real are the x-coordinate and y-coordinate of the vehicle’s current position in the world coordinate system, ψ real is the current body heading angle of the vehicle.
3. The trajectory tracking method according to claim 1, characterized in that: The desired front wheel steering angle satisfies the following relationship: Where δ is the desired front wheel steering angle, k is the feedforward proportional coefficient, L is the wheelbase, and L p is the forward distance, ρ is the current heading error of the vehicle, δ ref is the front wheel steering angle of the vehicle at the nearest reference point.
4. The trajectory tracking method according to claim 1, characterized in that: Determining the expected rotation speeds of the four wheels of the vehicle respectively according to the vehicle body heading angle on the reference trajectory, the target reference point, the speed of the vehicle at the target reference point, the expected front wheel steering angle, and the front wheel track of the vehicle, specifically includes: Determining the yaw angular velocity of the vehicle at the target reference point according to the body heading angle of the vehicle on the reference trajectory and the target reference point; determining the desired speeds of the four wheels of the vehicle according to the yaw rate of the vehicle at the target reference point, the speed of the vehicle at the target reference point, the desired front wheel steering angle and the front wheel track of the vehicle; Desired rotational speeds for the four wheels of the vehicle are determined based on the desired speeds for the four wheels of the vehicle.
5. The trajectory tracking method according to claim 4, characterized in that: The desired speeds of the four wheels of the vehicle satisfy the following relationship: Among them, v fl is the desired speed of the left front wheel, v fr The desired speed of the right front wheel is, v rl is the desired speed of the left rear wheel, v rr is the desired speed of the right rear wheel, δ is the desired front wheel steering angle, w is the front wheel track, r ref,obj is the yaw angular velocity of the vehicle at the target reference point.
6. A trajectory tracking device, characterized in that: include: A first acquisition module is used to acquire reference data, wherein the reference data includes a reference track to be tracked and a body heading angle, a speed and a front wheel steering angle of the vehicle on the reference track; The second acquisition module is used to acquire the current position and current body heading angle of the vehicle; A first determination module is used to determine a nearest reference point according to a current position of the vehicle, and to determine a target reference point on the reference track according to the nearest reference point and a preset foresight distance, wherein the nearest reference point is a point on the reference track that is closest to the current position of the vehicle, and the target reference point is located in front of the nearest reference point and the distance between the target reference point and the nearest reference point is the foresight distance; A second determination module is used to determine the vehicle body heading angle, speed of the vehicle at the target reference point and the front wheel steering angle of the vehicle at the nearest reference point according to the vehicle body heading angle, speed and front wheel steering angle of the vehicle on the reference trajectory; A third determination module is used to determine a current heading error of the vehicle according to the position of the target reference point, the current position of the vehicle and the current body heading angle; a fourth determination module, configured to determine a desired front wheel steering angle according to a current heading error of the vehicle, a wheelbase of the vehicle, a current heading error of the vehicle, a front wheel steering angle of the vehicle at the nearest reference point, and a preset feedforward proportional coefficient; a fifth determination module, configured to respectively determine the expected rotation speeds of the four wheels of the vehicle according to the vehicle body heading angle on the reference trajectory, the target reference point, the speed of the vehicle at the target reference point, the expected front wheel steering angle, and the front wheel track of the vehicle; a sending module, used for sending the desired front wheel steering angle and the desired rotational speeds of the four wheels of the vehicle to the vehicle actuator, so as to adjust the front wheel steering angle of the vehicle to the desired front wheel steering angle, and adjust the rotational speeds of the four wheels of the vehicle to their respective desired rotational speeds; The judgment module is used to use the target reference point as the current position when the vehicle moves to the target reference point, and judge whether the current position is the end point of the reference trajectory. If so, a stop movement instruction is sent to the vehicle actuator to stop the vehicle; if not, the target reference point is re-determined according to the current position, and the front wheel steering angle and the rotation speed of the four wheels of the vehicle are readjusted.
7. The trajectory tracking device according to claim 6, characterized in that: The current heading error of the vehicle satisfies the following relationship: Where ρ is the current heading error of the vehicle, x ref,obj and ref,obj are the x-coordinate and y-coordinate of the target reference point in the world coordinate system, respectively. real and real are the x-coordinate and y-coordinate of the vehicle’s current position in the world coordinate system, ψ real is the current body heading angle of the vehicle.
8. The trajectory tracking device according to claim 6, characterized in that: The desired front wheel steering angle satisfies the following relationship: Where δ is the desired front wheel steering angle, k is the feedforward proportional coefficient, L is the wheelbase, and L p is the forward distance, ρ is the current heading error of the vehicle, δ ref is the front wheel steering angle of the vehicle at the nearest reference point.
9. The trajectory tracking device according to claim 6, characterized in that: Determining the expected rotation speeds of the four wheels of the vehicle respectively according to the vehicle body heading angle on the reference trajectory, the target reference point, the speed of the vehicle at the target reference point, the expected front wheel steering angle, and the front wheel track of the vehicle, specifically includes: Determining the yaw angular velocity of the vehicle at the target reference point according to the body heading angle of the vehicle on the reference trajectory and the target reference point; determining the desired speeds of the four wheels of the vehicle according to the yaw rate of the vehicle at the target reference point, the speed of the vehicle at the target reference point, the desired front wheel steering angle and the front wheel track of the vehicle; Desired rotational speeds for the four wheels of the vehicle are determined based on the desired speeds for the four wheels of the vehicle.
10. The trajectory tracking device according to claim 9, characterized in that: The desired speeds of the four wheels of the vehicle satisfy the following relationship: Among them, v fl is the desired speed of the left front wheel, v fr The desired speed of the right front wheel is, v rl is the desired speed of the left rear wheel, v rr is the desired speed of the right rear wheel, δ is the desired front wheel steering angle, w is the front wheel track, r ref,obj is the yaw angular velocity of the vehicle at the target reference point.
