Distance detection method and device for a robotic vacuum cleaner
Patent Information
- Application Number
- CN202511602539.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2045-11-04
AI Technical Summary
[0002]现有的扫地机器人主要依赖栅格地图或简单几何形状来表示环境中的障碍物,这种建模方式存在精度不足的问题,导致机器人对复杂形状障碍物的几何特征理解不准确,容易产生清扫盲区,特别是在家具边角、墙面凹凸部位等复杂区域,传统方法难以准确计算安全距离,影响清扫效果和运行安全性
[0014]In summary, the technical solution provided by this invention employs a set of convex primitives for accurate geometric modeling of environmental obstacles. Complex obstacles are decomposed into basic convex primitives such as ellipsoids, cylinders, capsules, convex polyhedra, and triangular meshes. Compared to traditional grid maps or simple geometric representations, this approach accurately captures the actual geometric features of obstacles, effectively eliminating blind spots caused by modeling errors. The safety distance field constructed based on the set of convex primitives can accurately calculate the shortest safe distance from the robot to obstacles of various complex shapes, overcoming the limitations of traditional Euclidean distance calculation methods. This provides precise geometric constraints for path planning and obstacle avoidance control, improving the safety of robot operation. The bidirectional path search algorithm searches simultaneously from both the starting and ending points, reducing search space and computation time compared to a unidirectional search strategy. The forward search combines convex primitive penalty terms and obstacle density weighting, while the backward search considers the coverage potential function, making path planning both efficient and optimized. A three-layer cascaded control structure is adopted, including a path tracking layer based on model predictive control, an error compensation layer based on neural networks, and a safety assurance layer based on a convex primitive safe distance field. This effectively handles sensor noise, model uncertainty, and external disturbances, improving robustness and tracking accuracy. Local path replanning is performed using the convex primitive safe distance field, replanning only path segments affected by dynamic obstacles, avoiding the computational burden of global replanning and improving response speed and adaptability to dynamic environments. Adaptive weight fusion of LiDAR and ultrasonic sensor data is employed, dynamically adjusting the fusion weights based on the minimum detection range of the LiDAR, effectively solving the blind zone problem of LiDAR near-range detection and improving the comprehensiveness and accuracy of environmental perception.
Smart Images

