Image rendering-based vehicle trajectory working condition editing method and device

By using image rendering technology, the test site's working condition files are converted into SVG images. Users can select trajectory points on the image and input speed commands. The system combines maximum acceleration and maximum deceleration for smoothing, which solves the problem of unstable speed in automated road testing of unmanned vehicles and achieves intuitive and efficient trajectory editing.

CN122492883APending Publication Date: 2026-07-31SHANGHAI ECAR TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI ECAR TECHNOLOGY CO LTD
Filing Date
2026-05-20
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In automated road testing of unmanned vehicles, existing technologies struggle to precisely control vehicle speed, leading to unstable speeds during long-term repeated testing and making it difficult to achieve the ideal driving speed.

Method used

Using image rendering technology, the test field's working condition files are converted into visualized SVG images. Users select trajectory points on the image and input velocity commands. The images are then combined with maximum acceleration and maximum deceleration for smoothing, generating smooth trajectory working condition data.

Benefits of technology

It achieves intuitive and efficient vehicle trajectory editing, allowing users to intuitively adjust vehicle trajectory and speed on the image, improving the efficiency of trajectory condition file editing and the stability of vehicle testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492883A_ABST
    Figure CN122492883A_ABST
Patent Text Reader

Abstract

This invention discloses a vehicle trajectory condition editing method based on image rendering, comprising: obtaining a test field condition file; performing image rendering on the test field condition file to obtain a test image, the test image including a test field image and a vehicle driving trajectory; displaying the test image and selecting one or more road segment units on the test image; receiving an externally input speed command corresponding to the road segment unit, and using the speed command to update the vehicle speed corresponding to the road segment unit; receiving an externally input acceleration command to set a maximum acceleration and a maximum deceleration, and smoothing the speed value of the road segment unit whose speed is being updated based on the maximum acceleration and maximum deceleration to obtain smoothed trajectory condition data; and exporting the trajectory condition data to a vehicle controller in a preset type for vehicle condition testing. Compared with the prior art, this invention is intuitive to operate and has high trajectory editing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle driving, and more particularly to a method and apparatus for editing trajectory conditions in automatic road testing of vehicles. Background Technology

[0002] When conducting automated road tests of autonomous vehicles, a scheme is adopted that involves collecting vehicle driving condition data and then controlling the vehicle to automatically repeat the driving according to the data through program control for long-term repeated testing. However, in the initial data collection phase, the vehicle is driven manually using remote control or similar methods. This method results in difficulties in accurately controlling the speed of the collected data, and the remote control speed is limited. Consequently, it is difficult to maintain the ideal driving speed during the subsequent long-term automatic repeated driving test according to the data.

[0003] Therefore, there is an urgent need for a method and device for editing vehicle trajectory conditions that can solve the above problems. Summary of the Invention

[0004] The purpose of this invention is to provide a vehicle trajectory condition editing method and apparatus based on image rendering, which is intuitive to operate and has high trajectory editing efficiency.

[0005] To achieve the above objectives, the present invention provides a vehicle trajectory condition editing method based on image rendering, comprising: obtaining a test track condition file, the test track condition file including a map file of the test track and a driving file of the vehicle actually tested on the test track, the driving file including trajectory points of the vehicle and speed values ​​corresponding to the trajectory points; performing image rendering on the test track condition file to obtain a test image, the test image including a test track image and a vehicle driving trajectory; displaying the test image and selecting one or more road segment units on the test image; receiving an externally input speed command corresponding to the road segment unit and using the speed command to update the vehicle speed corresponding to the road segment unit; receiving an externally input acceleration command to set a maximum acceleration and a maximum deceleration, and smoothing the speed values ​​of the road segment units whose speed is being updated based on the maximum acceleration and maximum deceleration to obtain smoothed trajectory condition data; and exporting the trajectory condition data to a vehicle controller in a preset type for vehicle condition testing.

[0006] Preferably, obtaining the test track condition file includes: obtaining the target condition file of the vehicle's actual test at the test track, reading the driving file in the target condition file; obtaining the map file of the test track, and loading the driving file into the map file of the test track.

