Automatic measurement method, system and robot for geometric parameters of train carriages
Patent Information
- Application Number
- CN202610962566.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-10-09
AI Technical Summary
[0005]本申请所要解决的技术问题在于,提供一种列车车厢的几何参数的自动测量方法、系统及机器人,以解决现有技术中未针对铁路列车特定几何结构进行优化,导致无法精确测量列车停靠偏差、无法准确提取车厢门框坐标及内部净空尺寸,且在户外强光、反光等复杂环境下测量精度与稳定性不足的问题
本申请采用多线激光雷达结合深度相机的融合检测方案,先通过对车厢侧面点云进行预处理、纹理降噪并结合 RANSAC算法 与加权重最小二乘法完成平面拟合,精准求解车厢横向、纵向停靠位置偏差,再依托双传感器协同检测与自适应数据融合技术稳定提取侧面装卸门框的坐标及尺寸,有效克服了现有技术测量精度不足、户外复杂光照干扰大的缺陷;同时机器人完成对位入厢后自动扫描车厢内壁并解算车厢净空宽度、净高度、有效装载长度等几何参数,实现车厢外部位置检测、门框定位与内部空间测量的全流程自动化闭环作业,测量数据可直接对接机器人路径规划与装载规划模块,整体测量精度高、环境适应性强、自动化程度高,能够充分满足铁路物流场景下装卸车机器人自主作业的实际使用需求。
Smart Images

