Autonomous movement trajectory tracking method and system for humanoid robot

Through the ant colony algorithm based on the cosine curve transformation model and image processing of the visual system, the humanoid robot trajectory planning is optimized, and the problem of path non-optimization in the existing technology is solved, and efficient obstacle avoidance and path shortening is achieved.

CN120388045APending Publication Date: 2025-07-29GUANGDONG POLYTECHNIC NORMAL UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510532962.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In the prior art, in the humanoid robot trajectory planning, the detailed information of obstacles cannot be effectively utilized, resulting in the planning path not being optimized and the calculation time is long.

Method used

Ant colony algorithm based on cosine curve transformation model is adopted, combined with the grayscale processing and image enhancement of the robot vision system, texture features are extracted and obstacle locations are identified, and environmental maps are established using the raster method to optimize the moving path.

Benefits of technology

It realizes the shortening and smoothing of the moving path of the humanoid robot, improves the efficiency of path planning, and saves movement time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120388045A_ABST
    Figure CN120388045A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of humanoid robots, and discloses a humanoid robot autonomous movement trajectory tracking method, which comprises the following steps: acquiring an environment image of a humanoid robot movement environment by using a robot vision system, and carrying out gray processing and image enhancement processing on the environment image to obtain a target environment image; extracting textural features of the target environment image according to the target environment image, and inputting the textural features into a support vector machine to identify obstacles to obtain positions of the plurality of obstacles in the environment; establishing an environment map of the moving environment of the humanoid robot by adopting a grid method; and constructing an autonomous moving path of the humanoid robot by using the environment map and adopting an ant colony algorithm based on a cosine curve transformation model. The direction of the robot is determined by positioning the target and the obstacle, and meanwhile, the ant colony algorithm based on the cosine curve transformation model is adopted to optimize the moving path, so that the moving path of the humanoid robot is shortest and smooth, the planning efficiency is improved, and the moving time of the humanoid robot is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of humanoid robots, and particularly to a method and system for autonomous mobile trajectory tracking of a humanoid robot. Background Art

[0002] Currently, robots have been widely used in fields such as automation, artificial intelligence, and computer, thus becoming a research hotspot in the fields. Humanoid robots have stronger execution capabilities, decision-making capabilities, and autonomous perception capabilities. Applying them in fields such as service and production fields can improve the automation process. When most humanoid robots execute tasks, they need to first determine their own position in the environment, identify and locate the target through a vision sensor, and perform path planning based on their own position and the target position. Due to the complexity of the real-world scene environment and the existence of obstacles in the path, the planned path of the robot's motion trajectory is not the optimal path. Therefore, it is necessary to re-plan the moving path of the humanoid robot including obstacles.

[0003] At the present stage, the traditional method analyzes the architecture of the robot, establishes a trajectory optimization model with non-linearity, multiple objectives, and multiple constraints, and solves the vision model through a gravitational search algorithm to achieve robot trajectory optimization. This method has poor image processing effects and takes a long time to plan the path. There are also some that carry out constraint modeling on the robot trajectory planning problem, establish an obstacle avoidance model and a robot kinematics model, and at the same time design a penalty function to ensure that the robot effectively avoids obstacles during the movement process, and uses a stochastic fractal search algorithm to solve the trajectory planning problem. The planned path distance is long, and the trajectory planning effect is not good. The problems faced by the above methods are that when collecting obstacle information, only the contour information is collected, while the detailed information of the obstacles is ignored, resulting in many problems in the finally planned moving path of the humanoid robot. Summary of the Invention

[0004] The present invention provides a method and system for autonomous mobile trajectory tracking of a humanoid robot. First, the established target and obstacles are located, the direction of the robot is determined by the positioning of the target and obstacles, and at the same time, an ant colony algorithm based on a cosine curve transformation model is used to optimize the moving path, so that the moving path of the humanoid robot is the shortest and the path is smooth, improving the planning efficiency and saving the moving time of the humanoid robot.

[0005] The present invention provides a method for autonomous mobile trajectory tracking of a humanoid robot, including:

[0006] Using a robot vision system to collect an environmental image of the moving environment of the humanoid robot, and performing gray processing and image enhancement processing on the environmental image to obtain a target environmental image;

[0007] Extract the texture features of the target environmental image and input them into a support vector machine to identify obstacles, obtaining the positions of multiple obstacles in the environment;

[0008] According to the positions of the multiple obstacles in the environment, use the grid method to establish an environmental map of the moving environment of the humanoid robot;

[0009] Use the environmental map to construct an autonomous moving path for the humanoid robot by using the ant colony algorithm based on the cosine curve transformation model.

[0010] Further, in the step of using the robot vision system to collect the environmental image of the moving environment of the humanoid robot and performing gray-scale processing and image enhancement processing on the environmental image to obtain the target environmental image, the gray-scale processing of the environmental image includes:

[0011] Use the gray-scale transformation function to obtain the pixel value g(x,y) of the environmental image and replace the pixel value f(x,y) in the original image with it. The pixel value acquisition expression is: g(x,y) = T[f(x,y)], where T represents the gray-scale transformation function;

[0012] When the right pixels and left pixels in the environmental image are close to the values of 255 and 0 respectively, use the global gray-scale transformation function to mark the gray value with the highest number of pixels and obtain the gray value H with the highest similarity within the region. Max The expression is as follows:

[0013]

[0014] Among them, D(x,y) represents the similarity degree between the pixel at (x,y) in the environmental image and its nearby pixels; ζ(x,y) describes the standard deviation of the 3×3 pixel region, and its expression is as follows:

[0015]

[0016] Among them, m(x,y) describes the average value corresponding to the pixels existing in the 3×3 region.

[0017] Further, in the step of using the robot vision system to collect the environmental image of the moving environment of the humanoid robot and performing gray-scale processing and image enhancement processing on the environmental image to obtain the target environmental image, the image enhancement processing of the environmental image includes:

[0018] Process the R, G, and B gray values of the environmental image using a bilateral filter to obtain the bilateral filtering function l(x) of the environmental image, as follows:

[0019] l(x) = ∫d(ψ,x)D(ψ,x)dψ / ζ(x,y)

[0020] Among them, d(ψ, x) describes the distance between the central pixel point x of the environmental image and the surrounding pixel points ψ; D(ψ, x) represents the similarity between x and ψ.

[0021] Apply the bilateral filtering function to the Retinex algorithm, replace the Gaussian filtering therein, obtain the reflection component of the environmental image, and perform weighted fusion processing on the R, G, and B grayscale values through the following formula to obtain the image R(x, y) of the humanoid robot with edges retained and details enhanced:

[0022] R(x, y) = D(x, y)[R 1i (x, y) + R 2i (x, y)] / q·l(x)

[0023] Among them, q represents the weight coefficient; i = R, G, B; R 1i (x, y) are the values of R, G, and B of the environmental image after bilateral filtering; R 2i (x, y) represents the values of R, G, and B of the environmental image after Gabor filtering.

[0024] Furthermore, the step of extracting the texture features of the target environmental image and inputting them into a support vector machine to identify obstacles to obtain the positions of multiple obstacles in the environment includes:

[0025] Use the gray-level co-occurrence matrix to analyze the relationship between pixels to extract the texture features of the image. The texture feature expression of the image is as follows:

[0026]

[0027] Among them, T1 represents the energy of A; i = 1, …, n; j = 1, …, m; d represents the distance; describes the direction; T2 represents the correlation; v and σ respectively describe the mean and standard deviation corresponding to A; T3 represents the contrast, which is used to describe the thickness of the image texture; T4 represents the uniformity. Obtain the texture feature G of the environmental image according to the above formula T = [T1, T2, T3, T4];

[0028] Input the above features into the support vector machine to obtain whether the target belongs to the search target or an obstacle, determine the position of the target in the environment, and thus achieve the recognition of the image target. The target recognition result f(x) expression is as follows:

[0029]

[0030] Among them, represents the Lagrange multiplier; K(x i, x) represents the inner product function; b * represents the classification threshold.

[0031] Furthermore, the step of establishing an environmental map of the mobile environment of the humanoid robot by using the grid method according to the positions of the multiple obstacles in the environment includes:

[0032] Construct an environmental map with grid colors of white and black by using the grid method. Set the movement space of the humanoid robot as a square. Use the initial position of the humanoid robot as the starting point, establish a coordinate system, and represent the grid in the environmental map by (x, y), which is expressed as:

[0033]

[0034] where M represents the grid number; the symbol int represents taking the integer; H represents the number of grids in each row; the symbol represents taking the remainder.

[0035] Furthermore, the step of constructing an autonomous movement path of the humanoid robot by using the ant colony algorithm based on the cosine curve transformation model by using the environmental map includes:

[0036] Assume that the humanoid robot moves one grid at a time. Based on the running path of the robot, randomly select a grid without obstacles in each row and column to obtain several passable grids. Starting from the first grid, use the following formula to compare and analyze whether the humanoid robot can pass through adjacent grids:

[0037] J = max[|(x i+1 ― x i )|, |(y i+1 ― y i )|]

[0038] where J represents the maximum distance between grids, x i , y i represent the i-th grid, and x i+1 , y i+1 represent the adjacent grid to it; when J = 1, the adjacent grids without obstacles can be continuously passed; otherwise, they cannot be continuously passed;

[0039] Use the cosine curve transformation model to smooth the path with corners. Updating the pheromone in the ant colony algorithm includes: obtaining the pheromone τ i,j based on the above calculation:

[0040] τ i,j = (1 - λ)J + λgf(x)

[0041] where λ represents an adjustable parameter.

[0042] Taking the shortest distance as the goal, among the paths passed by the ants, the optimal path is selected, and the pheromone of the optimal path is updated. The update result is as follows:

[0043] τ′ i,j =(1 - λ)τ i,j +λτ i,j

[0044] Solving the above formula can obtain the shortest path length L * =1 / Δτ′ i,j .

[0045] Furthermore, the path smoothing of the path with a corner using the cosine curve transformation model includes:

[0046] Construct a cosine curve transformation model, determine the initial coordinates as (x1, y1), the target coordinates as (x2, y2), solve other relevant core parameters to determine the curve, and obtain the final path cosine curve. Among them, the basic equation parameters of the cosine curve are parameterized as:

[0047]

[0048] The curve can be translated first and then rotated until it passes through the known points (x1, y1) and (x2, y2). The parametric equations after the curve is translated and rotated are:

[0049]

[0050] Let the angle between the straight line passing through the two points (x1, y1) and (x2, y2) and the X-axis be the rotation angle of the basic cosine curve, then there is

[0051] θ = arctan[(y2 - y1) / (x2 - x1)]

[0052] In order to make the curve pass through the two points (x1, y1) and (x2, y2) and be smoothly connected, let (x1, y1) be the initial position after the basic cosine curve is rotated and translated. The basic cosine curve can extend infinitely from (x1, y1) after rotation and translation. (x1, y1) is the first (-π / 2, π / 2) interval of the cosine curve, and we get:

[0053]

[0054] Set the parameter t interval as (-0.5π, zπ - 0.5π), where

[0055] z = [(x1 - x2) 2 +(y1 - y2) 2 1 / 2 / π ​

[0056] Find θ, t, m, and n respectively. Using the above formula, the cosine curve passing through any two points (x1, y1) and (x2, y2) can be obtained.

[0057] The present invention also provides a humanoid robot autonomous movement trajectory tracking system, including:

[0058] An acquisition module, configured to use the robot vision system to acquire the environmental image of the moving environment of the humanoid robot, and perform grayscale processing and image enhancement processing on the environmental image to obtain a target environmental image;

[0059] An identification module, configured to extract the texture features according to the target environmental image and input them into a support vector machine to identify obstacles, so as to obtain the positions of multiple obstacles in the environment;

[0060] A building module, configured to build an environmental map of the moving environment of the humanoid robot by using the grid method according to the positions of the multiple obstacles in the environment;

[0061] A construction module, configured to use the environmental map to construct an autonomous movement path of the humanoid robot by using an ant colony algorithm based on a cosine curve transformation model.

[0062] The present invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above method are implemented.

[0063] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.

[0064] The beneficial effects of the present invention are as follows:

[0065] The present invention first acquires the environmental image of the moving environment of the humanoid robot, performs grayscale processing and image enhancement processing to obtain a target environmental image for extracting its texture features, then inputs them into a support vector machine to identify obstacles, obtains the positions of multiple obstacles in the environment, and finally builds an environmental map of the moving environment of the humanoid robot by using the grid method, and constructs an autonomous movement path of the humanoid robot by using an ant colony algorithm based on a cosine curve transformation model, so that the movement path of the humanoid robot is the shortest and the path is smooth, improving the planning efficiency and saving the movement time of the humanoid robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a schematic flowchart of the method according to an embodiment of the present invention.

[0067] Figure 2 It is a schematic structural diagram of the device according to an embodiment of the present invention.

[0068] Figure 3 Schematic diagram of the internal structure of a computer device according to an embodiment of the present invention.

[0069] The realization of the purpose, functional characteristics and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments

[0070] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0071] As Figure 1 shown, the present invention provides a method for autonomous mobile trajectory tracking of a humanoid robot, including:

[0072] S1. Use the robot vision system to collect the environmental image of the moving environment of the humanoid robot, and perform gray processing and image enhancement processing on the environmental image to obtain a target environmental image.

[0073] The robot vision system is composed of a DSP chip and a CCD camera. The DSP chip selects the DM642 signal processor as the processor of the vision system. Using the vision system to collect images can improve the environmental perception ability of the robot, make it more intelligent and autonomous, help the humanoid robot better understand the environment, and accurately locate the target position.

[0074] Due to the influence of the environment, the clarity of the images collected by the humanoid robot is low. Therefore, it is necessary to perform enhancement processing on the images collected by the vision image acquisition system. First, use the gray transformation function to process the images, transform the gray levels of all pixels of the environmental image, and implement image enhancement based on the Retinex algorithm.

[0075] Among them, performing gray processing on the environmental image includes:

[0076] Preprocess the RGB channels of the environmental graphics through the gray transformation function to reduce the complexity of image enhancement, and at the same time, the effect of image processing can be optimized. Gray change is to obtain the pixel value g(x, y) of the environmental image using the gray transformation function and replace the pixel value f(x, y) in the original image with it to improve the visual clarity of the environmental image. The expression for obtaining the pixel value is: g(x, y) = T[f(x, y)], where T represents the gray transformation function;

[0077] When the right pixels and left pixels in the environmental image are close to the 255 value and 0 value respectively, the contrast of the environmental image increases. To obtain the brightest area in the environmental image, use the global gray transformation function to mark the gray value with the highest number of pixels and obtain the similarity within the area. The highest gray value H Max The expression is as follows:

[0078]

[0079] Among them, D(x, y) represents the similarity degree between the pixel at the environmental image (x, y) and the nearby pixels; ζ(x, y) describes the standard deviation of the 3×3 pixel region, and its expression is as follows:

[0080]

[0081] Among them, m(x, y) describes the average value corresponding to the pixels existing in the 3×3 region.

[0082] Performing image enhancement processing on the environmental image includes:

[0083] After gray-scale processing the collected environmental image, using the Retinex algorithm to enhance the contrast and brightness of the image, making it easier for the humanoid robot to recognize obstacles and target areas in the environment. Processing the R, G, B gray-scale values with a bilateral filter and a Gabor filter can remove the noise in the image, and at the same time can also improve the clarity and contrast of the image. Replacing the Gaussian filter in the Retinex algorithm with a bilateral filter to achieve image enhancement. Specifically,

