Robot motion control method and apparatus, robot, and storage medium
By using lidar scanning and filtering to identify markers, the problem of insufficient sensing distance in traditional robot motion control is solved, enabling higher-precision identification and safety control of dangerous areas.
Patent Information
- Application Number
- PCT/CN2024/084443
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-31
- Filing Date
- 2024-03-28
- Publication Date
- 2026-01-08
Smart Images

Figure CN2024084443_08012026_PF_FP_ABST
Abstract
Description
Method, apparatus, robot and storage medium for robot motion control
[0001] Cross-reference to related applications
[0002] The present application claims priority to the Chinese patent application No. 2023106389099, filed on May 31, 2023, and entitled "Method, apparatus, robot and storage medium for robot motion control", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the field of mobile robots, and in particular, to a method, apparatus, robot, storage medium and computer program product for robot motion control. BACKGROUND
[0004] With the development of mobile robot technology, the application environment of mobile robots is becoming more and more complex. During the movement of the robot, it may enter a dangerous area or a prohibited area. For example, the robot may have a risk of falling due to entering a dangerous area. In the traditional technology, the robot can be controlled by infrared detection. However, due to the short sensing distance of infrared detection, when the robot moves at a high speed, it cannot prevent the robot from falling or may cause the robot to tip over due to emergency braking. In the method of controlling the movement of the robot based on the magnetic strip, the inductive distance of the magnetic strip is short and easy to demagnetize. The accuracy of the anti-falling method based on the depth camera is poor and prone to false detection. Therefore, how to ensure the safe operation of the robot has become a problem to be solved.
[0005] SUMMARY
[0006] According to various embodiments of the present application, a method, apparatus, robot, computer-readable storage medium and computer program product for robot motion control are provided.
[0007] A method for robot motion control, a laser radar is carried on the robot, a marker is arranged in the running environment of the robot, and the method comprises:
[0008] Obtaining a laser point cloud frame obtained by scanning the running environment;
[0009] Filtering the data points in the laser point cloud frame according to the reflection characteristics corresponding to each data point in the laser point cloud frame to obtain a filtered laser point cloud frame;
[0010] Clustering the data points in the filtered laser point cloud frame to obtain a point cloud cluster;
[0011] If it is determined that the laser point cloud frame contains a marker based on the point cloud cluster, the robot is controlled in motion.
[0012] An apparatus of robot motion control, the apparatus comprising:
[0013] An acquisition module, configured to acquire a laser point cloud frame obtained by scanning a running environment;
[0014] A filtering module, configured to filter data points in the laser point cloud frame according to reflection features corresponding to the data points, to obtain a filtered laser point cloud frame;
[0015] A clustering module, configured to cluster the data points in the filtered laser point cloud frame, to obtain a point cloud cluster;
[0016] A control module, configured to perform motion control on the robot if it is determined based on the point cloud cluster that the laser point cloud frame contains a marker.
[0017] A robot, comprising a memory and a processor, the memory storing a computer program, the robot being equipped with a laser radar, and a marker being arranged in a running environment of the robot, the processor implementing steps of a method of robot motion control when executing the computer program.
[0018] A computer readable storage medium, storing a computer program, the computer program implementing steps of a method of robot motion control when executed by a processor.
[0019] A computer program product, comprising a computer program, the computer program implementing steps of a method of robot motion control when executed by a processor.
[0020] Details of one or more embodiments of the application are set forth in the accompanying drawings and the description below. Other features and advantages of the application will be apparent from the description, the drawings, and the claims. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other drawings of embodiments according to these drawings without creative effort.
[0022] Fig. 1 is an application environment diagram of a method of robot motion control in an embodiment;
[0023] Fig. 2 is a flow diagram of a method of robot motion control in an embodiment;
[0024] FIG. 3 is a schematic diagram of a retro-reflective marker in one embodiment;
[0025] FIG. 4 is a flowchart of a method of motion control of a robot according to distance in one embodiment;
[0026] FIG. 5a is a schematic diagram of a region determined according to distance from a marker in one embodiment;
[0027] FIG. 5b is a flowchart of a filtering step for a laser point cloud frame in one embodiment;
[0028] FIG. 6 is a flowchart of a method of clustering to obtain point cloud clusters in one embodiment;
[0029] FIG. 7 is a flowchart of a method of motion control of a robot in another embodiment;
[0030] FIG. 8 is a block diagram of a device for motion control of a robot in one embodiment;
[0031] FIG. 9 is a diagram of an internal structure of a robot in one embodiment. DETAILED DESCRIPTION
[0032] For the purpose of promoting an understanding of the disclosure, the present application will be described in greater detail below with reference to the drawings. The preferred embodiments of the present application are illustrated in the drawings. However, the present application can be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and fully convey the scope of the application to those skilled in the art.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0034] The method for robot motion control provided in the embodiments of the present application can be applied to an application environment as shown in FIG. 1. In the application environment, a robot 102 acquires a laser point cloud frame obtained by scanning a running environment; filters data points in the laser point cloud frame according to reflection features corresponding to the data points, to obtain a filtered laser point cloud frame; clusters the data points in the filtered laser point cloud frame, to obtain a point cloud cluster; and controls motion of the robot 102 based on the point cloud cluster determining that the laser point cloud frame contains a marker. The robot 102 can be, but is not limited to, various delivery robots, work robots, service robots, sorting robots, cleaning robots, and the like. A user sets a marker at an edge of a dangerous area or a prohibited area in the running environment of the robot 102, and the marker has at least one of identifiable structural features, material features, or pattern features. For example, the user can paste markers such as reflective markers or structured markers on both sides of a staircase. The reflective markers have a specific shape and have a high reflectivity to laser pulses. The structured markers have a specific structure and present specific structural features in a laser point cloud frame formed after reflecting laser pulses. The robot 102 is provided with a laser radar, which scans the running environment to obtain the laser point cloud frame, so that the reflection intensity or the structural features are extracted as the reflection features to detect whether there is a marker in the running environment, and the motion of the robot can be controlled.
[0035] In one embodiment, as shown in FIG. 2, a method for robot motion control is provided. The method is described by taking the robot in FIG. 1 as an example, and includes the following steps:
[0036] S202, acquiring a laser point cloud frame obtained by scanning a running environment.
[0037] The running environment is an environment in which the robot runs, and can be an indoor environment or an outdoor environment. For example, the running environment can be a road environment for delivering goods. For another example, the running environment can be a hotel environment for providing services. For another example, the running environment can be a work environment in a factory.
[0038] The running environment is provided with a marker, which includes a reflective marker and a structured marker. The reflective marker has a high reflection intensity to laser pulses, and the data points with the high reflection intensity can be filtered out according to the reflection intensity corresponding to each data point, so that the reflective marker is identified from the filtered data points. The structured marker has a specific structure, and presents specific structural features in a laser point cloud frame formed after reflecting laser pulses, so that the structured marker can be identified from the filtered data points according to the structural features corresponding to each data point.
[0039] The robot is equipped with a laser radar, and thus can scan through the laser radar to obtain a laser point cloud frame. The laser point cloud frame is composed of a plurality of data points, each data point having a corresponding laser intensity. The laser radar is an optical sensor that can emit laser pulses into a running environment and receive laser pulses reflected by objects in the running environment, and generate a laser point cloud frame based on the reflected laser pulses.
[0040] In S204, the data points in the laser point cloud frame are filtered according to the reflection characteristics corresponding to the data points in the laser point cloud frame, to obtain a filtered laser point cloud frame.
[0041] The data points are points in the laser point cloud frame and are used to describe points in a three-dimensional space scanned by the laser radar. Each data point includes position coordinates, reflection characteristics, scanning angles, and other attributes. The reflection characteristics can be reflection intensity or reflection structural characteristics. The reflection intensity is used to represent the intensity of the pulse echo of the laser radar, and the reflection intensity of the data point corresponding to a point in the three-dimensional space is higher when the reflectivity of the point in the three-dimensional space to the laser pulse is higher. The structural characteristics are structured information presented by the pulse echo of the laser radar, and can reflect specific structures of objects in the running environment.
[0042] In one embodiment, when the reflection characteristics are reflection intensity, S204 specifically includes: determining an intensity threshold according to the reflection intensity corresponding to each data point in the laser point cloud frame; and filtering, among the data points in the laser point cloud frame, data points having reflection intensity greater than the intensity threshold, to obtain a filtered laser point cloud frame.
[0043] In S206, the data points in the filtered laser point cloud frame are clustered to obtain a point cloud cluster.
[0044] The point cloud cluster is a cluster composed of data points of the same type. For example, the point cloud cluster can be a cluster composed of data points corresponding to the same object scanned by the laser radar. Clustering is an unsupervised learning technique that measures the similarity of objects to be clustered and clusters similar objects into a class.
[0045] In one embodiment, the robot can cluster the data points in the filtered laser point cloud frame by using a K-Means clustering algorithm, a BIRCH (Balanced Iterative Reducing and Clustering using Hierarchies) algorithm, or a Gaussian Mixture Clustering algorithm, to obtain a point cloud cluster.
[0046] In S208, if it is determined based on the point cloud cluster that the laser point cloud frame contains a marker, the robot is controlled to move.
[0047] In one embodiment, when the reflection feature is the reflection intensity, the robot can determine whether the laser point cloud frame contains the reflective marker according to the point cloud cluster, and if it is determined based on the point cloud cluster that the laser point cloud frame contains the reflective marker, the motion control of the robot is performed.
[0048] The reflective marker is a marker composed of a reflective material and is pasted on the edge of a dangerous area or a prohibited area, and can be composed of various shapes of graphic elements. For example, the reflective marker can be composed of one or more rectangles, circles, ellipses, or triangles, etc. The plurality of graphic elements constituting the reflective marker can be the same or different. For example, the reflective marker can be composed of two or more rectangles, or the reflective marker can be composed of one rectangle and one circle, or the reflective marker can be composed of a circle and a triangle. In one embodiment, as shown in FIG. 3, the reflective marker is composed of two rectangles arranged side by side. The size of the rectangle and the spacing between the rectangles can be adjusted according to actual needs, for example, the size of the rectangle can be 50 mm x 100 mm, and the spacing between the two rectangles can be 50 mm.
[0049] The motion control is to control the motion mode of the robot, including controlling the moving speed, moving direction, or moving path of the robot, etc. For example, the robot is controlled to stop moving, or the robot is controlled to bypass the dangerous area, or the robot is controlled to reduce the moving speed, etc. If it is determined based on the point cloud cluster that the laser point cloud frame contains the reflective marker, it means that the robot is about to run to the dangerous area or the prohibited area, and the motion control of the robot is needed. For example, the user can paste the reflective marker on both sides of the stairs or the elevator, and when the laser point cloud frame collected by the laser radar contains the reflective marker, it means that the robot is about to run near the stairs or the elevator, and there is a risk of falling, so the motion control of the robot is performed. For another example, the user can paste the reflective marker on the edge of the water area or other forbidden area, and when the laser point cloud frame collected by the laser radar contains the reflective marker, it means that the robot is about to run to the forbidden area, so the motion control of the robot is performed. For another example, the user can also paste the reflective marker on the edge of the glass or other fragile obstacles, and when the laser point cloud frame collected by the laser radar contains the reflective marker, it means that the robot may collide with the fragile obstacles, so the motion control of the robot is performed.
[0050] In another embodiment, when the reflection feature is the structural feature, the robot can determine whether the laser point cloud frame contains the structured marker according to the point cloud cluster, and if it is determined based on the point cloud cluster that the laser point cloud frame contains the structured marker, the motion control of the robot is performed.
[0051] In the above embodiment, the laser point cloud frame obtained by scanning the running environment is acquired; since the reflection feature of the marker to the laser is different from the reflection feature of other objects in the running environment, the data points in the laser point cloud frame are filtered according to the reflection feature corresponding to each data point in the laser point cloud frame, so that the data points with different reflection features from other objects can be filtered out, and the filtered laser point cloud frame is obtained. The data points in the filtered laser point cloud frame are clustered to obtain a point cloud cluster, so that whether the marker is contained in the laser point cloud frame can be determined according to the shape feature of the marker. If it is determined based on the point cloud cluster that the marker is contained in the laser point cloud frame, the robot is controlled to move. By using the different feature of the marker to the laser reflection and the shape feature to identify the marker in the laser point cloud frame, the identification accuracy is higher, and the robot entering the dangerous area and the prohibited area is effectively avoided. Moreover, the sensing distance of the laser is far, and the marker can be identified at a far distance, so that the robot has sufficient time to brake, and the robot falling or toppling due to emergency braking is effectively avoided, and the safe operation of the robot is ensured.
[0052] In one embodiment, as shown in FIG. 4, S208 specifically includes the following steps:
[0053] S402, if it is determined based on the point cloud cluster that the marker is contained in the laser point cloud frame, determining the distance between the robot and the marker.
[0054] The distance is the distance between the robot and the marker in the three-dimensional space. The robot can acquire the time interval from the emission of the laser pulse to the reception of the reflected echo of the laser radar, and the distance between the robot and the marker can be determined according to the time interval.
[0055] S404, controlling the robot to move according to the distance.
[0056] Since the marker is pasted on the edge of the dangerous area, when the robot is far away from the marker, the urgency of danger is weak, and when the robot is close to the marker, the urgency of danger is stronger, so the robot is controlled to move according to the distance between the robot and the marker.
[0057] In an embodiment, S404 specifically comprises: determining the area where the robot currently locates according to the distance, and controlling the movement of the robot according to the area where the robot currently locates. Specifically, as shown in FIG. 5a, the black rectangular frame is the reflective marker. Area A is the braking area, area B is the avoidance stopping area, and area C is the deceleration area. When the robot moves to the deceleration area, the robot is controlled to reduce the moving speed, for example, to reduce the moving speed of the robot to 0.6 m / s; when the robot is in the avoidance stopping area, the robot is controlled to stop moving when encountering an obstacle; and when the robot is in the braking area, the robot is controlled to stop moving. Among them, the deceleration area is farthest from the reflective marker, the avoidance stopping area is between the braking area and the deceleration area, and the braking area is closest to the reflective marker. The distance between each area and the reflective marker can be adjusted, for example, the braking area can be an area with a distance of less than 1.2 meters from the reflective marker, the avoidance stopping area can be an area with a distance of greater than or equal to 1.2 meters and less than 1.5 meters from the reflective marker, and the deceleration area can be an area with a distance of greater than or equal to 1.5 meters and less than 2 meters from the reflective marker.
[0058] In an embodiment, S404 specifically comprises: controlling the moving path of the robot according to the distance. For example, when the distance is less than a preset value, the robot is controlled to stop moving and return. Or when the distance is less than a preset value, the robot is controlled to adjust the moving direction.
[0059] In the above embodiment, if it is determined based on the point cloud cluster that the laser point cloud frame contains the marker, the distance between the robot and the marker is determined, and the movement of the robot is controlled according to the distance. Thus, the movement mode of the robot can be adjusted according to the distance, and the flexibility of the movement of the robot is improved.
[0060] In an embodiment, S208 specifically comprises: if it is determined based on the point cloud cluster that the laser point cloud frame contains the marker, the position coordinates corresponding to each marker are determined respectively; and if the position coordinates corresponding to the markers in at least two laser point cloud frames are the same, the movement of the robot is controlled.
[0061] Among them, the position coordinates are the coordinates of the marker in the world coordinate system. Each data point of the laser point cloud frame includes the position coordinates corresponding to the data point, and the robot can determine the position coordinates of the marker according to the position coordinates corresponding to each data point. In order to avoid false detection of the robot, when the robot identifies the marker in a laser point cloud frame, the robot continues to collect laser point cloud frames by the laser radar. If the position coordinates corresponding to the markers in a plurality of laser point cloud frames continuously collected by the laser radar are the same, it is indicated that these markers all correspond to the same position marker, and it is determined that the robot scans the marker, and the movement of the robot is controlled.
[0062] In the above embodiments, if it is determined that the laser point cloud frame contains the markers based on the point cloud cluster, the position coordinates of each marker are determined respectively; if the position coordinates of the markers in at least two laser point cloud frames are the same, the robot is controlled to move. Thus, the robot mis-detection can be effectively avoided, and the accuracy of the robot motion control is improved.
[0063] In one embodiment, the marker includes a reflective marker, and the reflection feature includes reflection intensity. As shown in FIG. 5b, S204 specifically includes the following steps:
[0064] S502, determining the average reflection intensity and the maximum reflection intensity of the data points in the laser point cloud frame according to the reflection intensity corresponding to each data point in the laser point cloud frame.
[0065] The average reflection intensity is the average value of the reflection intensity corresponding to each data point in the laser point cloud frame. The maximum reflection intensity is the maximum value of the reflection intensity corresponding to each data point in the laser point cloud frame. When the robot receives the laser point cloud frame, the reflection intensity corresponding to each data point in the laser point cloud frame is counted, the average reflection intensity is calculated, and the maximum reflection intensity is searched in the reflection intensity corresponding to each data point. The robot can search the maximum reflection intensity by various searching methods such as sequential search method, dichotomy search method or binary tree search method.
[0066] S504, determining the intensity threshold according to the average reflection intensity and the maximum reflection intensity.
[0067] When the marker is a reflective marker, the reflection intensity of each data point corresponding to the reflective marker in the laser point cloud frame is high because the reflectivity of the reflective marker to the laser pulse is high. Therefore, the robot can determine the intensity threshold according to the average reflection intensity and the maximum reflection intensity, and then filter the data points in the laser point cloud frame according to the intensity threshold.
[0068] In one embodiment, S504 specifically includes: weighted sum of the average reflection intensity and the maximum reflection intensity, and the obtained sum value is taken as the intensity threshold. The weight values corresponding to the average reflection intensity and the maximum reflection intensity can be the same or different. For example, the weight value corresponding to the average reflection intensity is 0.3, and the weight value corresponding to the maximum reflection intensity is 0.7. The developer can configure the weight values corresponding to the average reflection intensity and the maximum reflection intensity when the robot is shipped, or the user can also set it in the setting interface.
[0069] In one embodiment, S504 specifically includes: the robot determines the average value of the average reflection intensity and the maximum reflection intensity, and takes the average value as the intensity threshold.
[0070] S506, filtering the data points in the laser point cloud frame based on the intensity threshold to obtain a filtered laser point cloud frame.
[0071] The robot filters the data points in the laser point cloud frame based on the intensity threshold, deletes the data points with a reflection intensity lower than the intensity threshold, and retains the data points with a reflection intensity higher than the intensity threshold.
[0072] In the above embodiment, the average reflection intensity and the maximum reflection intensity of each data point in the laser point cloud frame are determined according to the reflection intensity corresponding to the data point; the intensity threshold is determined according to the average reflection intensity and the maximum reflection intensity; and the data points in the laser point cloud frame are filtered based on the intensity threshold to obtain the filtered laser point cloud frame. Thus, the data points meeting the reflection characteristics of the reflective marker can be filtered from the laser point cloud frame, and the reflective marker is used to identify the dangerous area with a high laser pulse reflection intensity, thereby improving the accuracy of the robot motion control.
[0073] In one embodiment, the marker is a graphic combination composed of at least two graphic elements; as shown in FIG. 6, S206 specifically includes the following steps:
[0074] S602, determining a first clustering threshold and a second clustering threshold according to the distance between the graphic elements in the graphic combination; the first clustering threshold is smaller than the second clustering threshold.
[0075] The graphic element can be a graphic of various shapes, including a rectangle, a circle, or a triangle, etc. The robot can identify the graphic combination in the laser point cloud frame according to the shape characteristics of the graphic combination. In one embodiment, the first clustering threshold determined by the robot is smaller than the distance between the graphic elements, and the second clustering threshold is greater than the distance between the graphic elements, so that the data points corresponding to the graphic elements can be clustered into class clusters through the first clustering threshold, and the data points corresponding to the graphic combination can be clustered into class clusters through the second clustering threshold. In one embodiment, assuming that the distance between the graphic elements is R, the robot can determine the first clustering threshold as 0.5R and the second clustering threshold as 1.5R.
[0076] S604, clustering the data points in the filtered laser point cloud frame according to the first clustering threshold, and selecting a first class cluster meeting a first shape condition from the class clusters obtained by clustering; the first shape condition is determined based on the shape of the graphic element.
[0077] The first shape condition is a screening condition determined based on a shape of the graphic element, and is used to screen out a cluster that meets a shape feature of the graphic element. In an embodiment, the first shape condition can be that an aspect ratio of a minimum circumscribed rectangle of the cluster is within a preset range. The preset range corresponding to the aspect ratio can be determined according to an aspect ratio of the graphic element. For example, if the graphic element is a rectangle with an aspect ratio equal to 2, the preset range can be a numerical interval of 1.8 to 2.2. In another embodiment, the first shape condition can be that a radius of a minimum circumscribed circle of the cluster is within a preset range. The preset range corresponding to the radius can be determined according to a radius of the graphic element. For example, if the graphic element is a circle with a radius equal to 3, the preset range can be a numerical interval of 2.5 to 3.5. The robot clusters data points in the filtered laser point cloud frame according to the first clustering threshold, and clusters data points with a mutual distance less than the first clustering threshold into one cluster. Then, the robot screens the cluster obtained by clustering according to the first shape condition, discards clusters that are too large, too small, or not similar to the graphic element, and obtains a first cluster that meets a geometric feature of a single graphic element.
[0078] S606, according to the second clustering threshold, the data points in the first cluster are clustered, and the second cluster meeting the second shape condition is selected from the clusters obtained by clustering.
[0079] The second shape condition is a screening condition determined based on a shape of the graphic combination, and is used to screen out a cluster that meets a shape feature of the graphic combination. In an embodiment, the second shape condition can be that an aspect ratio of a minimum circumscribed rectangle of the cluster is within a preset range. The preset range of the aspect ratio can be determined according to an aspect ratio of the graphic combination as a whole. For example, if the aspect ratio of the graphic combination is equal to 1.5, the preset range can be a numerical interval of 1 to 2. In another embodiment, the second shape condition can be that a radius of a minimum circumscribed circle of the cluster is within a preset range. The preset range of the radius can be determined according to a radius of the graphic combination as a whole.
[0080] The robot clusters data points in the first cluster according to the second clustering threshold, and clusters data points with a mutual distance less than the second clustering threshold into one cluster. Then, the robot screens the cluster obtained by clustering according to the second shape condition, discards clusters that are too large, too small, or not similar to the graphic combination, and obtains a second cluster that meets a geometric feature of the graphic combination as a whole.
[0081] S608, filtering the second cluster to obtain a point cloud cluster.
[0082] In order to make the number of clusters contained in the finally obtained point cloud cluster consistent with the number of graphic elements contained in the graphic combination, the robot filters the second cluster to obtain a point cloud cluster.
[0083] In one embodiment, S608 specifically comprises: clustering each second-type cluster into a plurality of sub-clusters according to the first clustering threshold, and determining the number of sub-clusters in each second-type cluster; filtering the second-type clusters based on the number of sub-clusters in the second-type clusters to obtain the point cloud cluster.
[0084] The robot clusters each second-type cluster according to the first clustering threshold, and clusters each second-type cluster into a plurality of sub-clusters, the shape and size of the sub-clusters being similar to the graphic elements. The robot determines the number of sub-clusters in each second-type cluster, compares the number of sub-clusters in the second-type clusters with the number of graphic elements in the graphic combination, discards the second-type clusters with too many or too few sub-clusters in the second-type clusters, and retains the second-type clusters as the point cloud cluster. For example, if the graphic combination includes two graphic elements, the second-type clusters with less than 2 or more than 3 sub-clusters in the second-type clusters are discarded, and the retained point cloud cluster includes 2-3 sub-clusters. The robot filters the second-type clusters according to the number of sub-clusters in the second-type clusters, so that the filtered point cloud cluster not only meets the geometric characteristics of the graphic combination, but also includes the number of sub-clusters in the second-type clusters consistent with the number of graphic elements in the graphic combination, thereby more accurately identifying the marker and avoiding false detection.
[0085] In the above embodiment, the first clustering threshold and the second clustering threshold are determined according to the distance between the graphic elements in the graphic combination, then the data points in the filtered laser point cloud frame are clustered according to the first clustering threshold, and the first-type clusters meeting the first shape condition are selected from the clustered clusters. The data points in the first-type clusters are clustered according to the second clustering threshold, and the second-type clusters meeting the second shape condition are selected from the clustered clusters. The second-type clusters are filtered to obtain the point cloud cluster. Thus, the point cloud cluster meeting the geometric characteristics of the image combination can be clustered, the marker can be identified according to the shape of the image combination, and the accuracy of identifying the marker is improved.
[0086] In one embodiment, S208 specifically comprises: selecting at least two target sub-clusters in each point cloud cluster; determining the ratio between the number of data points of the target sub-clusters for each point cloud cluster; if there is a target ratio meeting the ratio condition in the ratio, it is determined that the laser point cloud frame contains a marker, and the robot is controlled to move.
[0087] The target sub-cluster is a sub-cluster meeting the selection condition among all the sub-clusters. For example, the selection condition can be that the number of data points is greater than a preset value. For another example, the selection condition can be that the number of data points is within a preset ranking in all sub-clusters, and the preset ranking can be 2, for example.
[0088] The ratio condition is a condition for determining whether the point cloud cluster is a marker according to the ratio. In an embodiment, the ratio condition can be that the ratio is less than a preset value, for example, the preset value can be 0.5, 0.6, etc. In another embodiment, the ratio condition can be that the ratio is within a preset ratio interval. The robot can determine the preset ratio interval according to the sizes of the graphic elements in the graphic combination. For example, if the graphic combination includes two graphic elements, the sizes of the two graphic elements are the same, and the ratio between the sizes of the graphic elements is 1, when the ratio between the number of data points of each target sub-cluster is much greater than 1 or much less than 1, it indicates that the sizes of each target sub-cluster are greatly different, which does not meet the size characteristics of the graphic elements in the graphic combination, and is not the point cloud cluster corresponding to the marker. Therefore, the robot can determine that the preset ratio interval is [0.5, 1.5]. If there is a target ratio in the ratio that meets the ratio condition, it indicates that each target sub-cluster in the point cloud cluster meets the size characteristics of the graphic elements in the graphic combination, thereby determining that the point cloud cluster is a marker.
[0089] In the above embodiment, at least two target sub-clusters are selected from each sub-cluster of the point cloud cluster; for each point cloud cluster, the ratio between the number of data points of the target sub-clusters is determined; if there is a target ratio in the ratio that meets the ratio condition, it is determined that the laser point cloud frame contains a marker, and the motion of the robot is controlled. According to whether the sizes of each target sub-cluster in the point cloud cluster meet the size characteristics of each graphic element in the graphic combination, it is determined whether the point cloud cluster is a marker, which further improves the accuracy of identifying the marker.
[0090] In an embodiment, as shown in FIG. 7, the method for controlling the motion of the robot includes the following steps:
[0091] S702, obtaining a laser point cloud frame obtained by scanning the running environment.
[0092] Wherein, each data point in the laser point cloud frame corresponds to a reflection feature, which can be reflection intensity or structural feature. When the reflection feature is reflection intensity, S704 is executed.
[0093] S704, determining the average reflection intensity and the maximum reflection intensity of the data points according to the reflection intensity corresponding to each data point in the laser point cloud frame.
[0094] S706, determining an intensity threshold according to the average reflection intensity and the maximum reflection intensity, and filtering the data points in the laser point cloud frame based on the intensity threshold to obtain a filtered laser point cloud frame.
[0095] S708, when the marker is a graphic combination composed of at least two graphic elements, determining a first clustering threshold and a second clustering threshold according to the distance between each graphic element in the graphic combination; the first clustering threshold is less than the second clustering threshold.
[0096] S710, cluster the data points in the filtered laser point cloud frame according to a first clustering threshold, and select a first cluster meeting a first shape condition from the clustered clusters; the first shape condition is determined based on a shape of a graphic element.
[0097] S712, cluster the data points in the first cluster according to a second clustering threshold, and select a second cluster meeting a second shape condition from the clustered clusters; the second shape condition is determined based on a shape of a graphic combination.
[0098] S714, cluster each second cluster into a plurality of sub-clusters according to the first clustering threshold, and determine a number of sub-clusters in each second cluster.
[0099] S716, filter the second cluster based on the number of sub-clusters in the second cluster to obtain a point cloud cluster, and select at least two target sub-clusters from the sub-clusters of each point cloud cluster.
[0100] S718, for each point cloud cluster, determine a ratio between the number of data points of the target sub-clusters.
[0101] S720, if there is a target ratio meeting a ratio condition in the ratio, determine that the laser point cloud frame contains a marker, and determine a distance between the robot and the marker; and perform motion control on the robot according to the distance.
[0102] The specific content of S702 to S720 can refer to the specific implementation process described above.
[0103] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps has no strict sequence limitation, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or stages in other steps.
[0104] Based on the same inventive concept, the present embodiment also provides a robot motion control device corresponding to the method for implementing the above-mentioned robot motion control. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more robot motion control device embodiments provided below can refer to the limitations of the robot motion control method in the above text, which will not be repeated here.
[0105] In one embodiment, as shown in FIG. 8, an apparatus for robot motion control is provided, comprising: an acquisition module 802, a filtering module 804, a clustering module 806, and a control module 808, wherein:
[0106] The acquisition module 802 is configured to acquire a laser point cloud frame obtained by scanning a running environment;
[0107] The filtering module 804 is configured to filter data points in the laser point cloud frame according to reflection characteristics corresponding to each data point in the laser point cloud frame, to obtain a filtered laser point cloud frame;
[0108] The clustering module 806 is configured to cluster data points in the filtered laser point cloud frame, to obtain a point cloud cluster;
[0109] The control module 808 is configured to perform motion control on the robot if it is determined based on the point cloud cluster that the laser point cloud frame contains a marker.
[0110] In the above embodiment, the laser point cloud frame obtained by scanning the running environment is acquired; since the reflection characteristics of the marker are different from those of other objects in the running environment, the data points in the laser point cloud frame are filtered according to the reflection characteristics corresponding to each data point in the laser point cloud frame, so that the data points with different reflection characteristics from other objects can be filtered out, and the filtered laser point cloud frame is obtained. The data points in the filtered laser point cloud frame are clustered to obtain a point cloud cluster, so that whether the laser point cloud frame contains a marker can be determined according to the shape characteristics of the marker. If it is determined based on the point cloud cluster that the laser point cloud frame contains a marker, motion control is performed on the robot. By using the different reflection characteristics and shape characteristics of the marker to the laser to identify the marker in the laser point cloud frame, the identification accuracy is higher, and the robot is effectively prevented from entering a dangerous area and a prohibited area. Moreover, the sensing distance of the laser is far, and the marker can be identified at a far distance, so that the robot has sufficient time to brake, effectively preventing the robot from falling or toppling due to emergency braking, and ensuring the safe operation of the robot.
[0111] In one embodiment, the control module 808 is further configured to:
[0112] If it is determined based on the point cloud cluster that the laser point cloud frame contains a marker, the distance between the robot and the marker corresponding thereto is determined;
[0113] Motion control is performed on the robot according to the distance.
[0114] In one embodiment, the laser point cloud frame includes at least two frames; the control module 808 is further configured to:
[0115] If it is determined that the laser point cloud frame contains the markers based on the point cloud cluster, the position coordinates corresponding to each marker are determined respectively;
[0116] If the position coordinates corresponding to the markers in at least two laser point cloud frames are the same, the robot is controlled to move.
[0117] In an embodiment, the filtering module 804 is further configured to:
[0118] According to the reflection intensity corresponding to each data point in the laser point cloud frame, the average reflection intensity and the maximum reflection intensity of the data point are determined;
[0119] According to the average reflection intensity and the maximum reflection intensity, the intensity threshold is determined;
[0120] Based on the intensity threshold, the data points in the laser point cloud frame are filtered to obtain a filtered laser point cloud frame.
[0121] In an embodiment, the marker is a graphical combination composed of at least two graphical elements; the clustering module 806 is further configured to:
[0122] According to the distance between each graphical element in the graphical combination, the first clustering threshold and the second clustering threshold are determined; the first clustering threshold is smaller than the second clustering threshold;
[0123] According to the first clustering threshold, the data points in the filtered laser point cloud frame are clustered, and a first cluster satisfying a first shape condition is selected from the clusters obtained by clustering; the first shape condition is determined based on the shape of the graphical element;
[0124] According to the second clustering threshold, the data points in the first cluster are clustered, and a second cluster satisfying a second shape condition is selected from the clusters obtained by clustering; the second shape condition is determined based on the shape of the graphical combination;
[0125] The second cluster is filtered to obtain a point cloud cluster.
[0126] In an embodiment, the clustering module 806 is further configured to:
[0127] According to the first clustering threshold, each second cluster is clustered into a plurality of sub-clusters, and the number of sub-clusters in each second cluster is determined;
[0128] Based on the number of sub-clusters, the second cluster is filtered to obtain a point cloud cluster.
[0129] In an embodiment, the control module 808 is further configured to:
[0130] At least two target sub-clusters are selected from the sub-clusters of each point cloud cluster;
[0131] For each point cloud cluster, determine the ratio between the number of data points of the target sub-cluster;
[0132] If there is a target ratio in the ratio that meets the ratio condition, it is determined that the laser point cloud frame contains a marker, and the robot is controlled to move.
[0133] The various modules in the robot motion control device described above can be implemented in whole or in part by software, hardware, and combinations thereof. The various modules described above can be embedded in hardware form or independent of the processor in the computer device, or can be stored in the form of software in the memory in the computer device, so as to be called and executed by the processor to perform the operations corresponding to the various modules.
[0134] In one embodiment, a robot is provided, and its internal structure diagram can be as shown in FIG. 9. The robot includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the robot is used to provide computing and control capabilities. The memory of the robot includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the robot is used to exchange information between the processor and external devices. The communication interface of the robot is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved through WIFI, mobile cellular network, NFC (Near Field Communication), or other technologies. The computer program is executed by the processor to implement a robot motion control method. The display unit of the robot is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the robot can be a touch layer overlaid on the display screen, or a key, trackball, or touchpad provided on the robot shell. It can also be an external keyboard, touchpad, or mouse, etc.
[0135] Those skilled in the art can understand that the structure shown in FIG. 9 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific robot can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0136] In an embodiment, a robot is provided, comprising a memory and a processor, the memory storing a computer program, the robot being equipped with a laser radar, and a marker being arranged in an operating environment of the robot, the processor implementing the steps in the above method embodiments when executing the computer program.
[0137] In an embodiment, a computer readable storage medium is provided, storing a computer program, the computer program being executed by a processor to implement the steps in the above method embodiments.
[0138] In an embodiment, a computer program product is provided, comprising a computer program, the computer program being executed by a processor to implement the steps in the above method embodiments.
[0139] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0140] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0141] Any combination of the technical features of the above-mentioned embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above-mentioned embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0142] The above-mentioned embodiments only express several embodiments of the present application, and the description is more specific and detailed, but it cannot be understood as a limitation on the scope of the patent application. It should be noted that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the scope of the patent protection of the present application should be subject to the appended claims.
Claims
1. A method for robot motion control, wherein a laser radar is mounted on the robot, and a marker is arranged in an operating environment of the robot, and the method comprises: obtaining a laser point cloud frame scanned from the operating environment; filtering data points in the laser point cloud frame according to reflection characteristics corresponding to the data points, to obtain a filtered laser point cloud frame; clustering the data points in the filtered laser point cloud frame, to obtain a point cloud cluster; and if it is determined that the marker is included in the laser point cloud frame based on the point cloud cluster, performing motion control on the robot. The motion control on the robot if it is determined that the marker is included in the laser point cloud frame based on the point cloud cluster comprises: determining a distance between the robot and the marker if it is determined that the marker is included in the laser point cloud frame based on the point cloud cluster; and performing motion control on the robot according to the distance. The laser point cloud frame comprises at least two frames, and the motion control on the robot if it is determined that the marker is included in the laser point cloud frame based on the point cloud cluster comprises: determining position coordinates corresponding to each of the markers if it is determined that the marker is included in the laser point cloud frame based on the point cloud cluster; and performing motion control on the robot if the position coordinates corresponding to the markers in at least two of the laser point cloud frames are the same. The marker comprises a reflective marker, and the reflection characteristics comprise reflection intensity, and the filtering of the data points in the laser point cloud frame according to the reflection characteristics corresponding to the data points to obtain the filtered laser point cloud frame comprises: determining an intensity threshold value according to the reflection intensity corresponding to each of the data points in the laser point cloud frame; and filtering, from the data points in the laser point cloud frame, data points with reflection intensity greater than the intensity threshold value, to obtain the filtered laser point cloud frame. The determination of the intensity threshold value according to the reflection intensity corresponding to each of the data points in the laser point cloud frame comprises: determining an average reflection intensity and a maximum reflection intensity of the data points according to the reflection intensity corresponding to each of the data points in the laser point cloud frame; and determining the intensity threshold value according to the average reflection intensity and the maximum reflection intensity.
2. The method of claim 1, wherein, The marker is a graphic combination composed of at least two graphic elements, and the clustering of the data points in the filtered laser point cloud frame to obtain the point cloud cluster comprises: determining a first clustering threshold value and a second clustering threshold value according to distances between the graphic elements in the graphic combination; the first clustering threshold value is less than the second clustering threshold value; clustering the data points in the filtered laser point cloud frame according to the first clustering threshold value, and selecting a first cluster satisfying a first shape condition from clusters obtained by the clustering; the first shape condition is determined based on shapes of the graphic elements; clustering the data points in the first cluster according to the second clustering threshold value, and selecting a second cluster satisfying a second shape condition from clusters obtained by the clustering; the second shape condition is determined based on a shape of the graphic combination; and filtering the second cluster, to obtain the point cloud cluster. 3. The method of claim 1, wherein, 4. The method of claim 1, wherein, 5. The method of claim 4, wherein, 6. The method of claim 1, wherein, 7. The method of claim 6, wherein, The filtering of the second type of cluster to obtain the point cloud cluster comprises: According to the first clustering threshold, each second type of cluster is clustered into a plurality of sub-clusters, and the number of sub-clusters in each second type of cluster is determined; and The second type of cluster is filtered based on the number of sub-clusters in the second type of cluster to obtain the point cloud cluster.
8. The method according to any one of claims 1 to 7, characterized in that, If it is determined based on the point cloud cluster that the laser point cloud frame contains a marker, the robot is controlled to move. Select at least two target sub-clusters in each sub-cluster of the point cloud cluster; For each point cloud cluster, determine the ratio between the number of data points of the target sub-clusters; and If there is a target ratio in the ratio that meets the ratio condition, it is determined that the laser point cloud frame contains a marker, and the robot is controlled to move.
9. The method according to any one of claims 1 to 8, characterized in that, The method further comprises: When the reflection feature is a structural feature, it is determined from the point cloud cluster whether the laser point cloud frame contains a structured marker, If it is determined based on the point cloud cluster that the laser point cloud frame contains a marker, the robot is controlled to move. If it is determined based on the point cloud cluster that the laser point cloud frame contains a structured marker, the robot is controlled to move.
10. The method according to any one of claims 1 to 9, characterized in that, The control of the robot to move comprises: Controlling the robot to stop moving; or Controlling the robot to bypass a dangerous area; or Controlling the robot to reduce the moving speed.
11. An apparatus for robot motion control, characterized by The device comprises: An acquisition module configured to acquire a laser point cloud frame obtained by scanning a running environment; A filtering module configured to filter data points in the laser point cloud frame according to reflection features corresponding to the data points in the laser point cloud frame to obtain a filtered laser point cloud frame; A clustering module configured to cluster the data points in the filtered laser point cloud frame to obtain point cloud clusters; A control module configured to control the robot to move if it is determined based on the point cloud cluster that the laser point cloud frame contains a marker.
12. The apparatus of claim 11, wherein, The control module is further configured to determine a distance between the robot and the marker if it is determined based on the point cloud cluster that the laser point cloud frame contains a marker, and control the robot to move according to the distance.
13. The apparatus of claim 11, wherein, The control module is further configured to determine position coordinates corresponding to each marker if it is determined based on the point cloud cluster that the laser point cloud frame contains a marker, and control the robot to move if the position coordinates corresponding to the markers in at least two laser point cloud frames are the same.
14. The apparatus of claim 11, wherein, The marker comprises a reflective marker, and the reflection feature comprises reflection intensity. The filtering module is further configured to determine an intensity threshold based on the reflection intensity corresponding to each data point in the laser point cloud frame, and filter out data points with reflection intensity greater than the intensity threshold from the data points in the laser point cloud frame to obtain a filtered laser point cloud frame.
15. The apparatus of claim 14, wherein, The determination of the intensity threshold based on the reflection intensity corresponding to each data point in the laser point cloud frame comprises: Determining the average reflection intensity and the maximum reflection intensity of the data points based on the reflection intensity corresponding to each data point in the laser point cloud frame; and Determining the intensity threshold based on the average reflection intensity and the maximum reflection intensity.
16. The apparatus of claim 11, wherein, The marker is a graphic combination composed of at least two graphic elements; The clustering module is further configured to determine a first clustering threshold and a second clustering threshold according to distances between the graphic elements in the graphic combination; the first clustering threshold is smaller than the second clustering threshold; cluster data points in the filtered laser point cloud frame according to the first clustering threshold, and select a first cluster meeting a first shape condition from the clusters obtained by clustering; the first shape condition is determined based on shapes of the graphic elements; cluster data points in the first cluster according to the second clustering threshold, and select a second cluster meeting a second shape condition from the clusters obtained by clustering; the second shape condition is determined based on a shape of the graphic combination; and filter the second cluster to obtain the point cloud cluster.
17. The apparatus of claim 16, wherein, The clustering module is further configured to cluster each of the second clusters into a plurality of sub-clusters according to the first clustering threshold, and determine a number of sub-clusters in each of the second clusters; and filter the second cluster based on the number of sub-clusters in the second cluster to obtain the point cloud cluster.
18. The apparatus of any one of claims 11 to 17, wherein, The control module is further configured to select at least two target sub-clusters from sub-clusters of each of the point cloud clusters; determine a ratio between numbers of data points of the target sub-clusters for each of the point cloud clusters; and if there is a target ratio meeting a ratio condition in the ratio, determine that the laser point cloud frame contains a marker, and perform motion control on the robot.
19. A robot comprising a memory and a processor, the memory storing a computer program, the robot being provided with a laser radar, and a marker being arranged in an operating environment of the robot, the processor implementing steps of the method in any one of claims 1 to 10 when executing the computer program.
20. A computer readable storage medium storing a computer program, the computer program implementing steps of the method in any one of claims 1 to 10 when executed by a processor.