Vehicle speed control method and device, electronic device, storage medium
By obtaining environmental maps and determining the vehicle driving path, the problem that the ACC system cannot effectively judge obstacles in driving school scenarios is solved, achieving more accurate vehicle speed control and improving user experience.
Patent Information
- Application Number
- CN202411128499.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2044-08-16
AI Technical Summary
The existing adaptive cruise control (ACC) system has problems with complex algorithms, instability and poor user experience in applications, especially in driving school scenarios, where the vehicle's driving path and obstacle location cannot be effectively judged.
By obtaining the environmental map of the target area, determine the vehicle's driving path and coverage area, and determine whether there are obstacles in the path point. Based on the distance between the vehicle and the target path point, the desired speed of the vehicle is adjusted in real time to achieve more accurate speed control.
Improves the accuracy and user experience of vehicle speed control, and can accurately judge obstacle location and adjust speed in the absence of clear lane lines.
Smart Images

Figure CN119190006B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of autonomous driving, and particularly relates to a vehicle speed control method, a device, an electronic device, and a storage medium. Background Art
[0002] The Adaptive Cruise Control (ACC) system can not only maintain the vehicle speed preset by the driver, but also reduce the speed as needed at any time under specific driving conditions, and even automatically brake. It is one of the core functions of the Advanced Driver Assistance Systems (ADAS). However, there are still some problems in the application of ACC, which restrict the wide application of ACC. Summary of the Invention
[0003] To solve the above problems, embodiments of the present application provide a vehicle speed control method, a device, an electronic device, and a storage medium.
[0004] In a first aspect, an embodiment of the present application provides a vehicle speed control method, including: obtaining an environmental map of a target area, where the environmental map includes obstacles and the coordinates of the obstacles; determining a driving path of the vehicle based on vehicle-related information, where the driving path includes a plurality of path points and the coordinates of the plurality of path points; determining a coverage area of the vehicle at each path point; determining whether there is an obstacle in the coverage area of the vehicle at at least one path point based on the coordinates of the obstacles; if there is an obstacle in the coverage area of the vehicle at at least one path point, determining at least one path point as a target path point and determining the distance between the vehicle and the target path point; determining an expected speed of the vehicle based on the distance between the vehicle and the target path point; and controlling the speed of the vehicle to be adjusted to the expected speed.
[0005] Optionally, the vehicle-related information includes vehicle coordinates, the angle between the vehicle front wheel and the vehicle body, the vehicle gear ratio, the vehicle wheelbase, and the vehicle gear position; determining the driving path of the vehicle based on the vehicle-related information includes: determining the angle of the vehicle front wheel based on the angle between the vehicle front wheel and the vehicle body and the vehicle gear ratio; determining the vehicle heading angle based on the angle of the vehicle front wheel and the vehicle wheelbase; determining the number of path points on the driving path based on the length of the driving path and the path resolution, where the length of the driving path is determined based on the vehicle gear position; and determining the coordinates of each path point based on the vehicle coordinates, the angle of the vehicle front wheel, the vehicle heading angle, the vehicle gear position, and the path resolution to determine the driving path.
[0006] Optionally, determine the coverage area of the vehicle at each waypoint, including: based on the vehicle size information and vehicle coordinates, determine multiple target points on the border of the vehicle and the relative coordinates of the multiple target points, where the relative coordinate of a target point is the difference between the coordinate of the target point and the vehicle coordinate; based on the coordinate of each waypoint and the relative coordinates of the target points, determine the projected coordinates of the target points at each waypoint; based on the projected coordinates of the target points at each waypoint, determine the coverage area of the vehicle at each waypoint, where the coverage area includes multiple coordinates.
[0007] Optionally, determine the distance between the vehicle and the target waypoint, including: sort the waypoints on the driving path and determine the sequence number of the target waypoint; based on the sequence number of the target waypoint and the path resolution, determine the distance between the vehicle and the target waypoint.
[0008] Optionally, based on the distance between the vehicle and the target waypoint, determine the desired speed of the vehicle, including: if the distance between the vehicle and the target waypoint is less than or equal to the first threshold, determine the first speed as the desired speed of the vehicle; if the distance between the vehicle and the target waypoint is greater than the first threshold and less than or equal to the second threshold, determine the desired speed of the vehicle based on the distance between the vehicle and the target waypoint; if the distance between the vehicle and the target waypoint is greater than the second threshold, determine the second speed as the desired speed of the vehicle.
[0009] Optionally, the method further includes: controlling the speed of the vehicle to be adjusted to the desired speed, including: based on the desired speed, determine the control amount of the throttle controller or the brake controller; based on the control amount of the throttle controller or the brake controller, adjust the speed of the vehicle.
[0010] Optionally, before obtaining the environmental map of the target area, the method includes: obtain the first map of the target area; draw an electronic fence on the first map to obtain the second map of the target area; obtain the third map around the vehicle; splice the second map and the third map to obtain the environmental map.
[0011] Second aspect, an embodiment of the present application provides a vehicle speed control device, including: an acquisition module, configured to acquire an environmental map of a target area, where the environmental map includes obstacles and coordinates of the obstacles; a determination module, configured to determine a driving path of the vehicle based on vehicle-related information, where the driving path includes a plurality of path points and coordinates of the plurality of path points; the determination module is further configured to determine a coverage area of the vehicle at each path point; the determination module is further configured to determine whether there is an obstacle in the coverage area of the vehicle at at least one path point based on the coordinates of the obstacle; the determination module is further configured to, if there is an obstacle in the coverage area of the vehicle at at least one path point, determine at least one path point as a target path point and determine the distance between the vehicle and the target path point; the determination module is further configured to determine an expected speed of the vehicle based on the distance between the vehicle and the target path point; a control module, configured to control the speed of the vehicle to be adjusted to the expected speed.
[0012] Third aspect, an embodiment of the present application provides an electronic device, including: a processor; a memory, connected to the processor, where the memory is used to store a computer program, and when the computer program is executed by the processor, the above method is implemented.
[0013] Fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are run by a processor, the above method is implemented.
[0014] Fifth aspect, an embodiment of the present application provides a computer program product, including computer program instructions, and when the computer program instructions are run by a processor, the above method is implemented.
[0015] Through the above technical solutions, the driving path of the vehicle is determined based on vehicle-related information, and the driving path can be updated in real time according to the change of vehicle-related information. The method is simple and has a high accuracy rate; secondly, it is determined whether there is an obstacle in the coverage area of the vehicle at each path point. Compared with determining whether there is an obstacle at the path point, the recognition accuracy of the obstacle is higher and the judgment result is more accurate; in addition, since there are no lane lines in the target area, the vehicle can drive in a straight line or in a curve, and the straight-line distance between the vehicle and the obstacle may not reflect the driving distance of the vehicle to the obstacle. The distance between the vehicle and the target path point is used to represent the driving distance of the vehicle to the obstacle, and the target path point can be updated in real time according to the driving path, so the distance between the vehicle and the target path point can also be updated in real time, so that the expected speed of the vehicle can be adjusted in real time, improving the accuracy of vehicle speed control and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a schematic flowchart of a vehicle speed control method provided by an embodiment of the present application.
[0017] Figure 2 It is a schematic flowchart of a method for determining a driving path of a vehicle provided by an embodiment of the present application.
[0018] Figure 3 It is a schematic flowchart of a method for determining a coverage area of a vehicle at a path point provided by an embodiment of the present application.
[0019] Figure 4 It is a schematic flowchart of a method for determining a distance between a vehicle and a target path point provided by an embodiment of the present application.
[0020] Figure 5 It is a schematic flowchart of a method for determining a desired speed of a vehicle provided by an embodiment of the present application.
[0021] Figure 6 It is a schematic flowchart of a method for adjusting the speed of a vehicle provided by an embodiment of the present application.
[0022] Figure 7 It is a structural block diagram of a vehicle speed control device provided by an embodiment of the present application.
[0023] Figure 8 The figure shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0024] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0025] Currently, the application of ACC in ADAS is relatively limited. When triggering ACC, the algorithm for decelerating and braking according to the distance of obstacles is complex and unstable, resulting in a poor user experience. In addition, when applying ACC to the driving school scenario, since there is no clear road, there is no solution in the related art to judge the driving path of the vehicle, and thus it is impossible to determine the distance of the vehicle driving to the obstacle to automatically adjust the speed of the vehicle.
[0026] In the face of the above technical problems, on the one hand, the embodiments of the present application provide a vehicle speed control method.
[0027] Figure 1 It is a schematic flowchart of a vehicle speed control method provided by an embodiment of the present application. As Figure 1 shown, the method includes the following steps.
[0028] Step S101, obtain an environmental map of the target area.
[0029] In an embodiment of the present application, the target area may refer to an area where a vehicle can travel. For example, a driving school site, an airport, a parking lot, etc. The environmental map is a two-dimensional map, and the environmental map includes obstacles and the coordinates of the obstacles. In an embodiment of the present application, the obstacles include static obstacles and dynamic obstacles. Optionally, the static obstacles include immovable objects or impassable areas, such as houses, trees, no-go areas, etc. The dynamic obstacles include movable objects, such as pedestrians, animals, other vehicles, etc., which are movable objects.
[0030] In an embodiment of the present application, in order to obtain the environmental map, the method includes: obtaining a first map of the target area. Specifically, point cloud data of the target area is obtained by using a first sensor (for example, a multi-line lidar), and the point cloud data is converted into two-dimensional data to form a first map. Since there are obstacles (such as impassable areas) in the target area that cannot be detected by the first sensor, it is necessary to mark the undetected obstacles on the first map. Optionally, an electronic fence is drawn on the first map to obtain a second map of the target area. The second map includes static obstacles and the coordinates of the static obstacles, that is, the second map is a static map. The method further includes: obtaining a third map around the vehicle. Specifically, point cloud data around the vehicle is obtained by using a second sensor (for example, a single-line lidar), and the point cloud data is converted into two-dimensional data to form a third map. The third map includes dynamic obstacles and the coordinates of the dynamic obstacles, that is, the third map is a dynamic map. The second map and the third map are stitched together to obtain the environmental map. Optionally, since the obstacles (dynamic obstacles) around the vehicle will change, it is necessary to obtain the third map around the vehicle in real time and update the environmental map in real time.
[0031] Step S102, determining a driving path of the vehicle based on vehicle-related information.
[0032] In an embodiment of the present application, the driving path includes multiple path points and the coordinates of the multiple path points. Different from the road scenario, the vehicle has no determined driving route in the target area (for example, the driving school scenario), so it is necessary to determine the driving path of the vehicle. Determining the driving path of the vehicle through vehicle-related information is simple and has a high accuracy rate. In addition, the driving path of the vehicle can be updated in time according to the change of vehicle-related information, that is, the driving path of the vehicle can be updated in real time.
[0033] Optionally, the vehicle-related information includes vehicle coordinates, the angle between the vehicle's front wheels and the vehicle body, the vehicle's gear ratio, the vehicle's wheelbase, the vehicle's gear position, etc. The vehicle coordinates refer to the coordinates of the center point of the vehicle's rear axle. Optionally, the vehicle coordinates are determined by sensors installed on the vehicle (e.g., inertial navigation). The angle between the vehicle's front wheels and the vehicle body, the vehicle's gear ratio, and the vehicle's wheelbase are fixed parameters of the vehicle. The vehicle's gear position can be obtained through the On-Board Diagnostics (OBD). Specifically, based on the angle between the vehicle's front wheels and the vehicle body and the vehicle's gear ratio, the angle of the vehicle's front wheels is determined; based on the angle of the vehicle's front wheels and the vehicle's wheelbase, the vehicle's heading angle is determined; based on the length of the driving path and the path resolution, the number of path points on the driving path is determined; based on the vehicle coordinates, the angle of the vehicle's front wheels, the vehicle's heading angle, the vehicle's gear position, and the path resolution, the coordinates of each path point are determined to determine the driving path. For more descriptions on determining the driving path, please refer to this application Figure 2 , which will not be elaborated here.
[0034] Step S103: Determine the coverage area of the vehicle at each path point.
[0035] Since the vehicle has a certain volume and a path point is a coordinate point, after the vehicle travels to the path point, it will not only cover the path point but also cover multiple coordinate points around the path point. If it is only determined whether there is an obstacle based on whether there is an intersection between the coordinates of the path point and the coordinates of the obstacle, it is not accurate enough. Therefore, it is necessary to determine whether there is an obstacle in the coverage area of the vehicle at the path point after the vehicle travels to the path point. Since the coordinates of each path point are determined based on the vehicle coordinates, after the vehicle travels to the path point, the coordinates of the path point correspond to the vehicle coordinates of the vehicle at the path point, and the coordinates of other points of the vehicle need to be determined based on the vehicle size. Optionally, based on the vehicle size information and the vehicle coordinates, multiple target points on the vehicle's border and the relative coordinates of the multiple target points are determined, and the relative coordinates are the difference between the coordinates of the target point and the vehicle coordinates; based on the coordinates of each path point and the relative coordinates of the target points, the projection coordinates of the target points on each path point are determined; based on the projection coordinates of the target points on each path point, the coverage area of the vehicle at each path point is determined, where the coverage area includes multiple coordinates. For more descriptions on determining the coverage area of the path point, please refer to this application Figure 3 , which will not be elaborated here.
[0036] Step S104: Determine whether there is an obstacle in the coverage area of the vehicle at at least one path point.
[0037] Optionally, for at least one waypoint, determine whether there is an intersection between the coordinates of the obstacle and the coordinates of the coverage area of the vehicle at this waypoint. If there is an intersection between the coordinates of the obstacle and the coordinates of the coverage area of the vehicle at this waypoint, it is determined that there is an obstacle within the coverage area of the vehicle at this waypoint; if there is no intersection, it is determined that there is no obstacle within the coverage area of the vehicle at this waypoint.
[0038] Optionally, if there is no obstacle within the coverage area of the vehicle at at least one waypoint, perform step S108. In step S108, control the vehicle to travel at the current speed (for example, the set speed). That is, at this time, there is no need to adjust the speed of the vehicle.
[0039] If there is an obstacle within the coverage area of the vehicle at at least one waypoint, perform step S105. In step S105, determine the at least one waypoint as the target waypoint and determine the distance between the vehicle and the target waypoint. Optionally, sort the waypoints on the driving path to determine the sequence number of the target waypoint; based on the sequence number of the target waypoint and the path resolution, determine the distance between the vehicle and the target waypoint. For more descriptions on determining the distance between the vehicle and the target waypoint, please refer to this application Figure 4 , which will not be elaborated here.
[0040] Step S106, based on the distance between the vehicle and the target waypoint, determine the desired speed of the vehicle.
[0041] Optionally, if the distance between the vehicle and the target waypoint is less than or equal to the first threshold, determine the first speed as the desired speed of the vehicle. If the distance between the vehicle and the target waypoint is greater than the first threshold and less than or equal to the second threshold, determine the desired speed of the vehicle based on the distance between the vehicle and the target waypoint. If the distance between the vehicle and the target waypoint is greater than the second threshold, determine the second speed as the desired speed of the vehicle. For more descriptions on determining the desired speed of the vehicle, please refer to this application Figure 5 , which will not be elaborated here.
[0042] Step S107, control the speed of the vehicle to be adjusted to the desired speed.
[0043] In the embodiments of this application, the speed of the vehicle can be controlled by a throttle controller or a brake controller. Optionally, based on the desired speed, determine the control amount of the throttle controller or the brake controller; based on the control amount of the throttle controller or the brake controller, adjust the speed of the vehicle. For more descriptions on adjusting the speed of the vehicle, please refer to this application Figure 6 , which will not be elaborated here.
[0044] In an embodiment of the present application, first, the driving path of the vehicle is determined based on vehicle-related information, and the driving path can be updated in real time according to changes in the vehicle-related information. The method is simple and has a high accuracy rate. Second, it is determined whether there are obstacles within the coverage area of each path point of the vehicle. Compared with determining whether there are obstacles at the path points, the recognition accuracy of obstacles is higher and the judgment result is more accurate. In addition, since there are no lane lines in the target area, the vehicle can travel in a straight line or along a curve, and the straight-line distance between the vehicle and the obstacle may not reflect the driving distance when the vehicle travels to the obstacle. The distance between the vehicle and the target path point is used to represent the driving distance when the vehicle travels to the obstacle, and the target path point can be updated in real time according to the driving path, so the distance between the vehicle and the target path point can also be updated in real time, thereby the desired speed of the vehicle can be adjusted in real time, the accuracy of vehicle speed control can be improved, and the user experience can be improved.
[0045] Figure 2 is a schematic flowchart of a method for determining the driving path of a vehicle provided by an embodiment of the present application. As Figure 2 shown, the method includes the following steps.
[0046] Step S201: Determine the front-wheel angle of the vehicle based on the rotation angle between the front wheels and the vehicle body and the vehicle gear ratio.
[0047] Optionally, the front-wheel angle is determined by formula (1):
[0048] front_angle = M_PI * steerAngle / (180 * gear_ratio), (1)
[0049] where front_angle represents the front-wheel angle, M_PI represents π, steerAngle represents the rotation angle between the front wheels and the vehicle body, and gear_ratio represents the vehicle gear ratio.
[0050] Step S202: Determine the vehicle heading angle based on the front-wheel angle of the vehicle and the vehicle wheelbase.
[0051] Optionally, the vehicle heading angle is determined by formula (2):
[0052] turnning_radius = wheel_base / tan(fabs(front_angle)), (2)
[0053] where turnning_radius represents the vehicle heading angle, wheel_base represents the vehicle wheelbase, and fabs() represents taking the absolute value.
[0054] Step S203: Determine the number of path points on the driving path based on the length of the driving path and the path resolution.
[0055] In the embodiments of the present application, the length of the driving path is determined based on the vehicle gear. Exemplarily, if the vehicle gear is in the forward gear, the length of the driving path is set to 30; if the vehicle gear is in the reverse gear, the length of the driving path is set to 5. It can be understood that the length of the driving path can be adjusted according to the actual situation. For example, for a manual transmission vehicle, the length of the driving path can also be determined according to different gears in the forward gear. For another example, the length of the driving path can also be determined according to the driving speed of the vehicle, etc. The path resolution refers to the distance between adjacent path points, and the path resolution can be determined according to the driving speed of the vehicle. When the driving speed of the vehicle is relatively fast, a larger value is selected for the path resolution; when the driving speed of the vehicle is relatively slow, a smaller value is selected for the path resolution, and the present application does not limit this.
[0056] Optionally, the number of path points is obtained through formula (3):
[0057] m = floor(arc_length / path_interval), (3)
[0058] where m represents the number of path points, arc_length represents the length of the driving path, path_interval represents the path resolution, and floor() represents rounding down.
[0059] Step S204: Determine the coordinates of each path point based on the vehicle coordinates, the vehicle front wheel angle, the vehicle heading angle, the vehicle gear, and the path resolution, so as to determine the driving path.
[0060] Optionally, when the front wheel angle is greater than or equal to 0 and the vehicle gear is in the forward gear, the coordinates of the i-th path point are determined through formulas (4)-(6):
[0061] yaw = path_interval * i / turning_radius, (4)
[0062] xi = turning_radius * sin(yaw) + x0, (5)
[0063] yi = turning_radius * (1.0 - cos(yaw)) + y0, (6)
[0064] where 1 ≤ i ≤ m and i is an integer, yaw represents the orientation of the path point (i.e., the orientation of the vehicle); (x0, y0) represents the vehicle coordinates, and (xi, yi) represents the coordinates of the i-th path point.
[0065] Optionally, when the current wheel angle is greater than or equal to 0 and the vehicle gear is in reverse, the coordinates of the i-th path point are determined by formulas (7)-(9):
[0066] yaw = -1 * path_interval * i / turning_radius, (7)
[0067] xi = turning_radius * sin(yaw) + x0, (8)
[0068] yi = turning_radius * (1.0 - cos(yaw)) + y0, (9)
[0069] where 1 ≤ i ≤ m and i is an integer, yaw represents the orientation of the path point (i.e., the orientation of the vehicle); (x0, y0) represents the vehicle coordinates, and (xi, yi) represents the coordinates of the i-th path point.
[0070] Optionally, when the current wheel angle is less than 0 and the vehicle gear is in forward, the coordinates of the i-th path point are determined by formulas (10)-(12):
[0071] yaw = -1 * path_interval * i / turning_radius, (10)
[0072] xi = turning_radius * sin(-1 * yaw) + x0, (11)
[0073] yi = -1 * turning_radius + turning_radius * cos(yaw) + y0, (12)
[0074] where 1 ≤ i ≤ m and i is an integer, yaw represents the orientation of the path point (i.e., the orientation of the vehicle); (x0, y0) represents the vehicle coordinates, and (x, y) represents the coordinates of the i-th path point.
[0075] Optionally, when the current wheel angle is less than 0 and the vehicle gear is in reverse, the coordinates of the i-th path point are determined by formulas (13)-(15):
[0076] yaw = path_interval * i / turning_radius, (13)
[0077] xi = -1 * turning_radius * sin(yaw) + x0, (14)
[0078] yi = -1 * turning_radius + turning_radius * cos(yaw) + y0, (15)
[0079] Where 1 ≤ i ≤ m, and i is an integer, yaw represents the orientation of the path point (i.e., the orientation of the vehicle); (x0, y0) represents the vehicle coordinates, and (xi, yi) represents the coordinates of the i-th path point.
[0080] In the embodiments of the present application, by using vehicle-related information to predict the driving path of the vehicle and determine the coordinates of multiple path points on the driving path, the method is simple, has low requirements for computing power, and has a high prediction accuracy; in addition, when the vehicle-related information (e.g., vehicle heading angle, vehicle gear, etc.) changes, the driving path can be updated in real time.
[0081] Figure 3 It is a schematic flowchart of a method for determining the coverage area of a vehicle at a path point provided by an embodiment of the present application. The method includes the following steps.
[0082] Step S301: Based on the vehicle size information and vehicle coordinates, determine multiple target points on the vehicle's border and the relative coordinates of the multiple target points.
[0083] The relative coordinate of a target point is the difference between the coordinate of the target point and the vehicle coordinates.
[0084] In the embodiments of the present application, the vehicle size information includes the length and width of the vehicle, the distance from the center point of the vehicle's rear axle to the rear of the vehicle, etc., and the vehicle coordinates are the coordinates of the center point of the vehicle's rear axle. Select multiple target points on the border of the vehicle, for example, n target points. The multiple target points can reflect the contour information of the vehicle, and determine the coordinate difference between the target point and the vehicle coordinates, that is, the relative coordinate of the target point.
[0085] Step S302: Based on the coordinates of each path point and the relative coordinates of the target points, determine the projection coordinates of the target points at each path point.
[0086] Optionally, the projection coordinates of the j-th target point at the i-th path point are determined by formulas (16)-(17):
[0087] new_pt.xj = xi + (footprint_spec[j].x * cos_yaw - footprint_spec[j].y * sin_yaw), (16)
[0088] new
[0089] _pt.yj = yi + (footprint_spec[j].x * sin_yaw + footprint_spec[j].y * cos_yaw), (17)
[0090] Where 1 ≤ i ≤ m, and i is an integer, 1 ≤ j ≤ n, and j is an integer, (footprint_spec[j].x, footprint_spec[j].y) represents the relative coordinates of the j-th target point, yaw represents the orientation of the path point (i.e., the orientation of the vehicle), (xi, yi) represents the coordinates of the i-th path point, and (new_pt.xj, new_pt.yj) represents the projected coordinates of the j-th target point on the i-th path point.
[0091] S303. Determine the coverage area of the vehicle at each path point based on the projected coordinates of the target point at each path point.
[0092] Optionally, for each path point, determine the coverage area of the vehicle at this path point based on the projected coordinates of the target point at this path point. For example, after obtaining the projected coordinates of the target point, use the Coordinate toolkit in C++ and then call the createLinearRing and createPolygon functions therein to obtain the coverage area of the vehicle at this path point.
[0093] In the embodiments of the present application, determining the coverage area of the vehicle at each path point according to the vehicle size can more accurately determine the area covered by the vehicle during driving and be more accurate when making obstacle judgments.
[0094] Figure 4 It is a schematic flowchart of a method for determining the distance between a vehicle and a target path point provided by an embodiment of the present application. The method includes the following steps.
[0095] Step S401. Sort the path points on the driving path and determine the serial number of the target path point.
[0096] In the embodiments of the present application, sort in the order from near to far according to the distance between the path point and the current position of the vehicle. For example, the serial number of the first path point close to the vehicle is 1, the serial number of the second path point is 2,..., and the serial number of the m-th path point is m.
[0097] Step S402. Determine the distance between the vehicle and the target path point based on the serial number of the target path point and the path resolution.
[0098] Optionally, the distance between the vehicle and the target path point can be determined by formula (18):
[0099] elsec_leading_distance = path_interval * path_index, (18)
[0100] Among them, elsec_leading_distance represents the distance between the vehicle and the target path point, path_interval represents the path resolution, and path_index represents the serial number of the path point.
[0101] In the embodiment of the present application, using the distance between the vehicle and the target path point to reflect the driving distance of the vehicle to the obstacle conforms to the driving trajectory of the vehicle; and the target path point can be updated in real time according to the driving path, then the distance between the vehicle and the target path point can also be updated in real time, so that the determined desired speed of the vehicle is more accurate.
[0102] Figure 5 It is a schematic flowchart of a method for determining the desired speed of a vehicle provided by an embodiment of the present application. As Figure 5 shown, the method includes the following steps.
[0103] Step S501, determine whether the distance between the vehicle and the target path point is less than or equal to the first threshold.
[0104] Optionally, the first threshold is the minimum braking distance. For example, the first threshold is 2m, 2.5m, 3m, etc. If the distance between the vehicle and the target path point is less than or equal to the first threshold, execute step S502. In step S502, determine the first speed as the desired speed of the vehicle. In the embodiment of the present application, the first speed is 0. When the distance between the vehicle and the target path point is less than or equal to the first threshold, emergency braking is required and the vehicle brakes directly. At this time, the desired speed of the vehicle is 0.
[0105] If the distance between the vehicle and the target path point is greater than the first threshold, execute step S503. In step S503, determine whether the distance between the vehicle and the target path point is less than or equal to the second threshold. If the distance between the vehicle and the target path point is less than or equal to the second threshold, execute step S504. In the embodiment of the present application, the second threshold is the minimum safety distance when the vehicle travels at the current speed. Optionally, the current speed is a set speed.
[0106] In step S504, based on the distance between the vehicle and the target path point, determine the desired speed of the vehicle.
[0107] Optionally, the desired speed of the vehicle is determined by formula (19):
[0108]
[0109] Wherein, elec_max_allowable_velocity represents the desired speed of the vehicle, max_deceleraton represents the braking deceleration, reaction_time represents the response time, elec_leading_distance represents the distance between the vehicle and the target path point, and min_elec_brake_disance represents the minimum braking distance. The braking deceleration is an inherent parameter of the vehicle, and the response time is a set value. Optionally, different minimum braking distances are selected for static obstacles and dynamic obstacles. When the type of the obstacle is determined, the minimum braking distance is a fixed value. Therefore, the desired speed of the vehicle depends on the distance between the vehicle and the target path point, and when the distance between the vehicle and the target path point changes, the desired speed of the vehicle changes.
[0110] Optionally, if the distance between the vehicle and the target path point is greater than the second threshold, step S505 is executed. In step S505, the second speed is determined as the desired speed of the vehicle. In the embodiment of the present application, the second speed may be the current speed, that is, the set speed.
[0111] In the embodiment of the present application, different desired speeds are determined according to the different distances between the vehicle and the target path point, which can improve the user experience.
[0112] Figure 6 It is a schematic flowchart of a method for adjusting the speed of a vehicle provided by an embodiment of the present application. As Figure 6 shown, the method includes the following steps.
[0113] Step S601, based on the desired speed, determine the control amount of the throttle controller or the brake controller.
[0114] In the embodiment of the present application, the throttle controller and the brake controller are two control methods for controlling the vehicle speed or the vehicle acceleration. In the embodiment of the present application, a proportional-integral-derivative (PID) control system is used to determine the control amount of the throttle controller or the brake controller.
[0115] Optionally, the control amount of the throttle controller is determined by formula (20):
[0116] delta_th
[0117] = kp_th * (now_error_th - last_error_th) + ki_th * now_error_th + kd_th
[0118] *(now_error_th + last_last_error_th - 2 * last_error_th)
[0119] ,(20)
[0120] where delta_th represents the control amount of the throttle controller, now_error_th represents the control error of the throttle controller in this cycle (the difference between the target value and the actual value), last_error_th represents the control error of the throttle controller in the previous cycle, and last_last_error_th represents the control error of the throttle controller in the cycle before the previous cycle; kp_th, ki_th, and kd_th respectively represent the parameters of the throttle controller.
[0121] Optionally, the control amount of the brake controller is determined by formula (21):
[0122]
[0123] where delta_brake represents the control amount of the brake controller, now_error_brake represents the control error of the brake controller in this cycle (the difference between the target value and the actual value), last_error_brake represents the control error of the brake controller in the previous cycle, and last_last_error_brake represents the control error of the brake controller in the cycle before the previous cycle; kp_br, ki_br, and kd_br respectively represent the parameters of the brake controller.
[0124] Step S602, based on the control amount of the throttle controller or the brake controller, adjust the speed of the vehicle.
[0125] Optionally, send the control amount of the throttle controller to the lower computer to adjust the speed of the vehicle. Or, send the control amount of the brake controller to the lower computer to adjust the speed of the vehicle.
[0126] Figure 7 is the structural block diagram of a vehicle speed control device provided by an exemplary embodiment of the present application. As Figure 7 shown, the vehicle speed control device 700 includes an acquisition module 701, a determination module 702, and a control module 703.
[0127] The acquisition module 701 is used to acquire the environmental map of the target area. The environmental map includes obstacles and the coordinates of the obstacles.
[0128] Optionally, the obtaining module 702 is further configured to obtain a first map of the target area; draw an electronic fence on the first map to obtain a second map of the target area; obtain a third map around the vehicle; splice the second map and the third map to obtain an environmental map.
[0129] The determining module 702 is configured to determine a driving path of the vehicle based on vehicle-related information. The driving path includes a plurality of path points and the coordinates of the plurality of path points. The determining module 702 is further configured to determine the coverage area of the vehicle at each path point, and determine whether there is an obstacle in the coverage area of the vehicle at at least one path point based on the coordinates of the obstacle. The determining module 702 is further configured to, if there is an obstacle in the coverage area of the vehicle at at least one path point, determine at least one path point as a target path point, and determine the distance between the vehicle and the target path point. The determining module 702 is further configured to determine the desired speed of the vehicle based on the distance between the vehicle and the target path point.
[0130] Optionally, the determining module 702 is further configured to determine the front-wheel angle of the vehicle based on the angle between the front wheels of the vehicle and the body of the vehicle and the vehicle gear ratio; determine the vehicle heading angle based on the front-wheel angle of the vehicle and the wheelbase of the vehicle; determine the number of path points on the driving path based on the length and path resolution of the driving path, where the length of the driving path is determined based on the vehicle gear; determine the coordinates of each path point based on the vehicle coordinates, the front-wheel angle of the vehicle, the vehicle heading angle, the vehicle gear, and the path resolution, so as to determine the driving path.
[0131] Optionally, the determining module 702 is further configured to determine a plurality of target points on the border of the vehicle and the relative coordinates of the plurality of target points based on the vehicle size information and the vehicle coordinates, where the relative coordinates of the target points are the difference between the coordinates of the target points and the vehicle coordinates; determine the projected coordinates of the target points at each path point based on the coordinates of each path point and the relative coordinates of the target points; determine the coverage area of the vehicle at each path point based on the projected coordinates of the target points at each path point, and the coverage area includes a plurality of coordinates.
[0132] Optionally, the determining module 702 is further configured to sort the path points on the driving path and determine the sequence number of the target path point; determine the distance between the vehicle and the target path point based on the sequence number of the target path point and the path resolution.
[0133] Optionally, the determining module 702 is further configured to, if the distance between the vehicle and the target path point is less than or equal to a first threshold, determine the first speed as the desired speed of the vehicle; if the distance between the vehicle and the target path point is greater than the first threshold and less than or equal to a second threshold, determine the desired speed of the vehicle based on the distance between the vehicle and the target path point; if the distance between the vehicle and the target path point is greater than the second threshold, determine the second speed as the desired speed of the vehicle.
[0134] The control module 703 is used to adjust the speed of the vehicle to the desired speed.
[0135] Optionally, the control module 702 is further configured to determine the control amount of the throttle controller or the brake controller based on the desired speed; and adjust the speed of the vehicle based on the control amount of the throttle controller or the brake controller.
[0136] The specific working principle and benefits of the vehicle speed control device provided in the embodiments of the present application are similar to those of the vehicle speed control method provided in the embodiments of the present application, and will not be elaborated here.
[0137] Next, refer to Figure 8 to describe the electronic device according to the embodiments of the present application. Figure 8 The following shows a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application.
[0138] As Figure 8 shown, the electronic device 800 includes one or more processors 801 and a memory 802.
[0139] The processor 801 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 800 to perform desired functions.
[0140] The memory 802 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage media, and the processor 801 may run the program instructions to implement the vehicle speed control methods of the various embodiments of the present application described above and / or other desired functions. Various contents such as an environmental map including a target area, a driving path of the vehicle, etc. may also be stored in the computer-readable storage media.
[0141] In one example, the electronic device 800 may further include: an input device 803 and an output device 804, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown).
[0142] The input device 803 may include, for example, a keyboard, a mouse, etc.
[0143] The output device 804 can output various information externally, including the distance between the vehicle and the target waypoint, the desired speed of the vehicle, etc. The output device 804 can include, for example, a display, a speaker, a printer, a communication network, and remote output devices connected thereto.
[0144] Of course, for simplicity, Figure 8 only some of the components related to this application in the electronic device 800 are shown, and components such as buses, input / output interfaces, etc. are omitted. In addition, according to specific application scenarios, the electronic device 800 may further include any other appropriate components.
[0145] In addition to the above methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions that, when run by a processor, cause the processor to execute the steps in the vehicle speed control method according to various embodiments of the present application described above in this specification.
[0146] The computer program product can be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present application. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, executed as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0147] Furthermore, an embodiment of the present application may also be a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are run by a processor, the processor is caused to execute the steps in the vehicle speed control method according to various embodiments of the present application described above in this specification.
[0148] The computer-readable storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0149] The basic principles of the present application have been described in conjunction with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in the present application are only examples and not limitations. It cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of the present application. Additionally, the specific details disclosed above are only for illustrative and facilitating understanding purposes, rather than limitations. These details do not limit the present application to necessarily implement using the above specific details.
[0150] The block diagrams of the devices, apparatuses, equipment, and systems involved in the present application are only illustrative examples and do not intend to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open-ended terms, meaning "including but not limited to", and can be used interchangeably with each other. The word "or" and "and" used herein refer to the phrase "and / or", and can be used interchangeably with it, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0151] It should also be noted that in the devices, equipment, and methods of the present application, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present application.
[0152] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
[0153] The above description has been given for purposes of illustration and description. Additionally, this description does not intend to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions, and sub-combinations thereof.
Claims
1. A vehicle speed control method, characterized in that: include: Acquire an environment map of the target area, wherein the environment map includes obstacles and coordinates of the obstacles; Determine a driving path of the vehicle based on the vehicle-related information, wherein the driving path includes a plurality of path points and coordinates of the plurality of path points; Determining a coverage area of the vehicle at each of the path points; Determining whether the vehicle has the obstacle within a coverage area of at least one of the waypoints based on the coordinates of the obstacle; If the obstacle exists in the coverage area of at least one of the waypoints, determining at least one of the waypoints as a target waypoint, and determining the distance between the vehicle and the target waypoint; determining a desired speed of the vehicle based on a distance between the vehicle and the target waypoint; Controlling the speed of the vehicle to adjust to the desired speed; The vehicle-related information includes vehicle coordinates, a turning angle between the front wheels of the vehicle and the vehicle body, a vehicle gear ratio, a vehicle wheelbase, and a vehicle gear position; and determining the driving path of the vehicle based on the vehicle-related information includes: Determining a front wheel steering angle of the vehicle based on a steering angle between the front wheel of the vehicle and the vehicle body and a gear ratio of the vehicle; Determining a vehicle heading angle based on the vehicle front wheel turning angle and the vehicle wheelbase; Determining the number of path points on the driving path based on the length of the driving path and the path resolution, wherein the length of the driving path is determined based on the gear position of the vehicle; Determine the coordinates of each of the path points based on the vehicle coordinates, the vehicle front wheel turning angle, the vehicle heading angle, the vehicle gear position and the path resolution to determine the driving path; Determining the distance between the vehicle and the target path point includes: Sorting the path points on the driving path and determining the sequence number of the target path point; Based on the sequence number of the target path point and the path resolution, a distance between the vehicle and the target path point is determined.
2. The method according to claim 1, characterized in that Determining the coverage area of the vehicle at each of the path points includes: Based on the vehicle size information and the vehicle coordinates, determining a plurality of target points on the border of the vehicle and relative coordinates of the plurality of target points, wherein the relative coordinates of the target points are differences between the coordinates of the target points and the vehicle coordinates; Based on the coordinates of each of the path points and the relative coordinates of the target point, determining the projection coordinates of the target point at each of the path points; Based on the projection coordinates of the target point at each of the path points, a coverage area of the vehicle at each of the path points is determined, where the coverage area includes a plurality of coordinates.
3. The method according to claim 1, characterized in that The determining the expected speed of the vehicle based on the distance between the vehicle and the target path point includes: If the distance between the vehicle and the target path point is less than or equal to a first threshold, determining a first speed as a desired speed of the vehicle; If the distance between the vehicle and the target waypoint is greater than a first threshold and less than or equal to a second threshold, determining a desired speed of the vehicle based on the distance between the vehicle and the target waypoint; If the distance between the vehicle and the target path point is greater than a second threshold, the second speed is determined as the expected speed of the vehicle.
4. The method according to any one of claims 1 to 3, characterized in that: The controlling the speed of the vehicle to adjust to the desired speed comprises: determining a control amount of a throttle controller or a brake controller based on the desired speed; Based on the control amount of the throttle controller or the brake controller, the speed of the vehicle is adjusted.
5. The method according to any one of claims 1 to 3, characterized in that: Before acquiring the environment map of the target area, the method includes: Acquire a first map of the target area; Drawing an electronic fence on the first map to obtain a second map of the target area; Acquire a third map around the vehicle; The second map and the third map are spliced together to obtain the environment map.
6. A vehicle speed control device, characterized in that: include: An acquisition module, used to acquire an environment map of a target area, wherein the environment map includes obstacles and coordinates of the obstacles; A determination module, configured to determine a driving path of the vehicle based on the vehicle-related information, wherein the driving path includes a plurality of path points and coordinates of the plurality of path points; The determination module is further used to determine the coverage area of the vehicle at each of the path points; The determination module is further used to determine whether the vehicle has the obstacle in a coverage area of at least one of the path points based on the coordinates of the obstacle; The determination module is further configured to, if the obstacle exists within the coverage area of at least one of the path points, determine at least one of the path points as a target path point, and determine the distance between the vehicle and the target path point; The determination module is further configured to determine a desired speed of the vehicle based on a distance between the vehicle and the target path point; A control module, used for controlling the speed of the vehicle to adjust to the desired speed; The vehicle-related information includes vehicle coordinates, a turning angle between the front wheels of the vehicle and the vehicle body, a vehicle gear ratio, a vehicle wheelbase, and a vehicle gear position; and determining the driving path of the vehicle based on the vehicle-related information includes: Determining a front wheel steering angle of the vehicle based on a steering angle between the front wheel of the vehicle and the vehicle body and a gear ratio of the vehicle; Determining a vehicle heading angle based on the vehicle front wheel turning angle and the vehicle wheelbase; Determining the number of path points on the driving path based on the length of the driving path and the path resolution, wherein the length of the driving path is determined based on the gear position of the vehicle; Determine the coordinates of each of the path points based on the vehicle coordinates, the vehicle front wheel turning angle, the vehicle heading angle, the vehicle gear position and the path resolution to determine the driving path; Determining the distance between the vehicle and the target path point includes: Sorting the path points on the driving path and determining the sequence number of the target path point; Based on the sequence number of the target path point and the path resolution, a distance between the vehicle and the target path point is determined.
7. An electronic device, characterized in that: include: processor; A memory, the memory is connected to the processor, the memory is used to store a computer program, and the computer program, when executed by the processor, implements the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Anti-collision method and device for autonomous vehicle
CN116443049A