Figure CN122883138A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of intelligent logistics inspection technology, and in particular relates to an automatic measurement method, system and robot for the geometric parameters of a train carriage. Background Technology
[0002] In railway freight yards, loading and unloading robots have been widely used in cargo loading and unloading operations of boxcars. Before the robot operates, it is necessary to accurately obtain geometric parameters such as the car parking deviation, the position of the side loading and unloading door frame, and the internal clearance dimensions of the car, so as to complete autonomous alignment, path planning and cargo loading scheme design. The accuracy of parameter measurement and environmental adaptability directly determine the safety and efficiency of robot operation.
[0003] Currently, the mainstream detection methods in the industry are divided into two categories: LiDAR contour measurement and pure vision image detection. LiDAR-based contour measurement technology only extracts general obstacle contours and lacks optimized algorithms for specific geometric features such as railway car sidewalls and door frames. This makes it difficult to accurately quantify the lateral and longitudinal parking deviations of the cars and to reliably obtain the internal clearance dimensions. Vision-based detection solutions have weak 3D measurement capabilities, large measurement errors, and are severely affected by complex lighting environments such as strong light and backlighting in railway stations, leading to significant fluctuations in detection accuracy.
[0004] In summary, existing technologies cannot simultaneously meet the requirements of measurement accuracy, environmental interference resistance, and full-process parameter extraction, making it difficult to support automated operations of loading and unloading robots. Therefore, there is an urgent need to propose a new method for automatic measurement of the geometric parameters of the vehicle compartment. Summary of the Invention
[0005] The technical problem to be solved by this application is to provide an automatic measurement method, system and robot for the geometric parameters of train carriages, so as to solve the problems in the prior art that are not optimized for the specific geometric structure of railway trains, resulting in the inability to accurately measure train stopping deviation, the inability to accurately extract the coordinates of carriage door frames and internal clearance dimensions, and insufficient measurement accuracy and stability in complex environments such as strong outdoor light and reflection.
[0006] To address the aforementioned technical problems, this application provides the following technical solution: In a first aspect, this application provides an automatic measurement method for the geometric parameters of a train car, comprising: Acquire side point cloud data of the target train carriage and preprocess the side point cloud data to obtain preprocessed side point cloud data; The preprocessed side point cloud data is subjected to plane fitting processing to obtain the plane equation of the carriage side wall; Based on the plane equation and the pre-calibrated track centerline or robot docking reference coordinate system, calculate the lateral deviation and longitudinal docking position deviation of the carriage; The side point cloud data is filtered to obtain candidate areas for the carriage door. The candidate areas for the carriage door are measured simultaneously using LiDAR and depth camera, and the measurement results are fused to obtain the center coordinates of the door frame. Based on the lateral deviation, longitudinal docking position deviation, and the center coordinates of the door frame, the robot is controlled to move to the position opposite the carriage door and enter the carriage. After entering the train carriage, the robot scans the inner wall of the carriage to obtain the geometric parameters of the carriage, including the net width, net height, and effective loading length inside the carriage.
[0007] Furthermore, the preprocessing includes: The process includes 3D region of interest clipping, removal of ground points and outliers, voxel downsampling, and processing of texture features on the sides of the carriage.
[0008] Furthermore, the textural feature processing of the carriage side includes: Echo intensity segmented filtering: Areas with low intensity and low local point density are identified as tarpaulin or shading areas and their fitting weights are reduced. Intensity edge detection: The average echo intensity is statistically analyzed along the transverse strip of the carriage, and the boundary of the paint strip is extracted as a segment constraint; Rivet / welding feature point removal: By calculating the angle between the local normal vector and the global principal normal vector, non-planar protruding points with an angle greater than 15° are removed; If echo intensity segmentation caused by paint banding is detected, a weighted average is applied to each segment after planar fitting.
[0009] Furthermore, the plane fitting employs a combination of the random sampling consensus algorithm and the weighted least squares method, as detailed below: The random sampling consensus algorithm is used for iterative calculation to select local points that are consistent with the plane equation from the pre-processed point cloud data to form an interior point set; wherein, the number of iterations of the random sampling consensus algorithm is dynamically updated according to the proportion of interior points obtained in each iteration. For the set of interior points, the weighted least squares method is used to refine the fitting of the plane parameters, wherein the weight of each interior point is set to the reciprocal of the square of its distance to the current fitting plane; Calculate the refined plane fitting residuals and the percentage of inliers. If the residuals are greater than 0.015m or the percentage of inliers is less than 0.70, the plane fitting quality is deemed insufficient and it is recommended to re-acquire data or switch the measurement posture.
[0010] Further, the step of filtering the side point cloud data to obtain candidate regions for the carriage door, and extracting door frame features from the candidate regions to obtain the center coordinates of the door frame, includes: Based on preset height and width constraints, the side point cloud data is filtered to obtain candidate areas for the carriage door; Based on the candidate area of the carriage door, both LiDAR and depth camera are used to simultaneously measure and obtain the measurement results and confidence levels of LiDAR and depth camera. The measurement results include the center coordinates, width, and height of the door frame. The adaptive fusion weights are calculated based on the ambient light intensity and the density of the laser point cloud. The measurement results of the lidar and depth camera are weighted and fused, and the center coordinates and fusion confidence of the fused gate frame are output. An alarm is issued when the confidence is lower than a preset threshold.
[0011] Furthermore, the measurement using lidar to obtain measurement results includes: For each point in the point cloud of the candidate region, construct a covariance matrix in its local neighborhood and perform eigenvalue decomposition, and take the eigenvector corresponding to the smallest eigenvalue as the normal vector of the point. Calculate the angle between the normal vector of each point and its neighboring points, mark the points whose normal vector angle is greater than a preset angle threshold as edge candidate points, and perform Hough transform line detection on the edge candidate points to obtain a set of candidate lines; Based on parallelism constraints, perpendicularity constraints, and door frame aspect ratio constraints, the four sides constituting the rectangular door frame are searched from the candidate line set. The center coordinates, width, and height of the rectangular door frame are calculated as the door frame measurement results of the lidar, and the laser branch confidence score is output.
[0012] Furthermore, the measurement of depth to obtain the measurement result includes: Edge detection and contour extraction are performed on RGB images, and quadrilateral contours are selected from the extracted contours by polygon approximation. Subpixel-level fine-grained iterative solution is performed on the four corner points of the quadrilateral contour to obtain the corner point pixel coordinates with subpixel precision; The pixel coordinates of the sub-pixel corner points are combined with the depth values of the corresponding pixels in the depth map and projected onto the world coordinate system through the pinhole camera model to obtain the world coordinates of the quadrilateral corner points. Then, the center coordinates, width, and height of the door frame are calculated as the door frame measurement results of the depth camera branch, and the confidence score of the visual branch is output.
[0013] Secondly, this application also provides an automatic measurement system for the geometric parameters of a train car, comprising: The data acquisition module is used to acquire side point cloud data of the target train carriage and preprocess the side point cloud data to obtain preprocessed side point cloud data. The plane fitting module is used to perform plane fitting processing on the preprocessed side point cloud data to obtain the plane equation of the carriage side wall. The deviation calculation module is used to calculate the lateral deviation and longitudinal docking position deviation of the carriage based on the plane equation and the pre-calibrated track centerline or robot docking reference coordinate system. The filtering and fusion module is used to filter the side point cloud data to obtain candidate areas of the carriage door, and after simultaneously measuring the candidate areas of the carriage door using LiDAR and depth camera, the measurement results are fused to obtain the center coordinates of the door frame. The measurement module is used to control the robot to move to the position of the carriage door and enter the carriage based on the lateral deviation, longitudinal docking position deviation and the center coordinate of the door frame. After entering the train carriage, the robot scans the inner wall of the carriage to obtain the geometric parameters of the carriage, including the net width, net height and effective loading length of the carriage.
[0014] Thirdly, this application also provides a loading and unloading robot, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of an automatic measurement method for the geometric parameters of a train car as described in any of the above-mentioned methods.
[0015] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of an automatic measurement method for the geometric parameters of a train car as described in any of the above-described methods.
[0016] The present application provides an automatic measurement method, system, and robot for the geometric parameters of a train carriage, the advantages of which are as follows: This application adopts a fusion detection scheme combining multi-line LiDAR and depth camera. First, the point cloud on the side of the carriage is preprocessed, texture noise is reduced, and plane fitting is completed by combining RANSAC algorithm and weighted least squares method to accurately solve the lateral and longitudinal parking position deviation of the carriage. Then, relying on dual sensor collaborative detection and adaptive data fusion technology, the coordinates and dimensions of the side loading and unloading door frame are stably extracted, which effectively overcomes the shortcomings of insufficient measurement accuracy and large interference from complex outdoor lighting in existing technologies. At the same time, after the robot completes the alignment and entry into the carriage, it automatically scans the inner wall of the carriage and calculates geometric parameters such as the carriage's net width, net height, and effective loading length. It realizes the fully automated closed-loop operation of the carriage's external position detection, door frame positioning and internal space measurement. The measurement data can be directly connected to the robot's path planning and loading planning module. The overall measurement accuracy is high, the environmental adaptability is strong, and the degree of automation is high, which can fully meet the actual use needs of autonomous operation of loading and unloading robots in railway logistics scenarios. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating an automatic measurement method for the geometric parameters of a train carriage according to an embodiment of this application. Figure 2 This is a schematic diagram of the structure of an automatic measurement system for the geometric parameters of a train carriage according to an embodiment of this application; Figure 3 This is a schematic diagram of the internal signal processing module of a loading and unloading robot according to an embodiment of this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] Please see Figure 1 This application provides an automatic measurement method for the geometric parameters of train carriages, applied to the loading and unloading operation of freight cars in railway freight yards. The method is executed by a loading / unloading robot equipped with a multi-line LiDAR and a side-mounted depth camera. This method relies on LiDAR to collect 3D point clouds and depth cameras to supplement visual information. Combined with point cloud processing, plane fitting, and multi-sensor data fusion technologies, it automatically completes the calculation of carriage stopping deviation, the positioning of the side loading / unloading door frame, and the measurement of the carriage's internal clearance parameters. This provides complete and high-precision geometric data support for the robot's autonomous positioning, carriage entry, and cargo loading planning. The method includes at least the following steps S10 to S50: S10. Acquire the side point cloud data of the target train carriage and preprocess the side point cloud data to obtain preprocessed side point cloud data.
[0021] Specifically, in this embodiment, a multi-line LiDAR deployed on a loading / unloading robot is used to acquire side point cloud data of the target train carriage. The robot travels to a preset measurement station in front of the carriage side, maintaining a horizontal distance of 2.0 m to 4.0 m from the carriage side wall, and activates the front-end deployed multi-line LiDAR (exemplarily, the number of radar lines is not less than 16 lines) to perform a full-area scan of the entire side of the carriage, collecting raw side point cloud data. The raw point cloud contains valid points on the vehicle body, ground points, aerial noise, outliers, and interference points caused by the surface texture of the carriage, and cannot be directly used for subsequent calculations. Therefore, a systematic preprocessing operation is required.
[0022] In one embodiment of this application, the preprocessing includes: three-dimensional region of interest clipping, removal of ground points and outliers, voxel downsampling, and processing of texture features on the side of the carriage.
[0023] Specifically, let the original point cloud frame be... Three-dimensional region of interest clipping is performed based on the prior geometry of the carriage: Keep the y-axis direction (vertical height) within the expected height range of the carriage door frame. points within, Usually, 0.5 m is taken. Take 3.2 m (suitable for most railway boxcars); Retain the x-axis direction (lateral) within the expected lateral range of the carriage sidewall. The points within this range are defined by the robot's docking distance (approximately 2.0 m to 4.0 m).
[0024] Ground point removal: Calculate the distribution histogram of the point cloud in the z-axis direction for each frame and filter out points with z < 0.1 m.
[0025] Outlier removal: Calculate the average distance of each point to its k = 50 nearest neighbors. Use global mean and standard deviation Eliminate Outliers (Formula 1).
[0026] Formula 1 (K-Nearest Neighbor Outlier Removal): ; ; Voxel downsampling: at resolution Point cloud after preprocessing cubic pixel pairs with a resolution of 0.02 m Downsampling is performed to retain the centroid of each voxel, effectively compressing the data volume while preserving geometric features.
[0027] In a specific embodiment, the textural feature processing of the carriage side includes: Echo intensity segmented filtering: Areas with low intensity and low local point density are identified as tarpaulin or shading areas and their fitting weights are reduced. Intensity edge detection: The average echo intensity is statistically analyzed along the transverse strip of the carriage, and the boundary of the paint strip is extracted as a segment constraint; Rivet / welding feature point removal: By calculating the angle between the local normal vector and the global principal normal vector, non-planar protruding points with an angle greater than 15° are removed; If echo intensity segmentation caused by paint stripes is detected, a weighted average is applied to each segment after planar fitting.
[0028] Specifically, the sides of railway boxcars have the following texture features: paint stripes (paint stripes extending horizontally, which periodically modulate the intensity of lidar echoes); rivets / welds (arranged regularly in the vertical direction); and tarpaulin-covered areas (rough surface, low echo intensity, and sparse dot density).
[0029] Echo intensity segmented filtering: Calculating point cloud echo intensity { The histogram is used to mark low-intensity points below 30% of the global mean as weak echo candidates. The local point density of weak echo points is detected in their 0.3 m radius neighborhood. If the density is <20 points / m³, they are identified as tarpaulin / shading areas, and their weight is reduced in the subsequent plane fitting.
[0030] Intensity edge detection: The average echo intensity of the point cloud strip (0.1 m wide) along the transverse direction (x-axis) of the carriage is statistically analyzed, and the intensity gradient curve is obtained by difference. The gradient extreme point corresponds to the boundary of the paint strip, and its x-coordinate is recorded as a candidate segmentation line, which is used as a segmentation constraint in the subsequent plane fitting.
[0031] Rivet / Weld Feature Point Removal: The regular arrangement of rivets on the side of the carriage appears as local protrusions in the point cloud. The removal of these features is achieved by calculating the angle between the local normal vector and the overall principal normal vector at each point. Remove Non-planar protruding points with an angle greater than 15° (Formula 2).
[0032] Formula 2 (Normal Vector Consistency Elimination): ; like → Mark them as characteristic noise points and remove them.
[0033] Segmented fitting strategy: If the echo intensity is segmented (usually 2 to 4 segments) due to the paint stripe, perform independent plane fitting for each segment, and finally take the weighted average of the plane equation parameters of each segment (the weight is proportional to the number of points in the segment) to obtain a unified plane equation of the carriage side.
[0034] S20. Perform plane fitting processing on the preprocessed side point cloud data to obtain the plane equation of the carriage side wall.
[0035] It is understandable that the side of the carriage is a standard vertical plane. In this embodiment, a combination of Random Sampling Consensus Algorithm (RANSAC) and weighted least squares method is used to complete the plane fitting, which takes into account both noise resistance and fitting accuracy.
[0036] In one specific embodiment of this application, step S2O includes: S21. Iterative calculations are performed using a random sampling consensus algorithm to select local points from the pre-processed point cloud data that are consistent with the plane equation, forming an interior point set; wherein, the number of iterations of the random sampling consensus algorithm is dynamically updated according to the proportion of interior points obtained in each iteration.
[0037] S22. For the set of interior points, the weighted least squares method is used to refine the fitting of the plane parameters, wherein the weight of each interior point is set to the reciprocal of the square of its distance to the current fitting plane. S23. Calculate the refined plane fitting residual and the proportion of inliers. If the residual is greater than 0.015m or the proportion of inliers is less than 0.70, the plane fitting quality is deemed insufficient and it is recommended to re-acquire or switch the measurement posture.
[0038] Specifically, let the equation of the target plane on the side of the carriage be: (where (A, B, C) are the normalized normal vectors, i.e.) ) The RANSAC algorithm iterative steps are as follows: Randomly select s = 3 non-collinear seed points and calculate the initial plane parameters (A, B, C, D); Calculate all points Signed distance to the plane ;like (Distance threshold, take) = 0.015 m), then Let it be an interior point; Iterate N times, with N calculated according to Formula 3, to ensure that the confidence level is within a certain range. Success rate at 0.99 : ; in, Interior point percentage, taken in the first iteration (Interior ratio approximately 50%), the percentage of the current optimal interior set updated in each round; the interior set of the model with the largest number of interior points is selected. .
[0039] right Perform weighted least squares method to refine plane parameters, weights Take the reciprocal of the square of the distance (Formula 4): For the set of interior points output by the RANSAC algorithm, a weighted least squares objective function is constructed to refine the plane parameters. The single-point weights are defined as follows: Equation 4 (Weighted Least Squares Objective Function): ,in , = 0.001 to prevent division by zero, with the optimization objective of "minimizing the sum of the product of the weight and the square of the distance from the point to the plane", the optimal equation of the carriage side wall plane is obtained by iterative solution.
[0040] Output: Plane equations Fitting residuals Number of interior points percentage of interior points .
[0041] Quality inspection: If or If the current frame's plane fitting quality is insufficient, it is recommended to re-acquire data or switch the measurement posture.
[0042] S30. Calculate the lateral deviation and longitudinal stopping position deviation of the carriage based on the plane equation and the pre-calibrated track centerline or robot stopping reference coordinate system.
[0043] Specifically, in this embodiment, on-site calibration is completed in advance, a unified world coordinate system is established, and the reference plane, track centerline, and robot operation reference coordinate system corresponding to the side wall of the carriage under standard parking conditions are determined.
[0044] The measured side wall plane equation of the carriage obtained in step S20 is compared with the pre-calibrated reference plane: using the formula for the distance between two parallel planes in space, the lateral deviation of the carriage relative to the standard position is calculated. This parameter represents the stopping offset of the carriage in the left and right directions. Combining the spatial extension range of the side wall plane and the distribution range of the point cloud along the length of the carriage, the longitudinal stopping position deviation of the carriage as a whole along the track extension direction is calculated, and the longitudinal deviation of the carriage in the front and rear directions is obtained.
[0045] The aforementioned lateral deviation and longitudinal docking position deviation are the core control parameters for robot vehicle alignment, and the measurement accuracy can be controlled within ≤10 mm.
[0046] In this embodiment of the application, based on the normal vector and position of the plane equation obtained in step S20, and combined with the pre-calibrated track centerline or robot docking reference coordinate system, the lateral deviation and longitudinal docking position deviation of the carriage are calculated.
[0047] S40. Filter the side point cloud data to obtain candidate areas of the carriage door, and then use LiDAR and depth camera to measure the candidate areas of the carriage door simultaneously, and fuse the measurement results to obtain the center coordinates of the door frame.
[0048] Understandably, the loading and unloading doors of the carriage are located on the side of the carriage. Based on the overall side point cloud, the door frame detection and parameter calculation are completed by combining the door frame size prior and multi-sensor fusion technology. Specifically, it is divided into three stages: candidate region screening, dual-branch independent measurement, and data adaptive fusion.
[0049] In one embodiment of this application, step S40 includes: S41. Based on preset height and width constraints, the side point cloud data is filtered to obtain candidate areas for the carriage door.
[0050] Specifically, constraints are set based on the general size range of railway shed door frames: the height range is limited to... (generally ) and, width range limitation The side point cloud is further filtered according to the above height and width constraints to extract the candidate region point cloud set corresponding to the carriage door. Simultaneously triggering the lateral depth camera to synchronously acquire RGB images of the area and... Depth image This ensures that the time difference between lidar and visual data acquisition does not exceed 0.1 seconds, achieving timestamp alignment.
[0051] S42. Based on the candidate area of the carriage door, both LiDAR and depth camera are used to simultaneously perform measurements to obtain the measurement results and confidence levels of LiDAR and depth camera. The measurement results include the center coordinates, width, and height of the door frame.
[0052] In a specific embodiment, the step of using lidar for measurement and obtaining measurement results includes: For each point in the point cloud of the candidate region, construct a covariance matrix in its local neighborhood and perform eigenvalue decomposition, and take the eigenvector corresponding to the smallest eigenvalue as the normal vector of the point. Calculate the angle between the normal vector of each point and its neighboring points, mark the points whose normal vector angle is greater than a preset angle threshold as edge candidate points, and perform Hough transform line detection on the edge candidate points to obtain a set of candidate lines; Based on parallelism constraints, perpendicularity constraints, and door frame aspect ratio constraints, the four sides constituting the rectangular door frame are searched from the candidate line set. The center coordinates, width, and height of the rectangular door frame are calculated as the door frame measurement results of the lidar, and the laser branch confidence score is output.
[0053] Specifically, the independent measurement method for each LiDAR branch is as follows: right Each point in In its Nearest neighbor range (radius) Construct a local covariance matrix within (0.1 m). (Formula 5): , ; right Perform eigenvalue decomposition to obtain eigenvalues. The direction corresponding to the smallest eigenvalue is the normal vector of that point. ( The smallest eigenvalue corresponds to the eigenvector. Calculate the angle between the normal vector of each point and its 8 neighbors (3D grid). (Formula 6), if ,mark Candidate points for the edge: Formula 6 (Normal Vector Mutation Detection): ,like → Mark as edge candidate The edge candidate points are sorted by x-coordinate (horizontal direction) to construct a two-dimensional edge point set of x-z, which is used for subsequent Hough line detection.
[0054] The Hough transform line detection and rectangle search are detailed below: Perform a Discrete Hough Transform in the ρ-θ parameter space (ρ: perpendicular distance from the origin to the line, θ: angle between the normal and the x-axis): for each detected line, the accumulator array... Add 1; , ; resolution ρ resolution .
[0055] Extracting local maxima (thresholds) from the accumulator A set of candidate straight lines was obtained. ; Rectangular door frame search: From The search for four edges is performed using the following combination of constraints: Parallelism constraint: Angle between opposite sides < 3°; Vertical constraint: the included angle between adjacent sides ∈ [87°, 93°]; Aspect ratio constraint: (Adapted to the typical width-to-height ratio of a boxcar door frame) For the four sides that satisfy the constraints, the average value of their corner coordinates is taken as the measurement result of the laser branch gate frame: , , , (Confidence level).
[0056] In a specific embodiment, the step of measuring depth to obtain measurement results includes: Edge detection and contour extraction are performed on RGB images, and quadrilateral contours are selected from the extracted contours by polygon approximation. Subpixel-level fine-grained iterative solution is performed on the four corner points of the quadrilateral contour to obtain the corner point pixel coordinates with subpixel precision; The pixel coordinates of the sub-pixel corner points are combined with the depth values of the corresponding pixels in the depth map and projected onto the world coordinate system through the pinhole camera model to obtain the world coordinates of the quadrilateral corner points. Then, the center coordinates, width, and height of the door frame are calculated as the door frame measurement results of the depth camera branch, and the confidence score of the visual branch is output.
[0057] Specifically, the branch-by-branch measurement method of the depth camera is as follows: For RGB images Perform Canny edge detection (low threshold) High threshold ); Use OpenCV's findContours to extract all contours; perform Douglas-Peucker polygon approximation on each contour. (pixels) Filter quadrilateral outlines: number of vertices = 4, convexity test passed, area... (After conversion to world coordinates); Perform subpixel refinement on the four corner points of the quadrilateral: in the neighborhood of the corner points ( Within a pixel, calculate the sub-pixel corner coordinates using Formula 7 (based on the gradient crossover principle): Formula 7 (Sub-pixel corner refinement): and ,in Estimate the current corner point. Iteratively solve for all pixels in its neighborhood until... Pixels The pixel coordinates of the four corner points Projecting the pinhole camera model onto world coordinates (Formula 8): Formula 8 (Pinhole Camera Projection Model): ; in The depth value of the corresponding pixel (from) (Read) For the camera intrinsic parameter matrix, The extrinsic parameters from the camera to the world coordinates are used to calculate the world coordinates of the four corner points, with the center as the reference point. .
[0058] S43. Calculate adaptive fusion weights based on ambient light intensity and laser point cloud density, perform weighted fusion of the measurement results of LiDAR and depth camera, output the center coordinates and fusion confidence of the fused gate frame, and issue an alarm when the confidence is lower than a preset threshold.
[0059] Specifically, the fusion timing is as follows: the door frame point cloud frame and the depth image frame are acquired at a time difference of ≤ 0.1 s, and then fused in the same coordinate system after being aligned by timestamps.
[0060] Adaptive fusion weights (Formula 9) is derived from the current ambient light intensity E and the laser point cloud density. Joint decision: Formula 9 (Adaptive Fusion Weights) ): ; (Deviates visual perception under strong light, and deviates visual perception under low laser density).
[0061] Final door frame parameters (Formula 10): Formula 10 (Dual Sensor Fusion Output): ; ; ; ; in For consistency reward items, As a benchmark for positional consistency, The closer the value is to 1.0, the better the consistency of the measurements between the two sensors.
[0062] Fusion confidence threshold test: If It outputs an alarm and suggests manual confirmation of the door frame position.
[0063] S50. Based on the lateral deviation, longitudinal stopping position deviation, and center coordinates of the door frame, control the robot to move to the position opposite the carriage door and enter the carriage. After entering the train carriage, scan the inner wall of the carriage to obtain the geometric parameters of the carriage. The geometric parameters include: the net width, net height, and effective loading length inside the carriage.
[0064] Specifically, the system transmits the lateral deviation and longitudinal docking position deviation obtained in step S30, as well as the door frame center coordinates obtained in step S40, to the robot motion controller; the controller drives the walking mechanism to complete the posture adjustment according to the above parameters, so that the robot can accurately align with the loading and unloading door on the side of the carriage.
[0065] After alignment, the robot enters the carriage at a low and constant speed (e.g., 0.1 m / s to 0.5 m / s). During the journey, the lidar works continuously to scan the left and right inner walls, floor, and ceiling of the carriage. The point clouds collected at different times are stitched together in the world coordinate system to form a complete three-dimensional point cloud model of the carriage interior.
[0066] Point cloud processing and geometric parameter calculation of the interior wall of the carriage: The 3D point cloud inside the carriage is segmented into regions, and four independent point cloud sets are extracted: left wall, right wall, floor, and ceiling. Using the plane fitting algorithm described above, the corresponding inner wall plane equations are obtained by fitting the four sets of point clouds.
[0067] The net width inside the carriage is calculated as follows: the average vertical distance between the left and right inner wall planes of the carriage. Interior height of the carriage: Calculate the average vertical distance between the floor plane and the ceiling plane of the carriage; Effective loading length: Based on the distribution range of the point cloud inside the carriage along the length direction, the effective depth length where the goods can be stacked is calculated; Available loading volume: calculated by multiplying the net width, net height, and effective loading length.
[0068] The net width, net height, effective loading length, and available loading volume of the car body output in this step are collectively referred to as the internal geometric parameters of the car body. The overall measurement accuracy of the net dimensions of the car body can be controlled within ≤30 mm.
[0069] The present application provides an automatic measurement method for the geometric parameters of a train carriage, the advantages of which are: This application adopts a fusion detection scheme combining multi-line LiDAR and depth camera. First, the point cloud on the side of the carriage is preprocessed, texture noise is reduced, and plane fitting is completed by combining RANSAC algorithm and weighted least squares method to accurately solve the lateral and longitudinal parking position deviation of the carriage. Then, relying on dual sensor collaborative detection and adaptive data fusion technology, the coordinates and dimensions of the side loading and unloading door frame are stably extracted, which effectively overcomes the shortcomings of insufficient measurement accuracy and large interference from complex outdoor lighting in existing technologies. At the same time, after the robot completes the alignment and entry into the carriage, it automatically scans the inner wall of the carriage and calculates geometric parameters such as the carriage's net width, net height, and effective loading length. It realizes the fully automated closed-loop operation of the carriage's external position detection, door frame positioning and internal space measurement. The measurement data can be directly connected to the robot's path planning and loading planning module. The overall measurement accuracy is high, the environmental adaptability is strong, and the degree of automation is high, which can fully meet the actual use needs of autonomous operation of loading and unloading robots in railway logistics scenarios.
[0070] Please see Figure 2 This application also provides an automatic measurement system 200 for the geometric parameters of a train car, comprising: The data acquisition module 201 is used to acquire the side point cloud data of the target train carriage and preprocess the side point cloud data to obtain preprocessed side point cloud data. The plane fitting module 202 is used to perform plane fitting processing on the preprocessed side point cloud data to obtain the plane equation of the carriage side wall. The deviation calculation module 203 is used to calculate the lateral deviation and longitudinal docking position deviation of the carriage based on the plane equation and the pre-calibrated track centerline or robot docking reference coordinate system. The filtering and fusion module 204 is used to filter the side point cloud data to obtain candidate areas of the carriage door, and after simultaneously measuring the candidate areas of the carriage door using LiDAR and depth camera, the measurement results are fused to obtain the center coordinates of the door frame. The measurement module 205 is used to control the robot to move to the position of the carriage door and enter the carriage according to the lateral deviation, longitudinal docking position deviation and the center coordinate of the door frame, and to scan the inner wall of the carriage after entering the train carriage to obtain the geometric parameters of the carriage, wherein the geometric parameters include: the net width, net height and effective loading length of the carriage.
[0071] Please see Figure 3 This application also provides a loading and unloading robot 300, including a memory 503 and a processor 302. The memory 303 stores a computer program, and the processor 302 executes the computer program to implement the steps of the automatic measurement method for the geometric parameters of the train carriage as described in any of the above claims.
[0072] Specifically, the loading and unloading robot 300 includes: a transceiver 301, a bus interface, and a processor 302. The processor 302 is used to acquire side point cloud data of the target train carriage, and preprocess the side point cloud data to obtain preprocessed side point cloud data; perform plane fitting processing on the preprocessed side point cloud data to obtain the plane equation of the carriage side wall; calculate the lateral deviation and longitudinal stopping position deviation of the carriage based on the plane equation and the pre-calibrated track centerline or robot stopping reference coordinate system; filter the side point cloud data to obtain candidate areas for carriage doors, and extract door frame features from the candidate areas of the carriage doors to obtain the center coordinates of the door frame; control the robot to move to the position of the carriage door and enter the carriage based on the lateral deviation, longitudinal stopping position deviation, and center coordinates of the door frame, and scan the inner wall of the carriage after entering the train carriage to obtain the geometric parameters of the carriage, wherein the geometric parameters include: the net width, net height, and effective loading length of the carriage.
[0073] In this embodiment, the loading / unloading robot 300 further includes a memory 303. Figure 3 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors 302 (represented by processor 302) and various circuits of memory 303 (represented by memory 303). The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 301 can be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium. The processor 302 is responsible for managing the bus architecture and general processing, and the memory 303 can store data used by the processor 302 during operation.
[0074] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the automatic measurement method for the geometric parameters of a train carriage as described above.
[0075] In this embodiment, the computer-readable storage medium can be a non-volatile storage medium or a volatile storage medium. For example, the computer storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0076] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limitations; therefore, other examples of exemplary embodiments may have different values.
[0077] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0078] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0079] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0080] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or 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 terminal device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0081] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. An automatic measurement method for the geometric parameters of a train carriage, characterized in that, include: Acquire side point cloud data of the target train carriage and preprocess the side point cloud data to obtain preprocessed side point cloud data; The preprocessed side point cloud data is subjected to plane fitting processing to obtain the plane equation of the carriage side wall; Based on the plane equation and the pre-calibrated track centerline or robot docking reference coordinate system, calculate the lateral deviation and longitudinal docking position deviation of the carriage; The side point cloud data is filtered to obtain candidate areas for the carriage door. The candidate areas for the carriage door are measured simultaneously using LiDAR and depth camera, and the measurement results are fused to obtain the center coordinates of the door frame. Based on the lateral deviation, longitudinal docking position deviation, and the center coordinates of the door frame, the robot is controlled to move to the position opposite the carriage door and enter the carriage. After entering the train carriage, the robot scans the inner wall of the carriage to obtain the geometric parameters of the carriage, including the net width, net height, and effective loading length inside the carriage.
2. The method according to claim 1, characterized in that, The preprocessing includes: The process includes 3D region of interest clipping, removal of ground points and outliers, voxel downsampling, and processing of texture features on the sides of the carriage.
3. The method according to claim 2, characterized in that, The textural feature processing of the carriage side includes: Echo intensity segmented filtering: Areas with low intensity and low local point density are identified as tarpaulin or shading areas and their fitting weights are reduced. Intensity edge detection: The average echo intensity is statistically analyzed along the transverse strip of the carriage, and the boundary of the paint strip is extracted as a segment constraint; Rivet / welding feature point removal: By calculating the angle between the local normal vector and the global principal normal vector, non-planar protruding points with an angle greater than 15° are removed; If echo intensity segmentation caused by paint stripes is detected, a weighted average is applied to each segment after planar fitting.
4. The method according to claim 1, characterized in that, The plane fitting method employs a combination of random sampling consensus algorithm and weighted least squares method, as detailed below: The random sampling consensus algorithm is used for iterative calculation to select local points that are consistent with the plane equation from the pre-processed point cloud data to form an interior point set; wherein, the number of iterations of the random sampling consensus algorithm is dynamically updated according to the proportion of interior points obtained in each iteration. For the set of interior points, the weighted least squares method is used to refine the fitting of the plane parameters, wherein the weight of each interior point is set to the reciprocal of the square of its distance to the current fitting plane; Calculate the refined plane fitting residuals and the percentage of inliers. If the residuals are greater than 0.015m or the percentage of inliers is less than 0.70, the plane fitting quality is deemed insufficient and it is recommended to re-acquire data or switch the measurement posture.
5. The method according to claim 1, characterized in that, The process involves filtering the side point cloud data to obtain candidate regions for the vehicle door, and then simultaneously measuring these candidate regions using both LiDAR and a depth camera. The measurement results are then fused to obtain the center coordinates of the door frame. Based on preset height and width constraints, the side point cloud data is filtered to obtain candidate areas for the carriage door; Based on the candidate area of the carriage door, both LiDAR and depth camera are used to simultaneously measure and obtain the measurement results and confidence levels of LiDAR and depth camera. The measurement results include the center coordinates, width, and height of the door frame. The adaptive fusion weights are calculated based on the ambient light intensity and the density of the laser point cloud. The measurement results of the lidar and depth camera are weighted and fused, and the center coordinates and fusion confidence of the fused gate frame are output. An alarm is issued when the confidence is lower than a preset threshold.
6. The method according to claim 5, characterized in that, The measurement using lidar to obtain measurement results includes: For each point in the point cloud of the candidate region, construct a covariance matrix in its local neighborhood and perform eigenvalue decomposition, and take the eigenvector corresponding to the smallest eigenvalue as the normal vector of the point. Calculate the angle between the normal vector of each point and its neighboring points, mark the points whose normal vector angle is greater than a preset angle threshold as edge candidate points, and perform Hough transform line detection on the edge candidate points to obtain a set of candidate lines; Based on parallelism constraints, perpendicularity constraints, and door frame aspect ratio constraints, the four sides constituting the rectangular door frame are searched from the candidate line set. The center coordinates, width, and height of the rectangular door frame are calculated as the door frame measurement results of the lidar, and the laser branch confidence score is output.
7. The method according to claim 5, characterized in that, The method of using depth to measure and obtain measurement results includes: Edge detection and contour extraction are performed on RGB images, and quadrilateral contours are selected from the extracted contours by polygon approximation. Subpixel-level fine-grained iterative solution is performed on the four corner points of the quadrilateral contour to obtain the corner point pixel coordinates with subpixel precision; The pixel coordinates of the sub-pixel corner points are combined with the depth values of the corresponding pixels in the depth map and projected onto the world coordinate system through the pinhole camera model to obtain the world coordinates of the quadrilateral corner points. Then, the center coordinates, width, and height of the door frame are calculated as the door frame measurement results of the depth camera branch, and the confidence score of the visual branch is output.
8. An automatic measurement system for the geometric parameters of a train carriage, characterized in that, include: The data acquisition module is used to acquire side point cloud data of the target train carriage and preprocess the side point cloud data to obtain preprocessed side point cloud data. The plane fitting module is used to perform plane fitting processing on the preprocessed side point cloud data to obtain the plane equation of the carriage side wall. The deviation calculation module is used to calculate the lateral deviation and longitudinal docking position deviation of the carriage based on the plane equation and the pre-calibrated track centerline or robot docking reference coordinate system. The filtering and fusion module is used to filter the side point cloud data to obtain candidate areas of the carriage door, and after simultaneously measuring the candidate areas of the carriage door using LiDAR and depth camera, the measurement results are fused to obtain the center coordinates of the door frame. The measurement module is used to control the robot to move to the position of the carriage door and enter the carriage based on the lateral deviation, longitudinal docking position deviation and the center coordinate of the door frame. After entering the train carriage, the robot scans the inner wall of the carriage to obtain the geometric parameters of the carriage, including the net width, net height and effective loading length of the carriage.
9. A loading and unloading robot, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the automatic measurement method for the geometric parameters of a train car as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the automatic measurement method for the geometric parameters of a train car as described in any one of claims 1-7.