[0084] Processing the R, G, B gray-scale values of the environmental image with a bilateral filter to obtain the bilateral filtering function l(x) of the environmental image, as shown below:

[0085] l(x) = ∫d(ψ, x)D(ψ, x)dψ / ζ(x, y)

[0086] Among them, d(ψ, x) describes the distance between the central pixel point x of the environmental image and the surrounding pixel points ψ; D(ψ, x) represents the similarity degree between x and ψ.

[0087] Applying the bilateral filtering function to the Retinex algorithm to replace the Gaussian filter therein, obtaining the reflection component of the environmental image, and weighted-fusing the R, G, B gray-scale values through the following formula to obtain the image R(x, y) of the humanoid robot with edges retained and details enhanced:

[0088] R(x, y) = D(x, y)[R 1i (x, y) + R 2i (x, y)] / q·l(x)

[0089] Among them, q represents the weight coefficient; i = R, G, B; R 1i (x, y) are the values of R, G, B of the environmental image after bilateral filtering; R 2i (x, y) represents the values of R, G, B of the environmental image after Gabor filtering.

[0090] S2. Extract the texture features of the target environmental image and input them into a support vector machine to identify obstacles, and obtain the positions of multiple obstacles in the environment.

[0091] Using obstacle information and environmental maps to accurately locate the target position, achieve robot target positioning, and thus plan the optimal path. By extracting the texture features of the image, detailed information about the target area can be provided, enabling better identification of the target area and achieving target positioning. The specific steps are as follows:

[0092] S201. Analyze the relationship between pixels using the gray-level co-occurrence matrix to extract the texture features of the image. The texture feature expression of the image is as follows:

[0093]

[0094] Among them, T1 represents the energy of A; i = 1,..., n; j = 1,..., m; d represents the distance; Describes the direction; T2 represents the correlation; v and σ respectively describe the mean and standard deviation corresponding to A; T3 represents the contrast, which is used to describe the coarseness of the image texture; T4 represents the uniformity. According to the above formula, the texture feature G of the environmental image is obtained T = [T1, T2, T3, T4];

[0095] S202. Input the above features into the support vector machine to obtain whether the target belongs to the search target or an obstacle, and determine the position of the target in the environment, thereby realizing the recognition of the image target. The expression of the target recognition result f(x) is as follows:

[0096]

[0097] Among them, Represents the Lagrange multiplier; K(x i , x) represents the inner product function; b * Represents the classification threshold.

[0098] S3. According to the positions of the multiple obstacles in the environment, use the grid method to establish an environmental map of the mobile environment of the humanoid robot.

[0099] To obtain the robot trajectory optimization result and reduce the calculation difficulty, use the grid method to establish an environmental map, thereby realizing path planning and control. The environmental map contains information such as obstacles and target areas, helping the humanoid robot plan the optimal path. Through the target recognition result, determine the positions of obstacles and targets in the global environment. In the environmental map, the grids are divided into white and black, mainly to distinguish whether there are obstacles.

[0100] An environmental map with grid colors of white and black is constructed using the grid method. The movement space of the humanoid robot is set as a square. The initial position of the humanoid robot is used as the starting point, and a coordinate system is established. In the environmental map, the grid is represented by (x, y), and it is expressed as:

[0101]

[0102] where M represents the grid number; the symbol int represents taking the integer; H represents the number of grids in each row; the symbol represents taking the remainder.

[0103] S4. Using the environmental map, an ant colony algorithm based on the cosine curve transformation model is adopted to construct the autonomous movement path of the humanoid robot.

[0104] (1) Path selection

[0105] The path trajectory of the humanoid robot can be represented as the crawling path of an ant. Compared with the long path, more pheromones are secreted by the ant in the Duanlu Jing. The greater the probability that the ant chooses this path. Suppose the humanoid robot moves one grid at a time. Based on the robot's running path, a grid without obstacles is randomly selected in each row and column to obtain several passable grids. Starting from the first grid, the following formula is used to compare and analyze whether the humanoid robot can pass through the adjacent grid:

[0106] J = max[|(x i+1 ―x i )|,|(y i+1 ―y i )|]

[0107] where J represents the maximum value of the distance between grids, x i , y i represent the i-th grid, x i+1 , y i+1 represent the adjacent grid to it; when J = 1, the adjacent grids without obstacles can be continuously passed; otherwise, they cannot be continuously passed.

[0108] When the path is continuous, further planning is carried out, and it is necessary to consider whether there is a previous robot movement path in the grid to avoid the path loop problem. When there are obstacles in the surrounding grids, delete this path. When J = 1, but the passable grids are not adjacent, continue to search for the passable grids around until a passable path for the robot is obtained.

[0109] (2) Path smoothing

[0110] In the cosine curve transformation model of a humanoid robot, any position cosine curve is set as curve1, curve2 is the curve after the translation of the cosine curve, and curve3 is the curve after the rotation of curve2. The process of determining the cosine curve between any two points in a plane is rather cumbersome. Curve3 can be obtained by translating curve1 to curve2 and then rotating curve2 by a certain angle around the initial point, making curve3 pass through the initial and end coordinate positions. Curve1, curve2, and curve3 are all cosine curves and are continuous and smooth. Since only a part of the curve is taken, no infinite extension treatment is done. After the cosine curve path of the humanoid robot is planned, the robot can reach the target position from the initial position and move forward step by step along the planned path. During the movement, it can reach the target position according to the pose of the planned path. The simple characteristics of the cosine equation not only ensure the reduction of the calculation amount but also ensure the continuity, smoothness, and feasibility of the path.