Figure CN121498690B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot distance detection technology, and in particular to a distance detection method and device for a sweeping robot. Background Technology
[0002] Existing robotic vacuum cleaners mainly rely on grid maps or simple geometric shapes to represent obstacles in the environment. This modeling method has insufficient accuracy, which leads to the robot's inaccurate understanding of the geometric features of complex-shaped obstacles and the creation of cleaning blind spots. This is especially true in complex areas such as furniture corners and uneven parts of walls, where traditional methods struggle to accurately calculate safe distances, affecting cleaning performance and operational safety. Summary of the Invention
[0003] The main objective of this invention is to provide a distance detection method and device for a sweeping robot. This invention can accurately capture the actual geometric features of obstacles, effectively eliminate cleaning blind spots caused by modeling errors, and improve the safety, robustness, and tracking accuracy of the sweeping robot.
[0004] To achieve the above objectives, the present invention provides a distance detection method for a robotic vacuum cleaner, comprising the following steps: The environmental point cloud data is acquired by a robotic vacuum cleaner, and the environmental point cloud data is decomposed into convex primitives to obtain a set of obstacle convex primitives. The safe distance field of the convex primitives is calculated based on the set of convex primitives of obstacles, and a bidirectional path search is performed on the starting point and the ending point to obtain the first cleaning path; Based on the first cleaning path and the convex element safety distance field, tracking control is performed, and robot control commands are output.
[0005] Optionally, in a first implementation of the first aspect of the present invention, the step of acquiring environmental point cloud data through a sweeping robot and performing convex primitive decomposition on the environmental point cloud data to obtain a set of obstacle convex primitives includes: The lidar data is filtered to obtain the lidar distance data, and the distance measurement values of the ultrasonic sensor are spline interpolated to obtain the ultrasonic data. Calculate the fusion weight parameters based on the radar range data; The radar distance data and the ultrasonic data are weighted and fused based on the fusion weight parameters to obtain initial fused data. The initial fused data is then transformed into three-dimensional coordinates using the robot pitch angle information provided by the inertial measurement unit to obtain environmental point cloud data. The environmental point cloud data is decomposed into convex primitives to obtain a set of obstacle convex primitives.
[0006] Optionally, in a second implementation of the first aspect of the present invention, the step of performing convex primitive decomposition on the environmental point cloud data to obtain a set of obstacle convex primitives includes: The environmental point cloud data is clustered and segmented, and the angle constraint between the normal vectors is added to group the points on the same obstacle surface into the same cluster, thus obtaining the initial point cloud clustering result; The initial point cloud clustering results are input into the convex primitive recognizer for shape type discrimination to obtain point cloud clusters with shape labels; Based on the point cloud cluster with shape labels, the reconstruction error from the point cloud to the convex primitive surface is minimized to obtain the convex primitive parameters. Based on the convex primitive parameters, generate a set of obstacle convex primitives including ellipsoidal convex primitives, cylindrical convex primitives, capsule convex primitives, convex polyhedral convex primitives, and triangular mesh convex primitives.
[0007] Optionally, in a third implementation of the first aspect of the present invention, the step of inputting the initial point cloud clustering result into a convex primitive recognizer for shape type discrimination to obtain point cloud clusters with shape labels includes: The initial point cloud clustering results are subjected to ellipsoid fitting and detection to obtain ellipsoid recognition results; the initial point cloud clustering results are subjected to cylinder axis fitting to obtain cylinder recognition results; and the initial point cloud clustering results are subjected to capsule end point detection to obtain capsule recognition results. Convex hull construction is performed on the initial point cloud clustering results, and the number of vertices and faces is counted. When the number of vertices is within a first range and the number of faces is within a second range, it is determined to be a convex polyhedron, and the polyhedron recognition result is obtained. Based on the ellipsoid recognition results, cylinder recognition results, capsule recognition results, and polyhedron recognition results, each point cloud cluster is assigned a corresponding ellipsoid label, cylinder label, capsule label, convex polyhedron label, or triangular mesh label, resulting in point cloud clusters with shape labels.
[0008] Optionally, in a fourth implementation of the first aspect of the present invention, the step of calculating the convex element safety distance field based on the obstacle convex element set and performing a bidirectional path search on the start and end points to obtain the first cleaning path includes: For each convex primitive in the set of obstacle convex primitives, a constraint function for each convex primitive is established based on the vector difference between the robot's position coordinates and the center coordinates of the convex primitive. Construct the corresponding scaling shape matrix based on the convex primitive geometric parameters of the constraint function; Based on the constraint function and the scaling shape matrix, the safety distance is numerically solved to obtain the individual safety distance value from the robot to each convex primitive. The minimum safe distance value is selected based on the individual safe distance value. At the same time, the gradient vector of the minimum safe distance value of each convex element with respect to the robot position is calculated. The minimum safe distance value and the gradient vector are combined to form the convex element safe distance field. Based on the convex element safety distance field, a bidirectional path search is performed on the starting point and the ending point to obtain the first cleaning path.
[0009] Optionally, in a fifth implementation of the first aspect of the present invention, the step of performing a bidirectional path search on the starting point and the ending point based on the convex element safety distance field to obtain a first cleaning path includes: Build a forward search tree from the starting point and a backward search tree from the ending point; Based on the forward search tree, the convex primitive penalty term value is calculated using the convex primitive safe distance field, and the obstacle density on the path from the current node to the destination is calculated to obtain the forward search node set. Based on the backward search tree, the coverage potential function value is calculated to evaluate the attractiveness of the uncleaned area, and a set of backward search nodes is obtained; Merging point detection is performed on the forward search node set and the backward search node set to determine the merging path, and the merging path is smoothed to obtain the first cleaning path.
[0010] Optionally, in a sixth implementation of the first aspect of the present invention, the step of calculating the convex primitive penalty term value using the convex primitive safety distance field based on the forward search tree, and simultaneously calculating the obstacle density on the path from the current node to the endpoint to obtain the forward search node set, includes: Calculate the cumulative cost value for each node in the forward search tree; The volume intersection of the straight path and each convex primitive in the set of obstacle convex primitives is calculated and divided by the cube of the path length to obtain the obstacle density weighted heuristic value of each node. The minimum safe distance value in the convex primitive safe distance field is input into the exponential decay function to calculate the convex primitive penalty term, thereby obtaining the convex primitive penalty term value of each node; The cumulative cost value, the obstacle density-weighted heuristic value, and the convex primitive penalty term value are linearly combined to form the forward node evaluation function value. Based on the forward node evaluation function value, the node expansion order is managed through a priority queue and the parent node information is recorded to obtain the forward search node set.
[0011] Optionally, in a seventh implementation of the first aspect of the present invention, the step of tracking and controlling based on the first cleaning path and the convex element safety distance field, and outputting robot control commands, includes: Establish the state vector of the sweeping robot, and recursively estimate the state vector to obtain the state estimate value; The first cleaning path is used as a reference trajectory input to the model predictive controller, and the minimum safe distance value in the convex primitive safe distance field is used as a constraint condition to limit the robot's motion boundary, thus obtaining the basic control quantity. Error compensation is calculated based on the position error, angle error, current velocity, and minimum safe distance value of the convex element safe distance field in the state estimate to obtain the error compensation amount; When the minimum safe distance value of the convex element safe distance field is lower than the preset critical value, emergency obstacle avoidance control based on the safe distance gradient is adopted; otherwise, the basic control quantity and the error compensation quantity are added together to obtain the target control quantity, and robot control instructions are generated according to the target control quantity.
[0012] Optionally, in an eighth implementation of the first aspect of the present invention, the distance detection method of the sweeping robot further includes: The robot control commands are input into the task planning layer, path planning layer, and motion control layer respectively for multi-frequency coordinated execution to obtain the hierarchical control execution result. Dynamic obstacle recognition is performed on the newly detected point cloud data of the sweeping robot to obtain dynamic obstacle recognition results; Based on the dynamic obstacle recognition results, an influence radius is set with the newly detected dynamic obstacle as the center, and path nodes in the first cleaning path that are located within the influence domain are selected. Path segments within the influence domain are marked as local replanning ranges. Based on the local replanning range, collision detection and safety constraints are performed using the convex primitive safety distance field to generate a second cleaning path.
[0013] The present invention also provides a distance detection device for a robotic vacuum cleaner, comprising: The convex primitive decomposition module is used to acquire environmental point cloud data through the sweeping robot and perform convex primitive decomposition on the environmental point cloud data to obtain a set of obstacle convex primitives. A bidirectional path search module is used to calculate the safe distance field of convex primitives based on the set of obstacle convex primitives, and to perform bidirectional path search on the starting point and the ending point to obtain the first cleaning path; The tracking control module is used to perform tracking control based on the first cleaning path and the convex element safety distance field, and output robot control commands.
[0014] In summary, the technical solution provided by this invention employs a set of convex primitives for accurate geometric modeling of environmental obstacles. Complex obstacles are decomposed into basic convex primitives such as ellipsoids, cylinders, capsules, convex polyhedra, and triangular meshes. Compared to traditional grid maps or simple geometric representations, this approach accurately captures the actual geometric features of obstacles, effectively eliminating blind spots caused by modeling errors. The safety distance field constructed based on the set of convex primitives can accurately calculate the shortest safe distance from the robot to obstacles of various complex shapes, overcoming the limitations of traditional Euclidean distance calculation methods. This provides precise geometric constraints for path planning and obstacle avoidance control, improving the safety of robot operation. The bidirectional path search algorithm searches simultaneously from both the starting and ending points, reducing search space and computation time compared to a unidirectional search strategy. The forward search combines convex primitive penalty terms and obstacle density weighting, while the backward search considers the coverage potential function, making path planning both efficient and optimized. A three-layer cascaded control structure is adopted, including a path tracking layer based on model predictive control, an error compensation layer based on neural networks, and a safety assurance layer based on a convex primitive safe distance field. This effectively handles sensor noise, model uncertainty, and external disturbances, improving robustness and tracking accuracy. Local path replanning is performed using the convex primitive safe distance field, replanning only path segments affected by dynamic obstacles, avoiding the computational burden of global replanning and improving response speed and adaptability to dynamic environments. Adaptive weight fusion of LiDAR and ultrasonic sensor data is employed, dynamically adjusting the fusion weights based on the minimum detection range of the LiDAR, effectively solving the blind zone problem of LiDAR near-range detection and improving the comprehensiveness and accuracy of environmental perception. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the distance detection method steps of a sweeping robot in one embodiment of the present invention; Figure 2 This is a structural block diagram of a distance detection device for a sweeping robot according to an embodiment of the present invention.
[0016] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0018] Reference Figure 1 This embodiment provides a distance detection method for a robotic vacuum cleaner, including the following steps: S1. The robot vacuum cleaner acquires environmental point cloud data and performs convex primitive decomposition on the environmental point cloud data to obtain a set of obstacle convex primitives. The process involves simultaneous preprocessing of data collected by multiple sensors mounted on the robotic vacuum cleaner. The LDS-01 lidar module acquires raw distance data within a 360-degree range at a 10Hz frequency. After cascaded median and Gaussian filtering, isolated points and high-frequency noise are removed, resulting in radar distance data with good continuity and high stability. Simultaneously, four HC-SR04 ultrasonic sensors distributed in the robot's front, rear, left, and right directions collect near-field obstacle information at a 40kHz frequency. The obtained non-uniform angular ultrasonic measurements are expanded to a 360-degree angular range using cubic spline interpolation, forming an ultrasonic data sequence consistent with the lidar data angles. Fusion weight parameters are constructed based on the minimum distance value in the radar data. These weights are dynamically adjusted using a sigmoid function. When the nearest detection distance of the radar is less than 0.5 meters, the fusion weights favor the ultrasonic data; otherwise, the lidar data is retained as the dominant factor, achieving adaptive optimization of measurement accuracy for different distance segments. The radar distance data and ultrasonic data are then weighted and fused according to the fusion weights to obtain the initial fused dataset. The initial fused data is transformed into three-dimensional coordinates by combining real-time pitch angle information provided by the inertial measurement unit (IMU). Each angle data point is mapped to a (x, y, z) three-dimensional coordinate format after cosφ and sinφ angle rotation, resulting in an environmental point cloud dataset. A spatial clustering process based on density clustering and normal vector consistency constraints is performed on the environmental point cloud data. Each subset of point clouds is input into the convex primitive recognition module. The convex primitive recognition module identifies standard geometric structural units, including ellipsoids, cylinders, capsules, convex polyhedra, and triangular meshes, using a geometric fitting algorithm. Simultaneously, it extracts the center coordinates, orientation matrix, and geometric dimension parameters of each structural unit, resulting in a set of obstacle convex primitives.
[0019] S2, calculate the safe distance field of convex primitives based on the set of obstacle convex primitives, and perform bidirectional path search on the start and end points to obtain the first cleaning path; Specifically, a constraint function is constructed for each convex primitive in the obstacle set. This constraint function is based on the vector difference between the robot's current position and the center coordinates of the convex primitive, and a shape constraint expression is introduced to describe the robot's geometric relationship with respect to the outer boundary of the convex primitive. Based on the geometric type of each convex primitive, such as an ellipsoid, cylinder, or capsule, principal axis dimension parameters and direction rotation matrices are extracted to construct a scaling shape matrix. This scaling shape matrix, by normalizing different axial dimensions and applying scaling factors, reflects the degree of boundary proximity between the robot and the geometry in various directions. Based on the constraint function and the scaling shape matrix, the Newton-Raphson iteration method is used to solve for the safe distance value for each convex primitive. The safe distance value indicates the degree to which the robot needs to scale its own boundary to achieve minimum contact with the outer contour of the convex primitive, and a convergence threshold is set to ensure numerical accuracy. The minimum safety distance value among all calculated individual unit safety distances is taken as the global minimum safety distance value for the current robot state. Simultaneously, the partial derivative of the constraint function of the convex primitive corresponding to the minimum distance value with respect to the robot's position coordinates is used to calculate the gradient vector. This gradient direction points to the steepest ascent direction from the obstacle closest to the robot, forming a complete safety distance field containing the minimum safety distance and its gradient information. An improved bidirectional A* path search algorithm is used to simultaneously construct forward and backward search trees from the starting and ending points respectively. During path expansion, the safety distance field is introduced as a penalty term into the evaluation function, prioritizing path nodes that are far from obstacles and have lower turning costs. A path merging mechanism is used to trigger a path connection operation when two search trees are close, generating a first cleaning path that maintains safety margins, reasonable obstacle avoidance, and a smooth path within the complex space composed of convex primitive sets.
[0020] S3 performs tracking control based on the first cleaning path and the convex element safety distance field, and outputs robot control commands.
[0021] Specifically, a state vector for the robotic vacuum cleaner is established, including position coordinates, attitude angles, linear velocity, angular velocity, and potential sensor bias parameters. An unscented Kalman filter is used to perform a recursive estimation operation on the state vector. The estimation process uses sensor observation data as input, integrates information from LiDAR, IMU, and odometry, and constructs a nonlinear state transition model and observation model using a multi-Sigma point propagation method to achieve high-precision state estimation, outputting the estimated state value. The first cleaning path is used as the input to the model predictive controller for the desired trajectory. The controller minimizes the trajectory error and control increment within the set prediction and control time domains. Simultaneously, the minimum safe distance value calculated from the convex primitive safe distance field is applied as a hard constraint to the position variables, thereby dynamically limiting the robot's motion boundary during path tracking to ensure its trajectory does not enter dangerous areas. The output is a basic control quantity, representing the optimal motion command of the robot under ideal conditions. Based on the spatial and angular errors between the estimated state and the reference trajectory, combined with the current velocity state and the minimum safe distance value at the corresponding position, the data is input into a three-layer feedforward neural network for nonlinear mapping learning. The neural network has already completed weight update training through online gradient descent in historical operations, and can output real-time estimates and compensations for control deviations, forming an error compensation quantity. The control system simultaneously monitors the current minimum safe distance value in real time. When the minimum safe distance value is lower than a preset critical threshold, it switches to an emergency obstacle avoidance control mode. Based on the gradient information of the safe distance field, a motion control law is constructed to escape along the gradient in the opposite direction, enabling the robot to move rapidly away from obstacles to ensure no collision occurs. In normal operation, the basic control quantity and the error compensation quantity are added together to generate a target control quantity. The target control quantity serves as the final motion decision basis for the robot at the current moment and is converted into specific linear and angular velocity commands through coordinate mapping, driving the underlying motion control module to execute corresponding actions, achieving continuous and stable tracking of the reference path and real-time response and adjustment to the dynamic obstacle environment.
[0022] In one example, environmental point cloud data is acquired using a robotic vacuum cleaner, and convex primitive decomposition is performed on the environmental point cloud data to obtain a set of obstacle convex primitives, including: The lidar data is filtered to obtain the lidar distance data, and the distance measurement values of the ultrasonic sensor are spline interpolated to obtain the ultrasonic data. Calculate the fusion weight parameters based on radar range data; The radar range data and ultrasonic data are weighted and fused based on the fusion weight parameters to obtain the initial fused data. The initial fused data is then transformed into three-dimensional coordinates using the robot pitch angle information provided by the inertial measurement unit to obtain environmental point cloud data. Convex primitive decomposition is performed on the environmental point cloud data to obtain a set of obstacle convex primitives.
[0023] In this example, data collected by various environmental perception sensors on the robotic vacuum cleaner are filtered, interpolated, fused, and geometrically transformed. The LDS-01 lidar sensor acquires polar coordinate distance data within a 360° range at a sampling frequency of 10Hz, with one sampling point per degree, forming the original radar data sequence. The data contains anomalies such as noise spikes and boundary reflection jitter. A 5-point median filter is applied to remove these anomalies from the original radar data. Then, a Gaussian kernel function with a standard deviation of 0.8 is used to smooth the median filter result, obtaining radar distance data with strong continuity and high anti-interference capability. Simultaneously, HC-SR04 ultrasonic sensors, positioned in the front, back, left, and right directions of the robot, acquire echo distance information of nearby obstacles at a frequency of 40kHz. Due to the limited angular coverage and discrete data characteristics of ultrasonic sensors, a cubic spline interpolation algorithm is used to extend the original data acquired in the four directions by curve fitting along the angular dimension, forming a structurally consistent ultrasonic data representation across the entire 360° angular space. The fusion module dynamically calculates fusion weight parameters based on the minimum value in the radar distance data. The fusion weight design follows the characteristics of a sigmoid function. When the minimum distance detected by the radar is less than 0.5 meters, the fusion weight parameters tend to decrease, thereby enhancing the reference weight of ultrasonic data in the near-range segment. Conversely, when there are no obvious near-range targets in the radar detection space, the fusion weight remains at a high level to fully utilize the advantages of radar measurement in the long-range segment. Based on the adaptive weight parameters, the filtered radar distance data and the interpolated ultrasonic data are weighted and fused to generate a set of initial fused distance data covering the entire 360° angle. The real-time pitch angle parameters provided by the inertial measurement unit (IMU) are introduced. Through a coordinate transformation process, the polar coordinate angle, fused distance value, and the robot's current attitude information are integrated and calculated to obtain the corresponding coordinate position of each angle measurement point in three-dimensional space. A structured environmental point cloud dataset is constructed, reflecting the spatial structural features and ground elevation undulations perceived by the robot at the current instant. The improved DBSCAN algorithm is used to cluster and segment point clouds. A radius threshold of 0.08 meters and a minimum number of points of 15 are used as density conditions. A consistency constraint on the angle between normal vectors is introduced to ensure the continuity of the obstacle surface normal during clustering, resulting in multiple point cloud subsets with clear geometric boundaries. Each point cloud subset is input into a convex primitive identification module. Based on the point distribution structure and fitting error calculation results, the geometric type of the point cloud subset is determined. Five standard convex primitives are attempted to be matched sequentially: ellipsoid, cylinder, capsule, convex polyhedron, and triangular mesh. For successfully fitted geometric structures, attribute information such as type number, center coordinates, orientation, and size parameters are extracted, constructing a set of obstacle convex primitives composed of multiple independent obstacle geometries.
[0024] In one example, convex primitive decomposition is performed on the environmental point cloud data to obtain a set of obstacle convex primitives, including: Clustering and segmenting of environmental point cloud data and adding normal vector angle constraints to group points on the same obstacle surface into the same cluster, thus obtaining the initial point cloud clustering results; The initial point cloud clustering results are input into the convex primitive recognizer for shape type discrimination to obtain point cloud clusters with shape labels; The convex primitive parameters are obtained by calculating the minimum reconstruction error from the point cloud to the convex primitive surface based on the point cloud cluster with shape labels. Generate a set of obstacle convex primitives based on convex primitive parameters, including ellipsoidal convex primitives, cylindrical convex primitives, capsule convex primitives, convex polyhedral convex primitives, and triangular mesh convex primitives.
[0025] In this example, spatial clustering is performed on the 3D environmental point cloud data. A density-based spatial clustering algorithm is used for processing, and a normal vector angle constraint is introduced on the basis of the traditional DBSCAN algorithm to enhance the ability of the clustering process to distinguish surface continuity. The core logic of clustering is that, on the premise that the Euclidean distance between points is less than a given threshold, the cosine value of the angle between the normal vectors of adjacent points is required to be greater than a set threshold. This ensures that each point cloud cluster is not only spatially compact, but also has consistent geometric surface configuration. The normal vector consistency constraint can effectively avoid classifying multiple surfaces of the same obstacle into different clusters or mistakenly clustering multiple obstacle connection areas into one class. In actual operation, by estimating the normal vector direction of each point and calculating the direction angle between neighboring points, a highly consistent spatial clustering division is completed, and an initial point cloud clustering result with continuous structure and coherent surface is obtained. Each point cloud cluster is input into a convex primitive recognizer. The convex primitive recognizer module consists of multiple geometric type discriminators. Fitting criteria and classification criteria are set for each type of convex structure, including an ellipsoid recognizer for detecting symmetrically distributed curved surfaces, a cylinder recognizer for linearly extended structures, a capsule recognizer for closed curved surface structures at both ends, a convex polyhedron recognizer for recognizing irregular blocks, and a triangular mesh recognizer for reconstructing complex surfaces. During the recognition process, the above multiple type recognizers are called for each point cloud cluster, and the optimal type label is selected based on evaluation indicators such as fitting error, structural consistency, and boundary closure. The shape classification and label assignment of the point cloud clusters are completed, resulting in a set of point cloud clusters with clearly bound shape type information. Point cloud clusters with shape labels are used as input. A parameter optimization framework is constructed based on the corresponding convex geometric models of each type. An objective function is constructed to sum the squared distances from the point cloud to the convex primitive surface. Two regularization terms, volume compactness and surface smoothness, are added to the objective function to enhance the surface transition characteristics while controlling the reasonableness of the model size. Gradient descent or quasi-Newton optimization strategies are used to iteratively adjust parameters such as the center position, orientation matrix, and scale factor of the geometric model. The residual descent trend is evaluated in real time during the iteration process until the convergence condition is met, and the optimal convex primitive parameter set with the minimum reconstruction error is output. Based on the shape labels and fitting parameter results of each point cloud cluster, an obstacle convex primitive set is constructed. The set consists of several standard geometric units, corresponding to ellipsoidal convex primitives, cylindrical convex primitives, capsule convex primitives, convex polyhedral convex primitives, and triangular mesh convex primitives, respectively. Each convex primitive contains information such as structure type, geometric size, spatial pose, and surface parameters, describing the spatial distribution and boundary shape of complex obstacles in the environment.
[0026] In one example, the initial point cloud clustering results are input into a convex primitive recognizer for shape type determination, resulting in point cloud clusters with shape labels, including: Ellipsoid fitting detection is performed on the initial point cloud clustering results to obtain ellipsoid recognition results; cylinder axis fitting is performed on the initial point cloud clustering results to obtain cylinder recognition results; capsule endpoint detection is performed on the initial point cloud clustering results to obtain capsule recognition results. Convex hull construction is performed on the initial point cloud clustering results. The number of vertices and faces are counted. When the number of vertices is within the first range and the number of faces is within the second range, it is determined to be a convex polyhedron, and the polyhedron recognition result is obtained. Based on the ellipsoid recognition results, cylinder recognition results, capsule recognition results, and polyhedron recognition results, each point cloud cluster is assigned a corresponding ellipsoid label, cylinder label, capsule label, convex polyhedron label, or triangular mesh label, resulting in point cloud clusters with shape labels.
[0027] In this example, based on the initial point cloud clustering results, geometric structure recognition is performed sequentially on each point cloud cluster. Shape judgment and label assignment are then performed based on the parameter characteristics and distribution patterns of various geometric shapes. First, an ellipsoidal fitting and recognition process is executed. This involves estimating the ellipsoidal model parameters in three-dimensional space using the least squares method. During the fitting process, a parameter vector containing the center position, principal axis lengths, and rotational orientation is constructed. In the solution process, the sum of the normalized squared errors from each point in the point cloud cluster to the fitted ellipsoid surface is calculated as an indicator of recognition reliability. When the overall fitting error is below a set threshold and the ratio of the three principal scales conforms to the ellipsoidal symmetry constraint, the point cloud cluster is determined to be an ellipsoidal structure and marked as an ellipsoidal recognition result. A cylindrical structure recognition process is then performed on the same point cloud clusters to extract columnar structures with linear symmetry axes. A random sampling consensus algorithm is used to fit the axis of the point cloud cluster. After fitting the main axis, the vertical distance from each point in the point cloud to the axis is statistically analyzed. If the standard deviation of the distance is lower than the threshold and the distribution direction shows obvious axisymmetry, it is identified as a structurally stable cylinder, and the point cloud cluster is marked as a cylinder identification result. For geometric shapes with closed two-sided curved surfaces connected by straight lines, a capsule body recognizer is used for processing. The capsule body recognizer extracts the two-sided point regions of the point cloud cluster and detects whether there is a fitable hemispherical end face structure. At the same time, it counts whether the ratio of the distance between the centers of the spheres to the length of the central cylindrical segment is within the empirical ratio range. If the end face closure is satisfied, the result is considered a cylinder. If the proportional consistency criterion is met, the point cloud cluster is identified as a capsule structure, and the capsule identification result is output. For irregular structures with complex shapes and lacking obvious axes or rotational symmetry, the convex hull construction method is used for polyhedron identification. By calling the fast convex hull algorithm in three-dimensional space to perform surface reconstruction operations on the point cloud cluster, a convex hull structure that completely encloses the point cloud cluster is generated. The number of vertices and the number of surface patches contained in the convex hull structure are statistically analyzed. If the number of vertices is within a preset first range and the number of surface patches falls within a second threshold range, the geometry is considered to have structural balance and spatial integrity, and meets the characteristics of a typical convex polyhedron. The polyhedron identification result is then output. For each point cloud cluster, a label assignment operation is performed. Based on the recognition confidence priority strategy, the recognition type that first meets the fitting error threshold and has the most complete structural indicators is assigned as the final shape label of the point cloud cluster. If the four types of labels, namely ellipsoid, cylinder, capsule, and convex polyhedron, do not meet the conditions, the point cloud cluster is classified into the triangular mesh type and marked as the default configuration type, which is suitable for obstacles with complex surfaces, incomplete boundaries, or sparse data. This completes the geometric type recognition and label assignment process for all point cloud clusters, generating a set of point cloud clusters with shape labels, including ellipsoid, cylinder, capsule, convex polyhedron, or triangular mesh labels.
[0028] In one example, the safe distance field of convex primitives is calculated based on the set of obstacle convex primitives, and a bidirectional path search is performed on the start and end points to obtain the first cleaning path, which includes: For each convex primitive in the obstacle convex primitive set, a constraint function for each convex primitive is established based on the vector difference between the robot's position coordinates and the center coordinates of the convex primitive. Construct the corresponding scaling shape matrix based on the geometric parameters of the convex primitives according to the constraint function; The safety distance is numerically solved based on the constraint function and the scaling shape matrix to obtain the individual safety distance value from the robot to each convex element; The minimum safe distance value is selected based on the individual safe distance value. At the same time, the gradient vector of the minimum safe distance value of each convex element with respect to the robot position is calculated, and the minimum safe distance value and the gradient vector are combined to form the convex element safe distance field. The first cleaning path is obtained by performing a bidirectional path search on the starting and ending points based on the safety distance field of the convex element.
[0029] In this example, based on the obstacle geometry modeling results, a differentiable, iterative, and path cost function-importable spatial distance metric mechanism is constructed using a set of convex primitives. For each convex primitive structure in the obstacle set, its center coordinates are extracted, and the current robot position coordinates are obtained. The spatial relative relationship between the robot and the obstacle is expressed by the three-dimensional vector difference between the two, and a constraint function for the convex primitive is constructed based on this. This function describes whether the robot is outside the scaled boundary of the convex geometry, i.e., whether the safe space between the robot and the obstacle surface meets the predetermined minimum distance requirement. Based on the principal axis parameters, scale dimension, and orientation rotation matrix of the convex primitive type, a shape matrix is constructed to quantify the scaling deformation, reflecting the expansion coefficient of the obstacle in various spatial directions. This ensures that subsequent distance measurements no longer rely on simplified spherical or axisymmetric models, but instead implement asymmetric and anisotropic spatial constraint definitions based on the actual geometric structure. By combining constraint functions and scaling shape matrices, without explicit geometric intersection, an iterative numerical solution method is used to calculate the minimum safe distance from the robot's current position to the primitive boundary for each convex primitive. This represents the shortest escape path length the robot has at its current position. The convergence condition is set based on continuous error contraction, ensuring that the results have interpretable geometric meaning and stable numerical performance. After solving for the individual safe distances of all convex primitives, the smallest distance is selected from all the calculation results as the global minimum safe distance value. The convex primitive number and structural attributes corresponding to the minimum safe distance are recorded. Furthermore, the gradient direction of the minimum distance value with respect to the robot's current position is differentiated, and the growth direction of the shortest distance under small spatial perturbations is extracted. This growth direction serves as the reverse vector used to penalize the direction of approaching obstacles in subsequent path guidance. The minimum safe distance value and its corresponding gradient vector are combined to form a spatial safe distance field. The spatial safe distance field takes the robot's current position as input and outputs the safe distance to the nearest convex primitive and the obstacle avoidance direction, providing quantified input for the penalty factor of the path cost function. Based on the convex primitive safety distance field, an improved bidirectional A* path search algorithm is invoked. Forward and backward search tree expansion processes are initiated between the start and end points, respectively. During path cost evaluation, the output value of the safety distance field is added to the path cost term in the form of an exponential function, thereby dynamically suppressing the probability of path selection near obstacle areas. A turning angle change cost and obstacle density weight term are added to the cost function to penalize paths that frequently turn or traverse high-density obstacle areas, improving path feasibility and cleaning efficiency. When the forward and backward search trees expand to a point where the spatial proximity distance is less than the set merging tolerance, a path connection operation is performed. The curvature optimization module is invoked to smoothly fit the connected path segments using a fifth-order Bézier curve, ensuring that the path possesses continuous differentiability and smooth controllability under obstacle avoidance constraints, and outputting the first cleaning path that meets the convex primitive geometric constraints.
[0030] In one example, a bidirectional path search is performed on the start and end points based on the convex element safety distance field to obtain the first cleaning path, which includes: Build a forward search tree from the starting point and a backward search tree from the ending point; Based on the forward search tree, the convex primitive penalty term value is calculated using the convex primitive safe distance field, and the obstacle density on the path from the current node to the destination is calculated to obtain the forward search node set. Based on the backward search tree, the coverage potential function value is calculated to evaluate the attractiveness of the unclogged area, and the set of backward search nodes is obtained; Merging point detection is performed on the forward search node set and the backward search node set to determine the merging path, and the merging path is smoothed to obtain the first cleaning path.
[0031] In this example, the robot's current position is used as the starting point for path search, and the target cleaning area or the global path termination point is used as the endpoint. An improved bidirectional path search strategy is adopted to construct a forward search tree and a backward search tree in parallel in a two-dimensional spatial grid or topology graph. The forward search tree starts from the starting point and expands layer by layer to all possible reachable nodes, while the backward search tree expands in reverse from the target position to simulate the attraction area of the target position on the path. At the same time, both are constrained by spatial accessibility, obstacle distribution and control range when expanding. During the forward search, the convex primitive safe distance field module is invoked for each expanded candidate node to query the minimum safe distance between its current position and the nearest obstacle. This minimum safe distance is then input into a preset exponential penalty function to calculate the convex primitive penalty term at that point, forming the obstacle distance component of the path cost function. Simultaneously, the obstacle distribution density of the region traversed during the extension from the current forward node to the target node is evaluated. By analyzing indicators such as the number, volume percentage, or cross-sectional projection density of convex primitives traversed on the straight or approximate path segments from the current node to the target node, an obstacle density value is comprehensively generated. This obstacle density is then weighted and superimposed into the total path cost function, making the search process more inclined to avoid congested spaces and high-density areas. The obstacle area is identified, forming a forward search node set. Each node contains its spatial location, parent-child connection relationship, total cost evaluation value, and accumulated obstacle avoidance penalty index. In the backward search tree construction process, the guiding role of cleaning coverage efficiency is emphasized. Therefore, instead of constructing a cost function based on the obstacle avoidance index for each extended node, a coverage potential function is introduced. The coverage potential function constructs an attraction potential energy model based on the spatial distribution distance between the current node and the cleaned area, using a logarithmic function to compress the distance influence and enhance the path attraction of edge areas. This guides the path to shift towards uncleaned or low-density areas, and constructs a backward search node set as the coverage optimization source in path guidance. As the bidirectional search trees expand and gradually move closer to each other, the spatial overlap between the forward and backward node sets is continuously monitored. When the spatial distance between a pair of nodes is less than a preset merging tolerance threshold, the pair is marked as a potential merging point. Then, the path is traced back to the starting and ending points along the forward and backward trees respectively, splicing them together to form a complete path channel. The path structure is then sent to the smoothing module. During the smoothing phase, a fifth-order Bézier curve or other high-order curvature continuous curve fitting method is constructed based on the identified path inflection point sequence. During the curve construction process, the path curvature term and the safety distance field penalty term are introduced simultaneously to form the optimization objective function. While maintaining path continuity and smoothness, the path is ensured to be spatially far from the obstacle surface and the robot's operation is kept controllable, generating a first cleaning path that meets the objectives of kinematic continuity, obstacle avoidance requirements, and maximizing cleaning efficiency.
[0032] In one example, based on the forward search tree, the convex primitive penalty term value is calculated using the convex primitive safe distance field, and the obstacle density on the path from the current node to the destination is calculated simultaneously to obtain the forward search node set, including: Calculate the cumulative cost value for each node in the forward search tree; The volume intersection of the straight path and each convex primitive in the obstacle convex primitive set is calculated and divided by the cube of the path length to obtain the obstacle density weighted heuristic value of each node. The minimum safe distance value in the convex element safe distance field is input into the exponential decay function to calculate the convex element penalty term, and the convex element penalty term value of each node is obtained. The cumulative cost value, obstacle density weighted heuristic value, and convex primitive penalty term value are linearly combined to form the forward node evaluation function value. Based on the forward node evaluation function value, the node expansion order is managed through a priority queue and the parent node information is recorded to obtain the forward search node set.
[0033] In this example, the forward search tree is progressively expanded outward from the starting point as the root node during path planning. Whenever a new node is visited or removed from the open list, a cost evaluation system is constructed for that node, and the evaluation results are used for node priority ranking and expansion decision logic. When expanding search nodes, the cumulative cost of the current node is calculated based on the discrete point sequence in the path. The cumulative cost consists of the accumulated distance and turning cost along the path from the starting point to the current node. The accumulated distance reflects the total path length, while the turning cost is constructed based on the angle change between path segments, reflecting the path smoothness requirement. If the path turns too frequently or the turning angle is too large, this cost is increased to suppress path discontinuity. Therefore, the cumulative cost of the current node is obtained by weighted summation of the length and angle change between every two adjacent nodes in the path segment. The heuristic term from the current node to the target point is calculated. This heuristic term introduces an obstacle density weighting mechanism. A density-aware model is established based on the intersection between the hypothetical straight path segment from the current node to the target point and the set of obstacle convex primitives. Specifically, the straight path segment is inserted as a three-dimensional line segment into the entire convex primitive space field. The intersection of this line segment with the volumes of all convex primitives is calculated, and the sum of the intersection volumes is divided by the cube of the path segment length to reflect the degree of obstacle occupancy per unit space of the path. If the path travels through a high-density obstacle area, this value increases rapidly, thereby guiding the path to avoid obstacle-rich areas. This reduces the computational burden of subsequent obstacle avoidance while maintaining path compactness. Simultaneously, the minimum safe distance value at the current node is queried and input into a preset exponential decay function to generate a convex primitive penalty term. The penalty function applies a larger penalty value to path nodes close to obstacles. When the safe distance approaches the system-defined critical threshold, the exponential function output approaches the upper limit of the penalty. When the node is far away from all obstacles, the function output decays rapidly to near zero, forming a dynamic suppression mechanism for high-risk paths. The forward node evaluation function is constructed by linearly weighting the cumulative cost, obstacle density-weighted heuristic value, and convex primitive penalty term value. This evaluation value comprehensively considers path length, obstacle density, and risk level, possessing both global shortest path guidance and local safety avoidance capabilities, thus forming the priority index for each candidate node in the current search round. Based on the evaluation function value, a priority queue structure is invoked to sort all nodes to be expanded, ensuring that each node retrieved from the queue has the minimum expected total cost. After a node is retrieved, it is marked as a visited node, and its parent node number and path segment cost information are recorded. Under the priority queue scheduling control, the forward search node set is gradually expanded, where each node contains location coordinates, cumulative path information, heuristic estimate, obstacle avoidance cost, and parent-child path connection relationships.
[0034] In one example, tracking control is performed based on the first cleaning path and the convex element safety distance field, and robot control commands are output, including: Establish the state vector of the robotic vacuum cleaner and recursively estimate the state vector to obtain the state estimate value; The first cleaning path is used as a reference trajectory input to the model predictive controller, and the minimum safe distance value in the convex element safe distance field is used as a constraint condition to limit the robot's motion boundary, thus obtaining the basic control quantity. Error compensation is calculated based on the position error, angle error, current velocity, and minimum safe distance value of the convex element safe distance field in the state estimate, and the error compensation amount is obtained. When the minimum safe distance value of the convex element safe distance field is lower than the preset critical value, emergency obstacle avoidance control based on the safe distance gradient is adopted; otherwise, the basic control quantity and the error compensation quantity are added together to obtain the target control quantity, and robot control instructions are generated according to the target control quantity.
[0035] In this example, a state vector for the robotic vacuum cleaner is constructed, including extended variables such as position coordinates, attitude angles, linear velocity, angular velocity, and sensor offset. Combining real-time observation information from multiple sensors, including LiDAR, IMU, and wheel odometry, an unscented Kalman filter is used to recursively estimate the state vector. By introducing multiple sets of sigma points for nonlinear propagation and fusing sensor data during the prediction and update stages, the current optimal estimate of the state vector is gradually obtained. Simultaneously, the covariance matrix is updated to maintain the estimation reliability and numerical stability of the system. The first cleaning path is loaded as the input trajectory into the model predictive controller. Based on dynamic programming, the controller optimizes the control input for the robot's future trajectory within a finite prediction time domain, while setting control increment limits and velocity constraints to ensure a smooth system transition. Simultaneously, to ensure the safety of path tracking in physical space, the minimum safe distance value in the convex primitive safe distance field is introduced into the prediction model in real time as a boundary constraint condition for the set of available path points within the prediction time window. That is, the position of each predicted point must maintain a spatial margin not less than the minimum safe distance, forming a trajectory optimization constraint system with obstacle avoidance constraints. This outputs basic control quantities, representing the linear and angular velocities required for the robot's ideal operation under undisturbed conditions. Error compensation processing is performed on the basic control quantities. Based on the instantaneous position and angular errors between the current state estimate and the reference trajectory, combined with the robot's current velocity state and the minimum safe distance value corresponding to its position, these variables are constructed into a state input vector. This vector is input into a set of trained neural network error compensation modules or other nonlinear modeling mechanisms for evaluation, outputting a real-time error compensation quantity to correct control offsets caused by inaccurate modeling, path disturbances, or control lag. A safety mechanism is introduced into the global control logic. When the minimum safe distance value of the current position is detected to be lower than a preset critical threshold, the conventional control process based on trajectory tracking and error compensation is abandoned. Instead, a gradient direction control law based on the convex primitive safe distance field is invoked to construct an emergency control command along the gradient direction away from the nearest obstacle surface. This enables the robot to immediately execute an obstacle-avoidance action, thereby avoiding collisions or jamming. If the current position is still within the safe range, the basic control quantity and the error compensation quantity are weighted and synthesized to generate the target control quantity. The target control quantity is mapped to the speed command and motion direction parameters required for the robot's underlying execution. Through the interface, the dual-wheel differential drive module or chassis motor controller is driven to execute the corresponding actions, completing the linkage and integration of trajectory tracking, obstacle avoidance control, and cleaning scheduling.
[0036] In one example, the distance detection method for the robotic vacuum cleaner also includes: The robot control commands are input into the task planning layer, path planning layer and motion control layer respectively for multi-frequency coordinated execution, resulting in hierarchical control execution results. Dynamic obstacle recognition is performed on the newly detected point cloud data of the sweeping robot to obtain the dynamic obstacle recognition results; Based on the dynamic obstacle recognition results, the influence radius is set with the newly detected dynamic obstacle as the center, and the path nodes in the first cleaning path that are located within the influence domain are selected. The path segments within the influence domain are marked as the local replanning range. Based on the local replanning range, collision detection and safety constraints are performed using the safe distance field of convex primitives to generate a second cleaning path.
[0037] In this example, a three-layer control architecture is built inside the robot: a low-frequency task planning layer, a mid-frequency path planning layer, and a high-frequency closed-loop motion control layer. The task planning layer schedules the global cleaning strategy and task priorities at a frequency of 2Hz, dynamically adjusting the current cleaning target or path switching logic based on room zoning, cleaning completion rate, and path coverage. The path planning layer handles environmental model changes and path replanning requests at a frequency of 5Hz, responding to events such as obstacle updates, target point adjustments, and local path failures, and re-executing path optimization calculations in real time. The motion control layer operates at 50Hz or higher, implementing a rapid closed-loop control mechanism for underlying motor control, trajectory tracking, and safety boundary responses. Robot control commands are input into the path planning layer and passed down to the motion control layer. Simultaneously, the task planning layer sends path switching commands or local cleaning compensation task commands to the path planning layer based on the global cleaning progress, forming a multi-frequency coordinated control execution mechanism that enables the robot to have both rapid local response capabilities and maintain global strategy consistency when facing environmental changes. The point cloud data continuously collected by the robot during operation is processed in real time to determine whether new dynamic obstacles have appeared in the current environment. The position comparison analysis of continuous frame point cloud data is performed. If a newly appearing point cloud cluster exists in 3 consecutive frames and the boundary distance between it and the existing static obstacle is greater than a set threshold, the point cloud cluster is marked as a new object. If the point cloud cluster shows obvious position changes in different frames and its position change rate exceeds the defined minimum motion speed threshold, it is identified as a dynamic obstacle and its current spatial position and movement trend are recorded. After completing dynamic obstacle recognition, an influence radius is set in space based on the current center point of the obstacle. The radius ranges from 1.5 meters to 2 meters. All path nodes within the influence circle or influence ellipsoid are searched in the first cleaning path. These nodes and their connecting segments are marked as "path disturbance areas" or "local replanning ranges" to prevent the robot from continuing to execute invalid paths without responding to environmental updates. In the local replanning stage, the path range is used as the local search space. The latest convex primitive safety distance field data is retrieved. A safety boundary function is constructed around each path node as the starting point, and collision detection is performed to eliminate all path segments with insufficient safety distance to the new dynamic obstacle. Simultaneously, the minimum safety distance gradient field is recalculated as the obstacle avoidance guidance function. The path search algorithm, such as improved RRT*, A*, or a gradient descent-based fast planning method, is rerun in the local area. Multi-objective constraint solutions are performed by considering path curvature, length, obstacle density, and real-time obstacle avoidance priority. Alternative path segments are generated in the disturbance area and spliced with the unaffected segments of the first cleaning path to construct the second cleaning path.
[0038] Reference Figure 2This embodiment provides a distance detection device for a robotic vacuum cleaner, including: The convex primitive decomposition module 1 is used to acquire environmental point cloud data through the sweeping robot and perform convex primitive decomposition on the environmental point cloud data to obtain a set of obstacle convex primitives. The bidirectional path search module 2 is used to calculate the safe distance field of convex primitives based on the set of obstacle convex primitives, and to perform bidirectional path search on the starting point and the ending point to obtain the first cleaning path; The tracking control module 3 is used to perform tracking control based on the first cleaning path and the convex element safety distance field, and output robot control commands.
[0039] In this embodiment, the specific implementation of each unit in the above device embodiment is described in the above method embodiment, and will not be repeated here.
[0040] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0041] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A distance detection method for a robotic vacuum cleaner, characterized in that, include: The environmental point cloud data is acquired by a robotic vacuum cleaner, and the environmental point cloud data is decomposed into convex primitives to obtain a set of obstacle convex primitives. Specifically, this includes: filtering LiDAR data to obtain radar distance data, and performing spline interpolation on the distance measurements from the ultrasonic sensor to obtain ultrasonic data; calculating fusion weight parameters based on the radar distance data; performing weighted fusion of the radar distance data and the ultrasonic data based on the fusion weight parameters to obtain initial fused data, and performing three-dimensional coordinate transformation on the initial fused data using robot pitch angle information provided by the inertial measurement unit to obtain environmental point cloud data; performing clustering and segmentation on the environmental point cloud data and adding normal vector angle constraints to group points on the same obstacle surface into the same cluster to obtain initial point cloud clustering results; performing ellipsoid fitting detection on the initial point cloud clustering results to obtain ellipsoid recognition results; performing cylinder axis fitting on the initial point cloud clustering results to obtain cylinder recognition results; and performing initial point cloud clustering... The results are obtained by detecting the endpoints of the capsule body and identifying the capsule body. A convex hull is constructed on the initial point cloud clustering results, and the number of vertices and faces is counted. When the number of vertices is within a first range and the number of faces is within a second range, it is determined to be a convex polyhedron, and a polyhedron identification result is obtained. Based on the ellipsoid identification result, the cylinder identification result, the capsule body identification result, and the polyhedron identification result, corresponding ellipsoid labels, cylinder labels, capsule body labels, convex polyhedron labels, or triangular mesh labels are assigned to each point cloud cluster, resulting in point cloud clusters with shape labels. The reconstruction error from the point cloud to the convex primitive surface is minimized based on the point cloud clusters with shape labels, resulting in convex primitive parameters. Based on the convex primitive parameters, an obstacle convex primitive set containing ellipsoidal convex primitives, cylindrical convex primitives, capsule body convex primitives, convex polyhedron convex primitives, and triangular mesh convex primitives is generated. The process involves calculating a safe distance field for each convex primitive based on the obstacle convex primitive set, and performing a bidirectional path search between the start and end points to obtain a first cleaning path. Specifically, this includes: establishing a constraint function for each convex primitive in the obstacle convex primitive set based on the vector difference between the robot's position coordinates and the convex primitive's center coordinates; constructing a corresponding scaling shape matrix based on the geometric parameters of the convex primitives using the constraint function; solving for the safe distance numerically based on the constraint function and the scaling shape matrix to obtain the individual safe distance value from the robot to each convex primitive; selecting the minimum safe distance value based on the individual safe distance value, and simultaneously calculating the gradient vector of the minimum safe distance value of each convex primitive with respect to the robot's position, combining the minimum safe distance value and the gradient vector to form a convex primitive safe distance field; and performing a bidirectional path search between the start and end points based on the convex primitive safe distance field to obtain the first cleaning path. Tracking control is performed based on the first cleaning path and the convex primitive safety distance field, and robot control commands are output. Specifically, this includes: establishing the state vector of the sweeping robot and recursively estimating the state vector to obtain a state estimate; using the first cleaning path as a reference trajectory input to the model predictive controller, and using the minimum safety distance value in the convex primitive safety distance field as a constraint condition to limit the robot's motion boundary to obtain a basic control quantity; performing error compensation calculation based on the position error, angle error, current speed in the state estimate and the minimum safety distance value in the convex primitive safety distance field to obtain an error compensation quantity; when the minimum safety distance value in the convex primitive safety distance field is lower than a preset critical value, emergency obstacle avoidance control based on the safety distance gradient is adopted; otherwise, the basic control quantity and the error compensation quantity are added together to obtain a target control quantity, and robot control commands are generated based on the target control quantity.
2. The distance detection method for a sweeping robot according to claim 1, characterized in that, The step of performing a bidirectional path search on the starting and ending points based on the convex element safety distance field to obtain the first cleaning path includes: Build a forward search tree from the starting point and a backward search tree from the ending point; Based on the forward search tree, the convex primitive penalty term value is calculated using the convex primitive safe distance field, and the obstacle density on the path from the current node to the destination is calculated to obtain the forward search node set. Based on the backward search tree, the coverage potential function value is calculated to evaluate the attractiveness of the uncleaned area, and a set of backward search nodes is obtained; Merging point detection is performed on the forward search node set and the backward search node set to determine the merging path, and the merging path is smoothed to obtain the first cleaning path.
3. The distance detection method for a sweeping robot according to claim 2, characterized in that, Based on the forward search tree, the convex primitive penalty term value is calculated using the convex primitive safe distance field, and the obstacle density on the path from the current node to the destination is calculated simultaneously to obtain the forward search node set, including: Calculate the cumulative cost value for each node in the forward search tree; The volume intersection of the straight path and each convex primitive in the set of obstacle convex primitives is calculated and divided by the cube of the path length to obtain the obstacle density weighted heuristic value of each node. The minimum safe distance value in the convex primitive safe distance field is input into the exponential decay function to calculate the convex primitive penalty term, thereby obtaining the convex primitive penalty term value of each node; The cumulative cost value, the obstacle density-weighted heuristic value, and the convex primitive penalty term value are linearly combined to form the forward node evaluation function value. Based on the forward node evaluation function value, the node expansion order is managed through a priority queue and the parent node information is recorded to obtain the forward search node set.
4. The distance detection method for a sweeping robot according to claim 1, characterized in that, The distance detection method for the sweeping robot also includes: The robot control commands are input into the task planning layer, path planning layer, and motion control layer respectively for multi-frequency coordinated execution to obtain the hierarchical control execution result. Dynamic obstacle recognition is performed on the newly detected point cloud data of the sweeping robot to obtain dynamic obstacle recognition results; Based on the dynamic obstacle recognition results, an influence radius is set with the newly detected dynamic obstacle as the center, and path nodes in the first cleaning path that are located within the influence domain are selected. Path segments within the influence domain are marked as local replanning ranges. Based on the local replanning range, collision detection and safety constraints are performed using the convex primitive safety distance field to generate a second cleaning path.
5. A distance detection device for a robotic vacuum cleaner, characterized in that, The steps for implementing the distance detection method of the sweeping robot according to any one of claims 1 to 4 include: The convex primitive decomposition module is used to acquire environmental point cloud data through the sweeping robot and perform convex primitive decomposition on the environmental point cloud data to obtain a set of obstacle convex primitives. A bidirectional path search module is used to calculate the safe distance field of convex primitives based on the set of obstacle convex primitives, and to perform bidirectional path search on the starting point and the ending point to obtain the first cleaning path; The tracking control module is used to perform tracking control based on the first cleaning path and the convex element safety distance field, and output robot control commands.
Citation Information
Patent Citations
Photovoltaic cleaning robot sensor data fusion and obstacle avoidance method and system
CN120406554A
Outdoor robot path planning method based on improved bidirectional A* and DWA algorithms
CN120506970A