Path planning method of self-moving equipment, self-moving equipment and readable storage medium
By using the path planning method of mobile devices in the courtyard scene, the 2D raster map is updated in real time and switched to local obstacle planning, the shortcomings of the existing navigation methods in dynamic obstacle processing are solved, and efficient response and path updates are achieved to complex environments.
Patent Information
- Application Number
- CN202510538513.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-27
AI Technical Summary
In semi-structured and frequent dynamic changes, the existing hybrid navigation methods have the problem of insufficient processing capabilities for dynamic obstacles and not timely updates of the path after the obstacle disappears.
A self-mobile device path planning method is adopted. By generating a 2D raster map in the target area, planning the initial path and updating it in real time, switching to local obstacle planning based on the existence of obstacles, and filtering temporary obstacles with stable detection windows to achieve a robust response to dynamic emergence obstacles.
It effectively solves the problem of insufficient processing capabilities for dynamic obstacles, realizes rapid response to dynamic environments and timely updates of paths, and ensures safe and efficient operation of self-mobile devices in complex environments.
Smart Images

Figure CN120063292A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the two-dimensional position control of a self-mobile device, and particularly to a path planning method for a self-mobile device, a self-mobile device, and a computer-readable storage medium. Background Art
[0002] In the courtyard cleaning scenario, in order to improve the operation efficiency and cleaning coverage rate, self-mobile devices (such as lawn mowing robots, snow sweeping robots, etc.) usually adopt a hybrid navigation method of "global path planning + local dynamic obstacle avoidance", that is, the initial path is generated by constructing an environmental map, and local obstacle avoidance scheduling is carried out 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 sudden dynamic obstacles and untimely update of the path after the obstacle disappears. Summary of the Invention
[0004] The purpose 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 sudden dynamic obstacles and untimely update of the path after the obstacle disappears, and to provide a path planning method for a self-mobile device, a self-mobile device, and a computer-readable storage medium.
[0005] In order to solve the above deficiencies of the prior art, the present invention provides the following technical solutions: A path planning method for a self-mobile device, characterized in that it includes: Planning an initial path of the self-mobile device according to a 2D grid map of the 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-mobile device; and starting to update the 2D grid map of the target area in real time through a plurality of cameras on the self-mobile device; Making the self-mobile device move forward along the initial path, and detecting in real time whether there is an obstacle 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-mobile device move forward along the initial path; if the current target point is the end point, ending the process.
[0006] Optionally, the planning to reach the current target point through local obstacle avoidance includes: Based on the current speed of the self-mobile device, combining the kinematic model and acceleration constraint of the self-mobile device, planning a path for the current target point, and detecting in real time whether there is an obstacle whose existence time exceeds the stable detection window; If there are no obstacles whose existence time exceeds the stable detection window before the path planning ends, and the disappearance time of the obstacles exceeds the stable detection window, then return to make the self-mobile device move forward along the initial path; If there are obstacles whose existence time exceeds the stable detection window until the path planning ends, then determine whether there is an optimal candidate trajectory among all the candidate trajectories obtained by the path planning; If there is an optimal candidate trajectory, then move forward along the optimal candidate trajectory to reach the current target point; If there is no optimal candidate trajectory, then after performing a backward adjustment, return to perform path planning on 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; The determination of whether there is an optimal candidate trajectory among all the candidate trajectories obtained by the path planning includes: For all the candidate trajectories obtained by the 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 determined that there is no optimal candidate trajectory; The total cost includes a speed cost, a cost of the straight line to the current target point, an obstacle cost, a left-right direction cost, and a cost of lateral camera information; For the speed cost, the greater the linear velocity, the smaller the cost; for the cost of the straight line to the current target point, the greater the distance by which the end point of the candidate trajectory deviates from the shortest straight-line path between the current position and the current target point, the greater the cost; for the obstacle cost, 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; for the left-right direction cost, the greater the angular velocity, the higher the cost, and when the angular velocity is zero, the cost is the lowest; for the cost of lateral camera information, the closer the obstacle distance, the higher the cost.
[0007] Optionally, for each candidate trajectory, the total cost is: ; where 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 cost of lateral camera information respectively, are respectively the corresponding weights; The calculation method of is as follows, where is the corresponding base value; is the obstacle density, = the number of obstacle point clouds / the area of the scanning region; is 's adjustment factor; is 's adjustment coefficient; is the linear velocity 's 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 's historical mean; , are respectively 's corresponding minimum value and maximum value.
[0008] Optionally, moving forward along the optimal candidate trajectory to reach the current target point includes: Moving forward along 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 along the optimal candidate trajectory to reach the current target point ends. If the current target point is not reached, return to judging whether the anti-collision strip is triggered; 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 along the initial path. If the current target point is the end point, the process ends; if it is not exceeded, return to 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; The obstacle avoidance time is re-timed each time the path planning for the current target point is started based on the current speed of the self-mobile device, combined with the kinematic model and acceleration constraints of the self-mobile device.
[0009] Optionally, the judgment of whether the dead angle logic is triggered includes: Judging whether at least two of the following conditions are met. If so, the dead angle logic is triggered and dead angle adjustment is performed; otherwise, the dead angle logic is not triggered; 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; Condition 2: Obstacles are continuously detected within the detection time window; Condition 3: The displacement of the self-mobile 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 adjustments for the current target point exceeds the limit. If so, return the initial path planned according to the 2D grid map of the target area. Otherwise, perform the dead angle adjustment and increment the number of dead angle adjustments for the current target point by 1.
[0010] Optionally, the backward adjustment includes: first determining whether the number of backward adjustments for the current target point exceeds the limit. If so, return the initial path planned 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.
[0011] Optionally, the multiple cameras include a forward binocular camera and multiple lateral cameras; Updating the 2D grid map of the target area in real - time through multiple cameras set on the self - moving device includes: 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; 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; 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; 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.
[0012] 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 the multiple lateral cameras: In Step A3, the fusion includes: Step A301: Take 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; Take each monocular depth point cloud as 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: Determine 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 determine 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, determine 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.
[0013] Optionally, the said 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 2D grid map row and column indexes 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 2D grid map row and column indexes 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.
[0014] Optionally, the said Step A403 includes: Step A4031: For each grid, if its occupancy probability is greater than or equal to the confidence threshold, keep 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 keep it as occupied; Step A4033: Mark all connected occupied regions, 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 this connected region as free; otherwise, do not change the marking of this connected region. Step A4034: For each grid marked as occupied, expand it by 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.
[0015] 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.
[0016] The present invention also provides a computer - readable storage medium, which stores a computer program, and is characterized in that: When the computer program is executed by the processor, it implements the steps of the path - planning method of the self - moving device as described above.
[0017] Compared with the prior art, the beneficial effects of the present invention are: (1) The path - planning method of a self - moving device according to the present invention generates an initial path based on a 2D grid map, sets a current target point, the self - moving 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 initial path planning and real - time environment perception, solves the problem of insufficient dynamic obstacle emergence handling ability of existing hybrid navigation methods, and is applicable to autonomous navigation tasks in complex dynamic environments.
[0018] (2) The present invention filters temporary obstacles through a stable detection window to achieve a robust response to dynamically emerging obstacles; uses obstacle - avoidance time and the number of backward adjustment times for judgment to prevent falling into an ineffective planning loop; detects obstacles in real time during path planning to solve the problem of untimely path update.
[0019] (3) When moving forward along the optimal candidate path, the present invention first judges the anti - collision strip and then judges the dead - angle logic in order to achieve a quick response to collision events. When there is neither a collision nor getting into a dead - angle, continue to execute target tracking, and continuously loop the above process during forward movement 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, adapting to dynamic courtyard environments.
[0020] (4) In the present invention, the preset backward distance 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-moving device and avoid unnecessary long-distance backward movement to improve efficiency.
[0021] (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-moving device. 3D point cloud data can be generated by the forward binocular camera and multiple lateral cameras, or only by the forward binocular camera. The multiple lateral cameras are used for visual blind filling. The former has higher 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 smaller density of obstacles.
[0022] (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 cost of the lateral camera information 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-moving device from being unstable due to too low a weight in an empty environment and to prevent the self-moving device from completely stagnating when the obstacles are dense. Description of the Drawings
[0023] Figure 1 It is a flowchart of an embodiment of the path planning method for a self-moving device of the present invention; Figure 2 It is a flowchart of reaching the current target point through local obstacle avoidance planning in step 2 of the embodiment of the present invention; Figure 3 It is a flowchart of step A3 in the embodiment of the present invention; Figure 4 It is a flowchart of updating the 2D grid map of the target area in real time through multiple cameras arranged on the self-moving device in step 1 of the embodiment of the present invention; Figure 5 It is a flowchart of the fusion in step A3 in the embodiment of the present invention; Figure 6 It is a flowchart of step A4 in the embodiment of the present invention. Detailed Embodiments
[0024] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all 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.
[0025] Refer toFigure 1 , A path planning method for a self - moving device, including: 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 - moving device; And start to update the 2D grid map of the target area in real time through multiple cameras on the self - moving device; In this embodiment, the above - mentioned method of planning the initial path according to the 2D grid map of the target area adopts methods such as the A - Star Algorithm or Dijkstra algorithm or Genetic Algorithm (GA) or Ant Colony Optimization (ACO), etc.; The above - mentioned method of updating the 2D grid map of the target area in real time through multiple cameras on the self - moving device uses SLAM (Simultaneous Localization and Mapping) or uses deep learning (such as YOLOv5) to segment static and dynamic objects in the scene, etc.; 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; Step 2: Make the self - moving 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, 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; The value range of the above - mentioned stable detection window is [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; The above - mentioned local obstacle - bypassing planning adopts: Based on the current speed (linear speed and angular speed) of the self - moving device, combined with the kinematic model and acceleration constraints of the self - moving device, generate possible linear speed - angular speed pairs, and then generate corresponding candidate trajectories within a given time window, and select the candidate trajectory that is the overall best in terms of the current target point orientation, the speed of the self - moving device, and obstacle - avoidance safety as the left - and - right candidate trajectories; Alternatively, based on the current speed (linear speed and angular speed) of the self - moving device, combining the kinematic model and acceleration constraints of the self - moving device, generate possible linear speed and angular speed pairs, and combine the position of the self - moving 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 desired speed of the self - moving device as the optimal candidate trajectory; Alternatively, based on the current speed (linear speed and angular speed) of the self - moving device, calculate the velocity potential field, and combine the kinematic model and acceleration constraints of the self - moving 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; 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 - moving device move forward along the initial path as described above; If the current target point is the end point, end the process; 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 arrival threshold. If so, the current target point is reached; otherwise, return to judge whether the distance between the current position and the current target point is less than the arrival threshold; The above - mentioned arrival 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.
[0026] It should be noted that the above - mentioned self - moving device is an intelligent electronic device with autonomous moving ability, which conforms to the "robot" defined in GB / T 39405 - 2020. Specifically in terms of application fields, 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.) where challenges such as dynamic obstacles and environmental changes need to be addressed; 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 - moving device can be any path point including the end point; The kinematic model describes the motion characteristics of the self - moving device, that is, how the self - moving device moves in space under specific control inputs, such as the differential drive model, etc.; 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.
[0027] In some embodiments, referring to Figure 2 , the above - mentioned reaching the current target point through local obstacle - bypassing planning includes: Step B1: 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. The specific method refers to the above - mentioned local obstacle avoidance planning method; at the same time, continuously detect whether there are obstacles whose existence time exceeds the stable detection window. 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, it indicates that the obstacles with stable existence states that appeared in the initial path have disappeared. Return to step 2 above to make the self - moving device move forward along the initial path. If, until the end of path planning, there are obstacles whose existence time exceeds the stable detection window, it indicates that the obstacles with stable existence states that appeared in the initial path still exist or new obstacles with stable existence states have emerged. Then execute step B2. Step B2: Determine whether there is an optimal candidate trajectory among all candidate trajectories obtained from path planning. If so, execute step B3; otherwise (if there is no optimal candidate trajectory), after performing backward adjustment, return to step B1 above 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. Specifically, the optimal candidate trajectory is: The candidate trajectory that is the overall optimal in terms of the orientation of the current target point, the speed of the self - moving device, and obstacle avoidance safety. Or the candidate trajectory with the lowest collision probability and closest to the expected speed of the self - moving device. Or the candidate trajectory that minimizes the velocity potential field. Step B3: Move forward along the optimal candidate trajectory to reach the current target point.
[0028] In some embodiments, in step B1, the 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, includes: Step B101: Set the maximum linear speed and the maximum angular speed of the self - moving device, and the minimum linear speed is 0, to obtain the dynamic window as 、 ; Step B102: Discretely slice the linear speed and the angular speed of the self - moving device; sample within the dynamic window 、 to obtain multiple ; Specifically, the linear speed Number of slices = Maximum linear acceleration * Time step / Slice resolution, Angular velocity Number of slices = Maximum angular acceleration * Time step / Slice resolution; In this embodiment, the slice resolution = 0.03. In other embodiments, it can also be set to other slice resolutions; Step B103, for each , perform forward trajectory simulation through the trajectory calculation formula to obtain each corresponding complete trajectory as a candidate trajectory; The above trajectory calculation formula is as follows: , 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.
[0029] In some embodiments, in step B1, the above backward adjustment includes: First, determine whether the number of backward adjustment times of the current target point exceeds the limit (which can be set to 3 times); If so, return to the step of planning the initial path according to the 2D grid map of the target area in step 1; Otherwise, retreat a preset backward distance; The above preset backward distance can be set to a fixed value, such as 0.3m, for quick path adjustment; it can also be dynamically adjusted.
[0030] 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 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; It can be expressed as: Where, is the preset backward distance, is the minimum backward distance, is the increment according to the obstacle distance Adjust the coefficient of the preset backward distance, is the attenuation coefficient, is the speed influence factor, is the environmental complexity factor; Under different scenarios, the preset backward distance is automatically adjusted according to the speed, the distance to the obstacle, and the environmental complexity, improving adaptability and avoiding unnecessary long-distance backward movement to improve efficiency.
[0031] In some embodiments, the above step B2 includes: 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 above to perform path planning on 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; The above total cost includes speed cost, the cost of the straight line to the current target point, obstacle cost, left-right direction cost, and lateral camera information cost; The above speed cost is that the greater the linear speed, the smaller the cost, expressed as , with the goal of enabling the self-mobile device to adopt a higher linear speed , to improve efficiency; The above 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 between the current position and the current target point, the greater the cost, expressed as ; is the perpendicular distance from the end point of the trajectory to the target line, with the goal of enabling the self-mobile device to travel as straight as possible; The above 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, expressed as: ; If the candidate trajectory collides with an obstacle, directly discard the candidate trajectory, otherwise the farther away from the obstacle, the obstacle cost is lower; 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 smallest, expressed as , with the goal of enabling the self-mobile device to select a path that is as balanced as possible left and right to improve the smoothness of the trajectory; The above lateral camera information cost is that the closer the distance to the obstacle, the higher the cost, expressed as ; is the closest obstacle distance detected by the lateral camera. For each candidate trajectory, the above total cost is: Among them, is the total cost, are respectively the corresponding weights; The calculation method of ( 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 minimum value and the maximum value corresponding to
[0032] 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 non - adaptability to multiple scenarios, inflexible path control and easy trajectory jitter when using fixed weights or calibrating weights through experiments.
[0033] In some embodiments, referring to Figure 3 , the above - mentioned step B3 includes: Step B301: Move forward 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, execute 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, execute step B302. If the dead - angle logic is not triggered, execute step B303; Specifically, the above collision adjustment can be performed by rotating a first preset angle after retreating a first preset distance (applicable to narrow channels or frontal collisions), or moving laterally a second preset distance after rotating a second preset angle (applicable to edge collisions), or rotating a third preset angle in place after stopping (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.3 m to 0.5 m, the second preset distance is 0.1 m to 0.2 m, the first preset angle is 30° to 45°, the second preset angle is 10° to 15°, and the third preset angle is 90° to 180°. The above dead angle adjustment can be performed by rotating a fourth preset angle after retreating a fourth preset distance, or retreating a fifth preset distance; the fourth preset distance ≤ the fifth preset distance. For example, the fourth preset distance is 0.3 m to 0.5 m, and the fifth preset distance is 0.5 m to 1. Step B302: Determine 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 for 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. If so, execute step 3 above. Otherwise, return to step B1 to 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 constraint of the self-mobile device (step B101). Specifically, to avoid staying in a difficult-to-pass area for a long time, the maximum obstacle avoidance time is set to 200 s in this embodiment. In other embodiments, the maximum obstacle avoidance time can be set according to the obstacle density. 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). 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.
[0034] The present invention adapts to obstacle avoidance in complex terrains by connecting 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 avoidance time constraint to avoid falling into an infinite loop.
[0035] In some embodiments, the above step B301 includes: Step B3011: Advance along the optimal candidate trajectory, and at the same time determine whether the anti-collision strip is triggered. If so, execute step B3012; otherwise, execute step B302. Step B3012: Perform collision adjustment, and then execute Step B302. The collision adjustment can specifically adopt the method of Step B301 above, which will not be elaborated here. Step B3013: Determine whether the dead-end logic is triggered. Specifically, determine whether at least two of the following conditions are met. If so, trigger the dead-end logic and execute Step B3014; otherwise, execute Step B302. 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 end or spinning. It can be expressed as: and , , preset ratio ; Condition 2: Obstacles are continuously detected within the detection time window, indicating that the self-mobile device cannot effectively avoid obstacles in a short time. The detection time window ranges from [2s, 5s]. Condition 3: The displacement of the self-mobile device is less than the minimum displacement threshold within the displacement time window, indicating that the self-mobile device cannot effectively move in a short time and may be trapped due to terrain or obstacle restrictions. The displacement time window ranges from [2s, 4s], and the minimum displacement threshold ranges from [0.05m, 0.2m]. 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 the logical robustness. The three conditions can adjust the parameter ranges separately to adapt to different devices and scenarios, and are triggered only when at least two conditions are met to avoid frequent adjustments caused by misjudgment. Step B3014: Determine whether the number of dead-end adjustments for the current target point is greater than the corresponding limit number. If so, return to Step 1; otherwise, perform dead-end adjustment, increment the number of dead-end adjustments for the current target point by 1, and then execute Step B302. The dead-end adjustment can specifically adopt the method of Step B301 above, which will not be elaborated here.
[0036] Before the dead-end adjustment, the present invention introduces the judgment of exceeding the limit number of dead-end adjustments and triggers the global path re-planning (return to the initial path generation) to avoid local deadlocks.
[0037] In some embodiments, in Step 1, the above-mentioned multiple cameras include a front binocular camera and two side cameras; in other embodiments, the number of side cameras can also be other numbers. Refer to Figure 4, The method for real-time updating of the 2D grid map of the target area by using multiple cameras installed on the self-moving device includes the following steps: 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-view consistency; Step A2: Calculate the depth information of the aligned video frames of the forward binocular camera and the two 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; Specifically, due to the different installation positions and angles of the forward binocular camera and the two side cameras, first convert the 3D point cloud data of the forward binocular camera and the two side cameras from the camera coordinate system where they are located to the device coordinate system, and then fuse the 3D point cloud data of the forward binocular camera and the two side cameras into a unified point cloud map 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.
[0038] 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 body coordinate system of the self-moving device.
[0039] In some embodiments, the above Step A2 includes: Calculate the disparity map of the left and right image pairs in the aligned video frames of the forward binocular camera, and 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 camera external parameters of the forward binocular camera, and use the calibration mapping table to calibrate the left and right image pairs in the aligned video frames of the forward binocular camera, and 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 camera external parameters of the forward binocular camera to convert the disparity map into the forward binocular point cloud; Use a depth estimation model to infer the depth information of the monocular images in the video frames after aligning each side camera; then, according to the depth information and the camera intrinsics, calculate the corresponding monocular depth point cloud. Specifically, normalize the pixel values of the monocular images in the video frames after aligning each side camera, adjust the image size, and then input them into the depth estimation model to output a depth map. Traverse each pixel of the depth map and use the camera intrinsics of each side camera to calculate the corresponding 3D points. Concatenate the obtained 3D points into a point cloud format to obtain the corresponding monocular depth point cloud. Construct 3D point cloud data from the forward binocular point cloud and the two monocular depth point clouds. It should be noted that the above stereo matching algorithm can adopt algorithms such as SGBM (Semi-Global Matching); the above depth estimation model can adopt, for example, Monodepth2 or MiDaS (Mixed Data Sampling Regression Models), etc.
[0040] In some embodiments, referring to Figure 5 , step A3, the above 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. It can be expressed as: 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; Since the monocular depth estimation error is large, 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. It can be expressed as: 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; Step A302: Determine 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. The confidence of the corrected monocular depth point cloud after the above calculation is as follows: Among them, is the confidence of the corrected monocular depth point cloud, is the depth difference influence factor, which is used to control the attenuation speed, is the absolute value of the depth difference, ; 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; Until the fusion is completed; After step A303, the fused 3D point cloud is obtained; When multiple monocular depth point clouds are relatively reliable (such as simple terrain and few occlusions), the above fusion can also be directly superimposed to enhance real-time performance and reduce computational overhead; In some embodiments, referring to Figure 6 , 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 parameters such as the origin, resolution, and map size 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 to improve the accuracy and stability of the 2D grid map; It can be expressed as: Among them, is the Log-Odds value of the grid at times t + 1 and t , is the row and column index of the 2D grid map; is the original occupancy probability value of the grid (corresponding to time t); 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; 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. 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. 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. 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, do not change it to improve the safety obstacle avoidance effect. Step A404: Update the 2D grid map of the target area to the 2D grid map obtained in step 403.
[0041] The present invention realizes the purpose of significantly improving the map robustness through a four - level cascaded denoising mechanism. By filtering with a confidence threshold, directly eliminating low - probability grids (step A4031), detecting neighborhood noise to remove isolated points (step A4032), filtering by connected region area to remove small - area interferences (step A4033), and dynamically expanding the low - confidence region to expand and label the periphery of occupied grids (step A4034).
[0042] In some embodiments, in step 1, the above - mentioned multiple cameras include a forward binocular camera and two side cameras. The 2D grid map of the target area is updated in real time through multiple cameras set on the self - moving device, including the following steps: 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 - perspective consistency. 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. Meanwhile, use a target detection model (such as YOLOv5 or SSD (Single Shot MultiBox Detector)) to perform obstacle detection on the video frames of each side camera, and extract obstacle features, including position (center point of the bounding box), orientation angle, and distance; 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 first plane segmentation and then clustering segmentation. The above plane segmentation is to remove the horizontal ground and horizontal obstacles through RANSAC (RANdom SAmple Consensus) and retain the vertical obstacles. The above clustering segmentation is to extract discrete independent obstacles through DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering or KD-Tree (k-dimensional tree) segmentation to reduce redundant data; 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, calibrate each blind area compensation region according to the obstacle features in step A´2. 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 an obstacle as free and with low confidence; Step A´4: Project the 3D point cloud data obtained in step A´3 onto the 2D grid map of the target area, and overlay the blind area compensation region obtained in step A3 onto the 2D grid map of the target area to complete the update of the 2D grid map of the target area; Specifically, the above 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~A403; The above overlaying the blind area compensation region obtained in step A3 onto the 2D grid map of the target area includes: converting the point coordinates of the blind area compensation region to the coordinates of the 2D grid map through polar coordinate transformation to obtain the low-confidence occupied area corresponding to the blind area compensation region in the 2D grid map; overlaying the low-confidence occupied area onto the 2D grid map of the target area, and if the same grid has two confidence markings, only retain the high-confidence marking.
[0043] The self - moving 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 - moving device.
[0044] It should be noted that the memory can be a RAM (Random Access Memory), Flash ROM (Flash Read - Only Memory), EEPROM (Electrically Erasable Programmable Read - Only Memory), eMMC (Embedded Multi - Media Card), SD card, etc. The processor can be an ARM Cortex - A (Advanced RISC Machine Cortex - A series) or a DSP (Digital Signal Processor), etc. The self - moving device adopting the path - planning method of the self - moving device in the above - mentioned embodiment can clean weeds or fallen leaves 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 - moving device are the same as those of the path - planning method of the self - moving device provided in the above - mentioned embodiment, and will not be elaborated here.
[0045] 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 - moving device.
[0046] 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-ROM (Compact Disc Read-Only Memory), or any combination of the above media. The above computer program can be used by or in conjunction with an instruction execution system or device. The code of the above computer program can be transmitted using 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: include: Planning an initial path of the mobile device according to the 2D grid map of the target area, obtaining multiple path points on the initial path; setting one of the path points as the current target point of the mobile device; and starting to update the 2D grid map of the target area in real time through multiple cameras on the mobile device; Make the self-moving device move forward along the initial path and detect in real time whether there is an obstacle that exists for a time exceeding the stable detection window; If so, reach the current target point through local obstacle avoidance planning; Otherwise, follow the initial path to reach the current target point; After reaching the current target point, the current target point is updated as the next path point, and the process returns to the step of making the mobile device move forward along the initial path; if the current target point is the end point, the process ends.
2. A path planning method for a self-moving device according to claim 1, characterized in that: The method of reaching the current target point through local obstacle avoidance planning includes: Based on the current speed of the self-moving device, combined with the kinematic model and acceleration constraints of the self-moving device, the path to the current target point is planned, and at the same time, whether there are obstacles whose existence time exceeds the stable detection window is detected in real time; If there is no obstacle that exists for a time longer than the stable detection window before the path planning is completed, and the obstacle disappears for a time longer than the stable detection window, then the process of making the self-mobile device move forward along the initial path is returned; If there is an obstacle whose existence time exceeds the stable detection window until the end of path planning, it is determined whether there is an optimal candidate trajectory among all candidate trajectories obtained by path planning; If there is an optimal candidate trajectory, move forward along the optimal candidate trajectory to reach the current target point; If there is no optimal candidate trajectory, after performing the backward adjustment, the current speed of the self-moving device is returned, and the path planning for the current target point is performed in combination with the kinematic model and acceleration constraint of the self-moving device; The determining whether there is an optimal candidate trajectory among all candidate trajectories obtained by path planning includes: 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, it is judged that there is no optimal candidate trajectory; The total cost includes speed cost, straight line cost to the current target point, obstacle cost, left and right direction cost and side camera information cost; The speed cost is that the greater the linear speed, the smaller the cost; the cost of the straight line to the current target point is that the greater the distance between the candidate trajectory end point 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, if there is no collision, the cost is inversely proportional to the closest distance to the obstacle; the left and right direction cost is that the greater the angular velocity, the higher the cost, and the angular velocity is zero, the minimum cost; the side camera information cost is that the closer the obstacle is, the higher the cost.
3. A path planning method for a self-moving device according to claim 2, characterized in that: For each candidate trajectory, the total cost is: ; in, is the total cost, They are speed cost, straight line cost to current target point, obstacle cost, left and right direction cost and side camera information cost. They are The corresponding weights; The calculation method is as follows, =1,2,3,4,5: in, for The corresponding base value; is the obstacle density, = number of obstacle point clouds / scanning area; for The regulatory factors; for The adjustment coefficient of Line speed 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, for The historical mean of , They are The corresponding minimum and maximum values.
4. A path planning method for a self-moving device according to claim 2 or 3, characterized in that: The method of advancing along the optimal candidate trajectory to reach the current target point includes: Advance along the optimal candidate trajectory, and determine whether the anti-collision bar is triggered. If the anti-collision bar is triggered, perform collision adjustment. If the anti-collision bar is not triggered, determine whether the blind spot logic is triggered. If the blind spot logic is triggered, perform blind spot adjustment. If the blind spot logic is not triggered, determine whether the current target point is reached. If the current target point is reached, end the process of advancing along the optimal candidate trajectory and reach the current target point. If the current target point is not reached, return to the process of determining whether the anti-collision bar is triggered. After the collision adjustment and blind spot adjustment are completed, it is determined whether the obstacle avoidance time exceeds the limit; if it exceeds the limit, the current target point is updated to the next path point, and the process is returned to make the self-moving device move forward along the initial path. If the current target point is the end point, the process is terminated; if it does not exceed the limit, the process is returned based on the current speed of the self-moving device, combined with the kinematic model and acceleration constraints of the self-moving device, to plan the path for the current target point; The obstacle avoidance time is reset each time the path planning for the current target point is performed based on the current speed of the self-moving device in combination with the kinematic model and acceleration constraints of the self-moving device.
5. A path planning method for a self-moving device according to claim 4, characterized in that: The determination of whether the blind spot logic is triggered includes: Determine whether at least two of the following conditions are met. If so, the blind spot logic is triggered and the blind spot adjustment is performed; otherwise, the blind spot logic is not triggered; Condition 1: The current angular velocity of the mobile device exceeds the preset ratio of the maximum angular velocity , and the current line speed is less than the preset ratio of the maximum line speed ; 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 the blind spot adjustment is performed, it is first determined whether the number of blind spot adjustments for the current target point exceeds the limit. If so, the initial path planned according to the 2D grid map of the target area is returned. Otherwise, the blind spot adjustment is performed, and the number of blind spot adjustments for the current target point is increased by 1.
6. A path planning method for a self-moving device according to claim 4, characterized in that: The back-off adjustment comprises: first determining whether the back-off adjustment times of the current target point exceed the limit, if so, returning to the initial path planned according to the 2D grid map of the target area, otherwise backing off by a preset back-off distance; The preset retreat distance is a fixed value or dynamically adjusted; The dynamic adjustment includes: Set the preset back-off distance to be equal to the sum of the minimum back-off distance, the increment adjusted according to the obstacle distance, the increment adjusted according to the linear speed, 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 speed of the self-moving device is faster; The increment adjusted according to the linear speed becomes larger when the linear speed of the self-moving device is larger; The increment adjusted according to the complexity of the environment is larger when the density of obstacles is higher.
7. A path planning method for a self-moving device according to claim 1, characterized in that: The multiple cameras include a forward-facing binocular camera and multiple side-facing cameras; The method of updating the 2D grid map of the target area in real time by using multiple cameras set on the mobile device includes: Step A1: enabling a forward binocular camera and multiple side cameras on a mobile device to collect video frames in real time, and aligning a video frame sequence according to a synchronization signal to obtain aligned video frames; Step A2: Calculate the depth information of the aligned video frames of the forward binocular camera and the multiple side cameras, and then convert the depth information into 3D point cloud data; Step A3, using external parameter calibration to convert the 3D point cloud data obtained in step A2 from the camera coordinate system to the device coordinate system, and then fuse the 3D point cloud data to obtain a 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.
8. A path planning method for a self-moving device according to claim 7, characterized in that: In step A2, the 3D point cloud data includes a forward binocular point cloud obtained by aligning the video frames of the forward binocular camera, and a plurality of monocular depth point clouds obtained by aligning the video frames of the plurality of lateral cameras; In step A3, the fusion includes: Step A301: taking the forward binocular point cloud as the main input, and calculating the forward binocular point cloud confidence according to the most recent acceptable depth and the depth of the forward binocular point cloud; 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; Step A302, determine whether the absolute value of the depth difference between the overlapping area of 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, fusing the forward binocular point cloud with each monocular depth point cloud, and judging whether the confidence of the forward binocular point cloud is greater than the corresponding preset value during fusion, if so, using the forward binocular point cloud, otherwise judging whether the confidence of the monocular depth point cloud is greater than the corresponding preset value, if so, using the monocular depth point cloud; otherwise, abandoning the fusion, marking it as an uncertain area, and waiting for the next update; Until fusion is complete.
9. A path planning method for a self-moving device according to claim 8, characterized in that: The step A4 comprises: Step A401, extract the (x, y, z) coordinates of the fused 3D point cloud, set the z filter range, perform height filtering, and obtain 2D projection points; and obtain the 2D grid map row and column indexes 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 determine whether the grid is occupied or idle according to the row and column index of the 2D grid map obtained in step A401, convert the determination result into an update amount, and then add it to the original occupancy probability value as the new occupancy probability value of the current grid; Step A403, denoising and correcting 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.
10. A path planning method for a self-moving device according to claim 9, characterized in that: The step A403 includes: Step A4031: 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 idle; Step A4032: for each grid marked as occupied, determine whether the number of occupied points in the grid area is less than a preset value. If so, determine it as an isolated noise point and mark the grid as free. Otherwise, keep it as occupied. Step A4033, mark all connected occupied areas, calculate the number of occupied grids of each connected area; determine whether the number of occupied grids of each connected area is less than a preset threshold, if so, mark all grids of the connected area as free; otherwise, do not change the mark of the connected area; Step A4034: for each grid marked as occupied, expand one grid in all directions; determine whether each expanded grid is idle, if so, mark the expanded grid as occupied and with low confidence, otherwise do not change it.
11. A self-propelled device, characterized in that: It includes a memory, a processor, and a path planning program stored in the memory and executable on the processor, wherein the path planning program is configured to implement the steps of the path planning method for a self-mobile device as described in any one of claims 1 to 10.
12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the path planning method for a mobile device as described in any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Mobile robot intelligent path planning method
CN112631294A
Local path planning method and system for unmanned vehicle
CN114200926A
Path and local prediction collision avoidance planning method of efficient warehouse-in and warehouse-out system
CN116203968A
Inspection unmanned aerial vehicle autonomous obstacle avoidance method, system and device, and storage medium
CN119440090A
Path planning method for robot, electronic device, and computer-readable storage medium
WO2023130766A1
Cited By
Intelligent mechanical arm path planning method based on data processing
CN120886270A