[0007] Preferably, the process of rendering the test field condition file to obtain a test image includes: the test field condition file containing the latitude and longitude coordinates of points in several map files and driving files; obtaining the maximum and minimum values ​​of the point coordinates in the test field condition file to obtain the latitude and longitude coordinates of four vertices; using the latitude and longitude coordinates of the four vertices as the four vertices of the canvas, and converting the latitude and longitude coordinates of all points in the test field condition file into pixel coordinates; traversing all points in the test field condition file and rendering the pixel coordinates of all points as image elements, thereby obtaining a test image rendered with the test field map and vehicle trajectory conditions.

[0008] Preferably, selecting a road segment unit on the test image includes: selecting two trajectory points sequentially on the vehicle's driving trajectory in the test image according to an externally input trajectory point selection command, and using the two trajectory points as the start and end points in sequence to generate a road segment unit between the two trajectory points; when multiple road segment units are selected on the test image, the above steps are repeated until multiple road segment units are generated.

[0009] Specifically, selecting a trajectory point on the vehicle's driving trajectory in the test image according to the externally input trajectory point selection command includes: selecting a pixel coordinate on the test image according to the externally input trajectory point selection command; finding the trajectory point closest to the selected pixel coordinate; calculating the coordinate distance between the found trajectory point's pixel coordinate and the selected pixel coordinate; determining whether the coordinate distance exceeds a preset threshold; if so, determining that the trajectory point is not selected; otherwise, determining that a trajectory point is selected; repeating the above steps until another trajectory point is selected to prevent accidental operation.

[0010] Preferably, smoothing the speed value of the road segment unit for speed updating includes: assuming the vehicle's trajectory has n trajectory points, namely C1, C2, C3...C n After the speed update, the speed values ​​corresponding to the trajectory points are V1, V2, V3...V n Let i = 1, 2, 3...n. Starting from i = 2, traverse towards i = n, and find the point C on the trajectory. i velocity value V i Greater than trajectory point C i-1 velocity value V i-1 At that time, with trajectory point C i-1 velocity value V i-1 Based on the maximum acceleration, the trajectory point C is calculated. i Maximum achievable speed V i-max-a , in (V i-1 V i-max-a Choose the minimum value among () as the current trajectory point V. i Smoothed velocity value V i-aThen traverse from i=n-1 to i=1, at trajectory point C i velocity value V i Greater than trajectory point C i+1 velocity value V i+1 At that time, with the trajectory point C i+1 velocity value V i+1 Based on the maximum deceleration, the trajectory point V is calculated. i The maximum speed that can be achieved, V i-max-b , in (V i-max-b V i+1 Choose the minimum value among () as the current trajectory point V. i Smoothed velocity value V i-b .

[0011] Preferably, receiving the speed command corresponding to the road segment unit from an external input and updating the vehicle speed corresponding to the road segment unit using the speed command includes: displaying a speed command input item for the road segment unit on the interface displaying the test image. The speed command input item includes the first and last coordinate points in the selected road segment unit and an indicator box for inputting the speed command, so as to instruct the user to input the corresponding speed command, and updating the vehicle speed of the road segment unit according to the speed command input in the corresponding indicator box.

[0012] Preferably, after generating a road segment unit between each of the trajectory points, the generated road segment unit is also indicated on the test image, and the speed value of the corresponding road segment unit in the target working condition file is displayed at the same time. The speed command input item is also displayed on the interface of the test image. The rendered image, the selected road segment unit, and the input port of the speed input item are displayed on the same display interface, so that the user can operate intuitively.

[0013] Preferably, the image rendering is SVG rendering, and the test image is an SVG image.

[0014] The present invention also provides a vehicle trajectory condition editing device based on image rendering, including a processor, a memory and one or more operation instructions, wherein the operation instructions are stored in the memory, and the processor executes the operation instructions to realize the vehicle trajectory condition editing method based on image rendering as described above.

