Control method, device, robot and computer readable storage medium
By combining the information alignment technology of RGB cameras and depth cameras, the problem of inaccurate acquisition of three-dimensional object position information in robot control is solved, improving the robot control accuracy and user experience.
Patent Information
- Application Number
- CN202110141605.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-02
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-02-02
AI Technical Summary
Existing robot control methods have low accuracy due to inaccurate acquisition of three-dimensional object position information, especially the low resolution of the 3D ToF method and the difficulty in achieving accurate positioning using two-dimensional information detected by radar.
Using a method that combines RGB cameras and depth cameras, the two-dimensional coordinate information is obtained through the RGB camera and the three-dimensional coordinate information is obtained through the depth camera, and the two-dimensional coordinates and three-dimensional coordinates are aligned based on the robot's position information on the global map, using the semantic segmentation model and The scene recognition model obtains the label information of objects to improve the control accuracy of the robot.
Controlling the robot through various information alignment results improves the robot's obstacle avoidance and cleaning efficiency and accuracy, enhances object recognition and positioning capabilities, and improves user experience.
Smart Images

Figure CN112927278B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of robot control technology, and in particular, relates to a control method, device, robot and computer-readable storage medium. Background Art
[0002] The control of the robot includes the control of the robot's obstacle avoidance. Obstacle avoidance is an important performance indicator of robots (such as robots that perform cleaning functions), and it also directly determines the user's product experience. Today's robot obstacle avoidance solutions are roughly divided into two directions, one direction is with three-dimensional object position information, and the other direction is without three-dimensional object position information. Among them, the three-dimensional object position information is obtained by: obtaining it through the 3D time of flight method (Time of Flight, ToF). In this method, due to the low resolution of the camera, the image information obtained is not easy to assist in obstacle avoidance. The obstacle avoidance solution without three-dimensional object position information usually uses laser radar obstacle avoidance, but because the three-dimensional object position information of the object cannot be fully perceived, the positioning of the object is not accurate enough, which in turn affects the accuracy of robot control.
[0003] In summary, the existing control methods still have inaccurate control, so it is necessary to provide a new method to solve the technical problem of low accuracy in controlling the robot. Summary of the invention
[0004] The embodiments of the present application provide a control method that can improve the precise control of a robot.
[0005] In a first aspect, an embodiment of the present application provides a control method, which is applied to a robot, wherein the robot includes an RGB camera and a depth camera, and the control method includes:
[0006] Determine information of two-dimensional coordinates in the image obtained by the RGB camera, wherein the information of the two-dimensional coordinates includes two-dimensional contour information and label information, wherein the label information is used to indicate whether the two-dimensional contour information has a label, and, when the two-dimensional contour information has a label, the label corresponding to the two-dimensional contour information;
[0007] Determine information of three-dimensional coordinates in the depth image obtained by the depth camera, the information of the three-dimensional coordinates includes three-dimensional contour information and first position information, the first position information is: relative position information between the coordinates of the actual scene corresponding to the three-dimensional coordinates and the depth camera;
[0008] Aligning the two-dimensional coordinates with the three-dimensional coordinates based on the global position information of the robot in the global map, the relative position information of the RGB camera and the robot, and the relative position information of the depth camera and the robot;
[0009] The robot is controlled accordingly according to the alignment result.
[0010] In a second aspect, an embodiment of the present application provides a control device applied to a robot, wherein the robot includes an RGB camera and a depth camera, and the control device includes:
[0011] a two-dimensional coordinate information determination unit, used to determine the two-dimensional coordinate information in the image obtained by the RGB camera, the two-dimensional coordinate information including two-dimensional contour information and label information, the label information is used to indicate whether the two-dimensional contour information has a label, and is used to indicate the label corresponding to the two-dimensional contour information when the two-dimensional contour information has a label;
[0012] A three-dimensional coordinate information determination unit, used to determine the three-dimensional coordinate information in the depth image obtained by the depth camera, the three-dimensional coordinate information including three-dimensional contour information and first position information, the first position information being: the relative position information between the coordinates of the actual scene corresponding to the three-dimensional coordinate and the depth camera;
[0013] an alignment unit, configured to align the two-dimensional coordinates with the three-dimensional coordinates based on the global position information of the robot in the global map, the relative position information of the RGB camera and the robot, and the relative position information of the depth camera and the robot;
[0014] The robot control unit is used to control the robot accordingly according to the alignment result.
[0015] In a third aspect, an embodiment of the present application provides a robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a robot, enables the robot to execute the method described in the first aspect above.
[0018] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0019] In the embodiment of the present application, the two-dimensional coordinates and the three-dimensional coordinates are aligned based on the global position information of the robot in the global map, the relative position information of the RGB camera and the robot, and the relative position information of the depth camera and the robot, and the information of the two-dimensional coordinates includes two-dimensional contour information and label information, and the information of the three-dimensional coordinates includes three-dimensional contour information and the first position information. Therefore, the obtained alignment result includes not only the three-dimensional contour information but also the label information corresponding to the two-dimensional contour information. That is, when the robot is controlled accordingly according to the alignment result, the information involved includes not only the three-dimensional contour information but also the label information corresponding to the two-dimensional contour information. The diverse information is conducive to improving the accurate control of the robot.
[0020] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0022] Figure 1 It is a flowchart of a first control method provided by an embodiment of the present application;
[0023] Figure 2 is a schematic diagram of an image captured by an RGB camera provided in an embodiment of the present application;
[0024] Figure 3 This is an embodiment of the present application. Figure 2 Schematic diagram obtained after semantic segmentation of an image;
[0025] Figure 4 It is a schematic diagram of the corresponding relationship between a robot, relative position information of an RGB camera and the robot, and a schematic diagram of the relative position information of a depth camera and the robot in a global map provided by an embodiment of the present application;
[0026] Figure 5 is a flow chart of a second control method provided in an embodiment of the present application;
[0027] Figure 6 is a flowchart of three control methods provided in another embodiment of the present application;
[0028] Figure 7 is a structural schematic diagram of a control device provided in one embodiment of the present application;
[0029] Figure 8 It is a schematic diagram of the structure of a robot provided in one embodiment of the present application. DETAILED DESCRIPTION
[0030] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0031] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0032] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0033] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0034] In the existing robot control method, the three-dimensional position information of the object is obtained by 3D ToF, and then the robot is controlled according to the three-dimensional position information of the object, or the object is detected by radar, etc., and then the robot is controlled according to the detection result. However, since the resolution of the depth camera corresponding to 3D ToF is low, the resolution of the three-dimensional position information obtained is also low, so when the robot is controlled according to the three-dimensional position information with low resolution, it is easy to cause the problem of low control accuracy. In addition, since the radar can only obtain two-dimensional information after detecting the object, and the two-dimensional information is difficult to accurately locate the object, when the robot is controlled according to the detection result of the radar, it is also easy to cause the problem of low control accuracy. In order to solve this problem, an embodiment of the present application provides a control method, in which the image obtained by the RGB camera and the depth image obtained by the depth camera are analyzed and aligned, and then the robot is controlled according to the alignment result. Since the robot is controlled by combining more information, the accuracy of the control of the robot is improved.
[0035] The control method provided in the embodiment of the present application is described below with reference to the accompanying drawings.
[0036] Figure 1 A flow chart of a first control method provided in an embodiment of the present application is shown, and the control method is applied to a robot, the robot including a red, green, blue (RGB) camera and a depth camera, as described in detail as follows:
[0037] Step S11, determining the two-dimensional coordinate information in the image obtained by the RGB camera, the two-dimensional coordinate information includes two-dimensional contour information and label information, the label information is used to indicate whether the two-dimensional contour information has a label, and, when the two-dimensional contour information has a label, the label corresponding to the two-dimensional contour information.
[0038] In some embodiments, semantic segmentation is performed on the two-dimensional image obtained by the RGB camera through a semantic segmentation model to obtain two-dimensional contour information and label information in the image obtained by the RGB camera.
[0039] In some embodiments, the network structure of the above-mentioned semantic segmentation model can use fully convolutional neural networks (FCN), the network structure Segnet mentioned in the paper "A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation (Segnet)", the network structure U-Net mentioned in the paper "Convolutional Neural Networks for Biomedical Image Segmentation (U-Net: Conolutional Networks for Biomedical Image Segmentation)", etc.
[0040] The semantic segmentation model can perform pixel-level end-to-end semantic segmentation on the image. In order to improve the accuracy of the segmentation results obtained after semantic segmentation of the image, the semantic segmentation model can be optimized in the following way: using diverse image data as training samples to ensure that the residual network in the semantic segmentation model has a certain complexity. Furthermore, the semantic segmentation model also includes a dilated convolutional network. After adding the dilated convolutional network, not only the receptive field is increased, but also the resolution is not lost. Here, in the segmentation task, a larger receptive field can detect and segment large targets. On the other hand, a higher resolution can accurately locate the target.
[0041] like Figure 2 and Figure 3 As shown, assuming Figure 2 The image obtained by graying the image obtained by the RGB camera is then segmented by the semantic segmentation model. Figure 2 After semantic segmentation, we get Figure 3The image shown, that is, after semantic segmentation, can obtain the two-dimensional contour information of the wires, socks, and background on the ground. If the training samples of the semantic segmentation model include training samples such as "wires", then the semantic segmentation result of the semantic segmentation model for "wires" includes not only the two-dimensional contour information of the "wires", but also the label "wire" corresponding to the two-dimensional contour information in the corresponding label information. However, if the training samples of the semantic segmentation model do not include training samples such as "wires", the semantic segmentation model cannot recognize that the category corresponding to the two-dimensional contour information of the "wires" is "wires", that is, the label in the obtained label information is empty. Of course, if multiple objects are segmented out in the image, each object corresponds to a label information. Since the semantic segmentation model can feedback the two-dimensional contour information of the object after segmenting the image based on the semantic segmentation model, that is, it can completely extract a contour information of the current obstacle, thereby improving the control accuracy of the robot, for example, improving the obstacle avoidance efficiency and cleaning coverage of the robot.
[0042] Before step S11, the robot constructs a corresponding global map in a designated area (such as the area to be cleaned) through simultaneous localization and mapping (SLAM) technology, and the global map is a plane map. Specifically, the robot can call a sensor module (such as a laser, an RGB camera and / or a depth camera, etc.), and realize the construction of a global map after capturing an image of a real scene through an RGB camera, that is, capturing video data through an RGB camera, and then post-processing each frame of data (i.e., image) in the video data to realize the construction of a global map.
[0043] Step S12, determining the three-dimensional coordinate information in the depth image obtained by the depth camera, the three-dimensional coordinate information includes three-dimensional contour information and first position information, the first position information is: the relative position information between the coordinates of the actual scene corresponding to the three-dimensional coordinates and the depth camera.
[0044] Among them, a depth camera refers to a camera (or camera) that can obtain the depth information of an object. It can be a structured light, 3D ToF, or a camera composed of binocular cameras. Taking 3D TOF as an example, a 3D TOF camera emits infrared or near-infrared light. By measuring the phase difference of the light reflected back to the image sensor, the distance from the 3D TOF camera to each point in the scene can be calculated to form a depth image. From the depth image, the three-dimensional contour information and the distance between each point in the scene and the depth camera can be determined).
[0045] Step S13, aligning the two-dimensional coordinates with the three-dimensional coordinates based on the global position information of the robot in the global map, the relative position information between the RGB camera and the robot, and the relative position information between the depth camera and the robot.
[0046] Figure 4 The diagram shows a corresponding relationship between the robot, the relative position information of the RGB camera and the robot, and the relative position information of the depth camera and the robot in the global map. Of course, in actual situations, the positions of the RGB camera and the depth camera on the robot can also be interchanged, which is not limited here.
[0047] In this embodiment, since both the RGB camera and the depth camera have corresponding relative position information with the robot, the two-dimensional coordinates in the image obtained by the RGB camera can be aligned with the three-dimensional coordinates in the depth image obtained by the depth camera, that is, the two-dimensional contour information and the three-dimensional contour information can be aligned, and after the alignment, the position information of the two-dimensional contour information (or two-dimensional coordinates) on the global map can be obtained.
[0048] In some embodiments, in order to improve the efficiency of aligning the two-dimensional coordinates with the three-dimensional coordinates, the RGB camera and the depth camera are installed on the same horizontal line of the robot to try to ensure that the actual scene captured by the RGB camera and the depth camera is the same. Of course, if the resolution of the RGB is higher than the resolution of the depth camera, the actual scene captured by the RGB camera will be larger than the actual scene captured by the depth camera, that is, the number of two-dimensional coordinates is greater than the number of three-dimensional coordinates, that is, there are two-dimensional coordinates that cannot be aligned with the three-dimensional coordinates.
[0049] In some embodiments, in order to obtain a larger field of view, the RGB camera is set to be a wide-angle RGB camera.
[0050] Step S14, controlling the robot accordingly according to the alignment result.
[0051] The control here includes obstacle avoidance control and / or cleaning control.
[0052] In this embodiment, when it is determined according to the alignment result that the robot needs to be controlled to avoid obstacles, a detour command is issued to the robot to control the robot to detour a certain area; when it is determined according to the alignment result that the robot needs to be controlled to clean, a cleaning command is issued to the robot to control the robot to clean a certain area. Of course, the above-mentioned detour command and cleaning command are only examples. In actual situations, other types of commands can also be issued, which are not limited here.
[0053] In the embodiment of the present application, the two-dimensional coordinates and the three-dimensional coordinates are aligned based on the global position information of the robot in the global map, the relative position information of the RGB camera and the robot, and the relative position information of the depth camera and the robot, and the information of the two-dimensional coordinates includes two-dimensional contour information and label information, and the information of the three-dimensional coordinates includes three-dimensional contour information and the first position information. Therefore, the obtained alignment result includes not only the three-dimensional contour information but also the label information corresponding to the two-dimensional contour information. That is, when the robot is controlled accordingly according to the alignment result, the information involved includes not only the three-dimensional contour information but also the label information corresponding to the two-dimensional contour information. The diverse information is conducive to improving the accurate control of the robot.
[0054] Figure 5 A flow chart of a second control method provided in an embodiment of the present application is shown. In this embodiment, step S54 and step S55 are further descriptions of the above-mentioned step S14, and steps S51 to S53 are the same as the above-mentioned steps S11 to S13, which will not be repeated here.
[0055] Step S51, determining the two-dimensional coordinate information in the image obtained by the RGB camera, the two-dimensional coordinate information including two-dimensional contour information and label information, the label information is used to indicate whether the two-dimensional contour information has a label, and is used to indicate that when the two-dimensional contour information has a label, the label corresponding to the two-dimensional contour information performs semantic segmentation on the image obtained by the RGB camera to obtain the two-dimensional contour information of the object in the image.
[0056] Step S52, determine the three-dimensional coordinate information in the depth image obtained by the depth camera, the three-dimensional coordinate information includes three-dimensional contour information and first position information, the first position information is: the coordinates of the actual scene corresponding to the three-dimensional coordinates and the relative position information of the depth camera. According to the two-dimensional contour information and the depth information obtained by the depth camera, the three-dimensional contour information and position information of the object are obtained.
[0057] Step S53, aligning the two-dimensional coordinates with the three-dimensional coordinates based on the global position information of the robot in the global map, the relative position information between the RGB camera and the robot, and the relative position information between the depth camera and the robot.
[0058] Step S54: If the alignment result indicates that there is three-dimensional contour information that matches the two-dimensional contour information, and the label information corresponding to the successfully matched two-dimensional contour information indicates that there is a label for the successfully matched two-dimensional contour information, then the corresponding strategy is determined according to the label to obtain a first strategy, which includes a preset obstacle avoidance strategy and / or a preset cleaning strategy.
[0059] The preset obstacle avoidance strategy refers to a strategy for controlling the robot to avoid objects, and the obstacle avoidance strategy includes information such as bypassing objects or crossing objects.
[0060] The preset cleaning strategy refers to a strategy for controlling a person to clean an object, and the cleaning strategy includes information such as the number of cleaning times and / or cleaning tools.
[0061] In some embodiments, after obtaining successfully matched two-dimensional contour information and three-dimensional contour information, if the two-dimensional contour information has a corresponding label, the label is also the label corresponding to the three-dimensional contour information. At this time, in order to improve the user's interactive experience, the label is displayed on the global map according to the location information of the successfully matched two-dimensional coordinates on the global map.
[0062] In this embodiment, since the labels of objects are displayed on the global map, it is helpful for the user to intuitively know the labels of objects obtained by the robot, and then choose whether to issue other instructions to the robot, which is helpful for the robot to better perform tasks, for example, better control the robot to avoid obstacles or clean up, etc.
[0063] Step S55, controlling the robot to perform corresponding actions on the area of the second position information according to the first strategy, wherein the second position information is the global position information of the successfully matched two-dimensional contour information in the global map.
[0064] In the embodiment of the present application, since the first strategy is related to the label, and the label helps the robot to more accurately determine whether the object is an obstacle or garbage that needs to be cleaned, the accuracy of the control of the robot can be improved. For example, if the three-dimensional contour information of the object indicates that the object is large in size, but the label of the object indicates that the object is garbage (such as waste paper), the first strategy determined is the cleaning strategy, and then the robot will perform a cleaning action on the object. For example, if the robot is a cleaning robot, and the object whose two-dimensional contour information the label indicates is a "wire", the first strategy determined is the obstacle avoidance strategy, so that the cleaning robot will reserve the maximum cleaning distance to avoid the wire located at the second position information, thereby preventing the wire from being entangled in the cleaning brush of the cleaning robot. By setting it in this way, it is conducive to achieving accurate control of the robot.
[0065] In some embodiments, the first strategy is determined based on the label, the second position information, and the three-dimensional contour information, that is, the correspondence between different labels, different second position information, and different three-dimensional contour information and control instructions is stored in the first strategy, where the control instructions include action information and / or duration information. It should be pointed out that when any parameter stored in the first strategy is different, the corresponding control instructions (action information and / or duration information) are usually different. For example, if a piece of garbage is near the socket, considering that the robot may accidentally touch the socket during cleaning, the duration information in the corresponding control instruction is 1 minute, and if there are no electrical appliances or other equipment around the garbage, the duration information in the corresponding control instruction is 5 minutes. By setting it in this way, the accurate control of the robot can be further improved. In the above example, although the action information of the two control instructions is cleaning information, due to the different cleaning durations, the two control instructions are also different control instructions:
[0066] In some embodiments, the scene where the object is located can be determined according to the tags of different objects. In this case, the control method further includes:
[0067] The scene where the two-dimensional contour information is located is determined according to the label of the two-dimensional contour information and the label of the two-dimensional contour information adjacent to the two-dimensional contour information.
[0068] If the distance between two pieces of two-dimensional contour information is less than a preset distance threshold, the two pieces of two-dimensional contour information are determined to be adjacent two-dimensional contour information. In this embodiment, considering that in actual situations, the objects contained in different scenes are usually different, for example, a "bedroom" scene usually does not contain "kitchenware", a "living room" scene does not include a "toilet", etc. Therefore, by combining the two-dimensional contour information and the labels of the two-dimensional contour information adjacent to the two-dimensional contour information for scene recognition, the accuracy of the obtained scene can be improved.
[0069] Correspondingly, step S54 determines the corresponding strategy according to the tag to obtain the first strategy, which specifically includes:
[0070] A corresponding strategy is determined according to the scene where the label and the two-dimensional contour information are located, and a first strategy is obtained.
[0071] For example, if the robot is a cleaning robot, the scene where the object is located is a bathroom scene, and the label of the object is "garbage", considering that there is usually water in the bathroom, in order to protect the cleaning robot, the first strategy determined is the avoidance strategy, that is, the garbage in the bathroom is not cleaned. Or, ask the user whether it needs to be cleaned, etc. For example, considering that the living room is usually dirtier than the bedroom, the number of cleaning times of the strategy corresponding to the living room is determined to be 3 times, and the number of cleaning times of the strategy corresponding to the bedroom is 1 time, or the strategy corresponding to the living room specifies cleaning with a mop, etc. In this embodiment, since the first strategy is determined in combination with the scene corresponding to the object and the label of the object, the accuracy of the control of the robot can be improved.
[0072] In some embodiments, the image obtained by the RGB camera is recognized by a pre-trained scene recognition model to obtain the scene where the object in the image is located, and the pre-trained scene recognition model is a deep convolutional neural network. The scene model can be trained in the following manner: obtain images corresponding to different scenes, manually mark the images with scenes, and then input the images with scene marking into the scene recognition model to be trained to obtain the scene recognition result output by the scene recognition model to be trained, compare the scene recognition result with the marking result obtained by manual scene marking, and if it meets the requirements, stop training the scene recognition model, otherwise, adjust the parameters of the scene recognition model, and then continue training the scene recognition model with adjusted parameters.
[0073] In some embodiments, after the scene where the object is located is obtained, a global map with partition information is generated according to the scene where the object is located, the label of the object, the location information of the object in the global map, and the constructed global map.
[0074] The partition information here is related to the scene. For example, if the scene contains information such as "living room", "bedroom 1", "bedroom 2", etc., the generated global map also contains partition information such as "living room", "bedroom 1", "bedroom 2", etc. In this embodiment, considering that SLAM can construct a map, but cannot identify the specific room type, and cannot accurately locate the position of the door in terms of partition, the position of the door can be accurately located and identified by combining the label output by the semantic segmentation model and the position of the object in the entire map, and then the constructed global map can be partitioned in combination with the scene where the object is located, such as partitioning the bedroom, living room, corridor, bathroom, etc. Since a global map with partition information is generated, the constructed global map is more accurate.
[0075] In some embodiments, when the resolution of the RGB camera is higher than the resolution of the depth camera, or the RGB camera is a wide-angle RGB camera, the two-dimensional contour information determined from the image obtained by the RGB camera usually contains two-dimensional contour information that cannot match the three-dimensional contour information determined from the depth image. In this case, step S14 includes:
[0076] If the alignment result indicates that there is no three-dimensional contour information that matches the two-dimensional contour information, and the label information corresponding to the two-dimensional contour information that failed to match indicates that there is a label for the two-dimensional contour information that failed to match, the robot is controlled to avoid the area of the third position information, wherein the third position information is the estimated global position information of the two-dimensional contour information that failed to match in the global map.
[0077] In this embodiment, considering that the depth camera is usually set with parameters to filter the object information returned from the ground a few millimeters below the ground in actual use (otherwise, the sensor will always capture the obstacle in front due to the reflection of some noise points on the ground, which will cause the robot to be unable to move forward), and in the process of filtering the object information, it is very likely to filter out the object information corresponding to the black or highly reflective object. Therefore, it is difficult to detect the black or highly reflective object only based on the depth information of the depth camera, for example, it is difficult to detect the wires on the ground. However, considering that when a two-dimensional contour information does not have matching three-dimensional contour information, the robot cannot accurately determine the position of the two-dimensional contour information on the global map. Therefore, in order to avoid accidents of the robot, the position of the two-dimensional contour information in the global map is estimated according to the position of the two-dimensional contour information in the image obtained by the RGB camera, the relative position of the RGB camera and the robot, and the global position information of the robot in the global map, etc., to obtain the third position information, and finally control the robot to avoid the area of the third position information. Alternatively, the position of the two-dimensional contour information in the global map is estimated based on the position of the two-dimensional contour information in the image obtained by the RGB camera, the label of the two-dimensional contour information, the relative position of the RGB camera and the robot, and the global position information of the robot in the global map, to obtain the third position information, and finally control the robot to avoid the area of the third position information. For example, assuming that label 1 is "beverage bottle" and label 2 is "pen", the two-dimensional contour information corresponding to label 1 is two-dimensional contour information 1, and the two-dimensional contour information corresponding to label 2 is two-dimensional contour information 2. Both two-dimensional contour information 1 and two-dimensional contour information 2 are in the upper left corner of the image, but the area corresponding to the third position information estimated for two-dimensional contour information 1 will be larger than the area corresponding to the third position information estimated for two-dimensional contour information 2.
[0078] In some embodiments, labels for objects are displayed on a global map.
[0079] In some embodiments, step S14 includes:
[0080] A1. If the alignment result indicates that there is three-dimensional contour information that matches the two-dimensional contour information, and the label information corresponding to the successfully matched two-dimensional contour information indicates that there is no label for the successfully matched two-dimensional contour information, then a corresponding strategy is determined based on the successfully matched three-dimensional contour information to obtain a second strategy, wherein the second strategy includes a preset obstacle avoidance strategy and / or a preset cleaning strategy, and the second strategy is different from the first strategy.
[0081] A2. Control the robot to perform corresponding actions on the area of the fourth position information according to the second strategy, wherein the fourth position information is the global position information of the successfully matched two-dimensional contour information in the global map.
[0082] In A1 and A2 above, when the label corresponding to the three-dimensional contour information cannot be determined, the corresponding strategy is determined according to the three-dimensional contour information. For example, when the three-dimensional contour information indicates that the object is large, the second strategy is an obstacle avoidance strategy; for example, when the three-dimensional contour information indicates that the object is a specified shape (such as the shape of a beverage bottle), the second strategy is a cleaning strategy.
[0083] In order to further describe the control method provided in the embodiment of the present application, the following description will be given using a cleaning robot as an example.
[0084] refer to Figure 6 The cleaning robot includes an image capture module, which includes a depth camera image capture module (equivalent to a depth camera) and an RGB camera image capture module (equivalent to an RGB camera).
[0085] The depth camera performs a depth ranging function to obtain three-dimensional contour information and position information (ie, first position information) within the current field of view of the depth camera.
[0086] The semantic segmentation function of the RGB camera is reflected by the object segmentation module and the scene recognition module. After the object segmentation module performs object segmentation on the image obtained by the RGB camera, it obtains the two-dimensional contour information of the object at the pixel level and the label information of the object.
[0087] After aligning the two-dimensional contour information of the object and the label information of the object with the three-dimensional contour information and the first position information, we can obtain: 1) a virtual object of interest (i.e., an object with a label, two-dimensional contour information, and a first position information, but no three-dimensional contour information); 2) an object of no interest (i.e., no label, but with two-dimensional contour information, three-dimensional contour information and the first position information); 3) a real object of interest (i.e., an object consisting of a label, two-dimensional contour information, three-dimensional contour information and the first position information).
[0088] The label information of the object is input into the scene recognition module to obtain the corresponding scene information, such as the information of the scene where the object is located.
[0089] The virtual objects of interest, non-objects of interest, real objects of interest and scene information are processed comprehensively to obtain corresponding strategies. If the obtained strategy is an obstacle avoidance strategy, the cleaning robot is controlled to perform corresponding obstacle avoidance actions. If the obtained strategy is a cleaning strategy, the robot is controlled to perform corresponding cleaning actions. After cleaning is completed, a global map is displayed on the display screen of the cleaning robot by partition or scene, or icons of interest to the user are displayed on the display screen of the cleaning robot.
[0090] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0091] Corresponding to the control method of the above embodiment, Figure 7 A structural block diagram of a control device provided in an embodiment of the present application is shown. The control device is applied to a robot, and the robot includes an RGB camera and a depth camera. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0092] The control device 7 includes: a two-dimensional coordinate information determination unit 71, a three-dimensional coordinate information determination unit 72, an alignment unit 73, and a robot control unit 74. Among them:
[0093] The two-dimensional coordinate information determination unit 71 is used to determine the two-dimensional coordinate information in the image obtained by the RGB camera, the two-dimensional coordinate information includes two-dimensional contour information and label information, the label information is used to indicate whether the two-dimensional contour information has a label, and to indicate the label corresponding to the two-dimensional contour information when the two-dimensional contour information has a label.
[0094] In some embodiments, semantic segmentation is performed on the two-dimensional image obtained by the RGB camera through a semantic segmentation model to obtain two-dimensional contour information and label information in the image obtained by the RGB camera.
[0095] The three-dimensional coordinate information determination unit 72 is used to determine the three-dimensional coordinate information in the depth image obtained by the depth camera. The three-dimensional coordinate information includes three-dimensional contour information and first position information. The first position information is: the relative position information between the coordinates of the actual scene corresponding to the three-dimensional coordinates and the depth camera.
[0096] The alignment unit 73 is used to align the two-dimensional coordinates with the three-dimensional coordinates based on the global position information of the robot in the global map, the relative position information between the RGB camera and the robot, and the relative position information between the depth camera and the robot.
[0097] In some embodiments, in order to improve the efficiency of aligning two-dimensional coordinates with three-dimensional coordinates, the RGB camera and the depth camera are installed on the same horizontal line of the robot to ensure that the actual scenes captured by the RGB camera and the depth camera are the same as far as possible.
[0098] In some embodiments, in order to obtain a larger field of view, the RGB camera is set to be a wide-angle RGB camera.
[0099] The robot control unit 74 is used to control the robot accordingly according to the alignment result.
[0100] In the embodiment of the present application, the two-dimensional coordinates and the three-dimensional coordinates are aligned based on the global position information of the robot in the global map, the relative position information of the RGB camera and the robot, and the relative position information of the depth camera and the robot, and the information of the two-dimensional coordinates includes two-dimensional contour information and label information, and the information of the three-dimensional coordinates includes three-dimensional contour information and the first position information. Therefore, the obtained alignment result includes not only the three-dimensional contour information but also the label information corresponding to the two-dimensional contour information. That is, when the robot is controlled accordingly according to the alignment result, the information involved includes not only the three-dimensional contour information but also the label information corresponding to the two-dimensional contour information. The diverse information is conducive to improving the accurate control of the robot.
[0101] In some embodiments, the robot control unit 74 includes:
[0102] The first strategy determination module is used to determine the corresponding strategy according to the label to obtain the first strategy if the alignment result indicates that there is three-dimensional contour information matching the two-dimensional contour information, and the label information corresponding to the successfully matched two-dimensional contour information indicates that there is a label for the successfully matched two-dimensional contour information. The first strategy includes a preset obstacle avoidance strategy and / or a preset cleaning strategy.
[0103] The first control module is used to control the robot to perform corresponding actions on the area of the second position information according to the first strategy, wherein the second position information is the global position information of the successfully matched two-dimensional contour information in the global map.
[0104] In some embodiments, the control device 7 further includes:
[0105] The scene determination unit is used to determine the scene where the two-dimensional contour information is located according to the label of the two-dimensional contour information and the label of the two-dimensional contour information adjacent to the two-dimensional contour information.
[0106] When the first strategy determination module determines the corresponding strategy according to the tag and obtains the first strategy, it is specifically used to:
[0107] A corresponding strategy is determined according to the scene where the label and the two-dimensional contour information are located, and a first strategy is obtained.
[0108] In some embodiments, the robot control unit 74 includes:
[0109] The second control module is used to control the robot to avoid the area of third position information if the alignment result indicates that there is no three-dimensional contour information matching the two-dimensional contour information, and the label information corresponding to the two-dimensional contour information that failed to match indicates that there is a label for the two-dimensional contour information that failed to match. The third position information is the estimated global position information of the two-dimensional contour information that failed to match in the global map.
[0110] In some embodiments, the robot control unit 74 includes:
[0111] A second strategy determination module is used to determine a corresponding strategy based on the successfully matched three-dimensional contour information if the alignment result indicates that there is three-dimensional contour information that matches the two-dimensional contour information, and the label information corresponding to the successfully matched two-dimensional contour information indicates that there is no label for the successfully matched two-dimensional contour information, to obtain a second strategy, the second strategy including a preset obstacle avoidance strategy and / or a preset cleaning strategy, and the second strategy is different from the first strategy.
[0112] The third control module is used to control the robot to perform corresponding actions on the area of fourth position information according to the second strategy, wherein the fourth position information is the global position information of the successfully matched two-dimensional contour information in the global map.
[0113] In some embodiments, the control device 7 further includes:
[0114] Label display unit, used to display labels on the global map.
[0115] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0116] Figure 8 This is a schematic diagram of the structure of a robot provided in one embodiment of the present application. Figure 8 As shown, the robot 8 of this embodiment includes: at least one processor 80 ( Figure 8 Only one processor is shown in the figure), a memory 81, and a computer program 82 stored in the memory 81 and executable on the at least one processor 80, the robot further comprising an RGB camera and a depth camera. When the processor 80 executes the computer program 82, the steps in any of the above-mentioned method embodiments are implemented:
[0117] Determine information of two-dimensional coordinates in the image obtained by the RGB camera, wherein the information of the two-dimensional coordinates includes two-dimensional contour information and label information, wherein the label information is used to indicate whether the two-dimensional contour information has a label, and, when the two-dimensional contour information has a label, the label corresponding to the two-dimensional contour information;
[0118] Determine information of three-dimensional coordinates in the depth image obtained by the depth camera, the information of the three-dimensional coordinates includes three-dimensional contour information and first position information, the first position information is: relative position information between the coordinates of the actual scene corresponding to the three-dimensional coordinates and the depth camera;
[0119] Aligning the two-dimensional coordinates with the three-dimensional coordinates based on the global position information of the robot in the global map, the relative position information of the RGB camera and the robot, and the relative position information of the depth camera and the robot;
[0120] The robot is controlled accordingly according to the alignment result.
[0121] Optionally, controlling the robot accordingly according to the alignment result includes:
[0122] If the alignment result indicates that there is three-dimensional contour information matching the two-dimensional contour information, and the label information corresponding to the successfully matched two-dimensional contour information indicates that the successfully matched two-dimensional contour information has a label, then determining a corresponding strategy according to the label to obtain a first strategy, wherein the first strategy includes a preset obstacle avoidance strategy and / or a preset cleaning strategy;
[0123] According to the first strategy, the robot is controlled to perform corresponding actions on the area of the second position information, wherein the second position information is the global position information of the successfully matched two-dimensional contour information in the global map.
[0124] Optionally, the control method further includes:
[0125] Determining the scene where the two-dimensional contour information is located according to the label of the two-dimensional contour information and the label of the two-dimensional contour information adjacent to the two-dimensional contour information;
[0126] The step of determining a corresponding strategy according to the tag to obtain a first strategy includes:
[0127] A corresponding strategy is determined according to the label and the scene where the two-dimensional contour information is located to obtain a first strategy.
[0128] Optionally, controlling the robot accordingly according to the alignment result includes:
[0129] If the alignment result indicates that there is no three-dimensional contour information matching the two-dimensional contour information, and the label information corresponding to the two-dimensional contour information that failed to match indicates that there is a label for the two-dimensional contour information that failed to match, the robot is controlled to avoid the area of the third position information, wherein the third position information is the estimated global position information of the two-dimensional contour information that failed to match in the global map.
[0130] Optionally, controlling the robot accordingly according to the alignment result includes:
[0131] If the alignment result indicates that there is three-dimensional contour information matching the two-dimensional contour information, and the label information corresponding to the successfully matched two-dimensional contour information indicates that the successfully matched two-dimensional contour information does not have a label, a corresponding strategy is determined according to the successfully matched three-dimensional contour information to obtain a second strategy, wherein the second strategy includes a preset obstacle avoidance strategy and / or a preset cleaning strategy, and the second strategy is different from the first strategy;
[0132] According to the second strategy, the robot is controlled to perform corresponding actions on the area of the fourth position information, wherein the fourth position information is the global position information of the successfully matched two-dimensional contour information in the global map.
[0133] Optionally, the control method further includes:
[0134] The label is displayed on the global map.
[0135] Optionally, the RGB camera is a wide-angle RGB camera.
[0136] The robot 8 may be a humanoid robot or a non-humanoid robot (such as a general sweeping robot, etc.). The robot may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will appreciate that Figure 8 This is only an example of the robot 8 and does not constitute a limitation of the robot 8. The robot 8 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0137] The processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0138] In some embodiments, the memory 81 may be an internal storage unit of the robot 8, such as a hard disk or memory of the robot 8. In other embodiments, the memory 81 may also be an external storage device of the robot 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the robot 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the robot 8. The memory 81 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 81 may also be used to temporarily store data that has been output or is to be output.
[0139] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0140] An embodiment of the present application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.
[0141] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0142] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0143] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / robot, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0144] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0145] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0146] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0148] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A control method, characterized in that: Applied to a robot, the robot includes an RGB camera and a depth camera, and the control method includes: Determine information of two-dimensional coordinates in the image obtained by the RGB camera, wherein the information of the two-dimensional coordinates includes two-dimensional contour information and label information, wherein the label information is used to indicate whether the two-dimensional contour information has a label, and, when the two-dimensional contour information has a label, the label corresponding to the two-dimensional contour information; Determine information of three-dimensional coordinates in the depth image obtained by the depth camera, the information of the three-dimensional coordinates includes three-dimensional contour information and first position information, the first position information is: relative position information between the coordinates of the actual scene corresponding to the three-dimensional coordinates and the depth camera; Based on the global position information of the robot in the global map, the relative position information of the RGB camera and the robot, and the relative position information of the depth camera and the robot, the two-dimensional coordinates are aligned with the three-dimensional coordinates, including: aligning the two-dimensional contour information with the three-dimensional contour information to obtain the position information of the two-dimensional contour information on the global map; Determining the scene where the two-dimensional contour information is located according to the label of the two-dimensional contour information and the label of the two-dimensional contour information adjacent to the two-dimensional contour information; The robot is controlled accordingly according to the alignment result and the scene where the two-dimensional contour information is located, including: if the alignment result indicates that there is three-dimensional contour information matching the two-dimensional contour information, and the label information corresponding to the successfully matched two-dimensional contour information indicates that the successfully matched two-dimensional contour information has a label, then a corresponding strategy is determined according to the label to obtain a first strategy, wherein the first strategy includes a preset obstacle avoidance strategy and / or a preset cleaning strategy; according to the first strategy, the robot is controlled to perform corresponding actions on the area of the second position information, wherein the second position information is the global position information of the successfully matched two-dimensional contour information in the global map.
2. The control method according to claim 1, characterized in that: The step of determining a corresponding strategy according to the tag to obtain a first strategy includes: A corresponding strategy is determined according to the label and the scene where the two-dimensional contour information is located to obtain a first strategy.
3. The control method according to claim 1, characterized in that: The controlling the robot accordingly according to the alignment result comprises: If the alignment result indicates that there is no three-dimensional contour information matching the two-dimensional contour information, and the label information corresponding to the two-dimensional contour information that failed to match indicates that there is a label for the two-dimensional contour information that failed to match, the robot is controlled to avoid the area of the third position information, wherein the third position information is the estimated global position information of the two-dimensional contour information that failed to match in the global map.
4. The control method according to claim 1, characterized in that: The controlling the robot accordingly according to the alignment result comprises: If the alignment result indicates that there is three-dimensional contour information matching the two-dimensional contour information, and the label information corresponding to the successfully matched two-dimensional contour information indicates that the successfully matched two-dimensional contour information does not have a label, a corresponding strategy is determined according to the successfully matched three-dimensional contour information to obtain a second strategy, wherein the second strategy includes a preset obstacle avoidance strategy and / or a preset cleaning strategy, and the second strategy is different from the first strategy; According to the second strategy, the robot is controlled to perform corresponding actions on the area of the fourth position information, wherein the fourth position information is the global position information of the successfully matched two-dimensional contour information in the global map.
5. The control method according to any one of claims 1 to 3, characterized in that: The control method further includes: The label is displayed on the global map.
6. The control method according to any one of claims 1 to 3, characterized in that: The RGB camera is a wide-angle RGB camera.
7. A control device, characterized in that: Applied to a robot, the robot includes an RGB camera and a depth camera, and the control device includes: a two-dimensional coordinate information determination unit, used to determine the two-dimensional coordinate information in the image obtained by the RGB camera, the two-dimensional coordinate information including two-dimensional contour information and label information, the label information is used to indicate whether the two-dimensional contour information has a label, and is used to indicate the label corresponding to the two-dimensional contour information when the two-dimensional contour information has a label; A three-dimensional coordinate information determination unit, used to determine the three-dimensional coordinate information in the depth image obtained by the depth camera, the three-dimensional coordinate information including three-dimensional contour information and first position information, the first position information being: the relative position information between the coordinates of the actual scene corresponding to the three-dimensional coordinate and the depth camera; an alignment unit, configured to align the two-dimensional coordinates with the three-dimensional coordinates based on the global position information of the robot in the global map, the relative position information of the RGB camera and the robot, and the relative position information of the depth camera and the robot, including: aligning the two-dimensional contour information with the three-dimensional contour information to obtain the position information of the two-dimensional contour information on the global map; A scene determination unit, used to determine the scene where the two-dimensional contour information is located according to the label of the two-dimensional contour information and the label of the two-dimensional contour information adjacent to the two-dimensional contour information; A robot control unit, used to control the robot accordingly according to the alignment result and the scene where the two-dimensional contour information is located; The robot control unit comprises: A first strategy determination module, configured to determine a corresponding strategy according to the label to obtain a first strategy if the alignment result indicates that there is three-dimensional contour information matching the two-dimensional contour information, and the label information corresponding to the successfully matched two-dimensional contour information indicates that there is a label for the successfully matched two-dimensional contour information, wherein the first strategy includes a preset obstacle avoidance strategy and / or a preset cleaning strategy; The first control module is used to control the robot to perform corresponding actions on the area of the second position information according to the first strategy, wherein the second position information is the global position information of the successfully matched two-dimensional contour information in the global map.
8. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
