Robot motion control method and related device, robot and storage medium
By calculating boundary confidence in robot motion control and determining motion vectors based on pixel values, the problem of insufficient robot environmental adaptability is solved, achieving higher environmental adaptability and accuracy.
Patent Information
- Application Number
- CN202511306066.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-09-12
AI Technical Summary
Existing robot motion control technology has weak environmental adaptability, resulting in insufficient robustness.
By acquiring target points in the map image, the boundary confidence is calculated based on the first pixel value of the target point and the second pixel value representing the boundary features. In response to the confidence condition being met, the robot's motion vector is determined and motion control is performed.
It improves the adaptability of robot motion control to the environment, reduces the boundary misjudgment rate, and enhances the accuracy and robustness of motion control.
Smart Images

Figure CN120791807B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of robots, in particular to a robot motion control method and related device, robot and storage medium. BACKGROUND
[0002] Thanks to the rapid development of artificial intelligence, electronic information and other technologies, robots have been widely used in hotels, logistics and many other places.
[0003] At present, the existing robot motion control technology usually has weak adaptability to the environment, resulting in insufficient robustness of robot motion control. In view of this, how to improve the environmental adaptability of robot motion control has become a problem to be solved. SUMMARY
[0004] The technical problem solved by the present application is to provide a robot motion control method and related device, robot and storage medium, which can improve the environmental adaptability of robot motion control.
[0005] In order to solve the above technical problem, the first aspect of the present application provides a robot motion control method, comprising: obtaining a target point of a robot in a map image; obtaining a boundary confidence based on a first pixel value of the target point and a second pixel value representing a boundary feature; wherein the boundary confidence represents the boundary effectiveness at the target point; in response to the boundary confidence satisfying a confidence condition, determining a motion vector of the robot based on the image coordinates of the target point, and controlling the robot to move based on the motion vector.
[0006] In order to solve the above technical problem, the second aspect of the present application provides a robot motion control device, comprising: a target point acquisition module, a confidence calculation module and a motion control module, the target point acquisition module is used for obtaining a target point of a robot in a map image; the confidence calculation module is used for obtaining a boundary confidence based on a first pixel value of the target point and a second pixel value representing a boundary feature; wherein the boundary confidence represents the boundary effectiveness at the target point; the motion control module is used for determining a motion vector of the robot based on the image coordinates of the target point in response to the boundary confidence satisfying a confidence condition, and controlling the robot to move based on the motion vector.
[0007] In order to solve the above technical problem, the third aspect of the present application provides an electronic device, at least comprising a storage and a processor coupled to each other, the storage at least stores program instructions, and the processor is used to execute the program instructions to realize the robot motion control method in the first aspect.
[0008] In order to solve the above technical problem, the fourth aspect of the present application provides a robot, comprising a driving device and an electronic device in the third aspect, the driving device is used to drive the whole robot to move.
[0009] To solve the above technical problems, the fifth aspect of the present application provides a computer readable storage medium, which stores program instructions capable of being run by a processor, and the program instructions are used to implement the robot motion control method of the first aspect.
[0010] The above scheme obtains a target point of the robot in the map image, obtains a boundary confidence based on a first pixel value of the target point and a second pixel value representing a boundary feature, and the boundary confidence represents the boundary effectiveness at the target point, so that in response to the boundary confidence satisfying a confidence condition, a motion vector of the robot is determined based on the image coordinates of the target point, and the robot is controlled to move based on the motion vector. Since the boundary confidence is determined by the first pixel value and the second pixel value, it is helpful to achieve pixel-level filtering accuracy with the aid of gray gradient information. Compared with traditional methods such as morphological operations, the boundary misjudgment rate can be greatly reduced. In the case where the boundary confidence satisfies the confidence condition, the motion vector of the robot is determined based on the image coordinates of the target point, and the robot is controlled to move accordingly, which can improve the environmental adaptability of the robot motion control. BRIEF DESCRIPTION OF DRAWINGS
[0011] Figure 1 is a flowchart of an embodiment of the robot motion control method of the present application;
[0012] Figure 2 is a framework diagram of an embodiment of the robot motion control device of the present application;
[0013] Figure 3 is a framework diagram of an embodiment of the electronic device of the present application;
[0014] Figure 4 is a framework diagram of an embodiment of the robot of the present application;
[0015] Figure 5 is a framework diagram of an embodiment of the computer readable storage medium of the present application. DETAILED DESCRIPTION
[0016] The schemes of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0017] In the following description, specific details are set forth in order to provide a thorough understanding of the present application, but the present application can be practiced without these details. In other instances, well-known methods, structures and techniques have not been described in detail in order to avoid obscuring the present application.
[0018] The terms "system" and "network" are often used interchangeably herein. The term "and / or", merely describes association between associated objects, indicates that there can be three cases: A and / or B, means A exists alone, A and B exist together, B exists alone. In addition, the segment " / " herein generally indicates that the associated objects before and after are "or" relationship. In addition, "multiple" herein means two or more than two.
[0019] Please refer to Figure 1 , Figure 1 is a flowchart of an embodiment of the robot motion control method of the present application. Specifically, it can include the following steps:
[0020] Step S11: obtaining a target point of the robot in the map image.
[0021] In one implementation scenario, the map image can include but is not limited to a grid map, a three-dimensional map, etc., and the specific type of the map image is not limited herein.
[0022] In one implementation scenario, as a possible example, the target point can be generated by the target object triggering the point selection instruction in the map image. For example, taking a hotel robot as an example, the hotel front desk, etc. can control the terminal device displaying the map image, and trigger the point selection instruction on the map image displayed by the terminal device, and then generate the target point at the position of the point selection instruction on the map image. In addition, if the point selection instruction is triggered again on the map image displayed by the terminal device, a new target point can be generated at the newly triggered point selection instruction.
[0023] In another implementation scenario, as another possible example, the target point can also be pre-set in the map image. For example, still taking the hotel robot as an example, the hotel front desk, etc. can pre-trigger the point selection instruction on the map image displayed by the terminal device, and then generate the target point at the position of the point selection instruction on the map image, which remains unchanged thereafter.
[0024] It should be noted that the above examples are only a few possible examples of obtaining the target point in actual application, and other obtaining methods are not limited herein, nor are they exemplified one by one. In addition, the target point can be regarded as the destination or end point of the robot. Of course, the target point can also have other meanings under certain scenarios. For example, still taking the hotel robot as an example, under the welcome scenario, the target point can be the welcome point.
[0025] Step S12: obtaining a boundary confidence based on the first pixel value of the target point and the second pixel value representing the boundary feature.
[0026] In the embodiments of the present disclosure, the boundary confidence degree represents the boundary effectiveness at the target point. Exemplarily, the greater the boundary confidence degree, the higher the boundary effectiveness at the target point, and vice versa, the smaller the boundary confidence degree, the lower the boundary effectiveness at the target point.
[0027] In one implementation scenario, the second pixel value representing the boundary feature can be set according to actual application. It should be noted that the core role of the second pixel value representing the boundary feature (i.e., the boundary feature value) is to distinguish the edge positions of different regions (such as walls, table legs, flat ground, etc.) in the map image, and reflect the properties of the boundary in the form of a value (such as an image gray value). That is, the closer the first pixel value of the target point to the boundary feature value, the more it can be determined that the target point is close to or located at the edge position of the related region in the map image, the higher the certainty, and the more it can support the robot to approach the target point for movement according to the image coordinates of the target point; on the contrary, the farther the first pixel value of the target point from the boundary feature value, the less it can be determined that the target point is close to or located at the edge position of the related region in the map image (for example, the target point may actually be located at the wall), the higher the uncertainty, and the less it can support the robot to approach the target point for movement according to the image coordinates of the target point. Without loss of generality, in order to be compatible with map images using different standards, the second pixel value can be set to the middle value of the value range of the first pixel value. For example, in the case where the value range of the first pixel value is 0 to 255, the second pixel value can be set to 127. Of course, the above example is only one possible example of the second pixel value in actual application, and the specific value of the second pixel value is not limited here, and examples are not repeated one by one.
[0028] In one implementation scenario, the difference between the first pixel value and the second pixel value can be obtained as a pixel difference value, and then the boundary confidence degree is obtained based on the pixel difference value. It should be noted that the boundary confidence degree can be negatively correlated with the absolute value of the pixel difference value. That is, the greater the absolute value of the pixel difference value, the higher the boundary confidence degree, and vice versa, the smaller the absolute value of the pixel difference value, the lower the boundary confidence degree. The above method of obtaining the difference between the first pixel value and the second pixel value as a pixel difference value, and then obtaining the boundary confidence degree based on the pixel difference value, and the boundary confidence degree being negatively correlated with the absolute value of the pixel difference value, can eliminate the influence of absolute brightness as much as possible, and help to reduce the sensitivity to overall light intensity changes.
[0029] In a specific implementation scenario, after obtaining the pixel difference value, a ratio between the pixel difference value and the second pixel value can be obtained as a pixel ratio, and a difference between 1 and a square of the pixel ratio can be obtained as the boundary confidence. In this way, the ratio between the pixel difference value and the second pixel value is obtained as the pixel ratio, which can map the pixel difference value to a value range of -1 to 1, and can eliminate the influence of absolute brightness as much as possible. Then, the difference between 1 and the square of the pixel ratio is obtained as the boundary confidence, which can help to reduce the sensitivity to overall light intensity changes.
[0030] In a specific implementation scenario, for ease of description, it is assumed that the second pixel value is set to 127 when the value range of the first pixel value is 0 to 255. The boundary confidence can be represented as:
[0031] edge_confidence = 1 - pow((pixel_value - 127) / 127, 2)
[0032] In the above formula, edge_confidence represents the boundary confidence, pow represents the power operation, pixel_value represents the first pixel value, (pixel_value - 127) / 127 represents the pixel ratio, i.e., the base of the power operation, and 2 represents the power of the power operation. Through the above formula, a high confidence greater than 0.9 can be generated when the first pixel value is in the interval [127 - 25, 127 + 25]. Of course, the above example is only one possible calculation method of the boundary confidence, and the calculation method of the boundary confidence is not limited herein, and no further examples are given.
[0033] Step S13: In response to the boundary confidence satisfying a confidence condition, a motion vector of the robot is determined based on the image coordinates of the target point, and the robot is controlled to move based on the motion vector.
[0034] In an implementation scenario, the confidence condition can include, but is not limited to, that the boundary confidence is higher than a confidence threshold, the boundary confidence is not lower than the confidence threshold, and the like. The specific content of the confidence condition is not limited herein. It should be noted that the confidence threshold can be set according to actual application, such as being set to 0.9, 0.95, and the like, but is not limited to the above.
[0035] In an implementation scenario, in response to the boundary confidence not satisfying the confidence condition, a prompt message can be output, and the prompt message is used to remind to re-specify the target point of the robot in the map image. That is, in the case where the boundary confidence does not satisfy the confidence condition, a prompt message can be output, and the prompt message is used to remind to re-specify the target point of the robot in the map image. On this basis, the foregoing step of obtaining the target point of the robot in the map image can be returned for iteration to determine the running vector of the robot.
[0036] In an implementation scenario, the motion vector can be determined based on an obstacle avoidance vector after the detection vector evades the obstacle, a vector module value of the detection vector, and a reference step length, the detection vector representing a direction vector sensed by the robot. To obtain the reference step length, the image coordinates can be mapped based on an environmental resolution parameter of the robot to obtain physical coordinates of the target point in a real space. It should be noted that the environmental resolution parameter represents the conversion relationship between the image coordinate system of the map image and the space coordinate system of the real space. On this basis, local data within a first range centered on the physical coordinates can be extracted from the sensing data of the robot as target data, and then the reference step length can be obtained based on the environmental resolution parameter and a conflict index determined from the target data, and the conflict index represents the distribution density of the obstacle. The above-mentioned manner extracts local data within a first range centered on the physical coordinates in the sensing data as target data, determines the conflict index representing the distribution density of the obstacle based on the target data, and obtains the reference step length by combining the environmental resolution parameter, that is, the reference step length is an adaptive elastic step length, which helps to improve the search efficiency compared with the fixed step length, especially in the case of complex terrain. It should be noted that, through experiments, the adaptive elastic step length can reduce 60% of the calculation redundancy compared with the fixed step length.
[0037] In a specific implementation scenario, the detection vector can be sensed by a direction sensor or other related sensors of the robot. In addition, it should be noted that the detection vector represents a direction angle relative to the robot.
[0038] In a specific implementation scenario, as described above, the environmental resolution parameter represents the conversion relationship between the image coordinate system of the map image and the space coordinate system of the real space, such as the mapping between the physical scale and the image pixel scale. For details, refer to the technical details of the conversion between the image coordinate system and the space coordinate system, which are not described herein. For ease of description, the environmental resolution parameter can be denoted as yaml_param.resolution.
[0039] In one specific implementation scenario, the robot can be configured with a relevant sensor for detecting the surrounding environment, so as to obtain sensing data of the surrounding environment by the relevant sensor. For example, in the case of a single-line laser radar, it can be determined that there is an object at a certain distance from the robot on a straight line at a certain emission angle of the laser beam, according to the detection parameters such as the time interval of the laser beam returning, etc. In addition, in the case that the detection parameters also include the loss of the laser beam returning, the material of the object can also be determined. Thus, by different emission angles, the sensing data of the surrounding environment can be obtained. Of course, the above example is only an example of obtaining sensing data by a single-line laser radar, and the same can be applied to other sensors, and will not be repeated here.
[0040] In one specific implementation scenario, the first range can be set according to actual application. For example, the first range can be set to 1 meter around, 1.5 meters around, 2 meters around, etc., and the specific value of the first range is not limited here.
[0041] In one specific implementation scenario, after obtaining the target data, the distribution density of the obstacle can be calculated according to the target data. Still taking the single-line laser radar as an example, as described above, the target data can include whether there is an object at each position within the first range centered on the physical coordinates and the material of the object, and if there is an object at a certain position and the robot cannot pass through the object normally according to the material of the object, the object can be regarded as an obstacle. On this basis, the distribution density of the obstacle (such as the number of obstacles per square meter, or the number of obstacles per square meter) can be calculated based on the number of obstacles determined within the first range and the volume (or area) of the first range. Of course, the above example is only one possible example of calculating the distribution density in actual application, and other possible calculation methods are not limited here, and will not be repeated here.
[0042] In one specific implementation scenario, after calculating the distribution density of the obstacle, the conflict index can be determined accordingly. For example, the conflict index and the distribution density can be positively correlated. That is, the conflict index can be positively correlated with the distribution density. In other words, the greater the distribution density, the higher the conflict index, and vice versa, the smaller the distribution density, the lower the conflict index. Of course, the specific functional relationship between the conflict index and the distribution density can be a linear relationship or a nonlinear relationship, and is not limited here.
[0043] In one specific implementation scenario, after obtaining the conflict index, the reference step size can be calculated in combination with the environment resolution parameter. Illustratively, the reference step size can be inversely proportional to the conflict index. That is, the higher the conflict index, the larger the reference step size, and vice versa, the lower the conflict index, the smaller the reference step size. As one possible example, the product of a preset coefficient (e.g., 0.5, etc.) and the conflict index can be obtained first, and then 1 minus the product is multiplied by the environment resolution parameter to obtain the reference step size. For ease of description, the reference step size step_delta can be represented as:
[0044] step_delta = yaml_param.resolution * (1 - 0.5 * conflict_index)
[0045] In the above formula, yaml_param.resolution represents the environment resolution parameter, conflict_index represents the conflict index, and 0.5 is the preset coefficient. Of course, the above example is only one possible way to calculate the reference step size, and other possible calculation methods are not limited herein and will not be exemplified one by one. In addition, as another possible implementation example, the reference step size can also be dynamically updated based on new sensing data of the surrounding environment of the robot during movement. It should be noted that the robot can dynamically update the reference step size at a target time during movement. The target time can be determined according to a pre-set update frequency, such as when the pre-set update frequency is 1 time per second, the reference step size can be dynamically updated when one second has elapsed since the last determination of the reference step size. Of course, the above example is only one possible example of the target time, and the setting method of the target time is not limited herein and will not be exemplified one by one. Illustratively, after the avoidance vector after the detection vector avoids the obstacle, the vector norm of the detection vector, and the movement vector are determined based on the reference step size, the robot can be controlled to move based on the movement vector, and in this process, new sensing data of the surrounding environment of the robot can be obtained. Then, the local data within the first range centered on the physical coordinates can be extracted again as target data based on the newly extracted target data, a new conflict index can be determined based on the new target data, and a new reference step size can be obtained in combination with the environment resolution parameter and the new conflict index. Then, a new movement vector can be determined based on the avoidance vector after the detection vector avoids the obstacle, the vector norm of the detection vector, and the new reference step size, and the robot can be controlled to move based on the new movement vector. This cycle is iterated to dynamically update the conflict index based on the dynamically updated sensing data, and then to dynamically update the reference step size.
[0046] In one specific implementation scenario, after obtaining the reference step, the reference step can be decremented on the basis of the preset step of the avoidance search to determine the second range. For example, in the case of a preset step of the avoidance search of 1 meter and a value of 1 meter, the second range can be determined based on 1 - step_delta. On this basis, the detection vector can be combined with the target data to perform the avoidance search of the obstacle within the second range centered on the physical coordinates to determine the obstacle avoidance vector. For example, if it can be determined based on the target data that a ray emitted from the current point of the robot in the opposite direction of the detection vector passes through the obstacle, the current point can be taken as the starting point of a new ray, a point on the new ray can be searched within the second range centered on the physical coordinates, if it can be determined based on the target data that the new ray does not pass through the obstacle, the direction of the detection vector can be adjusted to be on the new ray to obtain the obstacle avoidance vector; otherwise, if it can be determined based on the target data that the ray emitted from the current point of the robot in the opposite direction of the detection vector does not pass through the obstacle, the direction of the detection vector can be directly adjusted as the obstacle avoidance vector. In one word, the detection vector after avoiding the obstacle is the obstacle avoidance vector. In addition, if the current avoidance search fails in the avoidance search process, the avoidance search can be continued to be attempted, and the second range in the last avoidance search can be reduced (for example, the second range in the last avoidance search can be reduced by a reduction factor of 0.2) when the avoidance search is continued to be attempted. In addition, an upper limit number of times of the avoidance search (for example, 3 times, etc.) can be set until the number of attempts reaches the upper limit number of times. For ease of description, it can be represented as:
[0047] Δ n = Δ0• α n
[0048] In the above formula, Δ0 represents the second range at the beginning, Δ n represents the second range at the nth avoidance search, and α n represents the scaling factor at the nth avoidance search (for example, the preset coefficient at the first avoidance search can be taken as the base number n to obtain the power). Of course, the above example is only one possible example of the determination of the second range in actual application, and other possible determination methods are not limited herein and will not be exemplified one by one.
[0049] In one implementation scenario, as one possible implementation, the motion vector can be obtained based on the obstacle avoidance vector, the vector norm of the detection vector, and the reference step. For ease of description, the motion vector m can be represented as:
[0050]
[0051] In the above formula, d represents the detection vector, -sign(d) represents the obstacle avoidance vector, |d| represents the vector norm of the detection vector, step_delta represents the reference step, and the “.” in the above formula represents the Hadamard product.
[0052] In another implementation scenario, as another possible implementation, the detection vector can be searched for obstacle avoidance based on the target data within a search range centered on the physical coordinates of the target point in the real space, to obtain an obstacle avoidance vector after the detection vector avoids obstacles. It should be noted that the detection vector represents the direction vector sensed by the robot, the target data is the local data around the physical coordinates in the sensing data of the robot on the surrounding environment, and the search range is determined by decreasing the reference step based on the preset step of the avoidance search. In addition, the specific process of obtaining the obstacle avoidance vector through the avoidance search can be referred to the foregoing related description, which will not be described here. On this basis, the map vector with the actual direction consistent with the detection vector can be searched in the direction dual set based on the detection vector, as the target vector, and the direction dual set can include a plurality of vector pairs, and each vector pair can include a map vector with the actual direction consistent and a direction vector in the real space. Then, the motion vector can be obtained based on the obstacle avoidance vector, the vector norm of the detection vector, the target vector and the reference step. Through the above method, the map vector with the actual direction consistent with the detection vector is searched in the direction dual set as the target vector, and the motion vector is obtained based on the obstacle avoidance vector, the vector norm of the detection vector, the target vector and the reference step, so that the closed-loop control of the “detection-motion” vector can be realized. Through experiments, the direction matching accuracy can be improved to ±0.5°, which is obviously improved compared with the matching accuracy ±2° of the prior art.
[0053] In a specific implementation scenario, for ease of understanding, the direction dual set can be exemplarily represented as:
[0054] vector<pair<Point2f, Point2f>>mapping = {
[0055] {Point2f(delta,0.0f), Point2f(-1.0f,0.0f)},
[0056] {Point2f(0.0f,delta), Point2f(0.0f,-1.0f)}
[0057] }
[0058] It should be noted that in the above examples, pair<Point2f, Point2f> represents a vector pair, and the vectors in the curly braces are paired to present the mapping relationship between the map vector and the direction vector in the real space. Of course, the above examples are only a few possible examples of vector pairs in actual applications, and other possible cases are not limited herein and will not be exemplified one by one.
[0059] In a specific implementation scenario, after obtaining the map vector (i.e., the target vector) that is consistent with the actual direction and the detection vector, the motion vector can be obtained based on the obstacle avoidance vector, the vector norm of the detection vector, the target vector, and the reference step length. Specifically, a unit vector having the same direction as the target vector can be obtained, and the motion vector can be obtained based on the obstacle avoidance vector, the vector norm, the unit vector, and the reference step length. For ease of description, the motion vector m can be represented as:
[0060]
[0061] In the above formula, d represents the detection vector, -sign (d) represents the obstacle avoidance vector, |d| represents the vector norm of the detection vector, u represents a unit vector having the same direction as the target vector, step_delta represents the reference step length, and “.” in the above formula represents the Hadamard product.
[0062] In a specific implementation scenario, after obtaining the motion vector, the robot can be controlled to move along the vector direction of the motion vector. In addition, as a possible embodiment, the robot can also be controlled to move a distance equal to the vector norm of the motion vector, and when the robot moves a distance equal to the vector norm of the motion vector, the robot can be controlled to return to perform the aforementioned obstacle avoidance search based on the target data on the detection vector in the search range centered on the physical coordinates of the target point in the real space to obtain the obstacle avoidance vector after the detection vector avoids the obstacle, to obtain a new motion vector, and continue to control the robot to move according to the new motion vector, and so on until the robot reaches the target point.
[0063] In one specific implementation scenario, during the robot movement, the foregoing search for the detection vector to avoid the obstacle based on the target data within the search range centered on the physical coordinates of the target point in the real space to obtain the obstacle-avoiding vector after the detection vector avoids the obstacle and iteration can be performed in response to the current state of the robot satisfying the iteration condition. It should be noted that the iteration condition can be set to include but not limited to: the interval since the last calculation of the movement vector has exceeded a preset time length (for example, 1 second, 5 seconds, etc.), the robot has not yet reached the target point, and the like or a combination of the above. The iteration condition is not limited herein, so that the avoidance search can be continuously performed in combination with new sensing data during the robot movement to reduce the possibility of collision with the obstacle and also help improve the motion control accuracy.
[0064] The foregoing scheme obtains the target point of the robot in the map image, obtains the boundary confidence based on the first pixel value of the target point and the second pixel value representing the boundary feature, and the boundary confidence represents the boundary effectiveness at the target point, so that in response to the boundary confidence satisfying the confidence condition, the movement vector of the robot is determined based on the image coordinates of the target point, and the robot is controlled to move based on the movement vector. Since the boundary confidence is determined by the first pixel value and the second pixel value, it is helpful to achieve pixel-level filtering accuracy with the aid of the gray gradient information. Compared with traditional methods such as morphological operation, the boundary misjudgment rate can be greatly reduced. In the case where the boundary confidence satisfies the confidence condition, the movement vector of the robot is determined based on the image coordinates of the target point, and the robot is controlled to move accordingly, which can improve the environmental adaptability of the robot motion control.
[0065] Please refer to Figure 2 , Figure 2 is a frame diagram of one embodiment of the robot motion control device of the present application. The robot motion control device 20 includes: a target point acquisition module 21, a confidence calculation module 22, and a motion control module 23. The target point acquisition module 21 is configured to obtain the target point of the robot in the map image. The confidence calculation module 22 is configured to obtain the boundary confidence based on the first pixel value of the target point and the second pixel value representing the boundary feature. The boundary confidence represents the boundary effectiveness at the target point. The motion control module 23 is configured to determine the movement vector of the robot based on the image coordinates of the target point in response to the boundary confidence satisfying the confidence condition, and control the robot to move based on the movement vector.
[0066] According to the scheme, the robot motion control device 20 obtains a target point of the robot in the map image, obtains a boundary confidence based on a first pixel value of the target point and a second pixel value representing a boundary feature, and the boundary confidence represents a boundary validity at the target point. In response to the boundary confidence satisfying a confidence condition, a motion vector of the robot is determined based on an image coordinate of the target point, and the robot is controlled to move based on the motion vector. Since the boundary confidence is determined by the first pixel value and the second pixel value, the pixel-level filtering accuracy can be achieved by using the gray gradient information, and compared with the traditional method such as morphological operation, the boundary misjudgment rate can be greatly reduced. In the case that the boundary confidence satisfies the confidence condition, the motion vector of the robot is determined based on the image coordinate of the target point, and the robot is controlled to move accordingly, which can improve the environmental adaptability of the robot motion control.
[0067] In some disclosed embodiments, the confidence calculation module 22 includes a difference calculation sub-module for obtaining a difference between the first pixel value and the second pixel value as a pixel difference; the confidence calculation module 22 includes a difference mapping sub-module for mapping based on the pixel difference to obtain the boundary confidence; wherein the boundary confidence is negatively correlated with the absolute value of the pixel difference.
[0068] In some disclosed embodiments, the difference mapping sub-module includes a ratio calculation unit for obtaining a ratio between the pixel difference and the second pixel value as a pixel ratio; the difference mapping sub-module includes a confidence calculation unit for obtaining a difference between 1 and a square of the pixel ratio as the boundary confidence.
[0069] In some disclosed embodiments, the motion vector is determined based on an obstacle avoidance vector after the detection vector avoids the obstacle, a vector module value of the detection vector, and a reference step length, the detection vector represents a direction vector of the robot sensing itself, the robot motion control device 20 includes a coordinate mapping module for mapping the image coordinate based on an environmental resolution parameter of the robot to obtain a physical coordinate of the target point in a real space; wherein the environmental resolution parameter represents a conversion relationship between an image coordinate system of the map image and a space coordinate system of the real space; the robot motion control device 20 includes a data extraction module for extracting local data within a first range centered on the physical coordinate as target data from the sensing data of the robot on the surrounding environment; the robot motion control device 20 includes a step length calculation module for obtaining a reference step length based on the environmental resolution parameter and a conflict index determined by the target data; wherein the conflict index represents a distribution density of the obstacle.
[0070] In some disclosed embodiments, the conflict index is positively correlated with the distribution density; and / or, the reference step is negatively correlated with the conflict index; and / or, the obstacle avoidance vector is determined by the detection vector in combination with the target data in an obstacle avoidance search within a second range centered on the physical coordinates, and the second range is determined by decreasing the reference step on the basis of a preset step of the avoidance search; the reference step can also be dynamically updated based on new sensing data of the surroundings of the robot during movement.
[0071] In some disclosed embodiments, the motion control module 23 comprises an avoidance search submodule for performing an obstacle avoidance search on the detection vector based on the target data within a search range centered on the physical coordinates of the target point in the real space, to obtain an obstacle avoidance vector of the detection vector after avoiding obstacles; wherein the detection vector represents a direction vector sensed by the robot, the target data is local data around the physical coordinates in the sensing data of the surroundings of the robot, and the search range is determined by decreasing the reference step on the basis of a preset step of the avoidance search; the motion control module 23 comprises a dual mapping submodule for searching a map vector with an actual direction consistent with the detection vector as a target vector within a direction dual set based on the detection vector; wherein the direction dual set comprises a plurality of vector pairs, and each vector pair comprises a map vector with an actual direction consistent with the direction vector in the real space; the motion control module 23 comprises a vector determination submodule for obtaining a motion vector based on the obstacle avoidance vector, the vector norm of the detection vector, the target vector and the reference step.
[0072] In some disclosed embodiments, the vector determination submodule comprises a unit vector acquisition unit for acquiring a unit vector with the same direction as the target vector; the vector determination submodule comprises a motion vector calculation unit for obtaining a motion vector based on the obstacle avoidance vector, the vector norm, the unit vector and the reference step.
[0073] In some disclosed embodiments, the motion control module 23 comprises a loop iteration submodule for, in response to the current state of the robot satisfying an iteration condition during movement of the robot, returning to perform an obstacle avoidance search on the detection vector based on the target data within a search range centered on the physical coordinates of the target point in the real space, to obtain an obstacle avoidance vector of the detection vector after avoiding obstacles.
[0074] In some disclosed embodiments, the numerical range of the first pixel value is 0 to 255, and the second pixel value is 127; and / or, in the case that the boundary confidence does not satisfy the confidence condition, an output prompt message is outputted, and the prompt message is used to remind to re-specify the target point of the robot in the map image; and / or, the confidence condition comprises that the boundary confidence is higher than a confidence threshold.
[0075] Please refer to Figure 3 , Figure 3is a schematic diagram of a framework of an embodiment of the electronic device. The electronic device 30 at least includes a memory 31 and a processor 32 coupled with each other. The memory 31 at least stores program instructions. The processor 32 is configured to execute the program instructions to implement the steps in any of the above robot motion control method embodiments. Details can be referred to the above disclosed embodiments, which will not be repeated here.
[0076] Specifically, the processor 32 is configured to control itself and the memory 31 to implement the steps in any of the above robot motion control method embodiments. The processor 32 can also be referred to as a CPU (Central Processing Unit). The processor 32 can be an integrated circuit chip with processing capability. The processor 32 can also be a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general purpose processor can be a microprocessor or the processor can also be any conventional processor. In addition, the processor 32 can be jointly implemented by an integrated circuit chip.
[0077] The above scheme, the electronic device 30 obtains a target point of the robot in the map image, obtains a boundary confidence based on a first pixel value of the target point and a second pixel value representing a boundary feature, and the boundary confidence represents a boundary validity at the target point, so as to determine a motion vector of the robot based on an image coordinate of the target point in response to the boundary confidence satisfying a confidence condition, and control the robot to move based on the motion vector. Since the boundary confidence is determined by the first pixel value and the second pixel value, it is helpful to achieve pixel-level filtering accuracy with the aid of gray gradient information. Compared with traditional methods such as morphological operation, the boundary misjudgment rate can be greatly reduced. Then, the motion vector of the robot is determined based on the image coordinate of the target point in the case that the boundary confidence satisfies the confidence condition, and the robot is controlled to move accordingly, which can improve the environmental adaptability of robot motion control.
[0078] Please refer to Figure 4 , Figure 4is a frame diagram of an embodiment of the robot of the present application. The robot 40 can include the driving device 41 for driving the robot 40 as a whole and the electronic device 30 in the above disclosed embodiments. It should be noted that the driving device 41 can include, but is not limited to, a roller type, a track type, a bionic type (e.g., a mechanical leg of a humanoid robot, etc.), and the working principle of the driving device 41 is not limited herein, nor will it be exemplified one by one. In addition, as a possible implementation example, the robot 40 can also include other devices, such as related sensors that can include, but are not limited to, direction sensors, and the like, which are not limited herein, nor will they be exemplified one by one.
[0079] In the above solution, the robot 40 includes the driving device 41 for driving the robot 40 as a whole and the electronic device 30 in the above disclosed embodiments. Since the boundary confidence is determined by the first pixel value and the second pixel value, it is helpful to achieve pixel-level filtering accuracy with the aid of gray gradient information, and compared with traditional methods such as morphological operations, the boundary misjudgment rate can be greatly reduced. In the case that the boundary confidence meets the confidence condition, the motion vector of the robot is determined based on the image coordinates of the target point, and the motion control is performed accordingly, which can improve the environmental adaptability of the robot motion control.
[0080] Please refer to Figure 5 , Figure 5 is a frame diagram of an embodiment of the computer readable storage medium of the present application. The computer readable storage medium 50 stores program instructions 51 capable of being executed by a processor, and the program instructions 51 are used to implement the steps in any of the above robot motion control method embodiments.
[0081] In the above solution, the computer readable storage medium 50 obtains a target point of a robot in a map image, obtains a boundary confidence based on a first pixel value of the target point and a second pixel value representing a boundary feature, and the boundary confidence represents the boundary effectiveness at the target point. Therefore, in response to the boundary confidence meeting a confidence condition, a motion vector of the robot is determined based on image coordinates of the target point, and the robot is controlled to move based on the motion vector. Since the boundary confidence is determined by the first pixel value and the second pixel value, it is helpful to achieve pixel-level filtering accuracy with the aid of gray gradient information, and compared with traditional methods such as morphological operations, the boundary misjudgment rate can be greatly reduced. In the case that the boundary confidence meets the confidence condition, the motion vector of the robot is determined based on the image coordinates of the target point, and the motion control is performed accordingly, which can improve the environmental adaptability of the robot motion control.
[0082] In some embodiments, the device provided by the embodiments of the present disclosure has functions or includes modules that can be used to execute the methods described in the above method embodiments, and the specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0083] The above description of the various embodiments tends to emphasize differences between the various embodiments, and the same or similar elements can be referred to each other, and will not be described herein for the sake of brevity.
[0084] In several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the above-described device implementation is only schematic, and for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed elements can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0085] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place or can be distributed to a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment scheme.
[0086] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0087] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the various embodiment methods of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.
[0088] If the technical solution of the present application involves personal information, the product applying the technical solution of the present application has clearly informed the personal information processing rules before processing the personal information and obtained the personal independent consent. If the technical solution of the present application involves sensitive personal information, the product applying the technical solution of the present application has obtained the personal independent consent before processing the sensitive personal information and at the same time meets the requirement of "explicit consent". For example, at the personal information collection device such as camera, a clear and prominent mark is set to inform that it has entered the personal information collection range and will collect personal information. If the individual voluntarily enters the collection range, it is considered to agree to collect personal information. Or on the device for processing personal information, through the pop-up information or by asking the individual to upload his / her personal information, the individual's authorization is obtained under the condition of using obvious mark / information to inform the personal information processing rules. The personal information processing rules can include personal information processor, personal information processing purpose, processing method and personal information type, etc.
Claims
1. A robot motion control method, characterized in that, include: Obtain the robot's target point in the map image; Based on the first pixel value of the target point and the second pixel value representing the boundary features, a boundary confidence score is obtained; wherein, the boundary confidence score represents the boundary validity at the target point; In response to the boundary confidence level satisfying the confidence condition, the motion vector of the robot is determined based on the image coordinates of the target point, and the robot is controlled to move based on the motion vector; The step of obtaining the boundary confidence score based on the first pixel value of the target point and the second pixel value representing the boundary features includes: The difference between the first pixel value and the second pixel value is obtained as the pixel difference. The ratio between the pixel difference and the second pixel value is obtained as the pixel ratio. The difference between 1 and the square of the pixel ratio is used as the boundary confidence level.
2. The method according to claim 1, characterized in that, The motion vector is determined based on the obstacle avoidance vector after the detection vector avoids the obstacle, the vector magnitude of the detection vector, and the reference step size. The detection vector represents the robot's self-sensing orientation vector. The step size acquisition steps include: The image coordinates are mapped based on the robot's environmental resolution parameters to obtain the physical coordinates of the target point in real space; wherein, the environmental resolution parameters characterize the transformation relationship between the image coordinate system of the map image and the spatial coordinate system of the real space. From the robot's sensing data of the surrounding environment, local data within a first range centered on the physical coordinates is extracted as target data. The reference step size is obtained based on the environmental resolution parameter and the conflict index determined by the target data; wherein the conflict index characterizes the distribution density of obstacles.
3. The method according to claim 2, characterized in that, The conflict index is positively correlated with the distribution density; And / or, the reference step size is negatively correlated with the conflict index; And / or, the obstacle avoidance vector is determined by the detection vector within a second range centered on the physical coordinates, combined with the target data, to perform obstacle avoidance search, and the second range is determined by subtracting the reference step size from the preset step size of the avoidance search; And / or, the reference step size is dynamically updated based on the robot's progress in sensing new data about the surrounding environment during its movement.
4. The method according to claim 1, characterized in that, Determining the robot's motion vector based on the image coordinates of the target point includes: Within a search range centered on the physical coordinates of the target point in real space, obstacle avoidance search is performed on the detection vector based on the target data to obtain the obstacle avoidance vector after the detection vector avoids the obstacle; wherein, the detection vector represents the direction vector of the robot sensing itself, the target data is the local data around the physical coordinates in the robot's sensing data of the surrounding environment, and the search range is determined by decreasing the reference step size based on the preset step size of the avoidance search; Based on the detection vector, a map vector whose actual direction is consistent with the detection vector is searched within the direction dual set as the target vector; wherein, the direction dual set contains several vector pairs, and each vector pair contains a map vector whose actual direction is consistent with the direction and a direction vector in the real space. The motion vector is obtained based on the obstacle avoidance vector, the vector magnitude of the detection vector, the target vector, and the reference step size.
5. The method according to claim 4, characterized in that, The process of obtaining the motion vector based on the obstacle avoidance vector, the vector magnitude of the detection vector, the target vector, and the reference step size includes: Obtain a unit vector with the same direction as the target vector; The motion vector is obtained based on the obstacle avoidance vector, the vector magnitude, the unit vector, and the reference step size.
6. The method according to claim 4, characterized in that, During the robot's movement, the method further includes: In response to the robot's current state satisfying the iteration condition, the process returns to performing obstacle avoidance search on the detection vector based on the target data within the search range centered on the physical coordinates of the target point in real space, to obtain the obstacle avoidance vector after the detection vector avoids the obstacle.
7. The method according to any one of claims 1 to 6, characterized in that, The first pixel value ranges from 0 to 255, and the second pixel value is 127; And / or, if the boundary confidence does not meet the confidence condition, a prompt message is output, and the prompt message is used to remind the robot to re-designate the target point in the map image; And / or, the confidence condition includes the boundary confidence level being higher than the confidence threshold.
8. A robot motion control device, characterized in that, include: The target point acquisition module is used to acquire the robot's target points in the map image; The confidence calculation module is used to obtain the boundary confidence based on the first pixel value of the target point and the second pixel value representing the boundary features; wherein, the boundary confidence represents the boundary validity at the target point; A motion control module is used to determine the motion vector of the robot based on the image coordinates of the target point in response to the boundary confidence degree satisfying the confidence condition, and to control the robot to move based on the motion vector; The step of obtaining the boundary confidence score based on the first pixel value of the target point and the second pixel value representing the boundary features includes: The difference between the first pixel value and the second pixel value is obtained as the pixel difference. The ratio between the pixel difference and the second pixel value is obtained as the pixel ratio. The difference between 1 and the square of the pixel ratio is used as the boundary confidence level.
9. An electronic device, characterized in that, It includes at least a memory and a processor coupled to each other, wherein the memory stores at least program instructions, and the processor is used to execute the program instructions to implement the robot motion control method according to any one of claims 1 to 7.
10. A robot, characterized in that, It includes a drive unit and an electronic device as described in claim 9, wherein the drive unit is used to drive the overall movement of the robot.
11. A computer-readable storage medium, characterized in that, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the robot motion control method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Mobile control method, mobile robot, and computer storage medium
CN109074083A
Boundary fusion method and device for segmented region, and mobile robot
CN112927256A