[0015] Compared with existing technologies, this invention loads the operating condition files obtained from actual operating condition tests onto a vehicle test track for image rendering. Users can directly click to select trajectory points on the rendered test image to adjust the speed, and the adjusted speed values ​​are also smoothed. These technical features enable this invention to render a large set of trajectory operating condition points into a visualized map, intuitively displaying the vehicle's trajectory. By overlaying the map rendered from the test track, test personnel can directly see the vehicle's trajectory at different locations and specifically set the target speed for the vehicle on different road sections in the test track by selecting points and inputting parameters, thus improving the efficiency of trajectory operating condition file editing. Attached Figure Description

[0016] Figure 1 This is a flowchart of the vehicle trajectory condition editing method based on image rendering according to the present invention.

[0017] Figure 2 This is a test image rendered by the present invention.

[0018] Figure 3 This is the test image interface for changing the speed after selecting a road segment unit according to the present invention.

[0019] Figure 4 This is a structural diagram of the vehicle trajectory condition editing device based on image rendering according to the present invention.

[0020] Figure 5 It is a v / t curve, which is the corresponding curve of speed value and time in the driving trajectory data file collected by manually remotely controlled vehicle driving.

[0021] Figure 6 It is a curve showing the vehicle's speed and time in the trajectory data after speed editing - a v / t curve.

[0022] Figure 7 This invention describes the specific steps involved in obtaining the target operating condition file of a vehicle during actual testing at a test site. Detailed Implementation

[0023] To illustrate the technical content, structural features, objectives, and effects of the present invention in detail, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0024] refer to Figure 1 This invention discloses a vehicle trajectory condition editing method based on image rendering, including steps S1 to S6. The vehicle in this invention includes an unmanned vehicle.

[0025] S1, obtain the test track condition file, which includes the test track map file and the actual driving file of the vehicle in the test track. The driving file includes the trajectory points of the vehicle and the speed values ​​corresponding to the trajectory points.

[0026] refer to Figure 7 Step S1 includes steps S11 to S14.

[0027] S11, Obtain the target operating condition file of the vehicle during actual testing at the test site. This target operating condition file is a driving trajectory operating condition file collected by the manually controlled unmanned vehicle. The driving trajectory operating condition file includes a set of points for the driving process, and each point includes information such as coordinates, heading angle, and speed. The distance between adjacent points is fixed. This target operating condition file is a CSV file.

[0028] S12, read the driving file in the target working condition file, the driving file consists of the trajectory points of the vehicle and the speed values ​​corresponding to the trajectory points.

[0029] S13, retrieve the map file for the test site. This map file is a high-precision GeoJSON map of the test site.

[0030] S14, the driving file is loaded into the map file of the test field. Specifically, the information of the aforementioned point set is packaged into GeoJSON format elements, appended to the GeoJSON data of the map file, and a marker attribute is set. Subsequently, the set of trajectory points in this point set is retrieved from this marker. The coordinates of each point in the map file are latitude and longitude coordinates.

[0031] S2, The test field condition file is rendered to obtain a test image, which includes a test field image and a vehicle trajectory. This image is rendered as an SVG image.

[0032] Specifically, the test condition file includes the latitude and longitude coordinates of points in several map files and driving files. Step S2 includes steps S21 to S23.

[0033] S21, obtain the maximum and minimum values ​​of the point coordinates in the test condition file to obtain the latitude and longitude coordinates of the four vertices: [MAX(latitude), MAX(longitude)], [MAX(latitude), MIN(longitude)], [MIN(latitude), MAX(longitude)], [MIN(latitude), MIN(longitude)].

[0034] S22: Using the latitude and longitude coordinates of the four vertices as the four vertices of the canvas, the latitude and longitude coordinates of all points in the test case file are converted into pixel coordinates to represent the pixel position of each point in the SVG image. Specifically, a projection function is used to convert the coordinates of all points in the test case file into pixel coordinates.

[0035] S23, traverse all points in the test condition file, render the pixel coordinates of all points as image elements, and thus obtain a test image with a test field map and vehicle trajectory conditions rendered.