[0111] Conduct a detailed analysis of the cosine curve, study the curve parameters, determine the initial coordinates as (x1, y1), the target coordinates as (x2, y2), solve other relevant core parameters to determine the curve, and obtain the final path cosine curve. Among them, the basic equation of the cosine curve is:

[0112] y = cosx

[0113] Parameterize the basic equation of the cosine curve as:

[0114]

[0115]

[0116] The curve can be first translated and then rotated until it passes through the known points (x1, y1) and (x2, y2). The parametric equation matrix after the translation and rotation of the curve is:

[0117]

[0118] That is:

[0119]

[0120] Since there are 5 unknowns, namely x, y, θ, t, m, and n, in the equation, and there are only two known point coordinates, the unknown parameters cannot be solved under the existing conditions, and new conditions need to be created.

[0121] Therefore, let the angle between the line passing through the two points (x1, y1) and (x2, y2) and the X-axis be the rotation angle of the basic cosine curve. Then there is

[0122] θ = arctan[(y2 - y1) / (x2 - x1)]

[0123] In order to make the curve pass through the two points \((x1, y1)\) and \((x2, y2)\) and be smoothly connected, let \((x1, y1)\) be the initial position after the rotation and translation of the basic cosine curve. The basic cosine curve can extend infinitely from \((x1, y1)\) after rotation and translation. \((x1, y1)\) is the first \((-\pi / 2, \pi / 2)\) interval of the cosine curve, and we get:

[0124]

[0125] Set the parameter \(t\) interval to \((-0.5\pi, z\pi - 0.5\pi)\), where

[0126] \(z = [(x1 - x2)\) 2 + (y1 - y2)\) 2 \) 1 / 2 / \(\pi\)

[0127] Find \(\theta\), \(t\), \(m\), and \(n\) respectively. Using the formula we can obtain the cosine curve passing through any two points \((x1, y1)\) and \((x2, y2)\). That is, according to the above formula, the humanoid robot can reach the target position step by step along the coordinate positions in a straight-line segment manner through two intermediate points from the initial point. That is, first discretize the design of the cosine curve from the initial position to the target position, divide it into several segments (such as the line segment composed of two intermediate points), and then complete each segment. The comprehensive approximation of each segment to the cosine curve path can complete the path planning.

[0128] (3) Pheromone update

[0129] Based on the above calculation, obtain the pheromone \(\tau\) i,j :

[0130] \(\tau\) i,j = (1 - \(\lambda\))J + \(\lambda\)gf(x)

[0131] where \(\lambda\) represents an adjustable parameter.

[0132] Taking the shortest distance as the goal, among the paths passed by the ants, select the optimal path and update the pheromone of the optimal path. The update result is as follows:

[0133] \(\tau'\) i,j = (1 - \(\lambda\))\(\tau\) i,j + \(\lambda\)\(\tau\) i,j

[0134] Solve the above formula to obtain the shortest path length \(L\) * = 1 / \(\Delta\tau'\) i,j . The process of using the ant colony algorithm to obtain the optimal trajectory is: initialize the parameters → evaluate the ant colony → judge whether the termination condition is reached → if not, determine the moving direction, update the pheromone, and continue to evaluate the ant colony for cycling → if so, output the shortest path.

[0135] The present invention first collects the environmental image of the mobile environment of a humanoid robot, performs grayscale processing and image enhancement processing on it to obtain a target environmental image for extracting its texture features, then inputs it into a support vector machine to identify obstacles, obtains the positions of multiple obstacles in the environment, and finally uses the grid method to establish an environmental map of the mobile environment of the humanoid robot, and constructs an autonomous movement path of the humanoid robot by using an ant colony algorithm based on a cosine curve transformation model, so that the movement path of the humanoid robot is the shortest and the path is smooth, improving the planning efficiency and saving the movement time of the humanoid robot.

[0136] As Figure 2 shown, the present invention also provides a humanoid robot autonomous movement trajectory tracking system, including:

[0137] A collection module 1, configured to use a robot vision system to collect the environmental image of the mobile environment of the humanoid robot, and perform grayscale processing and image enhancement processing on the environmental image to obtain a target environmental image;

[0138] An identification module 2, configured to extract the texture features according to the target environmental image, and input them into a support vector machine to identify obstacles, and obtain the positions of multiple obstacles in the environment;

[0139] A building module 3, configured to establish an environmental map of the mobile environment of the humanoid robot by using the grid method according to the positions of the multiple obstacles in the environment;

[0140] A construction module 4, configured to use the environmental map to construct an autonomous movement path of the humanoid robot by using an ant colony algorithm based on a cosine curve transformation model.

[0141] In one embodiment, in the collection module 1, the grayscale processing of the environmental image includes:

[0142] Obtaining the pixel value g(x, y) of the environmental image by using a grayscale transformation function, and using this to replace the pixel value f(x, y) in the original image. The pixel value obtaining expression is: g(x, y) = T[f(x, y)], where T represents the grayscale transformation function;

[0143] When the right pixels and left pixels in the environmental image are close to the 255 value and 0 value respectively, use a global grayscale transformation function to mark the grayscale value with the highest number of pixels, and obtain the highest similarity grayscale value H in the region Max The expression is as follows:

[0144]

[0145] Among them, D(x, y) represents the similarity degree between the pixel at the environmental image (x, y) and the nearby pixels; ζ(x, y) describes the standard deviation of the 3×3 pixel region, and its expression is as follows:

[0146]

[0147] Among them, m(x, y) describes the average value corresponding to the pixels existing in the 3×3 region.

[0148] In one embodiment, in the acquisition module 1, the image enhancement processing of the environmental image includes:

[0149] Using a bilateral filter to process the R, G, and B gray values of the environmental image to obtain the bilateral filtering function l(x) of the environmental image, as shown below:

[0150] l(x) = ∫d(ψ, x)D(ψ, x)dψ / ζ(x, y)

[0151] Among them, d(ψ, x) describes the distance between the central pixel point x of the environmental image and the surrounding pixel points ψ; D(ψ, x) represents the similarity degree between x and ψ;

[0152] Applying the bilateral filtering function to the Retinex algorithm to replace the Gaussian filtering therein, obtaining the reflection component of the environmental image, and performing weighted fusion processing on the R, G, and B gray values through the following formula to obtain the image R(x, y) of the humanoid robot with edges retained and details enhanced:

[0153] R(x, y) = D(x, y)[R 1i (x, y) + R 2i (x, y)] / q·l(x)

[0154] Among them, q represents the weight coefficient; i = R, G, B; R 1i (x, y) are the values of R, G, and B of the environmental image after bilateral filtering; R 2i (x, y) represents the values of R, G, and B of the environmental image after Gabor filtering.

[0155] In one embodiment, the recognition module 2 includes:

[0156] An extraction unit, which is used to analyze the relationship between pixels by using a gray-level co-occurrence matrix to extract the texture features in the image. The expression of the texture features of the image is as follows:

[0157]

[0158] Among them, T1 represents the energy of A; i = 1,..., n; j = 1,..., m; d represents the distance; Describe the direction; T2 represents the correlation; v and σ respectively describe the mean and standard deviation corresponding to A; T3 represents the contrast, which is used to describe the thickness of the image texture; T4 represents the uniformity, and the texture feature G of the environmental image is obtained according to the above formula T =[T1, T2, T3, T4];

[0159] The recognition unit is used to input the above features into the support vector machine to obtain whether the target belongs to the search target or an obstacle, and determine the position of the target in the environment, so as to realize the recognition of the image target. The expression of the target recognition result f(x) is as follows:

[0160]

[0161] Among them, represents the Lagrange multiplier; K(x i , x) represents the inner product function; b * represents the classification threshold.

[0162] In one embodiment, the establishment module 3 includes:

[0163] Use the grid method to construct an environmental map with grid colors of white and black. Set the movement space of the humanoid robot as a square. Use the initial position of the humanoid robot as the starting point, establish a coordinate system, and represent the grid in the environmental map with (x, y), which is expressed as:

[0164]

[0165] Among them, M represents the grid number; the symbol int represents taking the integer; H represents the number of grids in each row; the symbol represents taking the remainder.

[0166] In one embodiment, the construction module 4 includes:

[0167] The path selection unit is used to set the humanoid robot to move one grid at a time. Based on the robot's running path, randomly select a grid without obstacles in each row and column to obtain several passable grids. Starting from the first grid, use the following formula to compare and analyze whether the humanoid robot can pass through the adjacent grid:

[0168] J = max[|(x i+1 ―x i )|, |(y i+1 ―y i )|]

[0169] Among them, J represents the maximum value of the distance between grids, x i , y i represent the i-th grid, x i+1 , y i+1Indicates the grid adjacent to it; when J = 1, continuous passage is possible between adjacent grids without obstacles; otherwise, continuous passage is not possible;

[0170] A path smoothing unit for path smoothing of a path with a corner using a cosine curve transformation model. Updating pheromones in the ant colony algorithm includes: obtaining pheromone τ based on the above calculation i,j :

[0171] τ i,j =(1 - λ)J + λgf(x)

[0172] where λ represents an adjustable parameter.

[0173] Taking the shortest distance as the goal, in the path passed by the ants, select the optimal path and update the pheromones of the optimal path. The update result is as follows:

[0174] τ′ i,j =(1 - λ)τ i,j +λτ i,j

[0175] Solving the above formula can obtain the shortest path length L * =1 / Δτ′ i,j .

[0176] In one embodiment, in the path smoothing unit, path smoothing of a path with a corner using a cosine curve transformation model includes:

[0177] Construct a cosine curve transformation model, determine the initial coordinates as (x1, y1), the target coordinates as (x2, y2), solve other relevant core parameters to determine the curve, and obtain the final path cosine curve. Among them, parameterize the basic equation of the cosine curve as:

[0178]

[0179] The curve can be translated first and then rotated until it passes through the known points (x1, y1) and (x2, y2). The parametric equation after the curve is translated and rotated is:

[0180]

[0181] Let the angle between the straight line passing through the two points (x1, y1) and (x2, y2) and the X-axis be the rotation angle of the basic cosine curve, then there is

[0182] θ = arctan[(y2 - y1) / (x2 - x1)]

[0183] In order to make the curve pass through the two points \((x1, y1)\) and \((x2, y2)\) and be smoothly connected, let \((x1, y1)\) be the initial position after the rotation and translation of the basic cosine curve. After rotation and translation, the basic cosine curve can extend infinitely starting from \((x1, y1)\). \((x1, y1)\) is the first \((-\pi / 2, \pi / 2)\) interval of the cosine curve, and we get:

[0184]

[0185] Set the parameter \(t\) interval to \((-0.5\pi, z\pi - 0.5\pi)\), where,

[0186] \(z = [(x1 - x2)\) 2 + (y1 - y2)\) 2 \) 1 / 2 / \(\pi\)

[0187] Respectively calculate \(\theta\), \(t\), \(m\), and \(n\). Using the above formulas, we can obtain the cosine curve passing through any two points \((x1, y1)\) and \((x2, y2)\).

[0188] The above modules and units are all used to correspondingly execute each step in the above humanoid robot autonomous movement trajectory tracking method. The specific implementation method refers to the description in the above method embodiments and will not be elaborated here.

[0189] As Figure 3 shown, the present invention also provides a computer device. This computer device can be a server, and its internal structure can be as Figure 3 shown. This computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of this computer design is used to provide computing and control capabilities. The memory of this computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of this computer device is used to store all the data required for the process of the humanoid robot autonomous movement trajectory tracking method. The network interface of this computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it realizes the humanoid robot autonomous movement trajectory tracking method.

[0190] Those skilled in the art can understand that Figure 3 the structure shown in

[0191] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned arbitrary autonomous movement trajectory tracking method for a humanoid robot is implemented.

[0192] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above embodiments of the various methods. Among them, any reference to a memory, storage, database, or other medium provided in the present application and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0193] It should be noted that in this article, the terms "include", "comprise", or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, apparatus, article, or method including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such a process, apparatus, article, or method. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, apparatus, article, or method including that element.

