Robot control method and device, electronic equipment and storage medium
By simulating tactile information through visual image mapping and feature extraction, the robot is controlled to perform grasping operations, which solves the problem of increased cost and time delay of installing tactile sensors on the robot, and improves grasping efficiency.
Patent Information
- Application Number
- CN202410918189.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-07-09
AI Technical Summary
Existing robots need to install tactile sensors during grasping tasks, which increases control costs and has the problem of delayed force feedback time.
By obtaining the visual image of the object to be grasped, image mapping and feature extraction are performed, the deformation information of the tactile sensor is simulated, the force conversion is performed, and the force degree information of the surface is obtained, which is used to control the robot to perform the grasping operation, avoiding the need for the robot to Requirements for installing tactile sensors.
It reduces robot control costs, solves the time delay problem in grabbing tasks, and improves control efficiency.
Smart Images

Figure CN118809592A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a robot control method, device, electronic device and storage medium. Background Art
[0002] With the development of artificial intelligence, humanoid robots have also ushered in a golden period of development. More and more companies have launched grasping robots for use in various scenarios. Through the robot's autonomous navigation function, it can avoid obstacles in actual applications and can also grasp objects in the scene.
[0003] However, in actual applications, there are many types of objects that robots need to grasp. When grasping, the robot needs to use tactile perception to know how much force is needed to grasp the object. However, installing tactile sensors on each robot will greatly increase the control cost. In addition, the robot's hand equipped with tactile sensors needs to touch the object to get force feedback. If the force feedback is analyzed after sensing the object, there will be a certain feedback time delay. Summary of the invention
[0004] The embodiments of the present application provide a robot control method, device, electronic device and storage medium, which can quickly determine tactile information used to control the robot to perform a grasping operation on an object to be grasped when the robot is not equipped with a tactile sensor, thereby effectively solving the control cost problem of the robot.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] An embodiment of the present application provides a robot control method, the method comprising: acquiring a visual image of an object to be grasped; performing image mapping on the visual image to obtain a tactile image of the object to be grasped; the tactile image is an image used to simulate the deformation of a tactile sensor of the robot when grasping the object to be grasped; performing image feature extraction on the tactile image to obtain simulated deformation information of the tactile sensor of the robot when grasping the object to be grasped; performing force conversion on the simulated deformation information to obtain tactile information used to characterize the degree of force on the surface of the object to be grasped; and controlling the robot to perform a grasping operation on the object to be grasped based on the tactile information.
[0007] An embodiment of the present application provides a robot control device, comprising: an acquisition module, used to acquire a visual image of an object to be grasped; an image mapping module, used to perform image mapping on the visual image to obtain a tactile image of the object to be grasped; the tactile image is an image used to simulate the deformation of the tactile sensor of the robot when grasping the object to be grasped; an image feature extraction module, used to perform image feature extraction on the tactile image to obtain simulated deformation information of the tactile sensor of the robot when grasping the object to be grasped; a force conversion module, used to perform force conversion on the simulated deformation information to obtain tactile information used to characterize the force degree of the surface of the object to be grasped; and a control module, used to control the robot to perform a grasping operation on the object to be grasped based on the tactile information.
[0008] In the above scheme, the image mapping module is also used to: perform feature extraction on the visual image at different resolutions to obtain image feature vectors at multiple resolutions; perform feature fusion on the image feature vectors at multiple resolutions to obtain image fusion features; perform feature mapping on the image fusion features to obtain a tactile image of the object to be grasped.
[0009] In the above scheme, the control module is also used to: obtain the current grasping force of the robot at the current moment; based on the tactile information, divide the surface of the object to be grasped into force areas to obtain multiple force areas with different force degrees; determine the regional grasping force corresponding to each of the force areas; based on the current grasping force and the regional grasping force, control the robot to perform a grasping operation on the object to be grasped.
[0010] In the above scheme, the control module is also used to: compare the current grasping force with the regional grasping force of each force area to obtain a comparison result; based on the comparison result, determine the target grasping force of the robot and the target force area on the surface of the object to be grasped; based on the target grasping force and the target force area, control the robot to perform a grasping operation on the object to be grasped.
[0011] In the above scheme, the control module is also used for: when it is determined based on the comparison result that the robot does not need to change the current grasping force, determining the current grasping force as the target grasping force, and determining the force area corresponding to the target grasping force among the multiple force areas as the target force area; when it is determined based on the comparison result that the robot needs to change the current grasping force, determining the force difference between the grasping force of each area and the current grasping force; determining the regional grasping force corresponding to the minimum force difference as the target grasping force, and determining the force area corresponding to the target grasping force among the multiple force areas as the target force area.
[0012] In the above scheme, the acquisition module is also used to: acquire a global visual image within the target area; perform image detection on the global visual image to obtain an image detection result; wherein the image detection result is obtained by performing image detection on a pre-trained image detection model; the image detection model is trained by the following steps: acquiring first sample data; the first sample data includes a sample global visual image and a sample image label of the sample global visual image; inputting the sample global visual image into the image detection model to be trained; performing image detection on the sample global visual image through the image detection model to be trained to obtain a predicted position and predicted category of a sample object to be grasped in the sample global visual image; performing loss calculation based on the predicted position, the predicted category and the sample image label to obtain a first loss result; updating the model parameters in the image detection model based on the first loss result to obtain a trained image detection model; in the case where it is determined that the global visual image contains an object to be grasped based on the image detection result, obtaining the image position information of the object to be grasped in the image coordinate system in the image detection result; and extracting the visual image of the object to be grasped from the global visual image based on the image position information.
[0013] In the above scheme, the control module is also used to: map the image position information in the image coordinate system to the world coordinate system to obtain the real position information of the object to be grasped; based on the tactile information, the real position information and the position coordinates of the robot's current position in the world coordinate system, control the robot to perform a grasping operation on the object to be grasped.
[0014] In the above scheme, the tactile image is obtained by image mapping through a pre-trained tactile image prediction model; the device also includes a prediction model training module, and the prediction model training module is used to: obtain second sample data; the second sample data includes a sample visual image and a sample tactile image; the sample visual image includes a sample object to be grasped, and the sample tactile image is the supervisory information when training the tactile image prediction model; the sample visual image is input into the tactile image prediction model to be trained; through the tactile image prediction model to be trained, the sample visual image is image mapped to obtain a sample prediction image of the sample object to be grasped; based on the sample prediction image and the sample tactile image, a loss calculation is performed to obtain a second loss result; based on the second loss result, the model parameters in the tactile image prediction model are updated to obtain a trained tactile image prediction model.
[0015] In the above scheme, the prediction model training module is also used to: perform feature extraction at different resolutions on the sample visual image through the image feature extraction network, and obtain sample feature vectors at multiple resolutions; perform feature fusion on the sample feature vectors at multiple resolutions through the image feature fusion network to obtain sample fusion features; perform feature mapping on the sample fusion features through the image feature processing network to obtain a sample prediction image of the sample object to be captured.
[0016] An embodiment of the present application provides an electronic device, comprising: a memory for storing computer executable instructions; and a processor for implementing the robot control method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
[0017] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing the robot control method provided in the embodiment of the present application when executed by a processor.
[0018] An embodiment of the present application provides a computer program product, which includes computer executable instructions, and the computer executable instructions are stored in a computer-readable storage medium; wherein, when a processor of an electronic device reads the computer executable instructions from the computer-readable storage medium and executes the computer executable instructions, the robot control method provided in the embodiment of the present application is implemented.
[0019] The embodiments of the present application have the following beneficial effects:
[0020] When the robot performs a grasping task, first, it obtains a visual image of the object to be grasped, performs image mapping on the visual image of the object to be grasped, and obtains a tactile image of the object to be grasped; then, it extracts image features from the tactile image to obtain simulated deformation information of the tactile sensor when the robot grasps the object to be grasped; it performs force conversion on the simulated deformation information to obtain tactile information used to characterize the degree of force on the surface of the object to be grasped; finally, based on the tactile information of the object to be grasped, it controls the robot to perform a grasping operation on the object to be grasped. In this way, since the tactile image is an image used to simulate the deformation of the tactile sensor of the robot when grasping the object to be grasped, and the tactile image can be obtained by performing image mapping on the visual image of the object to be grasped, without the need to collect the tactile image by installing a tactile sensor on each robot, the control cost of the robot is greatly reduced. In addition, the tactile information of the object to be grasped used to control the robot to perform the grasping operation can be obtained directly based on the tactile image through image feature extraction and force conversion process. It does not need to be analyzed when the robot touches the object to be grasped. It can effectively solve the time delay problem in the grasping task, thereby improving the control efficiency of the robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is an optional flowchart of the robot control method provided in the embodiment of the present application;
[0022] Figure 2 It is a confirmed schematic diagram of the visual image provided by the embodiment of the present application;
[0023] Figure 3 It is a schematic diagram of the training process of the image detection model provided in the embodiment of the present application;
[0024] Figure 4 is a schematic diagram of determining a tactile image provided by an embodiment of the present application;
[0025] Figure 5 is a schematic diagram of the training process of the tactile image prediction model provided in an embodiment of the present application;
[0026] Figure 6 It is a schematic diagram of determining the control robot to perform a grasping operation on the grasped object provided by an embodiment of the present application;
[0027] Figure 7 It is a flow chart of a vision-based tactile prediction method for industrial humanoid robot grasping provided in an embodiment of the present application;
[0028] Figure 8 is a schematic diagram of an optional model structure of a tactile image prediction model provided in an embodiment of the present application;
[0029] Fig. 9 is a structural block diagram of a robot control device provided in an embodiment of the present application;
[0030] Fig.10 It is a schematic diagram of the structure of the robot provided in the embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0032] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0033] If similar descriptions of "first / second" appear in the application documents, the following instructions are added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0034] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0035] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0036] The embodiment of the present application provides a robot control method, which can be applied to industrial humanoid robot grasping scenarios. When the robot performs a grasping task, once the object to be grasped (i.e., the object to be grasped) is detected, the collected visual image of the object to be grasped is input into a pre-trained tactile image prediction model, and the corresponding tactile image can be predicted, thereby quickly performing image feature extraction and force conversion based on the tactile image, and feeding back the tactile information obtained through image feature extraction and force conversion to the robot, thereby improving the control efficiency of the robot. In addition, the robot only needs to use the collected tactile image as the supervision information of the model by installing a tactile sensor during the training phase of the tactile image prediction model. In the use phase of the tactile image prediction model, that is, when the robot performs a grasping task, there is no need to install a tactile sensor on the robot, which greatly reduces the robot control cost.
[0037] Specifically, in the robot control method provided by the embodiment of the present application, when the robot performs a grasping task, first, a visual image of the object to be grasped is obtained, and the visual image of the object to be grasped is image mapped to obtain a tactile image of the object to be grasped; then, image features are extracted from the tactile image to obtain simulated deformation information of the tactile sensor of the robot when grasping the object to be grasped; the simulated deformation information is subjected to force conversion to obtain tactile information used to characterize the degree of force on the surface of the object to be grasped; finally, based on the tactile information of the object to be grasped, the robot is controlled to perform a grasping operation on the object to be grasped. In this way, the tactile image is an image used to simulate the deformation of the tactile sensor of the robot when grasping the object to be grasped. The tactile image is obtained by image mapping the visual image of the object to be grasped, and there is no need to collect the tactile image by installing a tactile sensor on each robot, which greatly reduces the control cost of the robot. In addition, the tactile information of the object to be grasped used to control the robot to perform the grasping operation can be obtained directly based on the tactile image through image feature extraction and force conversion process. It does not need to be analyzed when the robot touches the object to be grasped. It can effectively solve the time delay problem in the grasping task, thereby improving the control efficiency of the robot.
[0038] The robot control method provided in the embodiments of the present application can be applied to electronic devices such as robots, laptops, tablet computers, desktop computers, mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices, smart home appliances, and smart vehicle-mounted devices. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0039] The robot control method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0040] Figure 1 1 is an optional flow chart of a robot control method provided in an embodiment of the present application, and the method can be applied to electronic devices. The following will be described by taking the electronic device as a robot as an example. Figure 1 As shown, the method includes the following steps S101 to S105:
[0041] Step S101, obtaining a visual image of an object to be grasped.
[0042] In the embodiments of the present application, the object to be grasped refers to an object to be grasped that needs to be classified, screened, sorted or placed by the robot according to specific instructions or algorithms in an industrial scenario. For example, the object to be grasped may be a component, product or material on a production line. A visual image refers to an image corresponding to the object to be grasped acquired by the robot's camera or other visual sensors. The visual image may be an image acquired at the current moment, and the visual image reflects the visual information (i.e., color, texture, shape, etc.) of the object to be grasped. For example, a visual image may be an image of a component, product or material on a production line.
[0043] In some embodiments, see Figure 2 , Figure 2 It is shown that in step S101, obtaining a visual image of the object to be grasped can be achieved by following the steps S1011 to S1014:
[0044] Step S1011, obtaining a global visual image within the target area.
[0045] In the embodiment of the present application, the target area refers to the entire area within the line of sight of the robot at the current moment, and the target area may include the area where the object to be grasped is located. The global visual image refers to the complete image within the target area that can be captured by the robot's camera or other visual sensors. The global visual image includes all visual information within the target area, and the visual image of the object to be grasped may be a part of the global visual image.
[0046] When the robot needs to perform a grasping task, it first needs to collect the global visual image of the target area at the current moment through a camera or other visual sensor, so as to subsequently determine whether there is an object to be grasped in the global visual image. If so, continue to perform subsequent grasping tasks.
[0047] Step S1012, performing image detection on the global visual image to obtain an image detection result.
[0048] In the embodiment of the present application, image detection refers to detecting whether there is an object to be captured in the global visual image by using image detection technology. Image detection technology is a computer vision technology that can be used to identify and detect specific objects or objects from the global visual image. Here, the object to be captured in the global visual image can be identified by extracting, identifying and comparing features of the global visual image. Image detection can be achieved by a pre-trained image detection model.
[0049] After obtaining the global visual image within the target area, image detection may be performed on the global visual image to obtain an image detection result, wherein the image detection result includes object positions and object categories of all objects in the global visual image.
[0050] In some embodiments, the image detection result is obtained by performing image detection using a pre-trained image detection model; see Figure 3 , Figure 3 : is a schematic diagram of the training process of the image detection model provided in the embodiment of the present application. The training of the image detection model can be implemented by following the steps S301 to S305:
[0051] Step S301, obtaining first sample data.
[0052] In an embodiment of the present application, the first sample data includes a sample global visual image and a sample image label of the sample global visual image, wherein the sample global visual image is a model input in the model training stage of the image detection model, the sample image label is a training label in the model training stage of the image detection model, and the sample image label includes a position label and a category label.
[0053] Step S302: input the sample global visual image into the image detection model to be trained.
[0054] Step S303, performing image detection on the sample global visual image through the image detection model to be trained, and obtaining the predicted position and predicted category of the sample to-be-grabbed object in the sample global visual image.
[0055] In the embodiment of the present application, the image detection model to be trained is a network model before model training, that is, after the image detection model to be trained is trained, a pre-trained image detection model is obtained, and the image detection model to be trained has the same model structure as the pre-trained image detection model. For example, the image detection model can be Faster R-CNN, YOLO or RetinaNet, etc. There is no specific limitation on the model structure of the image detection model. The sample to be captured is the object to be captured in the model training stage.
[0056] The model training phase of the image detection model includes two training tasks, one is to predict the position coordinates of the sample object to be grasped, and the other is to predict the category of the sample object to be grasped. After the sample global visual image is input into the image detection model to be trained, the sample global visual image is subjected to image detection through the image detection function of the image detection model to be trained, and the predicted position and predicted category of the sample object to be grasped in the sample global visual image are obtained. The predicted position is the position coordinates of the sample object to be grasped predicted by the image detection process, and the predicted category is the category of the sample object to be grasped predicted by the image detection process. The predicted position and predicted category of the sample object to be grasped here are not the optimal results output by the image detection model in the training process. The optimal result needs to be obtained by continuously optimizing the model parameters of the image detection model by constructing the loss function of the image detection model.
[0057] Step S304, performing loss calculation based on the predicted position, predicted category and sample image label to obtain a first loss result.
[0058] In the embodiment of the present application, the loss calculation process is divided into two parts, one part is the loss calculation of the classification task, and the other part is the loss calculation of the regression task. The loss calculation of the classification task is implemented based on the predicted category and the category label in the sample image label, and the loss calculation of the regression task is implemented based on the predicted position and the position label in the sample image label. The corresponding first loss result includes the loss result of the classification task and the loss result of the regression task. Subsequently, based on the first loss result, the model parameters of the classification task and the regression task in the image detection model can be simultaneously optimized.
[0059] After obtaining the predicted position and predicted category, the loss function of the regression task can be constructed based on the predicted position and the position label in the sample image label. For example, the loss function of the regression task can be L1 loss. The loss function of the classification task can also be constructed based on the predicted category and the category label in the sample image label. For example, the loss function of the classification task can be cross entropy loss. Then, the loss function of the regression task and the loss function of the classification task are combined by adding weight coefficients, and then a comprehensive loss calculation is performed to obtain the first loss result. The first loss result is used to measure the inconsistency between the predicted position of the image detection model and the position label in the sample image label, and the predicted category and the category label in the sample image label, that is, the gap between the forward calculation result of each iteration of the calculation model (i.e., the predicted position and the predicted category) and the true value (i.e., the position label and the category label), so as to guide the next step of training in the right direction.
[0060] Step S305: Update the model parameters in the image detection model based on the first loss result to obtain a trained image detection model.
[0061] In an embodiment of the present application, based on the first loss result, the model parameters can be updated by an optimization algorithm such as gradient descent, so as to train the optimal image detection model. In the process of updating the model parameters in the image detection model based on the first loss result, the gradient of the model parameters of the image detection model can be calculated according to the first loss result of the image detection model. For example, the gradient of the model parameters of the image detection model to the first loss result of the image detection model can be calculated by a back propagation algorithm, that is, the model parameters of the image detection model are updated in a direction that can reduce the first loss result of the image detection model, so that the first loss result gradually decreases and the model performance of the image detection model is gradually optimized. Finally, the image detection model is repeatedly iterated and trained, and the above steps can be repeated to continuously update the model parameters of the image detection model and continuously optimize the model performance of the image detection model until the model converges or reaches a preset iteration condition, stop updating the model parameters in the image detection model, and save the trained image detection model. The preset iteration condition can be a preset iteration time or number of iterations.
[0062] Here, the trained image detection model is obtained through the model training process of the image detection model, so that the trained image detection model can be directly used in the subsequent model use process to perform image detection on the input global visual image to obtain accurate image detection results.
[0063] Step S1013, when it is determined based on the image detection result that the global visual image contains the object to be grasped, image position information of the object to be grasped in the image coordinate system in the image detection result is obtained.
[0064] In the embodiment of the present application, the image coordinate system is used to describe the position of the object to be grasped in the global visual image, that is, the image position information refers to the position of the object to be grasped in the global visual image.
[0065] After obtaining the image detection result, since the image detection result includes the object positions and object categories of all objects in the global visual image, it is possible to determine the category to which the object to be grasped belongs and check whether the object category in the image detection result includes the category to which the object to be grasped belongs. For example, assuming that the object to be grasped is a cup on a production line, the category to which the object to be grasped belongs is cups, and when the object categories in the global visual image include living things, tables, stools, and cups, it is determined that the global visual image contains the object to be grasped, otherwise it is not included. In the case where it is determined based on the image detection result that the global visual image contains the object to be grasped, the object position corresponding to the category to which the object category in the global visual image belongs can be determined from the image detection result, that is, the image position information of the object to be grasped in the image coordinate system.
[0066] Step S1014: extracting a visual image of the object to be captured from the global visual image based on the image position information.
[0067] In an embodiment of the present application, after determining the image position information of the object to be grasped in the image coordinate system, that is, after determining the position of the object to be grasped in the global visual image, the image of the position of the object to be grasped can be cut out from the global visual image, that is, the visual image of the object to be grasped can be extracted from the global visual image.
[0068] Here, by obtaining a visual image of the object to be grasped, a tactile image of the object to be grasped can be quickly generated based on the visual image through a tactile image prediction model, so that the tactile image can be generated without the robot's tactile sensor contacting the object to be grasped.
[0069] Step S102, performing image mapping on the visual image to obtain a tactile image of the object to be grasped.
[0070] In the embodiment of the present application, the tactile image is an image used to simulate the deformation of the tactile sensor when the robot grasps the object to be grasped; the tactile image reflects the tactile characteristics of the surface of the object to be grasped, and the tactile image does not contain information such as color, but contains information such as deformation, pressure, and texture generated when contacting the object to be grasped. Usually in industrial scenarios, a tactile image is an image obtained by a tactile sensor (such as a touch screen, a force sensor), and in the embodiment of the present application, the tactile image can be obtained by image mapping the visual image, without the need to install a tactile sensor, which can greatly reduce the control cost of the robot.
[0071] In some embodiments, see Figure 4 , Figure 4 It is shown that in step S102, image mapping is performed on the visual image to obtain a tactile image of the object to be grasped, which can be achieved by the following steps S1021 to S1023:
[0072] Step S1021, performing feature extraction on the visual image at different resolutions, and obtaining corresponding image feature vectors at multiple resolutions.
[0073] In the embodiment of the present application, when extracting features, the change in resolution will affect the detail level and abstraction level of the extracted features, so that information at different scales can be obtained. At a lower resolution, a feature extraction algorithm is used to extract key points, while at a high resolution, more detailed features in the visual image, such as textures, edges, etc., are directly extracted. The image feature vectors at multiple resolutions contain information at various scales from the original visual image to low resolution and then to high resolution.
[0074] In some embodiments, feature extraction of visual images at different resolutions can be achieved through a pre-trained image feature extraction network, for example, an Alexnet network. Image feature vectors at multiple resolutions are obtained through the pre-trained Alexnet network. The pre-trained Alexnet network may include five convolutional layers and three fully connected layers, and the output of each layer of the Alexnet network corresponds to a feature at one resolution. The image feature vectors at multiple resolutions may be image feature vectors at different resolutions output by the first convolutional layer, the fifth convolutional layer, and the last fully connected layer of the Alexnet network respectively after the visual image is input into the pre-trained Alexnet network. The network structure of the image feature extraction network and the number of resolutions of the image feature vectors at multiple resolutions are not specifically limited here.
[0075] Step S1022, performing feature fusion on image feature vectors at multiple resolutions to obtain image fusion features.
[0076] In the embodiment of the present application, feature fusion is used to combine feature information in image feature vectors at different resolutions to improve the understanding and processing capabilities of visual image content. Through feature fusion, semantic information at a higher level can be transmitted to a lower level, and detailed information at a lower level can also be transmitted to a higher level. In this way, the features of each level can fuse information from upper and lower levels to form a richer feature representation, namely, image fusion features.
[0077] In some embodiments, feature fusion of image feature vectors at multiple resolutions can be achieved through a pre-trained image feature fusion network, for example, an FPN network. Image fusion features can be fused by performing element-level addition operations through a pre-trained FPN network. The network structure of the image feature fusion network is not specifically limited herein.
[0078] Step S1023 , performing feature mapping on the image fusion features to obtain a tactile image of the object to be grasped.
[0079] In an embodiment of the present application, after obtaining the image fusion feature, the image fusion feature obtained through feature extraction and feature fusion can be mapped to the tactile image space, that is, the image fusion feature is converted into a tactile feature, and a tactile image of the object to be grasped is generated based on the tactile feature. Each pixel value in the tactile image represents the tactile characteristics of the surface of the object to be grasped.
[0080] In some embodiments, the tactile image is obtained by image mapping using a pre-trained tactile image prediction model; see Figure 5 , Figure 5: is a schematic diagram of the training process of the tactile image prediction model provided in an embodiment of the present application. The training of the tactile image prediction model can be implemented by following steps S501 to S505:
[0081] Step S501, obtaining second sample data.
[0082] In the embodiment of the present application, the second sample data includes a sample visual image and a sample tactile image; the sample visual image is the model input when training the tactile image prediction model, and the sample visual image includes the sample object to be grasped; the sample tactile image is the supervisory information when training the tactile image prediction model, and the sample tactile image includes the tactile features of the surface of the sample object to be grasped, which can be used to guide the tactile image prediction model to learn how to predict the tactile properties of the sample object to be grasped from the sample visual image. During the training process of the tactile image prediction model, the sample tactile image is paired with the corresponding sample visual image to form a training sample.
[0083] Step S502: inputting the sample visual image into the tactile image prediction model to be trained.
[0084] Step S503 , performing image mapping on the sample visual image through the tactile image prediction model to be trained to obtain a sample prediction image of the sample object to be grasped.
[0085] In the embodiment of the present application, the tactile image prediction model to be trained is the network model of the pre-trained tactile image prediction model before model training, that is, after the tactile image prediction model to be trained is trained, the pre-trained tactile image prediction model is obtained, and the tactile image prediction model to be trained has the same model structure as the pre-trained tactile image prediction model. The tactile image prediction model includes an image feature extraction network, an image feature fusion network, and an image feature processing network. The model structure of the tactile image prediction model is not specifically limited here.
[0086] In some embodiments, image mapping of the sample visual image can be achieved in the following ways: through an image feature extraction network, feature extraction is performed on the sample visual image at different resolutions, and corresponding sample feature vectors at multiple resolutions are obtained; through an image feature fusion network, feature fusion is performed on the sample feature vectors at multiple resolutions to obtain sample fusion features; through an image feature processing network, feature mapping is performed on the sample fusion features to obtain a sample prediction image of the sample object to be captured.
[0087] Here, the specific meanings and specific implementation methods involved in the steps of realizing feature extraction at different resolutions through an image feature extraction network, realizing feature fusion through an image feature fusion network, and realizing feature mapping through an image feature processing network can be found in the description of step S102 above, and will not be repeated here. The sample predicted image of the sample object to be grasped here does not yet belong to the optimal result output by the tactile image prediction model in the training process. The optimal result needs to be obtained by continuously optimizing the model parameters of the tactile image prediction model by constructing a loss function of the tactile image prediction model.
[0088] Step S504: performing loss calculation based on the sample prediction image and the sample tactile image to obtain a second loss result.
[0089] In an embodiment of the present application, the loss calculation is implemented based on the sample prediction image and the sample tactile image. After obtaining the sample prediction image, the loss function of the tactile image prediction model can be constructed based on the sample prediction image and the sample tactile image. For example, the loss function can be the L1 loss. Then, the loss calculation is performed based on the loss function to obtain a second loss result. The second loss result is used to measure the degree of inconsistency between the sample prediction image and the sample tactile image, that is, the difference between the forward calculation result of each iteration of the calculation model (that is, the sample prediction image) and the true value (that is, the sample tactile image), thereby guiding the next step of training to proceed in the right direction.
[0090] Step S505 , updating the model parameters in the tactile image prediction model based on the second loss result to obtain a trained tactile image prediction model.
[0091] In an embodiment of the present application, based on the second loss result, the model parameters can be updated by an optimization algorithm such as gradient descent, so as to train the optimal tactile image prediction model. In the process of updating the model parameters in the tactile image prediction model based on the second loss result, the gradient of the model parameters of the tactile image prediction can be calculated according to the second loss result of the tactile image prediction model. For example, the gradient of the model parameters of the tactile image prediction model to the second loss result of the tactile image prediction model can be calculated by the back propagation algorithm, that is, the model parameters of the tactile image prediction are updated in the direction that can reduce the second loss result of the tactile image prediction model, so that the second loss result gradually decreases, and the model performance of the tactile image prediction is gradually optimized. Finally, the tactile image prediction model is repeatedly iterated and trained, and the above steps can be repeated to continuously update the model parameters of the tactile image prediction model and continuously optimize the model performance of the tactile image prediction model until the model converges or reaches the preset iteration condition, stop updating the model parameters in the tactile image prediction model, and save the trained tactile image prediction model. The preset iteration condition can be a preset iteration time or number of iterations.
[0092] Here, the trained tactile image prediction model is obtained through the model training process of the tactile image prediction model, so that the trained tactile image prediction model can be directly used in the subsequent model use process to perform image mapping on the input visual image to obtain an accurate tactile image.
[0093] Step S103 , extracting image features from the tactile image to obtain simulated deformation information of the tactile sensor when the robot grasps the object to be grasped.
[0094] In the embodiment of the present application, the simulated deformation information refers to the information used to predict and simulate the deformation amount of the object to be grasped after being subjected to external force when being grasped by the robot. The image feature extraction process can apply image processing technology, such as edge detection, texture analysis, threshold segmentation and other technologies, to extract information related to the tactile characteristics of the surface of the object to be grasped from the tactile image, that is, the simulated deformation information of the tactile sensor of the robot when grasping the object to be grasped, so that the deformation of the surface of the object to be grasped is quantified. The simulated deformation information may include but is not limited to information such as compression degree, shape change, surface friction coefficient, local hardness change, etc.
[0095] Step S104 , performing force conversion on the simulated deformation information to obtain tactile information for characterizing the force degree of the surface of the object to be grasped.
[0096] In an embodiment of the present application, tactile information is used to characterize the degree of force on the surface of the object to be grasped. For example, the tactile information may be the tolerable pressure or pressure range of the surface of the object to be grasped. After obtaining the simulated deformation information, the force conversion relationship between the deformation variable and the force (i.e., the grasping force) is determined through a simulation algorithm or physical principle based on the extracted simulated deformation information, thereby obtaining the tactile information of the object to be grasped based on the force conversion relationship. The force conversion process requires certain mathematical modeling and calculation methods, such as finite element analysis, discrete element analysis (DEM) or other numerical simulation methods, and converts the deformation variable into a specific force magnitude based on known material properties (such as the hardness and thickness of the gel on the tactile sensor) and mechanical models.
[0097] Here, through the image feature extraction and force conversion process, the tactile information of the object to be grasped is quickly extracted from the tactile image, so that the robot can be quickly and accurately controlled when performing the grasping operation based on the tactile information.
[0098] Step S105 , controlling the robot to perform a grasping operation on the object to be grasped based on the tactile information.
[0099] In the embodiment of the present application, the tactile information can be used to control the grasping operation of the robot, for example, to control the force control when the robot grasps the object to be grasped, adjust the placement angle, etc. Here, after obtaining the tactile information of the object to be grasped, the grasping operation of the robot can be accurately controlled by simulating different tactile sensations according to the tactile information.
[0100] In some embodiments, see Figure 6 , Figure 6 It is shown that in step S105, the robot is controlled to perform a grasping operation on the grasped object based on the tactile information, which can be achieved by the following steps S1051 to S1054:
[0101] Step S1051, obtaining the current grasping force of the robot at the current moment.
[0102] In the embodiment of the present application, the current grasping force is the grasping force of the robot's manipulator at the current moment. After obtaining the tactile information of the object to be grasped and before controlling the robot to perform the grasping operation, it is first necessary to obtain the current grasping force of the robot at the current moment, so as to subsequently determine whether the current grasping force of the robot needs to be changed.
[0103] Step S1052: Based on the tactile information, the surface of the object to be grasped is divided into force areas to obtain a plurality of force areas with different force degrees.
[0104] Step S1053, determining the regional grasping force corresponding to each force-bearing area.
[0105] In the embodiment of the present application, force area division refers to the process of dividing the surface of the object to be grasped into regions according to different force levels according to the force conditions of the surface of the object to be grasped. The surface of the object to be grasped can be divided into multiple force areas with different force levels through force area division. The different force levels of these force areas may be caused by different materials, textures or shapes of the surface of the object to be grasped. For example, the surface of the object to be grasped is divided into four force areas through force area division, namely force area 1, force area 2, force area 3 and force area 4, wherein the corresponding force levels of force area 1, force area 2, force area 3 and force area 4 are level 1, level 2, level 3 and level 4, respectively, that is, the force level corresponding to force area 4 is the highest, and the force level corresponding to force area 1 is the lowest.
[0106] The regional grasping force refers to the grasping force that each force-bearing area can withstand. The regional grasping force can be a specific grasping force value or a grasping force range. Different force-bearing areas correspond to different regional grasping forces. For example, the regional grasping force corresponding to the force-bearing area 1 can be 1 Newton to 3 Newtons, and the regional grasping force corresponding to the force-bearing area 2 can be 4 Newtons to 6 Newtons, and so on. In some embodiments, the regional grasping force corresponding to the force-bearing areas with different force degrees can be obtained from the relationship table through a preset relationship table between the force degree and the regional grasping force.
[0107] Step S1054: Based on the current grasping force and the regional grasping force, the robot is controlled to perform a grasping operation on the object to be grasped.
[0108] In some embodiments, based on the current grasping force and the regional grasping force, controlling the robot to perform a grasping operation on the object to be grasped can be achieved in the following way: comparing the current grasping force with the regional grasping force of each force area to obtain a comparison result; based on the comparison result, determining the robot's target grasping force and the target force area on the surface of the object to be grasped; based on the target grasping force and the target force area, controlling the robot to perform a grasping operation on the object to be grasped.
[0109] That is to say, the comparison result after the force comparison is the result of numerically comparing the magnitude of the current grasping force with the magnitude of the regional grasping force of each force-bearing area, and the comparison result can be used to measure whether the robot needs to change the current grasping force. Specifically, when the magnitude of the current grasping force is different from the magnitude of the regional grasping force of each force-bearing area, it means that the robot needs to change the current grasping force; when the magnitude of the current grasping force is the same as the magnitude of the regional grasping force of one of the force-bearing areas, it means that the robot does not need to change the current grasping force and can perform grasping operations based on the current grasping force.
[0110] Here, when it is determined based on the comparison result that the robot does not need to change the current grasping force, the current grasping force is determined as the target grasping force, and the force area corresponding to the target grasping force in multiple force areas is determined as the target force area; when it is determined based on the comparison result that the robot needs to change the current grasping force, the force difference between the grasping force of each area and the current grasping force is determined; the grasping force of the area corresponding to the minimum force difference is determined as the target grasping force, and the force area corresponding to the target grasping force in multiple force areas is determined as the target force area. That is, when the robot does not need to change the current grasping force, the current grasping force is the target grasping force, and the force area corresponding to the target grasping force in multiple force areas is the target force area. The target grasping force refers to the grasping force of the robot when performing a grasping operation, and the target force area refers to the grasping area on the surface of the object to be grasped when the robot performs a grasping operation. When the robot needs to change the current grasping force, the regional grasping force with the smallest difference from the current grasping force is determined as the target grasping force, and the target force area is the force area corresponding to the target grasping force. Here, by comparing the results, it can be quickly determined whether the robot needs to change the current grasping force, as well as the target grasping force and the target force area.
[0111] In some embodiments, in addition to controlling the robot to perform a grasping operation on the object to be grasped based on tactile information, the robot can also be controlled to perform a grasping operation on the object to be grasped based on position information. This can be achieved in the following way: mapping the image position information in the image coordinate system to the world coordinate system to obtain the real position information of the object to be grasped; based on the tactile information, the real position information and the position coordinates of the robot's current position in the world coordinate system, controlling the robot to perform a grasping operation on the object to be grasped.
[0112] That is to say, after obtaining the image position information of the object to be grasped in the image coordinate system, it is necessary to determine the real position information of the object to be grasped in the world coordinate system, that is, the real coordinates of the object to be grasped and the direction compared to the robot. The image position information in the image coordinate system can be mapped to the world coordinate system according to the conversion matrix from the world coordinate system to the image coordinate system. Then, the grasping path of the robot is determined according to the real position information of the object to be grasped and the position coordinates of the current position of the robot in the world coordinate system. For example, when the distance between the object to be grasped and the robot is within the graspable range of the robot, the robot's mechanical arm can be adjusted to perform a grasping operation on the grasped object according to the grasping path, the target grasping force and the target force area. When the distance between the object to be grasped and the robot is not within the graspable range of the robot, it is necessary to move the robot and adjust the robot's mechanical arm to perform a grasping operation on the grasped object according to the grasping path, the target grasping force and the target force area. The robot determines which direction, which grasping area and how much force to use to grasp the object to be grasped, thereby achieving accurate grasping operations.
[0113] In the embodiment of the present application, after the control of the robot to perform the grasping operation is completed based on the visual image of the object to be grasped collected at the current moment, the above steps can be continued at the next moment, that is, the tactile information of the object to be grasped at the next moment can be obtained through the acquisition, image mapping, image feature extraction and force conversion process, so as to control the grasping operation of the robot at the next moment. For example, assuming that there are four different moments in time sequence, namely, moment 1, moment 2, moment 3 and moment 4, the visual image of the object to be grasped can be collected at moment 1, and the grasping operation of the robot can be controlled based on the analysis of the visual image at moment 2, and then the steps corresponding to the above moments 1 and 2 can be repeated at moments 3 and 4, so as to realize the continuous grasping operation control of the robot. It is also possible to collect the visual image of the object to be grasped at moment 1 while realizing the grasping operation control of the robot based on the analysis of the visual image collected at the previous moment; then, at moment 2, collect the visual image of the object to be grasped while realizing the grasping operation control of the robot based on the analysis of the visual image collected at moment 1, so as to realize the continuous grasping operation control of the robot. Moreover, the time intervals between adjacent moments may be the same or different, that is, the robot control method provided in the application embodiment may realize periodic control of the robot or non-periodic control of the robot.
[0114] The robot control method provided in the embodiment of the present application can be widely used in various scenarios, such as manufacturing, logistics, medical, service and other scenarios. In the manufacturing scenario, the object to be grasped can be parts, products, etc. on an automated production line, and the robot can be a sorting robot. The grasping operation performed by the robot on the grasped object can be sorting and classification of parts, or assembly of parts. In the logistics scenario, the object to be grasped can be goods in a warehouse, etc., and the robot can be a handling robot or a packaging robot. The grasping operation performed by the robot on the grasped object can be the handling of goods, or the packaging of goods. In the medical scenario, the object to be grasped can be medicines, medical devices, etc., and the robot can be a medical assistance robot. The grasping operation performed by the robot on the grasped object can be the distribution of medicines, or it can be to assist in surgical operations by grasping medical devices. In the service industry scenario, the object to be grasped can be goods in a supermarket, etc., and the robot can be a service robot. The grasping operation performed by the robot on the grasped object can be the classification of goods, or it can be the delivery of goods.
[0115] The robot control method provided in the embodiment of the present application can obtain a tactile image of the tactile sensor that simulates the robot's deformation when grasping the object to be grasped by image mapping of the visual image of the object to be grasped, without the need to collect the tactile image by installing a tactile sensor on each robot, which greatly reduces the control cost of the robot. In addition, the tactile information of the object to be grasped used to control the robot to perform the grasping operation can be directly obtained through image feature extraction and force conversion based on the tactile image, without the need to analyze it after the robot touches the object to be grasped, which can effectively solve the time delay problem in the grasping task, thereby improving the control efficiency of the robot.
[0116] The following is an explanation of an exemplary application of an embodiment of the present application in a practical application scenario.
[0117] The embodiment of the present application provides a vision-based tactile prediction method for industrial humanoid robot grasping, which can be applied to industrial robot grasping scenarios. In the related art, when grasping, the robot needs to use tactile perception to know how much force is needed to grasp the object. However, installing a tactile sensor on each robot will greatly increase the control cost. In addition, if the force feedback is analyzed after the robot senses the object, there will be a certain feedback time delay. The problem solved by the embodiment of the present application is how to accurately obtain the tactile information used to control the robot to perform the grasping operation without installing a tactile sensor. The second is to quickly determine the tactile information used to control the robot to perform the grasping operation, and solve the problem of feedback time delay.
[0118] like Figure 7 As shown, Figure 7 A flow chart of a vision-based tactile prediction method for industrial humanoid robot grasping provided in an embodiment of the present application. The steps of the method are as follows:
[0119] Step S701, in the model training phase, tactile images (i.e., the sample tactile images) and RGB images (i.e., the sample visual images) of objects (i.e., the sample objects to be grasped) are collected. According to the robot's perspective, the tactile sensor GelSight and the RGBD camera are used to collect tactile images and RGB images of different objects in the factory at close range.
[0120] Step S702: training a tactile image prediction model, the input of which is an RGB image, and the supervision signal is a tactile image. The RGB image of the object captured by the RGBD camera is used as the input of the model, and the tactile image of the object captured by the tactile sensor is used as the supervision information of the model. Figure 8 , Figure 8 An optional model structure diagram of a tactile image prediction model provided in an embodiment of the present application, the tactile image prediction model includes an image feature extraction network 801, an image feature fusion network 802, an upsampling 803 and a convolution module 804 (i.e., the above-mentioned image feature processing network).
[0121] Assuming that the size of the RGB image input to the tactile image prediction model is 640×640, the high-level semantic features of the RGB image are extracted through the image feature extraction network 801. Common image feature extraction networks 801 include ResNet50, SwinTransformer-Tiny, etc. The image feature extraction network 801 outputs three features, namely feature 1 (80×80×256), feature 2 (160×160×256) and feature 3 (320×320×256). Then, through the image feature fusion network 802, such as FPN, feature 1 is upsampled by upsampling 803 (the feature is expanded to twice the original), and then spliced with feature 2 to obtain feature 4. Repeat the above upsampling and splicing operations until the feature with the same size as the RGB image (640×640×256) is obtained. Finally, after a convolution module 804 (such as a 1x1 convolution layer), the number of channels is changed to 3 while ensuring the size of the features, and a predicted image (i.e., the sample predicted image mentioned above) is obtained. The model output size is 640×640×3, where 3 represents the number of channels. The tactile images collected during model training are used as the supervision information of the model, and the model parameters are optimized using the L1 loss. That is, the L1 loss is calculated for the predicted image and the tactile image output during the model training process, and then the gradient backpropagation is used to optimize the entire model parameters. It should be noted that the model structure of the tactile image prediction model is not unique. Figure 8This is just an example structure of the model structure of the tactile image prediction model provided in this application. No specific limitation is made here for the model structure of the tactile image prediction model.
[0122] Step S703, training the target detection network. The target detection network can be trained using a commonly used target detection network (i.e., the above-mentioned image detection network), and the categories of objects that need to be detected can be predefined. For example, the objects that need to be grasped on the industrial production line are bottles, steel pipes, and mice, that is, the RGB image includes bottles, steel pipes, and mice. When marking, the positions of the objects of these three categories appearing in the RGB image will be marked as the supervisory information (i.e., the above-mentioned sample image labels) during the training process of the target detection network. For example, the target detection network can be Yolov8, etc.
[0123] Step S704, in the actual model usage scenario, the robot detects the object to be grasped (i.e., the object to be grasped mentioned above) during grasping. If an object to be grasped is detected, the object is located in the RGB image. The object is detected by the target detection network, and the position coordinates (x, y) of the object in the RGB image are recorded. Since an RGBD camera is used, the z-axis coordinates corresponding to the position coordinates (x, y) can be found in the depth map according to the position coordinates. The image position of the object in the image coordinate system is known, and then the image position is converted to the world coordinate system to determine the actual position of the object, and then the robot will move its hand to the corresponding position.
[0124] Step S705, predicting the tactile image of the object, and analyzing the tactile information based on the tactile image when the object is not grasped. The detected part of the image of the object (i.e., the visual image) is input into the tactile image prediction model to obtain the tactile image of the object. Based on the tactile image, the force of each deformation element on the surface of the object, i.e., the tactile information, can be estimated by the finite element method, and then the tactile information is fed back to the robot.
[0125] Usually, the tactile sensor GelSight uses gel as the surface of the sensor. When an object contacts the GelSight sensor, the gel will be deformed by pressure. The sensor will mark points in the gel and predict the torque by capturing the displacement of the marked points. Specifically, it can be described as a tactile sensor GelSight with a high-resolution camera that can capture tiny changes on the surface of the gel. When an object contacts the gel, the surface of the gel will deform, thereby obtaining a tactile image of the object. After obtaining the tactile image, by using image processing techniques such as edge detection, image segmentation, and feature point tracking, the deformation information of the gel surface can be extracted from the tactile image captured by the camera, and by identifying the movement, shape change, or compression degree of the deformation area, each point of deformation on the gel surface can be quantified. According to physical principles, there is a direct relationship between the magnitude of deformation and the force. Known material properties (for example, the hardness and thickness of the gel) and mechanical models can be used to convert the deformation amount into a specific force magnitude. If the contact area between the robot and the object is large or multiple forces act simultaneously, the size and direction of multiple forces can be estimated simultaneously by analyzing the deformation of each local area, thereby obtaining tactile information of the object. It should be noted that the method of obtaining tactile information by analyzing tactile images is not the only one, and the above analysis method is only an example method provided by this application. The method of obtaining tactile information by analyzing tactile images is not specifically limited here.
[0126] Step S706: According to the feedback tactile information, the robot changes its grasping force to grasp the object. According to the feedback information of the position and force of the object, the robot plans in advance which direction and how much force to use to grasp the object.
[0127] In the embodiment of the present application, the tactile image is obtained by inputting the visual image of the object to be grasped into the tactile image prediction model, and then the tactile image is obtained through the prediction processing of the tactile image prediction model, without the need to collect the tactile image by installing a tactile sensor on each robot, which greatly reduces the control cost of the robot. In addition, the tactile information of the object to be grasped used to control the robot to perform the grasping operation can be directly obtained based on the tactile image through image feature extraction and force conversion process, without the need for the robot to touch the object to be grasped to analyze it, which can effectively solve the time delay problem in the grasping task, thereby improving the control efficiency of the robot.
[0128] Based on the robot control method described in the above embodiment, Fig. 9A structural block diagram of a robot control device 900 provided in an embodiment of the present application is shown. The robot control device may be a device in an electronic device (e.g., a robot). The robot control device may be implemented in software, which may be software in the form of programs and plug-ins, etc., including the following software modules: an acquisition module 901, an image mapping module 902, an image feature extraction module 903, a force conversion module 904, and a control module 905. These modules are logical and can therefore be arbitrarily combined or further split according to the functions implemented.
[0129] Among them, the acquisition module 901 is used to acquire the visual image of the object to be grasped; the image mapping module 902 is used to perform image mapping on the visual image to obtain the tactile image of the object to be grasped; the tactile image is an image used to simulate the deformation of the tactile sensor of the robot when grasping the object to be grasped; the image feature extraction module 903 is used to extract image features from the tactile image to obtain the simulated deformation information of the tactile sensor of the robot when grasping the object to be grasped; the force conversion module 904 is used to perform force conversion on the simulated deformation information to obtain tactile information used to characterize the force degree of the surface of the object to be grasped; the control module 905 is used to control the robot to perform a grasping operation on the object to be grasped based on the tactile information.
[0130] In some embodiments, the image mapping module 902 is also used to: perform feature extraction on the visual image at different resolutions to obtain corresponding image feature vectors at multiple resolutions; perform feature fusion on the image feature vectors at multiple resolutions to obtain image fusion features; perform feature mapping on the image fusion features to obtain a tactile image of the object to be grasped.
[0131] In some embodiments, the control module 905 is also used to: obtain the current grasping force of the robot at the current moment; based on the tactile information, divide the surface of the object to be grasped into force areas to obtain multiple force areas with different force degrees; determine the regional grasping force corresponding to each of the force areas; based on the current grasping force and the regional grasping force, control the robot to perform a grasping operation on the object to be grasped.
[0132] In some embodiments, the control module 905 is also used to: compare the current grasping force with the regional grasping force of each force area to obtain a comparison result; based on the comparison result, determine the target grasping force of the robot and the target force area on the surface of the object to be grasped; based on the target grasping force and the target force area, control the robot to perform a grasping operation on the object to be grasped.
[0133] In some embodiments, the control module 905 is also used for: when it is determined based on the comparison result that the robot does not need to change the current grasping force, determining the current grasping force as the target grasping force, and determining the force area corresponding to the target grasping force among the multiple force areas as the target force area; when it is determined based on the comparison result that the robot needs to change the current grasping force, determining the force difference between the grasping force of each area and the current grasping force; determining the regional grasping force corresponding to the minimum force difference as the target grasping force, and determining the force area corresponding to the target grasping force among the multiple force areas as the target force area.
[0134] In some embodiments, the acquisition module 901 is also used to: acquire a global visual image within the target area; perform image detection on the global visual image to obtain an image detection result; wherein the image detection result is obtained by performing image detection on a pre-trained image detection model; the image detection model is trained by the following steps: acquiring first sample data; the first sample data includes a sample global visual image and a sample image label of the sample global visual image; inputting the sample global visual image into the image detection model to be trained; performing image detection on the sample global visual image through the image detection model to be trained to obtain a predicted position and predicted category of a sample object to be grasped in the sample global visual image; performing loss calculation based on the predicted position, the predicted category and the sample image label to obtain a first loss result; updating the model parameters in the image detection model based on the first loss result to obtain a trained image detection model; when it is determined that the global visual image contains an object to be grasped based on the image detection result, obtaining the image position information of the object to be grasped in the image coordinate system in the image detection result; and extracting the visual image of the object to be grasped from the global visual image based on the image position information.
[0135] In some embodiments, the control module 905 is also used to: map the image position information in the image coordinate system to the world coordinate system to obtain the real position information of the object to be grasped; based on the tactile information, the real position information and the position coordinates of the robot's current position in the world coordinate system, control the robot to perform a grasping operation on the object to be grasped.
[0136] In some embodiments, the tactile image is obtained by image mapping through a pre-trained tactile image prediction model; the device 900 also includes a prediction model training module, and the prediction model training module is used to: obtain second sample data; the second sample data includes a sample visual image and a sample tactile image; the sample visual image includes a sample object to be grasped, and the sample tactile image is the supervision information when training the tactile image prediction model; the sample visual image is input into the tactile image prediction model to be trained; through the tactile image prediction model to be trained, the sample visual image is image mapped to obtain a sample prediction image of the sample object to be grasped; based on the sample prediction image and the sample tactile image, a loss calculation is performed to obtain a second loss result; based on the second loss result, the model parameters in the tactile image prediction model are updated to obtain a trained tactile image prediction model.
[0137] In some embodiments, the prediction model training module is also used to: perform feature extraction at different resolutions on the sample visual image through the image feature extraction network, and obtain corresponding sample feature vectors at multiple resolutions; perform feature fusion on the sample feature vectors at multiple resolutions through the image feature fusion network to obtain sample fusion features; perform feature mapping on the sample fusion features through the image feature processing network to obtain a sample prediction image of the sample object to be captured.
[0138] It should be noted that the description of the device of the embodiment of the present application is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment, so it is not repeated. For technical details not disclosed in the embodiment of the device, please refer to the description of the method embodiment of the present application for understanding.
[0139] An embodiment of the present application provides an electronic device, which may be a robot. Fig.10 Schematic diagram of the structure of the robot provided in the embodiment of the present application. Fig.10 As shown, the robot 110 includes: at least one processor 111 ( Fig.10 Only one is shown in the figure), a memory 112, and executable instructions 113 stored in the memory 112 and executable on at least one processor 111, when the processor 111 executes the executable instructions 113, the steps in any of the above-mentioned robot control method embodiments are implemented.
[0140] The robot may include but is not limited to a processor 111 and a memory 112. It is understood by those skilled in the art that Fig.10This is merely an example of the robot 110 and does not constitute a limitation of the robot 110 , which may include more or fewer components than those shown in the figure, or a combination of certain components, or different components, for example, may also include input and output devices, network access devices, etc.
[0141] The processor 111 may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPG), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0142] In some embodiments, the memory 112 may be an internal storage unit of the robot 110, such as a hard disk or memory of the robot 110. In other embodiments, the memory 112 may also be an external storage device of the robot 110, 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 110. Further, the memory 112 may also include both an internal storage unit of the robot 110 and an external storage device. The memory 112 is used to store an operating system, an application program, a boot loader, data, and other programs, such as program codes of a computer program. The memory 112 may also be used to temporarily store data that has been output or is to be output.
[0143] The present application embodiment provides a computer-readable storage medium in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will be caused to execute the robot control method provided by the present application embodiment, for example, Figure 1 The robot control method is shown.
[0144] The embodiment of the present application provides a computer program product, which includes computer executable instructions, and the computer executable instructions are stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the electronic device executes the robot control method described in the embodiment of the present application.
[0145] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0146] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0147] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0148] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0149] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A robot control method, characterized in that: The method comprises: Acquire a visual image of the object to be grasped; Performing image mapping on the visual image to obtain a tactile image of the object to be grasped; the tactile image is an image used to simulate the deformation of the tactile sensor of the robot when grasping the object to be grasped; Extracting image features from the tactile image to obtain simulated deformation information of the tactile sensor when the robot grasps the object to be grasped; Performing force conversion on the simulated deformation information to obtain tactile information for characterizing the degree of force on the surface of the object to be grasped; The robot is controlled to perform a grasping operation on the object to be grasped based on the tactile information.
2. The method according to claim 1, characterized in that The performing image mapping on the visual image to obtain a tactile image of the object to be grasped includes: Extracting features of the visual image at different resolutions respectively, and obtaining image feature vectors at multiple resolutions; Performing feature fusion on the image feature vectors at the multiple resolutions to obtain image fusion features; Feature mapping is performed on the image fusion features to obtain a tactile image of the object to be grasped.
3. The method according to claim 1, characterized in that The controlling the robot to perform a grasping operation on the object to be grasped based on the tactile information includes: Obtaining the current grasping force of the robot at the current moment; Based on the tactile information, the surface of the object to be grasped is divided into force areas to obtain a plurality of force areas with different force degrees; Determine the regional grasping force corresponding to each of the force-bearing areas; Based on the current grasping force and the regional grasping force, the robot is controlled to perform a grasping operation on the object to be grasped.
4. The method according to claim 3, characterized in that The controlling the robot to perform a grasping operation on the object to be grasped based on the current grasping force and the regional grasping force comprises: Comparing the current grasping force with the regional grasping force of each force-bearing area to obtain a comparison result; Based on the comparison result, determining a target grasping force of the robot and a target force area on the surface of the object to be grasped; Based on the target grasping force and the target force-bearing area, the robot is controlled to perform a grasping operation on the object to be grasped.
5. The method according to claim 4, characterized in that Determining the target grasping force of the robot and the target force area on the surface of the object to be grasped based on the comparison result includes: When it is determined based on the comparison result that the robot does not need to change the current grasping force, the current grasping force is determined as the target grasping force, and a force area corresponding to the target grasping force among the multiple force areas is determined as the target force area; When it is determined based on the comparison result that the robot needs to change the current grasping force, determining the force difference between the grasping force of each area and the current grasping force; The regional grasping force corresponding to the minimum force difference is determined as the target grasping force, and the force area corresponding to the target grasping force among the multiple force areas is determined as the target force area.
6. The method according to claim 1, characterized in that The step of obtaining a visual image of the object to be grasped includes: Acquire a global visual image within the target area; Performing image detection on the global visual image to obtain an image detection result; wherein the image detection result is obtained by performing image detection using a pre-trained image detection model; The image detection model is trained by the following steps: obtaining first sample data; the first sample data includes a sample global visual image and a sample image label of the sample global visual image; inputting the sample global visual image into the image detection model to be trained; performing image detection on the sample global visual image through the image detection model to be trained to obtain a predicted position and a predicted category of a sample object to be captured in the sample global visual image; performing loss calculation based on the predicted position, the predicted category and the sample image label to obtain a first loss result; updating the model parameters in the image detection model based on the first loss result to obtain a trained image detection model; In a case where it is determined based on the image detection result that the global visual image contains the object to be grasped, acquiring image position information of the object to be grasped in the image coordinate system in the image detection result; Based on the image position information, a visual image of the object to be grasped is extracted from the global visual image.
7. The method according to claim 6, characterized in that The controlling the robot to perform a grasping operation on the object to be grasped based on the tactile information includes: Mapping the image position information in the image coordinate system to the world coordinate system to obtain the real position information of the object to be grasped; Based on the tactile information, the real position information and the position coordinates of the current position of the robot in the world coordinate system, the robot is controlled to perform a grasping operation on the object to be grasped.
8. The method according to any one of claims 1 to 6, characterized in that: The tactile image is obtained by performing image mapping through a pre-trained tactile image prediction model; the tactile image prediction model is trained through the following steps: Acquire second sample data; the second sample data includes a sample visual image and a sample tactile image; the sample visual image includes a sample object to be grasped, and the sample tactile image is supervisory information when training the tactile image prediction model; Inputting the sample visual image into a tactile image prediction model to be trained; Performing image mapping on the sample visual image through the tactile image prediction model to be trained to obtain a sample prediction image of the sample object to be grasped; Performing loss calculation based on the sample prediction image and the sample tactile image to obtain a second loss result; The model parameters in the tactile image prediction model are updated based on the second loss result to obtain a trained tactile image prediction model.
9. The method according to claim 8, characterized in that The tactile image prediction model includes an image feature extraction network, an image feature fusion network and an image feature processing network; the sample visual image is image mapped by the tactile image prediction model to obtain a sample prediction image of the sample object to be grasped, including: Through the image feature extraction network, feature extraction is performed on the sample visual image at different resolutions, and sample feature vectors at multiple resolutions are correspondingly obtained; By means of the image feature fusion network, feature fusion is performed on the sample feature vectors at the multiple resolutions to obtain sample fusion features; The sample fusion features are feature mapped through the image feature processing network to obtain a sample prediction image of the sample object to be captured.
10. A robot control device, characterized in that: include: An acquisition module, used to acquire a visual image of an object to be grasped; An image mapping module, used for performing image mapping on the visual image to obtain a tactile image of the object to be grasped; the tactile image is an image used to simulate the deformation of the tactile sensor of the robot when grasping the object to be grasped; An image feature extraction module is used to extract image features from the tactile image to obtain simulated deformation information of the tactile sensor when the robot grasps the object to be grasped; A force conversion module, used for performing force conversion on the simulated deformation information to obtain tactile information for characterizing the force degree of the surface of the object to be grasped; A control module is used to control the robot to perform a grasping operation on the object to be grasped based on the tactile information.
11. An electronic device, characterized in that: include: A memory for storing computer executable instructions; A processor, configured to implement the robot control method according to any one of claims 1 to 9 when executing the computer executable instructions stored in the memory.
12. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and when the computer executable instructions are executed by a processor, the robot control method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Vision-based touch measurement method and device and equipment and storage medium
CN110162175A
Manipulator grabbing method based on tactile-visual fusion perception and manipulator
CN115625713A
Vision-based tactile sensor calibration method and device
CN115719385A
Grabbing stability evaluation method based on visual touch fusion perception and multi-modal space-time convolution
CN116945170A
Tactile information estimation device, tactile information estimation method and program
JP2020023050A
Cited By
Robot control method and device, electronic equipment, computer readable storage medium and computer program product
CN119526447A
Compliant control method for multiple components of composite robot
CN119820565A
Grabbing force generation method and device, equipment and medium
CN120095836A
Glass container surface defect detection method based on visual inspection
CN120142307A
Processing method and device for robot with body, electronic equipment and storage medium
CN120791805A
