Vehicle positioning method and device
By using a two-level three-dimensional data comparison method and low-precision and high-precision reference templates, high-precision positioning of the robot was achieved under conditions of uncertain train stopping positions and changes in the train body. This solved the problem of inaccurate positioning in existing technologies and ensured the accuracy and automation of the inspection.
Patent Information
- Application Number
- CN202511678237.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-02-10
AI Technical Summary
In existing technologies, the uncertainty of train stopping positions and the dynamic changes in train body length lead to low positioning accuracy of robots, affecting the inspection effect.
A two-level 3D data comparison method is adopted. First, coarse positioning is performed in a large area, and the initial position of the target feature is determined using a low-precision reference template. Then, fine positioning is performed in a smaller area, and the precise position of the target feature is determined using a high-precision reference template. Position compensation is achieved through point cloud registration algorithm.
This technology enables robots to accurately determine their relative position to the target vehicle in real time, even when the train's stopping position is uncertain or the vehicle body changes, thus improving positioning accuracy and detection stability.
Smart Images

Figure CN121498536A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of robot technology, and in particular to a vehicle positioning method and device. BACKGROUND
[0002] In modern rail transit automation operation, the application of inspection robots is increasingly widespread, aiming to replace manual detection of key components such as train bottom and side. These robots usually need to travel along a predetermined track or path and use cameras and other sensors to take pictures or scans of specific parts of the train to complete fault diagnosis and status evaluation. However, to achieve accurate and reliable automation detection, the core prerequisite is that the robot must be able to accurately know its own position relative to the train body.
[0003] The prior art generally uses fixed points or simple odometers for positioning. This positioning method has significant limitations: on the one hand, when the train is parked at the station or in the maintenance depot, the braking system will produce a position deviation, and the position of each parking cannot be completely consistent, which may have a random error of tens of centimeters or even more. On the other hand, due to the connection between carriages in the train formation through couplers and air pipes, changes in air pressure in the brake pipe will cause compression or stretching between the car bodies, resulting in dynamic changes in the actual length of each carriage. The superposition of these two factors makes the method of positioning relying on fixed points or simple odometers completely ineffective, and the images collected by the robot will be offset, causing key components to be out of view, which seriously affects the subsequent recognition and detection effect.
[0004] Therefore, there is an urgent need for a vehicle positioning method that can overcome the uncertainty of train parking position and the dynamic change of train body length. This method should enable inspection equipment to accurately lock its relative position with the target vehicle in a complex field environment, dynamically and in real time, thereby providing a reliable spatial reference for subsequent automated detection tasks and ensuring the stability and accuracy of detection. SUMMARY
[0005] The present application provides a vehicle positioning method and device to solve the problem of low positioning accuracy caused by the uncertainty of train parking position and the dynamic change of train body length in the prior art.
[0006] The present application provides a vehicle positioning method, comprising: acquiring, by a three-dimensional sensor mounted on a mobile device, first data of a preset target feature on the side of a vehicle within a first range, and comparing the first data with a preset first reference template to determine first position information of the target feature; Based on the first location information, a second range is determined, and second data of the target feature is collected within the second range. The second data is then compared with a preset second reference template to determine and output the second location information of the target feature. Wherein, the second range is smaller than the first range, and the precision of the second reference template is greater than the precision of the first reference template.
[0007] According to the vehicle positioning method provided by the present invention, both the first data and the second data are three-dimensional point cloud data; the step of comparing the first data with a preset first reference template to determine the first location information of the target feature specifically includes: The spatial transformation relationship between the three-dimensional point cloud data of the first data and the corresponding first reference template is calculated using a point cloud registration algorithm to determine the first position information. The step of comparing the second data with a preset second reference template to determine and output the second location information of the target feature specifically includes: The spatial transformation relationship between the three-dimensional point cloud data of the second data and the corresponding second reference template is calculated using a point cloud registration algorithm to determine the second position information.
[0008] According to the vehicle positioning method provided by the present invention, after determining the first location information of the target feature, the method further includes: comparing the first location information with a preset deviation threshold range; if it exceeds the deviation threshold range, selecting the next location from a preset search location sequence and controlling the mobile device to move to the next location; repeatedly performing the step of comparing the first data with a preset first reference template to determine the first location information of the target feature, until the finally determined first location information is within the deviation threshold range.
[0009] According to the vehicle positioning method provided by the present invention, determining a second range based on the first location information specifically includes: controlling the mobile device to move to a target measurement point according to the first location information, wherein the second range is a region centered on the target measurement point.
[0010] According to the vehicle positioning method provided by the present invention, after outputting the second location information of the vehicle, the method further includes: performing location compensation for subsequent operations of the mobile device based on the output second location information.
[0011] According to the vehicle positioning method provided by the present invention, in the first reference template, the area of the preset target feature occupies 40% to 60% of the area of the first reference template; in the second reference template, the area of the preset target feature occupies 70% to 90% of the area of the second reference template.
[0012] The present invention also provides a vehicle positioning device, comprising: The first position information determination module is used to collect first data of a preset target feature on the side of a vehicle within a first range using a three-dimensional sensor mounted on a mobile device, and compare the first data with a preset first reference template to determine the first position information of the target feature; The second location information determination module is used to determine a second range based on the first location information, collect second data of the target feature within the second range, compare the second data with a preset second reference template, determine and output the second location information of the target feature; Wherein, the second range is smaller than the first range, and the precision of the second reference template is greater than the precision of the first reference template.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the vehicle positioning methods described above.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the vehicle positioning method as described above.
[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the vehicle positioning methods described above.
[0016] The vehicle positioning method and apparatus provided by the present invention first determine the first position information of the target feature using a first reference template within a larger first range; then determine a smaller second range based on the first position information, collect second data of the target feature within the second range, and determine and output the second position information of the target feature by comparing the second data with the second reference template. Thus, by using the progressive comparison of two levels of three-dimensional data of the same vehicle side feature, the random deviation of train stops and the dynamic changes in vehicle length are compensated, enabling mobile devices to obtain accurate spatial references in real time without relying on fixed mileage or fixed points, thereby improving the positioning accuracy. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is one of the flowcharts illustrating the vehicle positioning method provided by the present invention.
[0019] Figure 2 This is a reference diagram of the first reference template provided by the present invention.
[0020] Figure 3 This is the second flowchart illustrating the vehicle positioning method provided by the present invention.
[0021] Figure 4 This is a structural schematic diagram of the vehicle positioning device provided by the present invention.
[0022] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0024] In automated inspection scenarios for rail transit, the "last meter" of train arrival and stopping at stations has always been a pain point for robotic operations. Early solutions generally adopted a combination of "track odometer + fixed markers": QR codes or reflective panels were placed every few meters along the track, and robots calculated their position relative to the train by reading these markers. However, fluctuations in the air braking force during train braking cause random longitudinal offsets of 10-30 cm for each carriage during each stop; more seriously, the "accordion effect" caused by the inflation and deflation of the brake ducts causes the entire train formation to expand or contract within a range of 0-20 cm, meaning that the length of a single carriage can "lengthen or shorten" at any time.
[0025] For example, when a subway train slowly enters a maintenance depot, it should theoretically stop at a fixed position so that a robot can perform an inspection along a pre-set path. However, due to braking and ductwork effects, the actual stopping position of the train may deviate from the theoretical position. Suppose the robot moves to a certain position according to a predetermined program, preparing to photograph and inspect a critical component of the train, such as a bolt on a bogie. Because the train's actual position has deviated, the robot's position is not truly the correct location relative to the component. As a result, when the robot activates its camera to take a picture, it finds that there is no bolt in its field of view, or it can only capture a portion of it, making it unable to complete the full inspection task. In this situation, the robot cannot accurately determine whether the bolt has cracks or is loose, thus affecting the quality and efficiency of the entire inspection work.
[0026] To compensate for this deviation, on-site operators must intervene manually for "secondary alignment." They need to manually adjust the robot's position or reset its coordinates to ensure the robot accurately reaches the actual inspection location. This process is not only time-consuming and labor-intensive but also disrupts the automated workflow, rendering the automated inspection, originally intended to improve efficiency, inefficient. Furthermore, since the deviation of each train stop may vary, this manual intervention may need to be performed frequently, further increasing the complexity and uncertainty of the operation. Therefore, this positioning method, which relies on fixed markers and odometers, has revealed serious limitations in practical applications and urgently needs to be overcome through technological innovation to achieve truly automated, high-precision inspection.
[0027] In view of the shortcomings of the prior art, the present invention provides a vehicle positioning method based on the side features of the vehicle itself. This method no longer relies on unstable external reference objects, but uses the stable three-dimensional structure of the vehicle itself as the positioning reference. Through a "coarse to fine, two-level progressive" approach, it dynamically and in real time eliminates the positional uncertainty caused by train stopping and vehicle body deformation.
[0028] Before introducing the specific implementation methods of the embodiments of the present invention, the terminology of the embodiments of the present invention will be explained illustratively.
[0029] A 3D sensor is an active or passive measuring device capable of acquiring 3D topographic information of a measured object in a single measurement. It typically consists of structured light, Time-of-Flight (ToF), line laser scanning, or binocular / multi-view vision modules, outputting a point cloud or depth map with spatial coordinates. In this embodiment of the invention, it is installed at the end effector of a mobile inspection robot to collect the complete contours of rigid components such as axle box end caps and brake cylinders on the side of a train.
[0030] The first range, also known as the "coarse localization search range," is the longitudinal length that the robot must cover when it first arrives at the side of the train, before the stopping error is known. For example, the first range can be ±25 cm (i.e., a total length of 50 cm). This range ensures that even if the train experiences a random deviation of up to 30 cm, the target features can still be captured by the 3D sensor.
[0031] First data: The original 3D point cloud collected in real time within the first range, with a density of about 1 mm to 3 mm, includes the target component (such as the axle box end cover) and the surrounding vehicle body surface, used to perform a "rough alignment" with the template.
[0032] First position information: The 6-DOF rigid body transformation matrix (including x, y, z axis translation and yaw, pitch and roll angles) obtained by registering the first data with the first reference template is used to represent the coarse pose of the target feature in the current coordinate system of the robot. Its positioning error can usually be converged to within ±10 cm.
[0033] First reference template: A "low-precision template" pre-collected offline and stored in the robot's hard drive. It is also a point cloud with a wide field of view (about 50 cm), but only retains areas with obvious geometric undulations—the end cap area of the axle box in the template accounts for 40% to 60% of the total area, and is used as a coarse matching benchmark; because of its small data volume, significant features, and fast matching speed, it is suitable for large-scale initial search.
[0034] The second range, also known as the "precise local positioning range," is the small area within which the robot moves and collects data again after obtaining the initial position information. A typical length of ±5 cm (i.e., a total length of 10 cm) corresponds to the residual uncertainty after compensating for the ±10 cm coarse error.
[0035] Second data: High-resolution point clouds re-captured within a second range, with a density of 0.3 mm to 0.5 mm and richer details, used for final registration with a high-precision template.
[0036] Second position information: The high-precision 6-DOF transformation matrix obtained by registering the second data with the second reference template can compress the residual error to within 2 mm or even 1 mm, serving as the final spatial reference for the robot to perform subsequent tasks such as bolt detection and crack identification.
[0037] The second reference template is derived from the first reference template, but only the most significant and stable local curved surfaces of the axle box end cover (accounting for 70% to 90% of the template area) are cropped. It has also undergone noise reduction and resampling processing, resulting in higher geometric accuracy. Due to its slightly larger data volume, it is only matched within a small window to ensure the final positioning accuracy.
[0038] Point cloud registration algorithm: refers to the mathematical optimization process of aligning two point clouds to the same coordinate system. This invention employs a two-stage strategy of "coarse registration + fine registration": coarse registration uses Sampling Consistency Based on Fast Feature Histogram (FPFH) (SAC-IA) to provide initial values; fine registration uses Iterative Closest Point (ICP) or its variants (GICP, NICP) to converge at the millimeter scale, ultimately outputting the rotation and translation matrix between the two clouds to achieve quantitative calculation of the deviation.
[0039] The embodiment of this invention can be a vehicle positioning system. This system is specifically designed for rail transit inspection and aims to solve the positioning challenges caused by train stopping position deviations and dynamic changes in the vehicle body. The system consists of a three-dimensional sensor, a mobile device, a processing unit, a storage module, and a feedback adjustment module. These components work together to achieve precise positioning of target features on the side of the vehicle.
[0040] 3D Sensor: Installed on a mobile device, this sensor collects 3D point cloud data from the side of the vehicle. In this embodiment, a high-precision structured light camera with a 2k×1k resolution is selected, capable of acquiring detailed 3D information of the target area in a short time. The camera is precisely calibrated to ensure its scanning plane maintains a suitable angle and distance from the side of the vehicle, comprehensively covering the target features and its surrounding area.
[0041] Mobile device: Serving as a carrier for the 3D sensor, it can move flexibly beside the track or within the maintenance depot. Equipped with a navigation system and odometer, it can move to a designated location according to a preset path or real-time calculated navigation points. Its stable mechanical structure ensures the stability of the 3D sensor and the accuracy of data acquisition during movement.
[0042] Processing Unit: The core component, equipped with a high-performance processor and GPU, is used to run point cloud registration algorithms and data processing tasks. It receives point cloud data from 3D sensors, performs preprocessing (such as noise filtering and feature extraction), and compares it with reference templates in the storage module to calculate the location information of the target features. This unit runs custom-developed localization software, possessing rapid calculation and high-precision matching capabilities.
[0043] Storage module: Used to store preset first and second reference templates. These templates are generated based on standard vehicle design drawings or pre-acquired high-precision 3D scan data. The template data is optimized to adapt to the needs of different positioning stages. The module also stores other data and programs required by the system.
[0044] Feedback Adjustment Module: This module monitors the accuracy of the positioning results and sends an adjustment command to the mobile device when the error exceeds a preset threshold. The device then fine-tunes its position or attitude according to the command and re-acquires data until the positioning results meet the accuracy requirements. This module ensures the reliability and accuracy of the entire positioning process, forming a closed-loop control system.
[0045] The following is combined with Figures 1-3 This invention describes a vehicle positioning method according to an embodiment of the present invention.
[0046] Figure 1 This is one of the flowcharts illustrating the vehicle positioning method provided in this embodiment of the invention. The method includes the following: Step 101: Using a 3D sensor mounted on a mobile device, first data of a preset target feature on the side of the vehicle is collected within a first range, and the first data is compared with a preset first reference template to determine the first position information of the target feature.
[0047] In this embodiment, the preset target features on the side of the vehicle refer to components or markings that have stable geometric shapes, are easy to acquire by 3D sensors, and can be uniquely identified. These features can be inherent components on the side of the train, such as axle box end covers, bogies, shock absorber seats, and braking components. They have regular shapes and fixed positions, providing reliable references for positioning. They may also be artificially set auxiliary markings, such as QR codes or reflectors, to help the robot accurately locate itself. The common feature of these target features is that they provide the robot with clear positioning criteria, ensuring the accuracy and stability of the positioning process.
[0048] When inspecting the sides of a train, the 3D sensors (such as structured light cameras or lidar) on the mobile device are activated and collect initial data on preset target features on the side of the vehicle. The scanning range of the sensors is pre-set, typically covering an area of approximately ±25cm before and after the target feature to account for random deviations in the train's stopping position. The acquired 3D point cloud data includes not only the target feature (such as the axle box end cap) but also background information such as the surrounding body surfaces and reinforcing ribs, forming the so-called "initial data." This data is immediately preprocessed after acquisition, including noise reduction, point cloud thinning, and feature extraction, to reduce unnecessary computation and highlight the geometric characteristics of the target features.
[0049] Simultaneously, the system retrieves a pre-stored "first reference template." This template is a 3D point cloud model created based on standard vehicle design drawings or high-resolution scan data, containing geometric information and positional parameters consistent with the target features. Specifically designed for coarse localization tasks, the template has a wide field of view, covering approximately 50cm, ensuring that even with significant deviations in train stopping, the target features can still be captured in the initial comparison. In the first reference template, the area containing the pre-defined target features occupies 40% to 60% of the template's area.
[0050] To determine the initial position information of the target feature, the system compares the preprocessed first data with the first reference template. The comparison process employs point cloud registration algorithms, such as Fast Feature Histogram (FPFH) and Sample Consistency Association (SAC-IA), to calculate the spatial transformation relationship between the two. In this way, the system obtains the translation and rotation values of the target feature in the current coordinate system, i.e., the "first position information." To ensure the reliability of the results, the system verifies whether the first position information is within a reasonable range. If the deviation exceeds a preset threshold, the device position is readjusted and the acquisition process is repeated until an accurate initial position is obtained.
[0051] Step 102: Determine a second range based on the first location information, collect second data of the target feature within the second range, compare the second data with a preset second reference template, and determine and output the second location information of the target feature.
[0052] In step 102, the system utilizes the first position information obtained in the previous step, including the approximate offset and orientation of the target feature in the robot coordinate system. Next, using this information, the system determines a smaller second range centered on the theoretical position of the target feature. This second range is smaller than the first range; for example, it extends approximately ±5cm before and after the target feature, forming a precision positioning window with a total length of 10cm. This reduction in the size of the second range compared to the first range aims to decrease the amount of data collected and calculated subsequently, while focusing on the core area of the target feature, laying the foundation for high-precision positioning.
[0053] After defining the second area, the 3D sensor on the mobile device will restart, this time acquiring high-resolution data only for the second area. Due to the reduced area, the sensor can scan with higher accuracy and a denser point cloud distribution, for example, increasing the point cloud density from 2 mm / point in the first stage to 0.5 mm / point, thus generating richly detailed second data. This data will primarily focus on key parts of the target features, such as the central area of the axle box end cap and details around bolt holes.
[0054] Simultaneously, the system retrieves a pre-stored second reference template. Compared to the first reference template, the second reference template has a narrower field of view and a smaller range, but higher precision. It only contains the core area of the target feature (such as the central part of the axle box end cover), and the point cloud data in the template has undergone fine processing, making the features more prominent and the geometric details richer. The area of the preset target feature in the template occupies 70% to 90% of the area of the second reference template. The increased proportion of the target feature area ensures that even minor deviations in the target feature can be captured more accurately in small-scale, high-precision comparisons.
[0055] The system employs a point cloud registration algorithm to precisely compare the acquired second data with a second reference template. To meet high-precision requirements, this stage typically uses an improved version of the Iterative Closest Point (ICP) algorithm, such as the NICP algorithm with non-rigid deformation processing, to better match the local details of the target features. The algorithm calculates the precise offset of the target feature at its current position, including millimeter-level translation and minute angular rotation, thereby obtaining the second position information.
[0056] To ensure the reliability of the results, the system verifies the second position information, checking whether its error is within the millimeter range. If the error is too large, the system will determine that there may be a data acquisition error or a template matching problem, and take adjustment measures, such as re-acquiring data or fine-tuning the sensor position, until results that meet the accuracy requirements are obtained.
[0057] Ultimately, the system will output the precise location information of the target features, providing a high-precision spatial reference for subsequent inspection tasks (such as bolt detection, crack identification, etc.).
[0058] The vehicle positioning method provided in this invention first determines the first position information of the target feature using a first reference template within a larger first range; then, based on the first position information, a smaller second range is determined, and second data of the target feature is collected within the second range. The second position information of the target feature is determined and output by comparing the second data with the second reference template. Thus, by using a progressive comparison of two levels of three-dimensional data of the same vehicle side feature, random deviations in train stopping and dynamic changes in vehicle length are compensated for, enabling mobile devices to obtain accurate spatial references in real time without relying on fixed mileage or fixed points, thereby improving positioning accuracy.
[0059] In rail transit inspection scenarios, accurately locating target features on the side of trains is a key step in achieving automated detection.
[0060] The process of comparing the first data with the preset first reference template: Mobile devices equipped with 3D sensors (such as structured light cameras or ToF sensors) are positioned close to the side of the train and scan within a preset "first range" (e.g., ±25cm before and after the target feature). This range is designed to account for the maximum possible positional deviation when the train stops, ensuring that the target feature remains within the scanning field of view. The raw data acquired by the sensors is a 3D point cloud, containing geometric information about the target feature (e.g., axle box end cap) and its surrounding area. The data volume is large, with a point cloud density of approximately 2mm / point.
[0061] The first batch of acquired data undergoes noise reduction to remove outliers caused by environmental interference or sensor errors. Then, voxel rasterization is used to downsample the point cloud, reducing the data volume while preserving key geometric features. Significant geometric characteristics of the target features (such as edges and holes) are extracted to provide crucial information for subsequent comparisons.
[0062] The first reference template is a 3D point cloud model based on a standard vehicle design or pre-scanned data. Its coverage is consistent with the first range, but the point cloud density is lower (e.g., 5mm / point) to reduce the computational load for comparison. The target feature region accounts for approximately 40%-60% of the first reference template, while the background region accounts for a relatively higher proportion, serving as a rough spatial matching benchmark.
[0063] Feature-based point cloud registration algorithms, such as Sample Consistency Initial Value Estimation (SAC-IA), are employed to quickly calculate the initial spatial transformation relationship between the first data and the first reference template. The initial transformation matrix is optimized using the Iterative Closest Point (ICP) algorithm to calculate the first positional information of the target features, including translation vectors and rotation matrices. If the alignment error exceeds a preset threshold (e.g., ±10cm), the system will adjust the device position and re-acquire data until a reliable coarse positioning result is obtained.
[0064] It should be noted that the length of the field of view of the first range is L, and the length of the region of the first reference template is l. Therefore, the positional offset of the first position information is ±L / 2, and the preset deviation threshold range is ±(Ll) / 2. Figure 2 As shown.
[0065] The process of comparing the second data with the preset second reference template: Based on the initial location information obtained from coarse localization, the system determines a second range, such as a narrow area around the target feature (e.g., ±5cm before and after), further narrowing the acquisition range. Within this second range, the 3D sensor re-acquires 3D point cloud data of the target feature at a higher resolution and point cloud density (e.g., 0.5mm / point), generating the second data.
[0066] The second reference template is also based on a standard model or a high-precision 3D point cloud model generated through pre-scanning, but with a smaller coverage area and a higher point cloud density (e.g., 0.3 mm / point). In the second reference template, the proportion of the target feature region is increased to 70%~90%, background information is further reduced, and the focus is on the core geometric details of the target features.
[0067] By employing a more refined point cloud registration algorithm, such as an improved ICP algorithm with non-rigid deformation processing (e.g., NICP), the second data is compared with the second reference template to output the second position information of the target feature, thereby providing millimeter-level accuracy in translation and rotation deviation, and finally determining the precise position of the target feature.
[0068] Furthermore, the system verifies the precise positioning results to ensure that the error is controlled at the millimeter level (e.g., ±2mm). If the error exceeds the allowable range, the system will fine-tune the device position or re-acquire data until the accuracy requirements are met.
[0069] In this embodiment, to ensure accurate positioning of target features on the side of the train, after determining the first location information of the target features, the embodiment of the present invention further includes: 1) Deviation Detection: The first position information is compared item by item with the system's preset deviation threshold range. The preset deviation threshold range is determined based on historical stopping data and train design parameters. For example, if the normal stopping deviation of the train is within ±5cm, the deviation threshold range is set to ±5cm.
[0070] 2) Position Adjustment: If the initial position information exceeds the deviation threshold, the system will trigger a position adjustment mechanism. The next position will be selected from a preset search position sequence. This search position sequence is a series of pre-defined position points based on the train's possible stopping deviation range, typically centered on the initial acquisition position, with a certain number of position points evenly distributed before and after it.
[0071] 3) Repeated Comparison: After the mobile device moves to the newly selected location, the 3D sensor is restarted to collect the first data. The new first data is then compared with the first reference template to redetermine the first position information. This process continues until the final determined first position information is within the preset deviation threshold range. This process iteratively approaches the true position of the target feature, ensuring the accuracy of subsequent fine positioning.
[0072] Furthermore, to achieve precise positioning of target features on the side of the train, this embodiment of the invention, after determining the first location information of the target features, further determines a second range for more accurate positioning. The specific process is as follows: Determine the target measurement point: Based on the initial position information, the system calculates the precise position of the target feature in the vehicle coordinate system. Using this position as a reference, a target measurement point is set. This target measurement point is typically located at the geometric center of the target feature, such as the center point of the axle box end cap or a critical node of the bogie.
[0073] Path planning: Based on the location of the target measurement point, the system plans the movement path of the mobile device. Following this path, the navigation system on the mobile device controls the device to move smoothly and accurately to the vicinity of the target measurement point.
[0074] Determine the second range: Centered on the target measurement point, the system sets a smaller area as the second range. The size of this range is determined according to actual needs, usually a cubic area with a side length of 10cm to 20cm, ensuring focus on the core area of the target features while reducing the amount of data acquisition and processing.
[0075] Data Acquisition and Comparison: Within the second range, the 3D sensor acquires 3D point cloud data of the target features with higher precision, i.e., the second data. The system retrieves a pre-stored second reference template, which has higher precision than the first reference template and focuses on the details of the target features. Using a point cloud registration algorithm, the second data is compared with the second reference template to determine the precise location information of the target features, with the error controllable within the millimeter range.
[0076] Through the above process, the system can effectively narrow the positioning range, improve positioning accuracy, and provide a reliable spatial reference for subsequent automated detection.
[0077] The positioning method of this invention not only achieves high-precision positioning of target features on the side of the train, but also further utilizes the accurate positioning results to perform position compensation for subsequent operations of the mobile device, so as to ensure the accuracy and reliability of the detection task.
[0078] First, 3D sensors acquire 3D point cloud data from the sides of the vehicle. Through two stages—coarse localization and fine localization—precise location information of the target features is obtained. In the fine localization stage, the mobile device acquires second data within a smaller, second-range area and compares it with a pre-stored second reference template to obtain high-precision second location information.
[0079] After obtaining the second position information, it is fed back to the mobile device's control system in real time. The control system then calculates the deviation between the mobile device's current posture and the ideal detected posture based on this information.
[0080] Based on the deviation calculation results, the system generates position compensation commands to adjust the position and attitude of the mobile device in real time, ensuring its precise alignment with target features for accurate detection or maintenance operations. The position compensation process is achieved through a high-precision mechanical structure and real-time control algorithms, ensuring the adjustment accuracy and stability of the mobile device.
[0081] Throughout the inspection process, the positioning and location compensation steps are repeatedly performed, and the position of the mobile equipment is monitored and adjusted in real time to cope with minor changes in train position or equipment displacement, ensuring that the inspection task is completed efficiently and accurately. This location compensation mechanism effectively improves inspection efficiency and quality, providing strong support for the automated operation and maintenance of rail transit.
[0082] To further understand the technical solution of the embodiments of the present invention, the vehicle positioning method of the present invention will be illustrated below through a specific example.
[0083] See Figure 3 The vehicle positioning method of this invention includes: Step 301: First reference template collection.
[0084] The axle box end cover was selected as the target feature, and 3D point cloud data for coarse localization of the vehicle side was acquired using a 3D sensor (such as a structured light camera). The field of view (first range) for coarse localization was approximately 50cm (denoted as L=50cm), and the length of the first reference template area was approximately 30cm (denoted as l=30cm). The acquired 3D point cloud data is the first data.
[0085] Step 302: Coarse positioning detection position determination.
[0086] The coarse positioning offset is calculated to be ±L / 2 = ±25cm according to the formula. Therefore, coarse positioning includes three detection positions: Detection location 1: 25cm in front of the first reference template; Detection location 2: First reference template location; Detection location 3: 25cm behind the first reference template.
[0087] Step 303: The robot moves to the initial detection position.
[0088] After receiving the task, the robot moves towards detection position 2. If it reaches this position, the coarse localization algorithm module is activated; otherwise, it continues moving towards detection position 2 until it does.
[0089] Step 304: Start the coarse positioning algorithm and collect data.
[0090] After the coarse localization algorithm module starts, the 3D sensors collect the first data from the side of the vehicle. The system compares the collected first data with the pre-stored first reference template, uses the point cloud registration algorithm to calculate the deviation between the current position and the template position, and determines whether the deviation is within the preset coarse localization threshold range (i.e., ±(Ll) / 2=±10cm). If the deviation is within the threshold range, a fine localization navigation point is determined based on the deviation value, and the mobile device is controlled to move to that navigation point; if the deviation exceeds the threshold, the next position is selected from the preset search position sequence (such as detection position 1 or detection position 3), and the robot is controlled to move to that position.
[0091] Step 305: Repeat the comparison until the conditions are met.
[0092] Once the robot reaches the designated location, it repeats the data collection, comparison, and judgment process. If the deviation still exceeds the threshold, it continues to select the next location and repeat the above process until the final determined deviation is within the threshold range.
[0093] Step 306: Determine the second range.
[0094] Based on the first location information, control the mobile device to move to the target measurement point. The second range is the area centered on the target measurement point, which is usually a small range (e.g., extending 5cm forward and backward, for a total length of 10cm), ensuring focus on the core area of the target feature.
[0095] Step 307: Precise positioning data acquisition.
[0096] Within the second range, the 3D sensor acquires 3D point cloud data of the target features with higher precision, generating second data. The second data has a higher point cloud density and richer details.
[0097] Step 308: Start the fine positioning algorithm and compare data.
[0098] The system retrieves a pre-stored second reference template, which has higher precision than the first reference template and focuses on the core geometric details of the target features. A more refined point cloud registration algorithm (such as the NICP algorithm) is then used to compare the second data with the second reference template, calculating the precise location information of the target features (second location information), with errors controllable within the millimeter range.
[0099] Step 309: Output the results.
[0100] The final determined second position information is output as the precise offset value of the current train parking position, providing a high-precision spatial reference for subsequent automated detection tasks.
[0101] Through steps 301-309 described above, this embodiment of the invention effectively determines the position of the target feature even when there is a deviation in the train's stopping position, gradually narrowing the error range and ultimately achieving high-precision positioning. This provides accurate position information for subsequent automated detection, ensuring the smooth progress of the detection task.
[0102] The vehicle positioning device provided in the embodiments of the present invention is described below. The vehicle positioning device described below and the vehicle positioning method described above can be referred to each other.
[0103] This invention provides a vehicle positioning device, see [link to relevant documentation]. Figure 4 ,include: The first position information determination module 410 is used to collect first data of a preset target feature on the side of a vehicle within a first range using a three-dimensional sensor mounted on a mobile device, and compare the first data with a preset first reference template to determine the first position information of the target feature. The second location information determination module 420 is used to determine a second range based on the first location information, collect second data of the target feature within the second range, compare the second data with a preset second reference template, determine and output the second location information of the target feature; Wherein, the second range is smaller than the first range, and the precision of the second reference template is greater than the precision of the first reference template.
[0104] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute a vehicle positioning method. This method includes: acquiring first data of a preset target feature on the side of the vehicle within a first range using a three-dimensional sensor mounted on a mobile device, comparing the first data with a preset first reference template to determine first position information of the target feature; determining a second range based on the first position information, acquiring second data of the target feature within the second range, comparing the second data with a preset second reference template, and determining and outputting second position information of the target feature; wherein the second range is smaller than the first range, and the precision of the second reference template is greater than the precision of the first reference template.
[0105] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0106] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the vehicle positioning method provided by the above methods. The method includes: acquiring first data of a preset target feature on the side of a vehicle within a first range using a three-dimensional sensor mounted on a mobile device, and comparing the first data with a preset first reference template to determine first position information of the target feature; determining a second range based on the first position information, acquiring second data of the target feature within the second range, and comparing the second data with a preset second reference template to determine and output second position information of the target feature; wherein the second range is smaller than the first range, and the accuracy of the second reference template is greater than the accuracy of the first reference template.
[0107] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a vehicle positioning method provided by the methods described above. The method includes: acquiring first data of a preset target feature on the side of a vehicle within a first range using a three-dimensional sensor mounted on a mobile device, and comparing the first data with a preset first reference template to determine first position information of the target feature; determining a second range based on the first position information, acquiring second data of the target feature within the second range, and comparing the second data with a preset second reference template to determine and output second position information of the target feature; wherein the second range is smaller than the first range, and the precision of the second reference template is greater than the precision of the first reference template.
[0108] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0109] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vehicle positioning method, characterized in that, include: By using a three-dimensional sensor mounted on a mobile device, first data of a preset target feature on the side of the vehicle is collected within a first range, and the first data is compared with a preset first reference template to determine the first position information of the target feature; Based on the first location information, a second range is determined, and second data of the target feature is collected within the second range. The second data is then compared with a preset second reference template to determine and output the second location information of the target feature. Wherein, the second range is smaller than the first range, and the precision of the second reference template is greater than the precision of the first reference template.
2. The method according to claim 1, characterized in that, Both the first data and the second data are three-dimensional point cloud data; The step of comparing the first data with a preset first reference template to determine the first location information of the target feature specifically includes: The spatial transformation relationship between the three-dimensional point cloud data of the first data and the corresponding first reference template is calculated using a point cloud registration algorithm to determine the first position information. The step of comparing the second data with a preset second reference template to determine and output the second location information of the target feature specifically includes: The spatial transformation relationship between the three-dimensional point cloud data of the second data and the corresponding second reference template is calculated using a point cloud registration algorithm to determine the second position information.
3. The method according to claim 1, characterized in that, After determining the first location information of the target feature, the method further includes: The first location information is compared with a preset deviation threshold range. If it exceeds the deviation threshold range, the next location is selected from a preset search location sequence, and the mobile device is controlled to move to the next location. The step of comparing the first data with a preset first reference template to determine the first location information of the target feature is repeated until the finally determined first location information is within the deviation threshold range.
4. The method according to claim 1 or 3, characterized in that, Determining the second range based on the first location information specifically includes: Based on the first location information, the mobile device is controlled to move to the target measurement point, and the second range is the area range centered on the target measurement point.
5. The method according to claim 1, characterized in that, After outputting the second location information of the vehicle, the method further includes: performing location compensation for subsequent operations of the mobile device based on the output second location information.
6. The method according to claim 1, characterized in that, In the first reference template, the area of the preset target feature occupies 40% to 60% of the area of the first reference template; In the second reference template, the area of the preset target feature occupies 70% to 90% of the area of the second reference template.
7. A vehicle positioning device, characterized in that, include: The first position information determination module is used to collect first data of a preset target feature on the side of a vehicle within a first range using a three-dimensional sensor mounted on a mobile device, and compare the first data with a preset first reference template to determine the first position information of the target feature; The second location information determination module is used to determine a second range based on the first location information, collect second data of the target feature within the second range, compare the second data with a preset second reference template, determine and output the second location information of the target feature; Wherein, the second range is smaller than the first range, and the precision of the second reference template is greater than the precision of the first reference template.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the vehicle positioning method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the vehicle positioning method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the vehicle positioning method as described in any one of claims 1 to 6.