[0036] For line elements, the pixel coordinates are rendered as... <path>For point elements, the pixel coordinate set is rendered as <g> <circle>< / circle> << / g> This results in a graphical representation of the test track map and vehicle trajectory conditions rendered on the page. (Reference) Figure 2 The rendered SVG image consists of gray and black elements representing test track lane lines and reinforced sections, and blue elements representing vehicle trajectories.

[0037] S3, display the test image, and select one or more road segment units on the test image.

[0038] Step S3 includes: selecting two trajectory points sequentially on the vehicle's trajectory in the test image according to the externally input trajectory point selection command, and using these two trajectory points as the start and end points respectively to generate a road segment unit between the two trajectory points; when multiple road segment units are selected on the test image, the above steps are repeated until multiple road segment units are generated. Specifically, in the SVG image (test image)... <svg>Add a click event to obtain the pixel coordinates of the user's mouse click position, so as to accept external input trajectory point selection commands.

[0039] Specifically, the steps for sequentially selecting two trajectory points on the vehicle's driving trajectory in the test image according to the externally input trajectory point selection command are as follows: Select a pixel coordinate on the test image according to the externally input trajectory point selection command; find the trajectory point closest to the selected pixel coordinate among the points with previously set marking attributes; calculate the coordinate distance between the found trajectory point's pixel coordinate and the selected pixel coordinate; determine whether the coordinate distance exceeds a preset threshold; if so, determine that the trajectory point is not selected; otherwise, determine that a trajectory point is selected; repeat the above steps until another trajectory point is selected to prevent accidental operation.

[0040] S4, receive the speed command corresponding to the road segment unit from external input, and use the speed command to update the vehicle speed corresponding to the road segment unit.

[0041] Specifically, the original speed values ​​of all points in the selected road segment unit are replaced with the speed values ​​corresponding to the input speed command.

[0042] During the rendering and display of the rendered image, a list input form for road segment units is also displayed on the interface for displaying the test image. This list input form provides a speed command input field. Figure 3 The speed command input field includes the coordinates of the beginning and end of the selected road segment unit and an indicator box for inputting the speed command, guiding the user to enter the corresponding speed command. The vehicle speed in the road segment unit is updated based on the speed command entered in the corresponding indicator box. This solution allows the present invention to simultaneously display the rendered image, the selected road segment unit, and the input port for the speed input field on the same display interface, enabling intuitive user operation.

[0043] S5, receive an external acceleration command to set the maximum acceleration and maximum deceleration, and smooth the speed value of the road segment unit that is updating speed based on the maximum acceleration and maximum deceleration to obtain smoothed trajectory condition data.

[0044] In addition to rendering and displaying the rendered image, an acceleration command input item is also provided in the list input form.

[0045] If multiple consecutive road segment units are selected and there is an intersection between the two road segment units, the speed value updated by the later road segment unit will be used. For unselected trajectory points or road segment units where no update speed is set, the speed value in the original vehicle trajectory will be used.

[0046] Step S5, which smooths the speed values ​​of the road segment units undergoing speed updates based on the maximum acceleration and maximum deceleration, specifically includes: for the trajectory points of the vehicle's travel trajectory, traversing backwards from the first trajectory point, when the speed value of the current trajectory point is greater than the speed value of the previous trajectory point, calculating the maximum speed achievable by the current trajectory point based on the maximum acceleration, and selecting the minimum value between the maximum speed and the original speed value as the speed value of the current trajectory point. Then, traversing backwards from the last trajectory point, when the speed value of the current trajectory point is greater than the speed value of the previous trajectory point, calculating the maximum speed achievable by the current trajectory point based on the maximum deceleration, and selecting the minimum value between the maximum speed and the original speed value as the speed value of the current trajectory point.

