Path Planning Method for Self-Moving Device, Self-Moving Device and Readable Storage Medium
By real-time update of the 2D raster map on a self-mobile device and combining local obstacle planning, the problem of insufficient handling capabilities of dynamic obstacles in courtyard scenes is solved, and timely update of paths and safe continuity are achieved, which is suitable for autonomous navigation in complex dynamic environments.
Patent Information
- Application Number
- CN202510538513.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-04-27
AI Technical Summary
In semi-structured and frequent dynamic changes, the hybrid navigation method has the problem of insufficient processing capabilities for dynamic obstacles and not timely updates of the path after the obstacle disappears.
The initial path is planned based on the 2D raster map, the current target point is set, and the map is updated in real time by the camera on the mobile device, and obstacles are detected in real time. Local obstacle planning is adopted, combined with kinematic model and acceleration constraints, the optimal candidate trajectory is selected, path adjustment is performed, and the weight is dynamically adjusted through the multi-dimensional cost function to prevent misjudgment and dead loops.
It realizes a robust response to dynamic obstacles, avoids the path not being updated in time, ensures the security and operation continuity of self-mobile devices in complex environments, and improves environmental adaptability and efficiency.
Smart Images

Figure CN120063292B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to two-dimensional position control of a self-moving device, and particularly to a path planning method for a self-moving device, a self-moving device, and a computer-readable storage medium. Background Art
[0002] In a courtyard cleaning scenario, in order to improve the operation efficiency and cleaning coverage rate, a self-moving device (such as a lawn mowing robot, a snow sweeping robot, etc.) usually adopts a hybrid navigation method of "global path planning + local dynamic obstacle avoidance", that is, an initial path is generated by constructing an environmental map, and local obstacle avoidance scheduling is performed by means of sensor perception during the actual cleaning process.
[0003] However, in a semi-structured and frequently dynamically changing courtyard scenario, this hybrid navigation method still faces technical bottlenecks such as insufficient ability to handle suddenly emerging dynamic obstacles and untimely update of the path after the obstacle disappears. Summary of the Invention
[0004] The object of the present invention is to solve the deficiencies of the hybrid navigation method in a semi-structured and frequently dynamically changing courtyard scenario, such as insufficient ability to handle suddenly emerging dynamic obstacles and untimely update of the path after the obstacle disappears, and to provide a path planning method for a self-moving device, a self-moving device, and a computer-readable storage medium.
[0005] In order to solve the above-mentioned deficiencies of the prior art, the present invention provides the following technical solutions:
[0006] A path planning method for a self-moving device, characterized by comprising:
[0007] Planning an initial path of the self-moving device according to a 2D grid map of a target area to obtain a plurality of path points on the initial path; setting one of the path points as the current target point of the self-moving device; and starting to update the 2D grid map of the target area in real time through a plurality of cameras on the self-moving device;
[0008] Making the self-moving device move forward along the initial path, and detecting in real time whether there is an obstacle whose existence time exceeds a stable detection window; if so, reaching the current target point through local obstacle avoidance planning; otherwise, reaching the current target point according to the initial path;
[0009] After reaching the current target point, making the current target point update to the next path point, and returning to the step of making the self-moving device move forward along the initial path; if the current target point is the end point, ending the process.
[0010] Optionally, the reaching the current target point through local obstacle avoidance planning includes:
[0011] Based on the current speed of the self - moving device, combining the kinematic model and acceleration constraints of the self - moving device, path planning is performed for the current target point, and at the same time, it is detected in real - time whether there are obstacles whose existence time exceeds the stable detection window;
[0012] If before the end of path planning, there are no obstacles whose existence time exceeds the stable detection window and the disappearance time of the obstacles exceeds the stable detection window, then return to make the self - moving device move forward along the initial path;
[0013] If until the end of path planning, there are obstacles whose existence time exceeds the stable detection window, then it is judged whether there is an optimal candidate trajectory among all candidate trajectories obtained by path planning;
[0014] If there is an optimal candidate trajectory, then move forward along the optimal candidate trajectory to reach the current target point;
[0015] If there is no optimal candidate trajectory, then after performing backward adjustment, return to perform path planning for the current target point based on the current speed of the self - moving device, combining the kinematic model and acceleration constraints of the self - moving device;
[0016] The judgment of whether there is an optimal candidate trajectory among all candidate trajectories obtained by path planning includes:
[0017] For all candidate trajectories obtained by path planning, calculate the total cost of each candidate trajectory, and select the candidate trajectory with the lowest total cost as the optimal candidate trajectory. If there is no candidate trajectory with the lowest total cost, then it is judged that there is no optimal candidate trajectory;
[0018] The total cost includes speed cost, cost of the straight line to the current target point, obstacle cost, left - right direction cost, and lateral camera information cost;
[0019] The speed cost is that the greater the linear velocity, the smaller the cost; the cost of the straight line to the current target point is that the greater the deviation of the end point of the candidate trajectory from the shortest straight - line path distance between the current position and the current target point, the greater the cost; the obstacle cost is that if the candidate trajectory collides with an obstacle, the cost is infinite, and if there is no collision, the cost is inversely proportional to the closest distance to the obstacle; the left - right direction cost is that the greater the angular velocity, the higher the cost, and when the angular velocity is zero, the cost is the smallest; the lateral camera information cost is that the closer the obstacle distance, the higher the cost.
[0020] Optionally, for each candidate trajectory, the total cost is:
[0021] ;
[0022] Among them, is the total cost, They are the speed cost, the cost of the straight line to the current target point, the obstacle cost, the left-right direction cost, and the lateral camera information cost, respectively corresponding weights;
[0023] The calculation methods are as follows, = 1, 2, 3, 4, 5:
[0024]
[0025]
[0026] Among them, is the corresponding base value; is the obstacle density, = the number of obstacle point clouds / the area of the scanning region; is the adjustment factor of; is the adjustment coefficient of; is the linear velocity the adjustment coefficient of; is the direction adjustment coefficient, is the deviation angle between the current traveling direction and the target direction; is the smoothing factor, is the historical mean value of; , are respectively the corresponding minimum value, maximum value.
[0027] Optionally, moving forward according to the optimal candidate trajectory and reaching the current target point includes:
[0028] Moving forward according to the optimal candidate trajectory, and at the same time judging whether the anti-collision strip is triggered. If the anti-collision strip is triggered, collision adjustment is performed. If the anti-collision strip is not triggered, it is judged whether the dead angle logic is triggered. If the dead angle logic is triggered, dead angle adjustment is performed. If the dead angle logic is not triggered, it is judged whether the current target point is reached. If the current target point is reached, the process of moving forward according to the optimal candidate trajectory and reaching the current target point ends. If the current target point is not reached, return to judging whether the anti-collision strip is triggered;
[0029] After the collision adjustment and dead angle adjustment are completed, it is judged whether the obstacle avoidance time is exceeded; if it is exceeded, the current target point is updated to the next path point, and return to making the self-mobile device move forward according to the initial path. If the current target point is the end point, the process ends; if it is not exceeded, return to performing path planning on the current target point based on the current speed of the self-mobile device, combining the kinematic model and acceleration constraint of the self-mobile device;
[0030] The obstacle avoidance time is re-timed each time when path planning for the current target point is performed based on the current speed of the self-mobile device, in combination with the kinematic model and acceleration constraints of the self-mobile device.
[0031] Optionally, the determination of whether to trigger the dead angle logic includes:
[0032] Determine whether at least two of the following conditions are met. If so, trigger the dead angle logic and perform dead angle adjustment; otherwise, the dead angle logic is not triggered;
[0033] Condition 1: The current angular velocity of the self-mobile device exceeds a preset ratio of the maximum angular velocity, and the current linear velocity is less than a preset ratio of the maximum linear velocity;
[0034] Condition 2: Obstacles are continuously detected within the detection time window;
[0035] Condition 3: The displacement of the self-mobile device is less than the minimum displacement threshold within the displacement time window;
[0036] Before performing the dead angle adjustment, first determine whether the number of dead angle adjustment times for the current target point exceeds the limit. If so, return to plan the initial path according to the 2D grid map of the target area. Otherwise, perform the dead angle adjustment and increment the number of dead angle adjustment times for the current target point by 1.
[0037] Optionally, the backward adjustment includes: first determining whether the number of backward adjustment times for the current target point exceeds the limit. If so, return to plan the initial path according to the 2D grid map of the target area. Otherwise, retreat a preset backward distance;
[0038] The preset backward distance is a fixed value or is dynamically adjusted;
[0039] The dynamic adjustment includes:
[0040] Set the preset backward distance to be equal to the sum of the minimum backward distance, the increment adjusted according to the obstacle distance, the increment adjusted according to the linear velocity, and the increment adjusted according to the environmental complexity;
[0041] The increment adjusted according to the obstacle distance is calculated by an exponential decay function, which is larger when the obstacle is closer and larger when the linear velocity of the self-mobile device is faster;
[0042] The increment adjusted according to the linear velocity is larger when the linear velocity of the self-mobile device is larger;
[0043] The increment adjusted according to the environmental complexity is larger when the obstacle density is higher.
[0044] Optionally, the multiple cameras include a forward binocular camera and multiple side cameras;
[0045] Updating the 2D grid map of the target area in real time through multiple cameras set on the self - moving device, including:
[0046] Step A1: Enable the forward binocular camera and multiple lateral cameras on the self - moving device to collect video frames in real time, and align the video frame sequences according to the synchronization signal to obtain the aligned video frames;
[0047] Step A2: Calculate the depth information of the aligned video frames of the forward binocular camera and multiple lateral cameras, and then convert the depth information into 3D point cloud data;
[0048] Step A3: Use extrinsic calibration to convert the 3D point cloud data obtained in Step A2 from the camera coordinate system where it is located to the device coordinate system, and then fuse the 3D point cloud data to obtain the fused 3D point cloud;
[0049] Step A4: Project the fused 3D point cloud onto the 2D grid map of the target area to complete the update of the 2D grid map of the target area.
[0050] Optionally, in Step A2, the 3D point cloud data includes the forward binocular point cloud obtained from the aligned video frames of the forward binocular camera and multiple monocular depth point clouds obtained from the aligned video frames of multiple lateral cameras:
[0051] In Step A3, the fusion includes:
[0052] Step A301: Use the forward binocular point cloud as the main input, and calculate the forward binocular point cloud confidence according to the nearest acceptable depth and the depth of the forward binocular point cloud;
[0053] Use each monocular depth point cloud as a supplementary input, and calculate the monocular depth point cloud confidence according to the nearest acceptable depth and the depth of the monocular depth point cloud;
[0054] Step A302: Judge whether the absolute value of the depth difference in the overlapping area between the forward binocular point cloud and each monocular depth point cloud is greater than the depth difference threshold. If so, calculate the corrected monocular depth point cloud confidence using the depth difference influence factor, update the monocular depth point cloud confidence in the overlapping area to the corrected monocular depth point cloud confidence, and then execute Step A303; otherwise, directly execute Step A303;
[0055] Step A303: Fuse the forward binocular point cloud and each monocular depth point cloud, and judge whether the forward binocular point cloud confidence is greater than the corresponding preset value during fusion. If so, use the forward binocular point cloud; otherwise, judge whether the monocular depth point cloud confidence is greater than the corresponding preset value. If so, use the monocular depth point cloud; otherwise, abandon the fusion, mark it as an uncertain area, and wait for the next update;
[0056] until the fusion is completed.
[0057] Optionally, step A4 includes:
[0058] Step A401: Extract the (x, y, z) coordinates of the fused 3D point cloud, set the z filtering range, perform height filtering to obtain 2D projection points; and obtain the row and column indices of the 2D grid map corresponding to the 2D projection points according to the parameters of the 2D grid map.
[0059] Step A402: First obtain the original occupancy probability value of the current grid, then judge whether the grid is occupied or free according to the row and column indices of the 2D grid map obtained in step A401, convert the judgment result into an update amount, and then accumulate it to the original occupancy probability value as the new occupancy probability value of the current grid.
[0060] Step A403: Denoise and correct the 2D grid map updated in step A402.
[0061] Step A404: Update the 2D grid map of the target area to the 2D grid map obtained in step 403.
[0062] Optionally, step A403 includes:
[0063] Step A4031: For each grid, if its occupancy probability is greater than or equal to the confidence threshold, retain it as occupied, otherwise mark it as free.
[0064] Step A4032: For each grid marked as occupied, judge whether the number of occupied points in the grid area is less than the preset value. If so, determine it as an isolated noise point and mark the grid as free, otherwise retain it as occupied.
[0065] Step A4033: Mark all connected occupied areas, calculate the number of occupied grids in each connected area; judge whether the number of occupied grids in each connected area is less than the preset threshold. If so, mark all grids in the connected area as free; otherwise, do not change the mark of the connected area.
[0066] Step A4034: For each grid marked as occupied, expand it by 1 grid in all directions; judge whether each expanded grid is free. If so, mark the expanded grid as occupied and with low confidence, otherwise do not change.
[0067] The present invention also provides a self - moving device, which is characterized in that it includes a memory, a processor, and a path - planning program stored on the memory and executable on the processor. The path - planning program is configured to implement the steps of the path - planning method of the self - moving device as described above.
[0068] The present invention also provides a computer-readable storage medium storing a computer program, characterized in that:
[0069] When the computer program is executed by a processor, it implements the steps of the path planning method for the self-mobile device as described above.
[0070] Compared with the prior art, the beneficial effects of the present invention are:
[0071] (1) For the path planning method of a self-mobile device according to the present invention, an initial path is generated based on a 2D grid map, and the current target point is set. The self-mobile device updates the 2D grid map in real time and switches to local obstacle avoidance planning according to the presence of obstacles. The present invention comprehensively considers the initial path planning and real-time environment perception, solves the problem of insufficient dynamic obstacle emergence handling ability of the existing hybrid navigation method, and is applicable to autonomous navigation tasks in complex dynamic environments.
[0072] (2) The present invention filters temporary obstacles through a stable detection window to achieve a robust response to dynamically emerging obstacles; uses the obstacle avoidance time and the number of backward adjustment times for judgment to prevent falling into an ineffective planning loop; and detects obstacles in real time during path planning to solve the problem of untimely path update.
[0073] (3) When the present invention advances along the optimal candidate path, by preferentially judging the anti-collision strip and then judging the dead angle logic, it can achieve a quick response to collision events. When there is neither a collision nor a situation of falling into a dead angle, it continues to perform target tracking, and continuously loops the above process during advancement to ensure safety and operation continuity; the present invention uses at least two conditions to judge dead angles, avoids misoperations caused by misjudgment of a single condition, and combines speed characteristics, obstacle information, and moving distance for multi-dimensional judgment, which is suitable for dynamic courtyard environments.
[0074] (4) The preset backward distance in the present invention can be automatically adjusted according to speed, obstacle distance, and environmental complexity in different scenarios, so as to improve the environmental adaptability of the self-mobile device and avoid unnecessary long-distance backward movement to improve efficiency.
[0075] (5) In the present invention, the 2D grid map of the target area can be updated in real time through multiple cameras arranged on the self-mobile device. 3D point cloud data can be generated by a forward binocular camera and multiple lateral cameras, or only by the forward binocular camera. The multiple lateral cameras are used for visual blind spot compensation. The former has high lateral perception and multi-angle obstacle avoidance capabilities and is suitable for narrow channels or scenes with dense obstacles. The latter has higher real-time performance and computational efficiency and is suitable for scenes with a small density of obstacles.
[0076] (6) In the present invention, the weights of the speed cost, the cost of the straight line to the current target point, the obstacle cost, the left-right direction cost, and the side camera information cost are dynamically adjusted according to the obstacle density and the linear velocity, and an exponential decay function and historical weight feedback are used to smooth the weight change; in addition, a minimum value and a maximum value are set to prevent the self-mobile device from being unstable due to too low weight in an empty environment and to prevent the self-mobile device from completely stagnating when the obstacles are dense. Description of the Drawings
[0077] Figure 1 It is a flowchart of an embodiment of a path planning method for a self-mobile device of the present invention;
[0078] Figure 2 It is a flowchart of reaching the current target point through local obstacle avoidance planning in step 2 in the embodiment of the present invention;
[0079] Figure 3 It is a flowchart of step A3 in the embodiment of the present invention;
[0080] Figure 4 It is a flowchart of real-time updating of the 2D grid map of the target area through multiple cameras arranged on the self-mobile device in step 1 in the embodiment of the present invention;
[0081] Figure 5 It is a flowchart of the fusion described in step A3 in the embodiment of the present invention;
[0082] Figure 6 It is a flowchart of step A4 in the embodiment of the present invention. Detailed Embodiment
[0083] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0084] Referring to Figure 1 , a path planning method for a self-mobile device includes:
[0085] Step 1: Plan an initial path according to the 2D grid map of the target area to obtain multiple path points on the initial path; set one of the path points as the current target point of the self-mobile device; and start to update the 2D grid map of the target area in real time through multiple cameras on the self-mobile device;
[0086] In this embodiment, the above-mentioned method for planning the initial path according to the 2D grid map of the target area adopts methods such as the A algorithm (A-Star Algorithm), Dijkstra algorithm, genetic algorithm (Genetic Algorithm, GA), or ant colony algorithm (Ant Colony Optimization, ACO);
[0087] The above-mentioned method for updating the 2D grid map of the target area in real time through multiple cameras on the self-mobile device uses SLAM (Simultaneous Localization and Mapping) or uses deep learning (such as YOLOv5) to segment static and dynamic objects in the scene;
[0088] The update frequency of the above-mentioned 2D grid map is updated once every 200 ms. In other embodiments, it can also be set to other update frequencies;
[0089] Step 2: Make the self-mobile device move forward along the initial path, and continuously detect whether there are obstacles whose existence time exceeds the stable detection window. The detection range is the initial path between the current target point and the current position; if so, it means that there were no obstacles on the original initial path, and then plan to bypass the obstacle locally to reach the current target point; otherwise, it means that there are no obstacles with a stable state on the original initial path without obstacles, and reach the current target point according to the initial path;
[0090] The above-mentioned stable detection window takes values in the range of [1.2 s, 2 s]. In this embodiment, it is 2 s to avoid misjudgment due to instantaneous jitter, detection error, or short-term disappearance of obstacles;
[0091] The above-mentioned local obstacle bypass planning adopts:
[0092] Based on the current speed (linear speed and angular speed) of the self-mobile device, combined with the kinematic model and acceleration constraints of the self-mobile device, generate possible linear speed and angular speed pairs, and then generate corresponding candidate trajectories within a given time window, and select the candidate trajectory that is the overall optimal in terms of the orientation of the current target point, the speed of the self-mobile device, and obstacle avoidance safety as the left and right candidate trajectories;
[0093] Or, based on the current speed (linear speed and angular speed) of the self-mobile device, combined with the kinematic model and acceleration constraints of the self-mobile device, generate possible linear speed and angular speed pairs, and combine with the position of the self-mobile device to predict the collision area, eliminate the linear speed and angular speed pairs in the collision area, generate corresponding candidate trajectories for the remaining linear speed and angular speed pairs, and select the candidate trajectory with the lowest collision probability and closest to the expected speed of the self-mobile device as the optimal candidate trajectory;
[0094] Alternatively, based on the current speed (linear speed and angular speed) of the self-mobile device, calculate the velocity potential field, and combine the kinematic model and acceleration constraints of the self-mobile device to generate possible linear speed and angular speed pairs, and then generate corresponding candidate trajectories. Select the candidate trajectory that minimizes the velocity potential field as the optimal candidate trajectory;
[0095] Step 3: After reaching the current target point, update the current target point to the next path point, and return to Step 2 to make the self-mobile device move forward along the initial path as described above;
[0096] If the current target point is the end point, end the process;
[0097] Specifically, the above-mentioned reaching the current target point includes: judging whether the distance between the current position and the current target point is less than the reaching threshold. If so, it reaches the current target point; otherwise, return to judge whether the distance between the current position and the current target point is less than the reaching threshold;
[0098] The above-mentioned reaching threshold ranges from [0.2m, 0.5m] and can be dynamically set according to the scenario. For example, a smaller value is set in a narrow area and a larger value is set in an open area.
[0099] It should be noted that the above-mentioned self-mobile device is an intelligent electronic device with autonomous movement ability, which conforms to the "robot" defined in GB / T 39405-2020. Specifically, according to the application field, it can be a personal / home service robot; the above-mentioned target area can be a part or all of the courtyard scene, or a public place (such as a shopping mall or an airport, etc.) that needs to cope with dynamic obstacles and environmental change challenges; the above-mentioned 2D grid map represents the environment as grids, and each grid is marked as occupied, free or unknown, and is used for dynamic path planning and obstacle avoidance; the current target point of the above-mentioned self-mobile device can be any path point including the end point;
[0100] The kinematic model describes the motion characteristics of the self-mobile device, that is, how the self-mobile device moves in space under specific control inputs, such as a differential drive model, etc.;
[0101] The acceleration constraint refers to the physical limitations on the change rates of the linear speed and angular speed in motion control, such as linear speed acceleration constraint and angular speed acceleration constraint.
[0102] In some embodiments, referring to Figure 2 , the above-mentioned reaching the current target point through local obstacle avoidance planning includes:
[0103] Step B1: Perform path planning for the current target point based on the current speed of the self-mobile device, and combine the kinematic model and acceleration constraints of the self-mobile device. The specific method refers to the method of the above-mentioned local obstacle avoidance planning; at the same time, continuously detect whether there are obstacles that have existed for more than the stable detection window;
[0104] If there are no obstacles with an existence time exceeding the stable detection window before the path planning ends, and the disappearance time of the obstacles exceeds the stable detection window, it indicates that the obstacles with a stable existence state that appeared in the initial path have disappeared. Return to step 2 and let the self-mobile device move forward along the initial path;
[0105] If there are obstacles with an existence time exceeding the stable detection window until the path planning ends, it indicates that the obstacles with a stable existence state that appeared in the initial path still exist or new obstacles with a stable existence state have appeared. Then execute step B2;
[0106] Step B2: Determine whether there is an optimal candidate trajectory among all the candidate trajectories obtained from the path planning. If so, execute step B3; otherwise (if there is no optimal candidate trajectory), after performing a backward adjustment, return to step B1 and perform path planning for the current target point based on the current speed of the self-mobile device, combined with the kinematic model and acceleration constraints of the self-mobile device;
[0107] Specifically, the optimal candidate trajectory is:
[0108] The candidate trajectory that is the overall optimal in terms of the orientation of the current target point, the speed of the self-mobile device, and obstacle avoidance safety,
[0109] or the candidate trajectory with the lowest collision probability and closest to the expected speed of the self-mobile device,
[0110] or the candidate trajectory that minimizes the velocity potential field;
[0111] Step B3: Move forward along the optimal candidate trajectory to reach the current target point.
[0112] In some embodiments, in step B1, the path planning for the current target point based on the current speed of the self-mobile device, combined with the kinematic model and acceleration constraints of the self-mobile device, includes:
[0113] Step B101: Set the maximum linear speed and the maximum angular speed of the self-mobile device, and the minimum linear speed to 0, , and obtain the dynamic window as 、 ;
[0114] Step B102: Discretely slice the linear speed and the angular speed of the self-mobile device; sample within the dynamic window 、 to obtain multiple ;
[0115] Specifically,
[0116] Linear velocity Number of slices = maximum linear acceleration * time step / slice resolution,
[0117] Angular velocity Number of slices = maximum angular acceleration * time step / slice resolution;
[0118] In this embodiment, the slice resolution = 0.03. In other embodiments, it can also be set to other slice resolutions;
[0119] Step B103. For each , perform forward trajectory simulation through the trajectory calculation formula to obtain the complete trajectory corresponding to each as the candidate trajectory;
[0120] The above trajectory calculation formula is as follows:
[0121]
[0122]
[0123]
[0124] , are the current heading angle and the original heading angle of the self - moving device respectively; , are the current XY position coordinates of the self - moving device.
[0125] In some embodiments, in step B1, the above backward adjustment includes:
[0126] First, determine whether the number of backward adjustment times for the current target point exceeds the limit (which can be set to 3 times);
[0127] If so, return to step 1 to plan the initial path according to the 2D grid map of the target area;
[0128] Otherwise, retreat a preset backward distance;
[0129] The above preset backward distance can be set to a fixed value, such as 0.3 m, for quick path adjustment; it can also be dynamically adjusted.
[0130] Specifically, in this embodiment, the preset backward distance is dynamically adjusted. The preset backward distance is equal to the sum of the minimum backward distance, the increment adjusted according to the obstacle distance, the increment adjusted according to the linear velocity, and the increment adjusted according to the environmental complexity. The above increment adjusted according to the obstacle distance is calculated by an exponential decay function, which is larger when the obstacle is closer and larger when the linear velocity of the self-mobile device is faster. The above increment adjusted according to the linear velocity is larger when the linear velocity of the self-mobile device is larger. The above increment adjusted according to the environmental complexity is larger when the obstacle density is higher.
[0131] It can be expressed as:
[0132]
[0133] Wherein, is the preset backward distance, is the minimum backward distance, is the coefficient for adjusting the preset backward distance according to the obstacle distance , is the attenuation coefficient, is the speed influence factor, is the environmental complexity factor;
[0134] The preset backward distance is automatically adjusted according to the speed, obstacle distance and environmental complexity in different scenarios, which improves the adaptability and avoids unnecessary long-distance backward movement to improve the efficiency.
[0135] In some embodiments, the above step B2 includes:
[0136] For all candidate trajectories obtained by path planning, calculate the total cost of each candidate trajectory, select the candidate trajectory with the lowest total cost as the optimal candidate trajectory, and then execute step B3; if there is no optimal candidate trajectory, after performing backward adjustment, return to step B1, where based on the current speed of the self-mobile device, combined with the kinematic model and acceleration constraints of the self-mobile device, path planning is performed for the current target point;
[0137] The above total cost includes speed cost, cost to the straight line of the current target point, obstacle cost, left and right direction cost, and lateral camera information cost;
[0138] The above speed cost is that the larger the linear velocity, the smaller the cost, expressed as , and the goal is to make the self-mobile device adopt a higher linear velocity to improve the efficiency;
[0139] The above cost to the straight line of the current target point is that the larger the distance between the end point of the candidate trajectory and the shortest straight-line path between the current position and the current target point, the larger the cost, expressed as ; is the perpendicular distance from the trajectory end point to the target line, and the goal is to make the self-mobile device move along the line as much as possible;
[0140] The above obstacle cost is that if the candidate trajectory collides with an obstacle, the cost is infinite. If there is no collision, the cost is inversely proportional to the closest distance to the obstacle, which is expressed as:
[0141] ;
[0142] If the candidate trajectory collides with an obstacle, the candidate trajectory is directly discarded. Otherwise, the farther the distance from the obstacle, the lower the obstacle cost is;
[0143] The above left-right direction cost is that the greater the angular velocity, the higher the cost, and when the angular velocity is zero, the cost is the lowest, which is expressed as , and the goal is to make the self-mobile device try to select a path with left-right balance to improve the trajectory smoothness;
[0144] The above lateral camera information cost is that the closer the obstacle distance, the higher the cost, which is expressed as ; is the closest obstacle distance detected by the lateral camera.
[0145] For each candidate trajectory, the above total cost is:
[0146]
[0147] where, is the total cost, are respectively corresponding weights;
[0148] The calculation method of = 1, 2, 3, 4, 5) is as follows:
[0149]
[0150]
[0151] where, is corresponding basic value; is the obstacle density, = number of obstacle point clouds / scanned area; is adjustment factor; is adjustment coefficient; is the linear velocity adjustment coefficient; is the direction adjustment coefficient, is the deviation angle between the current traveling direction and the target direction; is the smoothing factor, is historical mean value of; 、 are respectively corresponding minimum value and maximum value.
[0152] The present invention comprehensively calculates weights through obstacle density, linear velocity and deviation angle, and introduces a smoothing factor to realize the fusion of the historical state of weights. Compared with using fixed weights or calibrating weights through experiments, the present invention can dynamically adapt according to the environmental state, and solves the problems of inadaptability to multiple scenarios, inflexible path control and easy trajectory jitter when using fixed weights or calibrating weights through experiments.
[0153] In some embodiments, referring to Figure 3 , the above step B3 includes:
[0154] Step B301: Advance along the optimal candidate trajectory, and at the same time judge whether the anti-collision strip is triggered. If the anti-collision strip is triggered, after performing collision adjustment, perform step B302; if the anti-collision strip is not triggered, judge whether the dead angle logic is triggered. If the dead angle logic is triggered, after performing dead angle adjustment, perform step B302. If the dead angle logic is not triggered, perform step B303;
[0155] Specifically, the above collision adjustment can be to retreat a first preset distance and then rotate a first preset angle (applicable to narrow channels or frontal collisions), or rotate a second preset angle and then move laterally a second preset distance (applicable to edge collisions), or stop and rotate a third preset angle in place (applicable to blocked paths ahead). The first preset distance > the second preset distance, and the first preset angle > the second preset angle > the third preset angle. For example, the first preset distance is 0.3m - 0.5m, the second preset distance is 0.1m - 0.2m, the first preset angle is 30° - 45°, the second preset angle is 10° - 15°, and the third preset angle is 90° - 180°;
[0156] The above dead angle adjustment can be to retreat a fourth preset distance and then rotate a fourth preset angle, or retreat a fifth preset distance; the fourth preset distance ≤ the fifth preset distance. For example, the fourth preset distance is 0.3m - 0.5m, and the fifth preset distance is 0.5m - 1;
[0157] Step B302: Judge whether the obstacle avoidance time is greater than the maximum obstacle avoidance time; the obstacle avoidance time is re-timed each time when performing path planning on the current target point based on the current speed of the self-mobile device, combined with the kinematic model and acceleration constraint of the self-mobile device;
[0158] If so, execute the above step 3;
[0159] Otherwise, return to step B1, and perform path planning on the current target point based on the current speed of the self - moving device, in combination with the kinematic model and acceleration constraints of the self - moving device (step B101);
[0160] Specifically, to avoid staying in difficult - to - pass areas for a long time, the maximum obstacle - bypassing time is set to 200 s in this embodiment. In other embodiments, the maximum obstacle - bypassing time can be set according to the obstacle density;
[0161] Step B303, determine whether the current target point has been reached (whether the distance between the current position and the current target point is less than the above - mentioned arrival threshold);
[0162] If so (the distance between the current position and the current target point is less than the above - mentioned arrival threshold), then execute step 3; otherwise, return to step B301 to determine whether the anti - collision strip is triggered.
[0163] The present invention adapts to obstacle avoidance in complex terrains by connecting anti - collision adjustment → dead - angle adjustment → path - point switching in series as a continuous state machine, and re - planning the path after each adjustment, and combines the obstacle - bypassing time constraint to avoid falling into an infinite loop.
[0164] In some embodiments, the above - mentioned step B301 includes:
[0165] Step B3011, move forward along the optimal candidate trajectory, and at the same time determine whether the anti - collision strip is triggered. If so, then execute step B3012; otherwise, execute step B302;
[0166] Step B3012, perform collision adjustment, and then execute step B302; The collision adjustment can specifically adopt the method of the above - mentioned step B301, which will not be elaborated here;
[0167] Step B3013, determine whether the dead - angle logic is triggered. Specifically, determine whether at least two of the following conditions are met. If so, then trigger the dead - angle logic and execute step B3014; otherwise, execute step B302;
[0168] Condition 1: The current angular velocity exceeds a preset ratio of the maximum angular velocity , and the current linear velocity is less than a preset ratio of the maximum linear velocity , indicating that it may be stuck in a dead - angle or spinning;
[0169] It can be expressed as:
[0170] , and ,
[0171] , preset ratio ;
[0172] Condition 2: Obstacles are continuously detected within the detection time window, indicating that the self - moving device cannot effectively bypass the obstacles within a short period of time; the detection time window ranges from [2s, 5s];
[0173] Condition 3: The displacement of the self - moving device is less than the minimum displacement threshold within the displacement time window, indicating that the self - moving device cannot effectively move within a short period of time and may be trapped due to terrain or obstacle restrictions;
[0174] The displacement time window ranges from [2s, 4s], and the minimum displacement threshold ranges from [0.05m, 0.2m];
[0175] Condition 1 correlates the angular velocity with the linear velocity to avoid local cycling caused by excessive turning; the timing coupling of Condition 2 and Condition 3 can increase logical robustness; the three conditions can individually adjust the parameter ranges to adapt to different devices and scenarios, and are triggered only when at least two conditions are met, avoiding frequent adjustments caused by misjudgment;
[0176] Step B3014: Determine whether the number of dead - angle adjustments for the current target point is greater than the corresponding limit number. If so, return to Step 1; otherwise, perform dead - angle adjustment, increment the number of dead - angle adjustments for the current target point by 1, and then execute Step B302. The dead - angle adjustment can specifically adopt the method of Step B301 above, which will not be elaborated here.
[0177] The present invention introduces the judgment of exceeding the limit of the number of dead - angle adjustments before dead - angle adjustment and triggers the global path re - planning (return to the initial path generation) to avoid local deadlocks.
[0178] In some embodiments, in Step 1, the above - mentioned multiple cameras include a forward binocular camera and two side cameras; in other embodiments, the number of side cameras can also be other numbers;
[0179] Refer to Figure 4 , the real - time update of the 2D grid map of the target area by multiple cameras set on the self - moving device includes the following steps:
[0180] Step A1: Enable the forward binocular camera and two side cameras on the self - moving device to collect video frames in real - time, and align the video frame sequences according to the synchronization signal to obtain the aligned video frames, ensuring multi - perspective consistency;
[0181] Step A2: Calculate the depth information of the aligned video frames of the forward binocular camera and two side cameras, and then convert the depth information into 3D point cloud data;
[0182] Step A3: Use external parameter calibration to convert the 3D point cloud data obtained in Step A2 from the camera coordinate system where it is located to the device coordinate system, and then fuse the 3D point cloud data to obtain the fused 3D point cloud;
[0183] Specifically, due to the different installation positions and angles of the forward binocular camera and the two side cameras, first, the 3D point cloud data of the forward binocular camera and the two side cameras are converted from their respective camera coordinate systems to the device coordinate system, and then the 3D point cloud data of the forward binocular camera and the two side cameras are fused into a unified point cloud map to obtain the fused 3D point cloud.
[0184] Step A4: Project the fused 3D point cloud onto the 2D grid map of the target area to complete the update of the 2D grid map of the target area.
[0185] It should be noted that in Step A1, the above synchronization signal is a timestamp or an IMU synchronization signal, etc.; in Step A2, the above depth information represents the distance from the object to the corresponding camera, that is, the spatial distance or depth value, and the 3D point cloud data refers to a set composed of multiple 3D points in three-dimensional space, and each 3D point has (x, y, z) coordinates; in Step A3, the above device coordinate system is the coordinate system of the self-moving device body.
[0186] In some embodiments, the above Step A2 includes:
[0187] Calculate the disparity map of the left and right image pairs in the video frame after the forward binocular camera is aligned, then deduce the depth information according to the disparity map and the camera parameters, and then use the camera internal parameters to map the depth information into the forward binocular point cloud; specifically, obtain the camera internal parameters and external parameters of the forward binocular camera, and use the calibration mapping table to calibrate the left and right image pairs in the video frame after the forward binocular camera is aligned, then use the stereo matching algorithm to calculate the disparity map of the left and right image pairs, and then use the camera internal parameters and external parameters of the forward binocular camera to convert the disparity map into the forward binocular point cloud;
[0188] Use the depth estimation model to infer the depth information of the monocular images in the video frames after the alignment of each side camera; then, according to the depth information and the camera internal parameters, calculate the corresponding monocular depth point cloud; specifically, normalize the pixel values of the monocular images in the video frames after the alignment of each side camera, adjust the image size, then input them into the depth estimation model, output the depth map, traverse each pixel of the depth map, use the camera internal parameters of each side camera to calculate the corresponding 3D points, and splice the obtained 3D points into a point cloud format to obtain the corresponding monocular depth point cloud;
[0189] Construct the 3D point cloud data from the forward binocular point cloud and the two monocular depth point clouds;
[0190] It should be noted that the above-mentioned stereo matching algorithm can adopt algorithms such as SGBM (Semi-Global Matching); the above-mentioned depth estimation model can adopt, for example, Monodepth2 or MiDaS (Mixed Data Sampling Regression Models), etc.
[0191] In some embodiments, referring to Figure 5 , step A3, the above-mentioned fusion includes:
[0192] Step A301: Use the forward binocular point cloud as the main input, and calculate the forward binocular point cloud confidence according to the nearest acceptable depth and the depth of the forward binocular point cloud;
[0193] It can be expressed as:
[0194]
[0195] Among them, is the forward binocular point cloud confidence, is the depth of the forward binocular point cloud, is the nearest acceptable depth, is the adjustment coefficient of the forward binocular point cloud confidence;
[0196] Since the monocular depth estimation error is relatively large, each monocular depth point cloud is used as a supplementary input, and the monocular depth point cloud confidence is calculated according to the nearest acceptable depth and the depth of the monocular depth point cloud;
[0197] It can be expressed as:
[0198]
[0199] Among them, is the monocular depth point cloud confidence, is the depth of the monocular depth point cloud, is the adjustment coefficient of the monocular depth point cloud confidence;
[0200] Step A302: Judge whether the absolute value of the depth difference in the overlapping area between the forward binocular point cloud and each monocular depth point cloud is greater than the depth difference threshold. If so, calculate the corrected monocular depth point cloud confidence using the depth difference influence factor, update the monocular depth point cloud confidence in the overlapping area to the corrected monocular depth point cloud confidence, and then execute step A303; otherwise, directly execute step A303;
[0201] The above calculation of the corrected monocular depth point cloud confidence is:
[0202]
[0203] Among them, is the confidence of the corrected monocular depth point cloud, is the depth difference influence factor, used to control the attenuation speed, is the absolute value of the depth difference, ;
[0204] Step A303: Fuse the forward binocular point cloud and each monocular depth point cloud, and determine whether the confidence of the forward binocular point cloud is greater than the corresponding preset value. If so, use the forward binocular point cloud; otherwise, determine whether the confidence of the monocular depth point cloud is greater than the corresponding preset value. If so, use the monocular depth point cloud; otherwise, abandon the fusion, mark it as an uncertain area, and wait for the next update;
[0205] until the fusion is completed;
[0206] After step A303, the fused 3D point cloud is obtained;
[0207] When multiple monocular depth point clouds are relatively reliable (such as simple terrain and few occlusions), the above fusion can also be performed by direct superposition to enhance real-time performance and reduce computational overhead;
[0208] In some embodiments, referring to Figure 6 , step A4 includes:
[0209] Step A401: Extract the (x, y, z) coordinates of the fused 3D point cloud, set the z filtering range, perform height filtering to obtain 2D projection points; and obtain the 2D grid map row and column indices corresponding to the 2D projection points according to parameters such as the origin, resolution, and map size of the 2D grid map;
[0210] Step A402: First obtain the original occupancy probability value of the current grid, then determine whether the grid is occupied or free according to the 2D grid map row and column indices obtained in step A401, convert the judgment result into an update amount, and then accumulate it to the original occupancy probability value as the new occupancy probability value of the current grid to improve the accuracy and stability of the 2D grid map;
[0211] It can be expressed as:
[0212]
[0213] Among them, is the Log-Odds value of the grid at time t + 1 and t , is the 2D grid map row and column index; is the grid 's original occupancy probability value (corresponding to time t);
[0214] Step A403: Denoise and correct the 2D grid map updated in Step A402 to further improve the accuracy and stability of the 2D grid map;
[0215] Step A4031: According to experimental experience, set a confidence threshold (which can be set to 0.5). For each grid, if its occupancy probability is greater than or equal to the confidence threshold, it is retained as occupied; otherwise, it is marked as free to reduce false obstacles;
[0216] Step A4032: For each grid marked as occupied, determine whether the number of occupied points in the neighborhood of this grid is less than a preset value (which can be set to 3). If so, it is determined as an isolated noise point, and this grid is marked as free; otherwise, it is retained as occupied;
[0217] Step A4033: Use a connected region labeling algorithm (such as BFS (Breadth - First Search) or DFS (Depth - First Search)) to label all connected occupied regions; calculate the number of occupied grids in each connected region, and determine whether the number of occupied grids in each connected region is less than a preset threshold. If so, it is considered a misjudged small object, and all grids in this connected region are marked as free; otherwise, the label of this connected region remains unchanged;
[0218] Step A4034: For each grid marked as occupied, expand it by 1 grid in all directions; determine whether each expanded grid is free. If so, mark the expanded grid as occupied and with low confidence; otherwise, it remains unchanged to improve the safety obstacle avoidance effect;
[0219] Step A404: Update the 2D grid map of the target area to the 2D grid map obtained in Step 403.
[0220] The present invention adopts a four - level cascaded denoising mechanism. It directly eliminates low - probability grids through the confidence threshold filter (Step A4031), clears isolated points through neighborhood noise detection (Step A4032), removes small - area interferences through connected region area filtering (Step A4033), and expands and marks the periphery of occupied grids by dynamically expanding low - confidence regions (Step A4034), thereby achieving the purpose of significantly improving the robustness of the map.
[0221] In some embodiments, in Step 1, the above - mentioned multiple cameras include a forward binocular camera and two side cameras;
[0222] Updating the 2D grid map of the target area in real - time through multiple cameras set on the self - moving device includes the following steps:
[0223] Step A´1: Enable the forward binocular camera and two side cameras on the self - moving device to collect video frames in real - time, and align the video frame sequences according to the synchronization signal to ensure multi - view consistency;
[0224] Step A´2: Calculate the depth information of the video frames of the forward binocular camera, and then convert the depth information into 3D point cloud data; specifically, the method of Step A2 can be adopted;
[0225] Meanwhile, use an object detection model (such as YOLOv5 or SSD (Single Shot MultiBox Detector), etc.) to detect obstacles in the video frames of each side camera, and extract obstacle features, including position (center point of the bounding box), orientation angle, and distance;
[0226] Step A´3: Use extrinsic calibration to convert the 3D point cloud data obtained in Step A´2 from the camera coordinate system where it is located to the device coordinate system, and then optimize the 3D point cloud data to reduce the computational overhead; specifically, the above optimization includes plane segmentation first and then clustering segmentation; the above plane segmentation is to remove the horizontal ground and horizontal obstacles through RANSAC (RANdom SAmple Consensus) and retain vertical obstacles; the above clustering segmentation is to extract discrete and independent obstacles through DBSCAN (Density - Based Spatial Clustering of Applications with Noise) clustering or KD - Tree (k - dimensional tree) segmentation to reduce redundant data;
[0227] Meanwhile, according to the installation points, field - of - view angles, and effective depth ranges of each side camera in A´2, establish corresponding blind - area compensation regions; then, according to the obstacle features in Step A´2, calibrate each blind - area compensation region; specifically, the above blind - area compensation regions are fan - shaped, with the center being the installation point of the corresponding side camera, the radian being the field - of - view angle of the corresponding side camera, and the radius being the effective depth range of the corresponding side camera; the above calibrating each blind - area compensation region according to the obstacle features in Step A´2 includes: marking the position of the obstacle as occupied and with low confidence according to the obstacle features in Step A´2, and gradually reducing the confidence according to the orientation angle and distance of the obstacle, and marking the position without obstacles as free and with low confidence;
[0228] Step A´4: Project the 3D point cloud data obtained in Step A´3 onto the 2D grid map of the target area, and superimpose the blind - area compensation regions obtained in Step A´3 onto the 2D grid map of the target area to complete the update of the 2D grid map of the target area;
[0229] Specifically, the method of projecting the 3D point cloud data obtained in step A´3 onto the 2D grid map of the target area can adopt the method of steps A401 to A403;
[0230] Overlaying the blind area compensation area obtained in step A3 onto the 2D grid map of the target area includes: through polar coordinate conversion, converting the point coordinates of the blind area compensation area into the coordinates of the 2D grid map to obtain the low-confidence occupancy area corresponding to the blind area compensation area on the 2D grid map; overlaying the low-confidence occupancy area onto the 2D grid map of the target area. If the same grid has two confidence level markings, only the high-confidence marking is retained.
[0231] The self-mobile device provided by the present invention includes a memory, a processor, and a path planning program stored on the above-mentioned memory and operable on the above-mentioned processor. The above-mentioned path planning program is configured to implement the steps of the path planning method of the above-mentioned self-mobile device.
[0232] It should be noted that the memory can be RAM (Random Access Memory), Flash ROM (Flash Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), eMMC (Embedded MultiMedia Card), SD card, etc., and the processor can be ARM Cortex-A (Advanced RISC Machine Cortex-A series), DSP (Digital Signal Processor), etc.; the self-mobile device adopting the path planning method of the self-mobile device in the above-mentioned embodiment can clean weeds, fallen leaves, etc. in a semi-structured and frequently dynamically changing courtyard scene, and can also be used in public places (such as shopping malls or airports, etc.) to perform tasks in scenarios that need to cope with dynamic obstacles and environmental change challenges; compared with the prior art, the beneficial effects of this self-mobile device are the same as those of the path planning method of the self-mobile device provided in the above-mentioned embodiment, and will not be elaborated here.
[0233] The readable storage medium provided by the present invention stores a computer program; when the above-mentioned computer program is executed by a processor, it implements the steps of the path planning method of the above-mentioned self-mobile device.
[0234] It should be noted that the above-readable storage medium is a tangible carrier capable of physically carrying program code, including but not limited to the following types: storage devices based on electrical, magnetic, optical, electromagnetic or semiconductor principles (such as USB flash drives, hard disks, RAM, ROM, EPROM, flash memory), as well as optical storage devices such as optical fibers, CD-ROMs (Compact Disc Read-Only Memory), or any combination of the above media. The above computer program can be used by an instruction execution system or device, or in combination with it. The code of the above computer program can be transmitted by any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above. The code of the above computer program can be written in one or more programming languages or combinations thereof, such as Java, Smalltalk, C++, etc.
Claims
1. A path planning method for a self - moving device, characterized in that, Including: Planning an initial path for the self - moving device according to a 2D grid map of the target area to obtain multiple path points on the initial path; setting one of the path points as the current target point of the self - moving device; and starting to update the 2D grid map of the target area in real time through multiple cameras on the self - moving device; Making the self - moving device move forward along the initial path and detecting in real time whether there are obstacles whose existence time exceeds the stable detection window; If so, planning to reach the current target point through local obstacle avoidance; Otherwise, reaching the current target point according to the initial path; After reaching the current target point, making the current target point update to the next path point and returning to the step of making the self - moving device move forward along the initial path; If the current target point is the end point, ending the process; The step of planning to reach the current target point through local obstacle avoidance includes: Performing path planning for the current target point and judging whether there is an optimal candidate trajectory among all the candidate trajectories obtained from the path planning; The step of judging whether there is an optimal candidate trajectory among all the candidate trajectories obtained from the path planning includes: For all the candidate trajectories obtained from the path planning, calculating the total cost of each candidate trajectory, selecting the candidate trajectory with the lowest total cost as the optimal candidate trajectory. If there is no candidate trajectory with the lowest total cost, it is judged that there is no optimal candidate trajectory; For each candidate trajectory, the total cost is: ; Among them, is the total cost, are the speed cost, the cost of the straight line to the current target point, the obstacle cost, the left - right direction cost, and the side - camera information cost respectively, are respectively the corresponding weights; the speed cost is that the greater the linear velocity, the smaller the cost; the cost of the straight line to the current target point is that the greater the distance between the end point of the candidate trajectory and the shortest straight - line path between the current position and the current target point, the greater the cost; the obstacle cost is that if the candidate trajectory collides with an obstacle, the cost is infinite, and if there is no collision, the cost is inversely proportional to the closest distance to the obstacle; the left - right direction cost is that the greater the angular velocity, the higher the cost, and when the angular velocity is zero, the cost is the smallest; the side - camera information cost is that the closer the obstacle distance, the higher the cost. The calculation method is as follows: = 1, 2, 3, 4, 5: Among them, is the corresponding base value; is the obstacle density, = the number of obstacle point clouds / the area of the scanning region; is the adjustment factor of is the adjustment coefficient of is the linear velocity the adjustment coefficient of is the direction adjustment coefficient, is the deviation angle between the current traveling direction and the target direction; is the smoothing factor, is the historical mean of , are respectively the corresponding minimum value and maximum value.
2. The path planning method for a self - moving device according to claim 1, characterized in that The step of planning to reach the current target point through local obstacle avoidance includes: Based on the current speed of the self - moving device, combining the kinematic model and acceleration constraints of the self - moving device, performing path planning for the current target point, and at the same time detecting in real time whether there are obstacles whose existence time exceeds the stable detection window; If before the end of the path planning, there are no obstacles whose existence time exceeds the stable detection window and the disappearance time of the obstacles exceeds the stable detection window, returning to the step of making the self - moving device move forward along the initial path; If until the end of the path planning, there are obstacles whose existence time exceeds the stable detection window, judging whether there is an optimal candidate trajectory among all the candidate trajectories obtained from the path planning; If there is an optimal candidate trajectory, moving forward according to the optimal candidate trajectory to reach the current target point; If there is no optimal candidate trajectory, after performing a backward adjustment, returning to the step of performing path planning for the current target point based on the current speed of the self - moving device, combining the kinematic model and acceleration constraints of the self - moving device.
3. The path planning method for a self - moving device according to claim 2, characterized in that The step of moving forward according to the optimal candidate trajectory to reach the current target point includes: Moving forward according to the optimal candidate trajectory, and at the same time judging whether the anti - collision strip is triggered. If the anti - collision strip is triggered, performing a collision adjustment. If the anti - collision strip is not triggered, judging whether the dead - angle logic is triggered. If the dead - angle logic is triggered, performing a dead - angle adjustment. If the dead - angle logic is not triggered, judging whether the current target point is reached. If the current target point is reached, ending the step of moving forward according to the optimal candidate trajectory to reach the current target point. If the current target point is not reached, returning to the step of judging whether the anti - collision strip is triggered; After the collision adjustment and dead angle adjustment are completed, it is determined whether the obstacle avoidance time is exceeded; if it is exceeded, the current target point is updated to the next path point, and it returns to making the self-moving device move forward along the initial path. If the current target point is the end point, the process ends; if it is not exceeded, it returns to performing path planning for the current target point based on the current speed of the self-moving device, combined with the kinematic model and acceleration constraints of the self-moving device. The obstacle avoidance time is re-timed each time when performing path planning for the current target point based on the current speed of the self-moving device, combined with the kinematic model and acceleration constraints of the self-moving device.
4. A path planning method for a self-moving device according to claim 3, characterized in that The determination of whether the dead angle logic is triggered includes: Determine whether at least two of the following conditions are met. If so, trigger the dead angle logic and perform dead angle adjustment; otherwise, the dead angle logic is not triggered; Condition 1: The current angular velocity of the self - moving device exceeds a preset ratio of the maximum angular velocity , and the current linear velocity is less than a preset ratio of the maximum linear velocity ; Condition 2: Obstacles are continuously detected within the detection time window; Condition 3: The displacement of the self-moving device is less than the minimum displacement threshold within the displacement time window; Before performing the dead angle adjustment, first determine whether the number of dead angle adjustment times of the current target point is exceeded. If so, return to planning the initial path according to the 2D grid map of the target area. Otherwise, perform the dead angle adjustment and increment the number of dead angle adjustment times of the current target point by 1.
5. A path planning method for a self-moving device according to claim 3, characterized in that The backward adjustment includes: first determining whether the number of backward adjustment times of the current target point is exceeded. If so, return to planning the initial path according to the 2D grid map of the target area. Otherwise, retreat a preset backward distance; The preset backward distance is a fixed value or is dynamically adjusted; The dynamic adjustment includes: Set the preset backward distance to be equal to the sum of the minimum backward distance, the increment adjusted according to the obstacle distance, the increment adjusted according to the linear velocity, and the increment adjusted according to the environmental complexity; The increment adjusted according to the obstacle distance is calculated by an exponential decay function, which is larger when the obstacle is closer and larger when the linear velocity of the self-moving device is faster; The increment adjusted according to the linear velocity is larger when the linear velocity of the self-moving device is larger; The increment adjusted according to the environmental complexity is larger when the obstacle density is higher.
6. A path planning method for a self-moving device according to claim 1, characterized in that The multiple cameras include a front binocular camera and multiple side cameras; The real-time update of the 2D grid map of the target area by the multiple cameras arranged on the self-moving device includes: Step A1: Make the front binocular camera and multiple side cameras on the self-moving device collect video frames in real time, and align the video frame sequences according to the synchronization signal to obtain the aligned video frames; Step A2: Calculate the depth information of the aligned video frames of the front binocular camera and multiple side cameras, and then convert the depth information into 3D point cloud data; Step A3: Use external parameter calibration to convert the 3D point cloud data obtained in Step A2 from the camera coordinate system where it is located to the device coordinate system, and then fuse the 3D point cloud data to obtain the fused 3D point cloud; Step A4: Project the fused 3D point cloud onto the 2D grid map of the target area to complete the update of the 2D grid map of the target area.
7. A path planning method for a self - moving device according to claim 6, characterized in that In step A2, the 3D point cloud data includes a forward binocular point cloud obtained from the video frames aligned by the forward binocular camera and multiple monocular depth point clouds obtained from the video frames aligned by multiple lateral cameras; In step A3, the fusion includes: Step A301: Use the forward binocular point cloud as the main input, and calculate the forward binocular point cloud confidence according to the nearest acceptable depth and the depth of the forward binocular point cloud; Use each monocular depth point cloud as a supplementary input, and calculate the monocular depth point cloud confidence according to the nearest acceptable depth and the depth of the monocular depth point cloud; Step A302: Judge whether the absolute value of the depth difference in the overlapping area between the forward binocular point cloud and each monocular depth point cloud is greater than the depth difference threshold. If so, calculate the corrected monocular depth point cloud confidence using the depth difference influence factor, update the monocular depth point cloud confidence in the overlapping area to the corrected monocular depth point cloud confidence, and then execute step A303; otherwise, directly execute step A303; Step A303: Fuse the forward binocular point cloud and each monocular depth point cloud, and judge whether the forward binocular point cloud confidence is greater than the corresponding preset value during fusion. If so, use the forward binocular point cloud; otherwise, judge whether the monocular depth point cloud confidence is greater than the corresponding preset value. If so, use the monocular depth point cloud; otherwise, abandon the fusion, mark it as an uncertain area, and wait for the next update; Until the fusion is completed.
8. A path planning method for a self - moving device according to claim 7, characterized in that Step A4 includes: Step A401: Extract the (x, y, z) coordinates of the fused 3D point cloud, set the z filtering range, perform height filtering to obtain 2D projection points; and obtain the row and column indices of the 2D grid map corresponding to the 2D projection points according to the parameters of the 2D grid map; Step A402: First obtain the original occupancy probability value of the current grid, then judge whether the grid is occupied or free according to the row and column indices of the 2D grid map obtained in step A401, convert the judgment result into an update amount, and then accumulate it to the original occupancy probability value as the new occupancy probability value of the current grid; Step A403: Denoise and correct the 2D grid map updated in step A402; Step A404: Update the 2D grid map of the target area to the 2D grid map obtained in step 403.
9. A path planning method for a self - moving device according to claim 8, characterized in that Step A403 includes: Step A4031: For each grid, if its occupancy probability is greater than or equal to the confidence threshold, retain it as occupied, otherwise mark it as free; Step A4032: For each grid marked as occupied, judge whether the number of occupied points in the grid neighborhood is less than the preset value. If so, determine it as an isolated noise point and mark the grid as free, otherwise retain it as occupied; Step A4033: Mark all connected occupied regions, and calculate the number of occupied grids in each connected region; determine whether the number of occupied grids in each connected region is less than a preset threshold. If so, mark all grids in the connected region as free; otherwise, do not change the marking of the connected region. Step A4034: For each grid marked as occupied, expand one grid in all directions; determine whether each expanded grid is free. If so, mark the expanded grid as occupied and with low confidence, otherwise do not change.
10. A self - moving device, characterized in that: It includes a memory, a processor, and a path planning program stored on the memory and executable on the processor. The path planning program is configured to implement the steps of the path planning method for the self - moving device as described in any one of claims 1 to 9.
11. A computer - readable storage medium, wherein the computer - readable storage medium stores a computer program, and is characterized in that: When the computer program is executed by a processor, it implements the steps of the path planning method for the self - moving device as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Mobile robot intelligent path planning method
CN112631294A
Local path planning method and system for unmanned vehicle
CN114200926A