[0194] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A method for autonomous mobile trajectory tracking of a humanoid robot, characterized in that, Including: Collecting an environmental image of the moving environment of a humanoid robot using a robot vision system, and performing grayscale processing and image enhancement processing on the environmental image to obtain a target environmental image; Extracting the texture features of the target environmental image, and inputting them into a support vector machine to identify obstacles, so as to obtain the positions of multiple obstacles in the environment; Establishing an environmental map of the moving environment of the humanoid robot by using the grid method according to the positions of the multiple obstacles in the environment; Constructing an autonomous moving path of the humanoid robot by using the environmental map and the ant colony algorithm based on the cosine curve transformation model.

2. The autonomous movement trajectory tracking method of the humanoid robot according to claim 1, characterized in that In the step of collecting an environmental image of the moving environment of the humanoid robot using a robot vision system, and performing grayscale processing and image enhancement processing on the environmental image to obtain a target environmental image, the grayscale processing of the environmental image includes: Obtaining the pixel value g(x, y) of the environmental image by using a grayscale transformation function, and replacing the pixel value f(x, y) in the original image with it. The pixel value acquisition expression is: g(x, y) = T[f(x, y)], where T represents the grayscale transformation function; When the rightward pixels and leftward pixels in the environmental image approach the values of 255 and 0 respectively, the global grayscale transformation function is used to mark the grayscale value with the highest number of pixels, and the grayscale value H with the highest similarity within the region is obtained accordingly. Max The expression is as follows: Where D(x, y) represents the similarity between the pixel at (x, y) of the environmental image and the nearby pixels; ζ(x, y) describes the standard deviation of the 3×3 pixel region, and its expression is as follows: Where m(x, y) describes the average value corresponding to the pixels existing in the 3×3 region.

3. The autonomous mobile trajectory tracking method for a humanoid robot according to claim 2, characterized in that In the step of collecting an environmental image of the moving environment of the humanoid robot using a robot vision system, and performing grayscale processing and image enhancement processing on the environmental image to obtain a target environmental image, the image enhancement processing of the environmental image includes: Processing the R, G, B grayscale values of the environmental image by using a bilateral filter to obtain the bilateral filter function l(x) of the environmental image, as shown below: l(x) = ∫d(ψ, x)D(ψ, x)dψ / ζ(x, y) Where d(ψ, x) describes the distance between the central pixel point x of the environmental image and the surrounding pixel points ψ; D(ψ, x) represents the similarity between x and ψ; Applying the bilateral filter function to the Retinex algorithm to replace the Gaussian filter therein, obtaining the reflection component of the environmental image, and performing weighted fusion processing on the R, G, B grayscale values through the following formula to obtain an image R(x, y) of the humanoid robot with edges retained and details enhanced: R(x,y) = D(x,y)[R 1i (x,y) + R 2i (x,y)] / q·l(x) Among them, q represents the weight coefficient; i = R, G, B; R 1i (x, y) are the values of R, G, and B of the environmental image after bilateral filtering; R 2i (x, y) represents the values of R, G, and B of the environmental image after Gabor filtering.

