Path planning method and system for obstacle avoidance of humanoid robot
Through dual-view monocular visual positioning and dynamic detection and branch extended path planning algorithm, multi-sensor data is integrated, and the obstacle recognition accuracy and real-time and flexibility of path planning of humanoid robots are improved, and the problem of obstacle avoidance in complex environments is solved. , realize efficient and safe path planning.
Patent Information
- Application Number
- CN202411246648.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-06
AI Technical Summary
The existing humanoid robot environment perception and path planning methods are insufficient in precision, real-time and flexibility in complex environments, making it difficult to accurately identify obstacles and plan effective obstacle avoidance paths, especially in dynamic and changeable environments.
Using dual-view monocular visual positioning combined with adaptive threshold segmentation method and regional growth-based obstacle segmentation algorithm, multi-sensor data is integrated to improve obstacle recognition accuracy and real-time path planning and path planning. flexibility.
It significantly improves the accuracy of obstacle identification and the efficiency and safety of path planning, and can achieve efficient obstacle avoidance and stable walking in complex environments, solving the shortcomings of real-time and flexibility in the prior art.
Smart Images

Figure CN119088030A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of humanoid robots, and in particular to a path planning method and system for obstacle avoidance of a humanoid robot. Background Art
[0002] Humanoid robots are one of the important research directions of modern robots. People have high expectations for humanoid robots, hoping that they can be similar to humans in terms of morphology, movement, perception, etc., and have certain logical thinking abilities, so that they can autonomously complete certain tasks in the human living environment and achieve humanized interaction. The core research directions of humanoid robots include environmental cognition and motion control, among which environmental cognition ability is the basis of its autonomous decision-making ability, and motion ability is the main way for it to respond to external environmental information.
[0003] In terms of environmental cognition, commonly used sensors include sonar, laser rangefinders, and panoramic cameras. These sensors can help humanoid robots obtain the geometric position and orientation information of the surrounding environment. However, existing environmental cognition technologies face the following shortcomings: (1) The limitations of a single sensor. Different sensors have their own advantages and disadvantages in terms of perception accuracy, perception range, and environmental adaptability. For example, laser rangefinders work better in indoor environments, but are easily disturbed by light in outdoor environments. Although panoramic cameras can provide a wide range of visual information, they have high computing requirements when processing complex images. (2) The coupling problem of environmental cognition and motion control. The movement ability of humanoid robots requires the coordinated movements of various joints of the body and the adjustment of the center of gravity to maintain stability. Existing technologies often find it difficult to simultaneously take into account accurate environmental perception and stable gait generation in complex environments. (3) The complexity of autonomous obstacle avoidance path planning. In dynamic and unknown environments, humanoid robots need to perceive obstacles in real time and plan obstacle avoidance paths. Existing path planning methods often rely on pre-set rules and lack dynamic adjustment capabilities, making it difficult to cope with complex and changing environments.
[0004] Existing environmental perception and path planning methods have the following deficiencies when faced with complex environments: (1) Insufficient accuracy. The environmental information provided by a single sensor may be insufficiently accurate or incomplete, resulting in inaccurate obstacle identification and positioning, which affects the effectiveness of path planning. (2) Insufficient real-time performance. Existing path planning algorithms have poor real-time performance when dealing with dynamic environmental changes and are unable to quickly adapt to environmental changes, which can easily cause robots to collide or fail to avoid obstacles in a timely manner. (3) Insufficient flexibility. Existing path planning methods usually lack flexibility and cannot effectively cope with complex and dynamic environments. In particular, when faced with multiple obstacles or complex terrain, the reliability and effectiveness of path planning are limited. Summary of the invention
[0005] In view of this, the purpose of an embodiment of the present invention is to provide a path planning method and system for obstacle avoidance of a humanoid robot, which improves the accuracy of obstacle recognition and environmental perception by integrating multiple advanced algorithms, and realizes efficient obstacle avoidance and stable walking of a humanoid robot in a complex environment by comprehensively considering multiple factors such as environmental perception, path planning and motion control.
[0006] The embodiment of the present invention is achieved as follows:
[0007] A path planning method for humanoid robot obstacle avoidance, comprising:
[0008] An environment image of the humanoid robot is acquired, and the environment image is processed using an adaptive threshold segmentation method to obtain an obstacle area and an obstacle-free area.
[0009] The obstacle contour box is identified using the obstacle segmentation algorithm based on region growing.
[0010] Using the dual-view monocular vision positioning method, the position coordinates of the obstacle in space are calculated.
[0011] The path planning result is obtained by using dynamic detection and branch expansion path planning algorithm.
[0012] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the step of obtaining an environmental image of the humanoid robot and processing the environmental image using an adaptive threshold segmentation method to obtain an obstacle area and an obstacle-free area includes:
[0013] The humanoid robot is equipped with two monocular cameras to collect environment images respectively and obtain the left view image I L (x, y) and the corresponding right view image I R (x,y).
[0014] Through image calibration and stereo matching, the left-view image and the corresponding right-view image are fused to obtain a fused image I F (x,y).
[0015] Calculate the adaptive segmentation threshold size of the fused image Where W(i,j) is a custom local window, μ W(i,j) is the mean grayscale value of pixels in the custom local window, σ W(i,j) is the standard deviation, k is the adjustment factor, and σ0 is the global standard deviation reference value.
[0016] For each pixel (x, y) in the fused image, if the gray value is greater than the adaptive segmentation threshold, it is classified into the obstacle-free area, otherwise it is classified into the obstacle area, and the obstacle area R is obtained.obs and barrier-free area R free .
[0017] Its technical effects are: through the image fusion of the left and right monocular cameras, the accuracy and robustness of image processing are improved, especially in complex lighting conditions and occlusion conditions; an adaptive threshold formula based on local statistical characteristics is introduced, combined with the local mean and standard deviation of the image, so that the threshold can be dynamically adjusted to adapt to different environmental changes, thereby improving the accuracy of obstacle and obstacle-free area segmentation; by adjusting the adjustment factor k and the global standard deviation reference value σ0, the dynamic change range of the threshold is finely controlled, thereby accurately controlling the segmentation result.
[0018] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the obstacle segmentation algorithm based on region growing is used to identify and obtain the obstacle contour frame, which includes:
[0019] In the obstacle area R obs In the above example, we select several seed points S = {s1, s2, ..., s n}.
[0020] Starting from each of the seed points, the surrounding pixel points are incorporated into the dynamic region based on the region dynamic growth threshold and the morphological feature constraint value.
[0021] The dynamic growth threshold of the region is τ(a,b)=α·|I(s)-I(a,b)|+β·ΔI, where I(s) is the grayscale value of the initial seed point, ΔI is the average grayscale difference, and α and β are control parameters.
[0022] The morphological feature constraint value is in, is the edge strength, θ(x,y) is the texture direction, γ and δ are weight coefficients, θ seed is the main texture direction of the dynamic area.
[0023] When the boundary pixel points of the dynamic region growth no longer meet the region dynamic growth threshold or the morphological feature constraint value or exceed the maximum growth radius R max When , the growth stops and the complete obstacle area is obtained.
[0024] For the complete obstacle area, edge detection is performed based on the edge points of the area. Calculate the minimum bounding rectangle of each obstacle area Among them, x min ,x max ,y min ,y maxThe minimum and maximum boundary coordinates of the complete obstacle area are obtained to obtain the obstacle contour box of each obstacle area.
[0025] Its technical effects are: in the process of region growing, by dynamically adjusting the threshold to adapt to different grayscale changes, the accuracy and adaptability of segmentation are improved; the introduction of edge strength and texture direction as growth constraints makes the segmentation process more consistent with the morphological characteristics of obstacles in actual scenes; the multi-criteria growing method combining pixel similarity, position proximity and morphological characteristics significantly improves the robustness and accuracy of region segmentation.
[0026] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the use of a dual-view monocular vision positioning method to calculate the position coordinates of the obstacle in space includes:
[0027] For the fused image I of the specified obstacle F (x, y), according to the obstacle contour box E of the obstacle area i (x i ,y i ,w i ,h i ), determine the coordinates of the obstacle center point in,
[0028] Calculate the horizontal offset of the obstacle center point to get the parallax
[0029] Calculate the depth of the center point of the obstacle Where f is the focal length of the camera and H is the baseline distance of the camera.
[0030] Calculate the position coordinates (X i ,Y i ,Z i ),in, is the optical center coordinate of the fused image plane.
[0031] Its technical effect is: by fusing images from the left and right perspectives, using stereo matching and parallax calculation, the accuracy of obstacle positioning is improved, which is especially suitable for obstacle identification in complex environments. Combined with precise stereo matching after image calibration, it ensures high precision of triangulation, thereby improving the accuracy of obstacle spatial positioning. In complex environments, the three-dimensional spatial coordinates of obstacles can be accurately calculated through a dual-perspective monocular vision system, providing accurate location information for subsequent path planning.
[0032] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the path planning result obtained by using the dynamic detection and branch extension path planning algorithm includes:
[0033] Using a dynamic detection algorithm, detection nodes for detecting obstacles and free areas are generated on the forward path of the humanoid robot.
[0034] The best one among the detection nodes is selected as a temporary target point, so as to make the humanoid robot move in the direction of the temporary target point.
[0035] A branch-and-extend path planning algorithm is used to generate and select an optimal path from the current position of the humanoid robot to a target position, thereby obtaining a path planning result.
[0036] Its technical effect is: by combining dynamic detection point distribution, fuzzy logic target selection and branch expansion path planning, the intelligence, efficiency and robustness of the humanoid robot's obstacle avoidance path planning in complex environments are improved.
[0037] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the use of a dynamic detection algorithm to generate detection nodes for detecting obstacles and idle areas on the forward path of the humanoid robot includes:
[0038] According to the current position P of the humanoid robot r =(X r ,Y r ,Z r ) and the target position P g =(X g ,Y g ,Z g ), generate a r and the target position P g The three-dimensional detection area V d ={(X,Y,Z)|X r ≤X≤X g ,Y r ≤Y≤Y g ,Z r ≤Z≤Z g}.
[0039] In the three-dimensional detection area V d Several detection nodes are generated in the process to detect obstacles and idle areas. The generation formula of candidate points of each detection node is P i' =P r +Δ i' , we get the candidate point set C = {P i' ∣P i' ∈Vd}, where Δ i' =(ΔX i' ,ΔY i' ,ΔZ i' ) is the current position P r The displacement increment to the detection node.
[0040] Its technical effect is that the detection node generation algorithm fully considers the movement characteristics of the humanoid robot in three-dimensional space. It not only generates detection nodes on the plane, but also introduces the consideration of height dimension, making the algorithm more adaptable in complex three-dimensional environments. Unlike the traditional fixed node generation method, this algorithm dynamically adjusts the position of the detection node to make it more in line with the robot's current motion state and environmental changes, thereby improving the accuracy and efficiency of detection.
[0041] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the step of selecting the best among the detection nodes as a temporary target point for moving the humanoid robot toward the temporary target point comprises:
[0042] Generate detection node priority function Among them, θ i' is the current position P r The deviation of the line of sight, cos(θ i' ) is the direction priority of the detection node, w1 and w2 are weight parameters, |P g -P i' | is the distance from the detection node to the target location.
[0043] According to the detection node priority function F(P i' ), select the detection node with the highest priority as the temporary target point P d , used to make the humanoid robot move towards the temporary target point P d direction of movement.
[0044] Its technical effect is: through the custom priority function F(P i' ), in the selection of detection nodes, multiple factors such as distance and direction deviation are comprehensively considered to ensure that the final selected detection nodes can better serve the needs of path planning. Compared with the existing technology, it has obvious advantages, especially in complex and dynamically changing environments. Humanoid robots can generate detection nodes more accurately and quickly, thereby realizing efficient obstacle avoidance path planning.
[0045] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the use of a branch-and-expand path planning algorithm to generate and select an optimal path from the current position of the humanoid robot to the target position, and obtaining a path planning result includes:
[0046] From the current position P r Starting from the temporary target point P d For the direction, generate from the current position P r To the temporary target point P d Several potential paths, and the path branch set B = {B h}, where the calculation formula for each path branch is B h (t) = P r +t·(P d -P r )+Δ h (t), t∈[0,1] is the path parameter, Δ h (t) is the path offset.
[0047] Define a path feasibility function for evaluating the pros and cons of each path branch Among them, L(B h ) is the path branch B h The total length, σ(O h' ,B h ) is the path branch B h With the obstacle O h' The minimum distance, S(B h ) is the path branch B h The smoothness, and is the weight coefficient.
[0048] If the path branch B h With the obstacle O h' The minimum distance σ(O h' ,B h ) is less than a preset safety distance threshold, then the path branch B h Generate extended path branch B h ′(t)=B h (t)+ò·n(t), where ò is the expansion step and n(t) is the path normal vector.
[0049] For each of the extended path branches B h ′(t), update the extended path feasibility function C(B h ′), update the path branch set B = {B h ′}.
[0050] Select the updated extended path feasibility function C(B h ′) has the smallest value. opt As the best path from the current position of the humanoid robot to the target position, Get the path planning result.
[0051] The technical effect is that the branch expansion path planning algorithm of the present invention dynamically expands the path branches during the path generation process and selects the best path through optimization evaluation, which can better adapt to the complex and dynamically changing environment. Different from the traditional path planning algorithm, by introducing the comprehensive feasibility evaluation function C(B h ), not only the path length is considered, but also factors such as obstacle distance and path smoothness are combined to improve the safety and efficiency of the path. Through the generation and expansion of the initial path branches, the path is diversified and optimized, so that the humanoid robot can adjust the path at any time to adapt to environmental changes during the forward process. When generating the path, the path direction and length are dynamically adjusted to avoid falling into the local optimum. At the same time, a variety of factors are comprehensively considered for path optimization, ensuring the efficient obstacle avoidance and path planning capabilities of the humanoid robot in complex environments.
[0052] A path planning system for humanoid robot obstacle avoidance, comprising:
[0053] The environment image processing module is used to obtain the environment image of the humanoid robot, and use an adaptive threshold segmentation method to process the environment image to obtain an obstacle area and an obstacle-free area.
[0054] The obstacle contour frame segmentation module is used to use the obstacle segmentation algorithm based on region growing to identify the obstacle contour frame.
[0055] The obstacle positioning module is used to calculate the position coordinates of the obstacle in space using a dual-view monocular vision positioning method.
[0056] The path planning module is used to obtain the path planning result by using the dynamic detection and branch expansion path planning algorithm.
[0057] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the path planning method for obstacle avoidance of a humanoid robot as described above.
[0058] The beneficial effects of the present invention are:
[0059] The present invention effectively integrates multi-sensor data through dual-view monocular vision positioning and an obstacle segmentation algorithm based on region growing. It can accurately identify obstacle areas and obstacle-free areas through adaptive threshold segmentation and stereo matching, greatly improving the accuracy of obstacle recognition. Compared with traditional methods, it can better cope with complex environmental changes.
[0060] The present invention adopts a dynamic detection algorithm to generate detection nodes at key positions of the robot's forward path, so as to detect obstacles and idle areas ahead in real time. By introducing a priority function, the optimal temporary target point can be dynamically selected, so that the robot can flexibly avoid obstacles in complex environments. Combined with the branch extension path planning algorithm, multiple potential paths can be generated while ensuring real-time performance, the optimal path can be selected and dynamically adjusted, which solves the deficiency of the prior art that it is difficult to flexibly respond in a dynamic environment.
[0061] The path feasibility function proposed in the present invention not only takes into account the path length, but also comprehensively considers the minimum distance between the path and obstacles and the smoothness of the path, and can generate a safer and smoother travel path. The introduction of extended path branches enables the rapid generation of alternative paths when the initial path is unsafe, which greatly improves the effectiveness and safety of path planning and solves the problem of unstable path planning in complex terrain in the prior art.
[0062] The present invention provides a path planning method and system for humanoid robot obstacle avoidance. Through the integration and optimization of multiple advanced algorithms, significant improvements are achieved in environmental perception, path planning, real-time and flexibility, safety, and system scalability, which makes up for many deficiencies of the existing technology and provides an efficient and reliable solution for the autonomous obstacle avoidance of humanoid robots in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0064] Figure 1 The figure is a flow chart of the path planning method for obstacle avoidance of a humanoid robot according to the present invention. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below 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, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0066] Please refer to Figure 1 The first embodiment of the present invention provides a path planning method for obstacle avoidance of a humanoid robot, which includes: acquiring an environmental image of the humanoid robot, processing the environmental image using an adaptive threshold segmentation method to obtain an obstacle area and an obstacle-free area; using an obstacle segmentation algorithm based on region growing to identify an obstacle contour frame; using a dual-view monocular vision positioning method to calculate the position coordinates of the obstacle in space; and using a dynamic detection and branch extension path planning algorithm to obtain a path planning result.
[0067] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the step of obtaining an environmental image of the humanoid robot and processing the environmental image using an adaptive threshold segmentation method to obtain an obstacle area and an obstacle-free area comprises: equipping the humanoid robot with two monocular cameras, respectively collecting environmental images, and obtaining a left-view image I L (x, y) and the corresponding right view image I R (x, y); through image calibration and stereo matching, the left view image and the corresponding right view image are fused to obtain a fused image I F (x, y); Calculate the adaptive segmentation threshold size of the fused image Where W(i,j) is a custom local window, μ W(i,j) is the mean grayscale value of pixels in the custom local window, σ W(i,j) is the standard deviation, k is the adjustment factor, σ0 is the global standard deviation reference value; for each pixel (x, y) in the fused image, if the gray value is greater than the adaptive segmentation threshold, R free ={(x,y)|I F (x, y)>T(i, j)}, it is classified into the obstacle-free area, otherwise, the gray value is less than the adaptive segmentation threshold R obs ={(x,y)|I F (x,y)≤T(i,j)}, classified into obstacle area, and obtained obstacle area R obs and barrier-free area R free .
[0068] Its technical effects are: through the image fusion of the left and right monocular cameras, the accuracy and robustness of image processing are improved, especially in complex lighting conditions and occlusion conditions; an adaptive threshold formula based on local statistical characteristics is introduced, combined with the local mean and standard deviation of the image, so that the threshold can be dynamically adjusted to adapt to different environmental changes, thereby improving the accuracy of obstacle and obstacle-free area segmentation; by adjusting the adjustment factor k and the global standard deviation reference value σ0, the dynamic change range of the threshold is finely controlled, thereby accurately controlling the segmentation result.
[0069] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the obstacle segmentation algorithm based on region growing is used to identify the obstacle contour frame, which includes: in the obstacle region R obs In the above example, we select several seed points S = {s1, s2, ..., s n}, select the seed points located in the high confidence part of the obstacle area, with the center point of the area or the position with the largest grayscale value as the reference; starting from each of the seed points, based on the regional dynamic growth threshold and the morphological feature constraint value, the surrounding pixels are included in the dynamic area; the regional dynamic growth threshold is τ(a,b)=α·|I(s)-I(a,b)|+β·ΔI, where I(s) is the grayscale value of the initial seed point, ΔI is the average grayscale difference, which is obtained by calculating the difference between the grayscale mean of the current area and the grayscale value of the newly added pixel, and α and β are control parameters; the morphological feature constraint value is Used to determine whether the new pixel point meets the morphological characteristics of the region, where: is the edge strength, θ(x,y) is the texture direction, γ and δ are weight coefficients, θ seed is the main texture direction of the dynamic area; when the boundary pixel points of the dynamic area growth no longer meet the dynamic growth threshold of the area or the morphological feature constraint value or exceed the maximum growth radius R max When , the growth stops, and a complete obstacle area is obtained; edge detection is performed on the complete obstacle area, and the edge points of the area are Calculate the minimum bounding rectangle of each obstacle area Among them, x min ,x max ,y min ,y max The minimum and maximum boundary coordinates of the complete obstacle area are obtained to obtain the obstacle contour box of each obstacle area.
[0070] Its technical effects are: in the process of region growing, by dynamically adjusting the threshold to adapt to different grayscale changes, the accuracy and adaptability of segmentation are improved; the introduction of edge strength and texture direction as growth constraints makes the segmentation process more consistent with the morphological characteristics of obstacles in actual scenes; the multi-criteria growing method combining pixel similarity, position proximity and morphological characteristics significantly improves the robustness and accuracy of region segmentation.
[0071] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the use of a dual-view monocular vision positioning method to calculate the position coordinates of the obstacle in space includes: for the fused image I of the specified obstacle F (x, y), according to the obstacle contour box E of the obstacle area i (x i ,y i ,w i ,h i ), determine the coordinates of the obstacle center point in, Calculate the horizontal offset of the obstacle center point to get the parallax Calculate the depth of the obstacle center point Where f is the focal length of the camera, H is the baseline distance of the camera, which refers to the distance between the left and right cameras; the position coordinates of the center point of the obstacle in space (X i ,Y i ,Z i ),in, is the optical center coordinate of the fused image plane, and the center point of the image can be selected.
[0072] Its technical effect is: by fusing images from the left and right perspectives, using stereo matching and parallax calculation, the accuracy of obstacle positioning is improved, which is especially suitable for obstacle identification in complex environments. Combined with precise stereo matching after image calibration, it ensures high precision of triangulation, thereby improving the accuracy of obstacle spatial positioning. In complex environments, the three-dimensional spatial coordinates of obstacles can be accurately calculated through a dual-perspective monocular vision system, providing accurate location information for subsequent path planning.
[0073] In a preferred embodiment of the present invention, in the above-mentioned path planning method for obstacle avoidance of a humanoid robot, the use of dynamic detection and branch extension path planning algorithm to obtain the path planning result includes: using a dynamic detection algorithm to generate detection nodes for detecting obstacles and idle areas on the forward path of the humanoid robot; selecting the best one among the detection nodes as a temporary target point to move the humanoid robot toward the temporary target point; using a branch extension path planning algorithm to generate and select the best path from the current position of the humanoid robot to the target position to obtain the path planning result.
[0074] Its technical effect is: by combining dynamic detection point distribution, fuzzy logic target selection and branch expansion path planning, the intelligence, efficiency and robustness of the humanoid robot's obstacle avoidance path planning in complex environments are improved.
[0075] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the use of a dynamic detection algorithm to generate detection nodes for detecting obstacles and idle areas on the forward path of the humanoid robot comprises: according to the current position P of the humanoid robot r =(X r ,Y r ,Z r ) and the target position P g =(X g ,Y g ,Z g ), generate a r and the target position P g The three-dimensional detection area V d ={(X,Y,Z)|X r ≤X≤X g ,Y r ≤Y≤Y g ,Z r ≤Z≤Z g}; In the three-dimensional detection area V d Several detection nodes are generated in the process to detect obstacles and idle areas. The generation formula of candidate points of each detection node is P i' =P r +Δ i' , we get the candidate point set C = {P i' ∣P i' ∈V d}, where Δ i' =(ΔX i' ,ΔY i' ,ΔZ i' ) is the current position P rThe displacement increment to the detection node is dynamically adjusted according to the complexity of the environment and the distribution of obstacles.
[0076] Its technical effect is that the detection node generation algorithm fully considers the movement characteristics of the humanoid robot in three-dimensional space. It not only generates detection nodes on the plane, but also introduces the consideration of height dimension, making the algorithm more adaptable in complex three-dimensional environments. Unlike the traditional fixed node generation method, this algorithm dynamically adjusts the position of the detection node to make it more in line with the robot's current motion state and environmental changes, thereby improving the accuracy and efficiency of detection.
[0077] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the step of selecting the best among the detection nodes as a temporary target point for moving the humanoid robot toward the temporary target point comprises: generating a detection node priority function Among them, θ i' is the current position P r The deviation of the line of sight, cos(θ i' ) is the direction priority of the detection node, w1 and w2 are weight parameters, |P g -P i' | is the distance from the detection node to the target location; according to the detection node priority function F(P i' ), select the detection node with the highest priority as the temporary target point P d , used to make the humanoid robot move towards the temporary target point P d direction of movement.
[0078] Its technical effect is: through the custom priority function F(P i' ), in the selection of detection nodes, multiple factors such as distance and direction deviation are comprehensively considered to ensure that the final selected detection nodes can better serve the needs of path planning. Compared with the existing technology, it has obvious advantages, especially in complex and dynamically changing environments. Humanoid robots can generate detection nodes more accurately and quickly, thereby realizing efficient obstacle avoidance path planning.
[0079] In a preferred embodiment of the present invention, in the above-mentioned path planning method for humanoid robot obstacle avoidance, the branch expansion path planning algorithm is used to generate and select the best path from the current position of the humanoid robot to the target position, and the path planning result is obtained including: r Starting from the temporary target point P d For the direction, generate from the current position P r To the temporary target point P dSeveral potential paths, and the path branch set B = {B h}, where the calculation formula for each path branch is B h (t) = P r +t·(P d -P r )+Δ h (t), t∈[0,1] is the path parameter, Δ h (t) is the path deviation, which indicates the deviation of the path that may be caused by obstacle avoidance or optimization; a path feasibility function is defined for evaluating the pros and cons of each path branch: Among them, L(B h ) is the path branch B h The total length, σ(O h' ,B h ) is the path branch B h With the obstacle O h' The minimum distance, S(B h ) is the path branch B h The smoothness is used to calculate the curvature of the path branch. and is the weight coefficient, which is used to adjust the influence of various factors; if the path branch B h With the obstacle O h' The minimum distance σ(O h' ,B h ) is less than a preset safety distance threshold, then the path branch B h Generate extended path branch B h ′(t)=B h (t)+ò·n(t), where ò is the extension step length, n(t) is the path normal vector (, and the path normal vector is used to adjust the path direction to avoid obstacles; for each of the extended path branches B h ′(t), update the extended path feasibility function C(B h ′), update the path branch set B = {B h '}; Select the updated extended path feasibility function C(B h ′) has the smallest value. opt As the best path from the current position of the humanoid robot to the target position, Get the path planning result, and generate the optimal path B opt It is a set of paths consisting of a series of three-dimensional coordinate points along which the humanoid robot will move, avoid obstacles, and eventually reach the target location.
[0080] The technical effect is that the branch expansion path planning algorithm of the present invention dynamically expands the path branches during the path generation process and selects the best path through optimization evaluation, which can better adapt to the complex and dynamically changing environment. Different from the traditional path planning algorithm, by introducing the comprehensive feasibility evaluation function C(B h ), not only the path length is considered, but also factors such as obstacle distance and path smoothness are combined to improve the safety and efficiency of the path. Through the generation and expansion of the initial path branches, the path is diversified and optimized, so that the humanoid robot can adjust the path at any time to adapt to environmental changes during the forward process. When generating the path, the path direction and length are dynamically adjusted to avoid falling into the local optimum. At the same time, a variety of factors are comprehensively considered for path optimization, ensuring the efficient obstacle avoidance and path planning capabilities of the humanoid robot in complex environments.
[0081] The second embodiment of the present invention provides a path planning system for obstacle avoidance of a humanoid robot, comprising: an environment image processing module, used to obtain an environment image of the humanoid robot, and use an adaptive threshold segmentation method to process the environment image to obtain an obstacle area and an obstacle-free area; an obstacle contour frame segmentation module, used to use an obstacle segmentation algorithm based on region growth to identify an obstacle contour frame; an obstacle positioning module, used to use a dual-view monocular vision positioning method to calculate the position coordinates of the obstacle in space; and a path planning module, used to use a dynamic detection and branch extension path planning algorithm to obtain a path planning result.
[0082] A third embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the path planning method for obstacle avoidance of a humanoid robot as described above is implemented.
[0083] The computer program product of the path planning method and device for obstacle avoidance of a humanoid robot provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0084] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned path planning method for humanoid robot obstacle avoidance, thereby improving the accuracy of obstacle recognition and environmental perception. By comprehensively considering multiple factors such as environmental perception, path planning and motion control, the humanoid robot can achieve efficient obstacle avoidance and stable walking in a complex environment.
[0085] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0086] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A path planning method for obstacle avoidance of a humanoid robot, characterized in that: include: Acquire an environment image of the humanoid robot, and process the environment image using an adaptive threshold segmentation method to obtain an obstacle area and an obstacle-free area; Use the obstacle segmentation algorithm based on region growing to identify the obstacle contour frame; Use the dual-view monocular vision positioning method to calculate the position coordinates of the obstacle in space; The path planning result is obtained by using dynamic detection and branch expansion path planning algorithm.
2. The path planning method for obstacle avoidance of a humanoid robot according to claim 1, characterized in that: The step of obtaining an environment image of the humanoid robot and processing the environment image using an adaptive threshold segmentation method to obtain an obstacle area and an obstacle-free area includes: The humanoid robot is equipped with two monocular cameras to collect environment images respectively and obtain the left view image I L (x, y) and the corresponding right view image I R (x,y); Through image calibration and stereo matching, the left-view image and the corresponding right-view image are fused to obtain a fused image I F (x,y); Calculate the adaptive segmentation threshold size of the fused image Where W(i,j) is a custom local window, μ W(i,j) is the mean grayscale value of pixels in the custom local window, σ W(i,j) is the standard deviation, k is the adjustment factor, and σ0 is the global standard deviation reference value; For each pixel (x, y) in the fused image, if the gray value is greater than the adaptive segmentation threshold, it is classified into the obstacle-free area, otherwise it is classified into the obstacle area, and the obstacle area R is obtained. obs and barrier-free area R free .
3. The path planning method for obstacle avoidance of a humanoid robot according to claim 2, characterized in that: The obstacle segmentation algorithm based on region growing is used to identify the obstacle contour frame, which includes: In the obstacle area R obs In the above example, we select several seed points S = {s1, s2, ..., s n }; Starting from each of the seed points, based on the region dynamic growth threshold and the morphological feature constraint value, surrounding pixel points are included in the dynamic region; The region dynamic growth threshold is τ(a,b)=α·|I(s)-I(a,b)|+β·ΔI, where I(s) is the gray value of the initial seed point, ΔI is the average gray difference, and α and β are control parameters; The morphological feature constraint value is f(a,b)=γ·▽I(x,y)+δ·cos(θ(x,y)-θ seed ), where ▽I(x,y) is the edge strength, θ(x,y) is the texture direction, γ and δ are weight coefficients, and θ seed is the main texture direction of the dynamic area; When the boundary pixel points of the dynamic region growth no longer meet the region dynamic growth threshold or the morphological feature constraint value or exceed the maximum growth radius R max When , the growth stops and the complete obstacle area is obtained; For the complete obstacle area, edge detection is performed based on the edge points of the area. Calculate the minimum bounding rectangle of each obstacle area Among them, x min ,x max ,y min ,y max The minimum and maximum boundary coordinates of the complete obstacle area are obtained to obtain the obstacle contour box of each obstacle area.
4. The path planning method for obstacle avoidance of a humanoid robot according to claim 3, characterized in that: The method of using a dual-view monocular vision positioning method to calculate the position coordinates of the obstacle in space includes: For the fused image I of the specified obstacle F (x, y), according to the obstacle contour box E of the obstacle area i (x i ,y i ,w i ,h i ), determine the coordinates of the obstacle center point in, Calculate the horizontal offset of the obstacle center point to get the parallax Calculate the depth of the obstacle center point Where, f is the focal length of the camera, and H is the baseline distance of the camera; Calculate the position coordinates (X i ,Y i ,Z i ),in, is the optical center coordinate of the fused image plane.
5. The path planning method for obstacle avoidance of a humanoid robot according to claim 1, characterized in that: The path planning result obtained by using the dynamic detection and branch extension path planning algorithm includes: Using a dynamic detection algorithm, generating detection nodes for detecting obstacles and free areas on a forward path of the humanoid robot; Selecting the best one among the detection nodes as a temporary target point, so as to make the humanoid robot move towards the temporary target point; A branch-and-extend path planning algorithm is used to generate and select an optimal path from the current position of the humanoid robot to a target position, thereby obtaining a path planning result.
6. The path planning method for obstacle avoidance of a humanoid robot according to claim 5, characterized in that: The method of using a dynamic detection algorithm to generate detection nodes for detecting obstacles and idle areas on the forward path of the humanoid robot includes: According to the current position P of the humanoid robot r =(X r ,Y r ,Z r ) and the target position P g =(X g ,Y g ,Z g ), generate a r and the target position P g The three-dimensional detection area V d ={(X,Y,Z)|X r ≤X≤X g ,Y r ≤Y≤Y g ,Z r ≤Z≤Z g }; In the three-dimensional detection area V d Several detection nodes are generated in the process to detect obstacles and idle areas. The generation formula of candidate points of each detection node is P i' =P r +Δ i' , we get the candidate point set C = {P i' ∣P i' ∈V d }, where Δ i' =(ΔX i' ,ΔY i' ,ΔZ i' ) is the current position P r The displacement increment to the detection node.
7. The path planning method for obstacle avoidance of a humanoid robot according to claim 6, characterized in that: The selecting the best one among the detection nodes as a temporary target point for moving the humanoid robot toward the temporary target point comprises: Generate detection node priority function Among them, θ i' is the current position P r The deviation of the line of sight, cos(θ i' ) is the direction priority of the detection node, w1 and w2 are weight parameters, |P g -P i' ∣ is the distance from the detection node to the target location; According to the detection node priority function F(P i' ), select the detection node with the highest priority as the temporary target point P d , used to make the humanoid robot move towards the temporary target point P d direction of movement.
8. The path planning method for obstacle avoidance of a humanoid robot according to claim 7, characterized in that: The use of the branch-and-extend path planning algorithm to generate and select an optimal path from the current position of the humanoid robot to the target position, and obtaining a path planning result includes: From the current position P r Set out, with the temporary target point P d For the direction, generate from the current position P r To the temporary target point P d Several potential paths, and the path branch set B = {B h }, where the calculation formula for each path branch is B h (t) = P r +t·(P d -P r )+Δ h (t), t∈[0,1] is the path parameter, Δ h (t) is the path offset; Define a path feasibility function for evaluating the pros and cons of each path branch Among them, L(B h ) is the path branch B h The total length, σ(O h' ,B h ) is the path branch B h With the obstacle O h' The minimum distance, S(B h ) is the path branch B h The smoothness, and is the weight coefficient; If the path branch B h With the obstacle O h' The minimum distance σ(O h' ,B h ) is less than a preset safety distance threshold, then the path branch B h Generate extended path branch B′ h (t) = B h (t)+ò·n(t), where ò is the expansion step and n(t) is the path normal vector; For each of the extended path branches B′ h (t), update the extended path feasibility function C(B′ h ), update the path branch set B = {B′ h }; Select the updated extended path feasibility function C(B′ h ) is the path B with the smallest value opt As the best path from the current position of the humanoid robot to the target position, Get the path planning result.
9. A path planning system for humanoid robot obstacle avoidance, characterized in that: include: An environment image processing module is used to obtain an environment image of the humanoid robot, and process the environment image using an adaptive threshold segmentation method to obtain an obstacle area and an obstacle-free area; The obstacle contour frame segmentation module is used to identify the obstacle contour frame using the obstacle segmentation algorithm based on region growing; The obstacle positioning module is used to calculate the position coordinates of the obstacle in space using a dual-view monocular vision positioning method; The path planning module is used to obtain the path planning result by using the dynamic detection and branch expansion path planning algorithm.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the path planning method for obstacle avoidance of a humanoid robot as claimed in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Wrist bone segmentation recognition method and system, terminal and readable storage medium
CN109993750A
Power robot based binocular vision navigation system and method based on
WO2015024407A1
Cited By
Navigation obstacle avoidance method and system in low-confidence and feature similar environment
CN119687918A
Humanoid robot navigation method and system, storage medium and program product
CN120800343A
Humanoid robot dynamic obstacle avoidance method and system based on image segmentation
CN121979267A
Whole body obstacle avoidance method and system for a legged humanoid robot
CN123010811A