[0047] For example, suppose there are n trajectory points of the vehicle's driving trajectory, namely C1, C2, C3...C n After the speed update, the speed values ​​corresponding to the trajectory points are V1, V2, V3...V n Let i = 1, 2, 3...n. Starting from i = 2, traverse towards i = n, and find the point C on the trajectory. i velocity value V i Greater than trajectory point C i-1 velocity value V i-1 At that time, with trajectory point C i-1 velocity value V i-1 Based on the maximum acceleration, the trajectory point C is calculated. i Maximum achievable speed V i-max-a , in (V i-1 V i-max-a Choose the minimum value among () as the current trajectory point V. i Smoothed velocity value V i-a Then traverse from i=n-1 to i=1, at trajectory point C i velocity value V i Greater than trajectory point C i+1 velocity value V i+1 At that time, with the trajectory point C i+1 velocity value V i+1 Based on the maximum deceleration, the trajectory point V is calculated. i The maximum speed that can be achieved, V i-max-b , in (V i-max-b V i+1 Choose the minimum value among () as the current trajectory point V. i Smoothed velocity value V i-b .

[0048] In the above embodiments, the speed is directly smoothed using the maximum acceleration and maximum deceleration. In contrast, other smoothing strategies are also used. For example, within the limits of the maximum acceleration and maximum deceleration values, it is determined whether the speed can be adjusted to the target speed within the distance of three trajectory points. If so, the speed values ​​of the three trajectory points are adjusted uniformly; otherwise, the speed is adjusted directly using either the maximum or minimum acceleration value.

[0049] Preferably, after generating a road segment unit between each trajectory point, the generated road segment unit is also indicated on the test image, and the speed value of the corresponding road segment unit in the target working condition file is displayed simultaneously. This speed value can be the speed value of each trajectory point, or it can be the average speed of the selected target working condition file.

[0050] S6, export the trajectory condition data to the vehicle controller in a preset type for vehicle condition testing.

[0051] Clicking the export button on the interface where the test image is located will export the trajectory working condition data as a CSV file. This file will then be inserted into the vehicle controller, allowing the vehicle to repeatedly drive and perform road tests according to the modified target working conditions.

[0052] refer to Figure 4 The present invention also provides a vehicle trajectory condition editing device based on image rendering, including a processor 21, a memory 22 and one or more operation instructions 23, wherein the operation instructions 23 are stored in the memory 22, and the processor 21 executes the operation instructions to realize the vehicle trajectory condition editing method based on image rendering as described above.

[0053] refer to Figure 5 In one embodiment, the speed and time curve (v / t curve) in the driving trajectory data file collected by manually remotely controlling the vehicle shows that the speed is not constant and fluctuates significantly, depending on temporary operations during remote control. (Reference) Figure 6 In this embodiment, after speed editing is performed using the vehicle trajectory condition editing method based on image rendering, the corresponding curve of vehicle speed value and time in the trajectory condition data is the -v / t curve. In step S5, after the speed is set according to the target value and smoothed by the maximum acceleration / deceleration limit, the present invention can meet the requirement of the vehicle to travel stably at the target speed on a specific road section.

[0054] The above-disclosed embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, any equivalent variations made in accordance with the scope of the present invention are still within the scope of the present invention.< / svg> < / path>

Claims

1. A method for editing vehicle trajectory working conditions based on image rendering, characterized in that: include: Obtain test track condition files, which include a map file of the test track and driving files of the vehicle during actual testing at the test track. The driving files include the trajectory points of the vehicle and the speed values ​​corresponding to the trajectory points. The test field condition file is rendered to obtain a test image, which includes a test field image and a vehicle driving trajectory. Display the test image and select one or more road segment units on the test image; Receive the speed command corresponding to the road segment unit from external input, and use the speed command to update the vehicle speed corresponding to the road segment unit; Receive external acceleration commands to set maximum acceleration and maximum deceleration, and smooth the speed values ​​of the road segment units that are updating speed based on the maximum acceleration and maximum deceleration to obtain smoothed trajectory condition data. The trajectory condition data is exported to the vehicle controller in a preset type for vehicle condition testing.

2. The vehicle trajectory condition editing method as described in claim 1, characterized in that: The obtained test site condition documents include: Obtain the target operating condition file of the vehicle during actual testing at the test site, and read the driving file in the target operating condition file; Obtain the map file of the test track and load the driving file into the map file of the test track.