4. The method for autonomous moving trajectory tracking of a humanoid robot according to claim 3, wherein, The step of extracting the texture features of the target environmental image according to the target environmental image, And inputting them into a support vector machine to identify obstacles, so as to obtain the positions of multiple obstacles in the environment, includes: Analyzing the relationship between pixels by using a gray-level co-occurrence matrix to extract the texture features of the image. The texture feature expression of the image is as follows: Among them, T1 represents the energy of A; i = 1, …, n; j = 1, …, m; d represents the distance; θ describes the direction; T2 represents the correlation; v and σ respectively describe the mean and standard deviation corresponding to A; T3 represents the contrast, which is used to describe the thickness of the image texture; T4 represents the uniformity, and the texture feature G of the environmental image is obtained according to the above formula T = [T1, T2, T3, T4]; Inputting the above features into a support vector machine to obtain whether the target belongs to the search target or an obstacle, determining the position of the target in the environment, so as to realize the recognition of the image target. The target recognition result f(x) expression is as follows: Among them, represents the Lagrange multiplier; K(x i , x) represents the inner product function; b * represents the classification threshold.

5. The autonomous mobile trajectory tracking method for a humanoid robot according to claim 4, characterized in that The step of establishing an environmental map of the moving environment of the humanoid robot by using the grid method according to the positions of the multiple obstacles in the environment includes: An environmental map with grid colors of white and black is constructed using the grid method. The movement space of the humanoid robot is set as a square. The initial position of the humanoid robot is used as the starting point, and a coordinate system is established. In the environmental map, the grid is represented by (x, y), which is expressed as: Among them, M represents the grid number; the symbol int indicates taking the integer; H represents the number of grids in each row; the symbol indicates taking the remainder.

6. The autonomous mobile trajectory tracking method for a humanoid robot according to claim 5, wherein The steps of constructing the autonomous movement path of the humanoid robot using the ant colony algorithm based on the cosine curve transformation model with the environmental map include: Assume that the humanoid robot moves one grid at a time. Based on the robot's movement path, randomly select a grid without obstacles in each row and column to obtain several passable grids. Starting from the first grid, use the following formula to compare and analyze whether the humanoid robot can pass through adjacent grids: J = max[|(x i+1 ― x i )|,|(y i+1 ― y i )|] where J represents the maximum distance between grids, and x i , y i represents the i-th grid, and x i+1 , y i+1 represents the adjacent grid thereto; when J = 1, grids that are adjacent and have no obstacles therebetween can be continuously passed through; otherwise, they cannot be continuously passed through; The path smoothing of the path with a corner is performed by using a cosine curve transformation model. Updating the pheromone in the ant colony algorithm includes: obtaining the pheromone τ based on the above calculation i,j : τ i,j = (1 - λ)J + λgf(x) where λ represents an adjustable parameter. Taking the shortest distance as the goal, select the optimal path among the paths passed by the ants, and update the pheromone of the optimal path. The update result is shown as follows: τ′ i,j =(1 - λ)τ i,j +λτ i,j Solving the above formula can obtain the shortest path length L * = 1 / Δτ′ i,j .

7. The method for autonomous moving trajectory tracking of a humanoid robot according to claim 5, characterized in that The path smoothing of the path with a corner using the cosine curve transformation model includes: Construct a cosine curve transformation model, determine the initial coordinates as (x1, y1) and the target coordinates as (x2, y2), solve other relevant core parameters to determine the curve, and obtain the final path cosine curve. Among them, the basic equation of the cosine curve is parameterized as: The curve can be translated first and then rotated until it passes through the known points (x1, y1) and (x2, y2). The parametric equation after the curve is translated and rotated is: Let the angle between the straight line passing through the two points (x1, y1) and (x2, y2) and the X-axis be the rotation angle of the basic cosine curve, then θ = arctan[(y2 - y1) / (x2 - x1)] In order to make the curve pass through the two points (x1, y1) and (x2, y2) and be smoothly connected, let (x1, y1) be the initial position after the basic cosine curve is rotated and translated. The basic cosine curve can extend infinitely from (x1, y1) after rotation and translation. (x1, y1) is the first (-π / 2, π / 2) interval of the cosine curve, and we get: Set the parameter t interval as (-0.5π, zπ - 0.5π), where z = [(x1 ― x2) 2 + (y1 ― y2) 2 1 / 2 / π​ Respectively calculate θ, t, m, and n. Using the above formula, the cosine curve passing through any two points (x1, y1) and (x2, y2) can be obtained.

8. An autonomous mobile trajectory tracking system for a humanoid robot, characterized in that, including: A collection module for using the robot vision system to collect the environmental image of the moving environment of the humanoid robot, and performing gray-scale processing and image enhancement processing on the environmental image to obtain the target environmental image; An identification module for extracting the texture features from the target environmental image and inputting them into a support vector machine to identify obstacles, and obtaining the positions of multiple obstacles in the environment; A establishment module for establishing an environmental map of the moving environment of the humanoid robot using the grid method according to the positions of the multiple obstacles in the environment; A construction module for constructing the autonomous movement path of the humanoid robot using the ant colony algorithm based on the cosine curve transformation model with the environmental map.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Multi-modal sensing fusion robot autonomous decision optimization method and system

    CN120953951A