3. The vehicle trajectory condition editing method as described in claim 1, characterized in that: Rendering the test field condition file to obtain test images includes: The test condition file includes the latitude and longitude coordinates of points in several map files and driving files; Obtain the maximum and minimum values ​​of the point coordinates in the test condition file to obtain the latitude and longitude coordinates of the four vertices; The latitude and longitude coordinates of the four vertices are used as the four vertices of the canvas, and the latitude and longitude coordinates of all points in the test condition file are converted into pixel coordinates; By traversing all points in the test condition file, the pixel coordinates of all points are rendered as image elements, thus obtaining a test image that renders the test field map and vehicle trajectory conditions.

4. The vehicle trajectory condition editing method as described in claim 1, characterized in that: Selecting a road segment unit on the test image includes: selecting two trajectory points sequentially on the vehicle's driving trajectory in the test image according to an externally input trajectory point selection command, and using the two trajectory points as the start and end points in sequence to generate a road segment unit between the two trajectory points; When multiple road segment units are selected on the test image, repeat the above steps until multiple road segment units are generated.

5. The vehicle trajectory condition editing method as described in claim 4, characterized in that: Based on the externally input trajectory point selection command, the selection of trajectory points on the vehicle's driving trajectory in the test image includes: Based on the externally input trajectory point selection command, a pixel coordinate is selected on the test image. The trajectory point closest to the selected pixel coordinate is found. The coordinate distance between the found trajectory point and the selected pixel coordinate is calculated. It is determined whether the coordinate distance exceeds a preset threshold. If so, the trajectory point is not selected. If so, a trajectory point is selected. The above steps are repeated until another trajectory point is selected.

6. The vehicle trajectory condition editing method as described in claim 1, characterized in that: Smoothing the speed values ​​of the road segment units for which speed updates are performed includes: assuming the vehicle's trajectory has n trajectory points, denoted as C1, C2, C3…C… n After the speed update, the speed values ​​corresponding to the trajectory points are V1, V2, V3...V n Let i = 1, 2, 3...n. Starting from i = 2, traverse towards i = n, and find the point C on the trajectory. i velocity value V i Greater than trajectory point C i-1 velocity value V i-1 At that time, with trajectory point C i-1 velocity value V i-1 Based on the maximum acceleration, the trajectory point C is calculated. i Maximum speed V that can be achieved i-max-a , in (V i-1 V i-max-a Choose the minimum value among () as the current trajectory point V. i Smoothed velocity value V i-a Then traverse from i=n-1 to i=1, at trajectory point C i velocity value V i Greater than trajectory point C i+1 velocity value V i+1 At that time, with the trajectory point C i+1 velocity value V i+1 Based on the maximum deceleration, the trajectory point V is calculated. i The maximum speed that can be achieved, V i-max-b , in (V i-max-b V i+1 Choose the minimum value among () as the current trajectory point V. i Smoothed velocity value V i-b .

7. The vehicle trajectory condition editing method as described in claim 1, characterized in that: Receiving a speed command corresponding to the road segment unit from an external input, and updating the vehicle speed of the corresponding road segment unit using the speed command includes: displaying a speed command input item for the road segment unit on the interface displaying the test image. The speed command input item includes the first and last coordinate points of the selected road segment unit and an indicator box for inputting the speed command, so as to instruct the user to input the corresponding speed command, and updating the vehicle speed of the road segment unit according to the speed command input in the corresponding indicator box.

8. The vehicle trajectory condition editing method as described in claim 1, characterized in that: After generating a road segment unit between each of the trajectory points, the generated road segment unit is also indicated on the test image, and the speed value of the corresponding road segment unit in the target working condition file is displayed at the same time, and the speed command input item is displayed on the interface of the test image.

9. The vehicle trajectory condition editing method as described in claim 1, characterized in that: The image is rendered as SVG, and the test image is an SVG image.

10. A vehicle trajectory condition editing device based on image rendering, characterized in that: The system includes a processor, a memory, and one or more operation instructions, the operation instructions being stored in the memory, and the processor executing the operation instructions to implement the vehicle trajectory condition editing method based on image rendering as described in any one of claims 1-9.