A human hand-robot contact state detection system and method
By combining virtual scenes and physical scenes with a single depth camera, the depth pixel coordinates are calculated and the contact status is determined, which solves the problem of target being occluded in contact detection between human hands and robots, and achieves low-cost and efficient contact status detection and contact location determination.
Patent Information
- Application Number
- CN202210106559.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-28
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-01-28
AI Technical Summary
In the existing technology, the vision-based contact detection method between the human hand and the robot has the problem that the detection target is blocked, resulting in a large amount of calculation, high hardware cost, and difficulty in accurately determining the contact status between the human hand and the robot.
A single depth camera is used to combine virtual scenes and physical scenes, images are acquired through color cameras and depth cameras, depth pixel coordinates are calculated and mapped to synthetic depth images, and the virtual camera is used to determine the contact status. Only a single depth camera can be used to accurately determine Contact between human hands and robots.
The contact status detection between human hand and robot is realized with small calculation amount and low hardware cost, and the contact part is determined through the pixel label in the virtual robot model, which solves the problem of how to accurately judge the contact part.
Smart Images

Figure CN114549641B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a human hand-robot contact state detection system and method, belonging to the field of human-machine interaction. Background Art
[0002] Industrial robots can work for a long time, with high precision and high efficiency. However, due to the limitations of current robot programming methods, workers and robots still need to work together for human-machine interaction. Workers and robots share the same workspace. To ensure the safety of operators, it is necessary to accurately judge the contact status between human hands and robots.
[0003] The vision-based contact detection method between human hands and robots has the advantages of low cost, easy deployment, and flexibility, but there is a problem of occlusion of the detection target. At present, a complete three-dimensional model image is usually obtained by shooting the target at multiple angles and then fusing the target images at different angles. For example, in the patent CN109255813B "A real-time detection method for handheld object posture for human-machine collaboration", "only one depth image will always be unable to obtain the three-dimensional point cloud information of each surface of the object due to different degrees of occlusion. Therefore, we take multi-angle depth images of each part of the object, and then align and merge them according to the actual position of the object represented by each part, and finally obtain a complete three-dimensional model image of the object." However, this method requires a large amount of calculation, a large demand for camera devices, and high cost; and in some human-machine interaction scenarios, it is difficult to obtain the situation of occluded targets even if the angle is switched. Summary of the invention
[0004] In order to overcome the problems existing in the prior art, the present invention designs a human hand-robot contact status detection system, which only requires a single depth camera to accurately determine the contact status between the human hand and the robot, with small calculation amount and low hardware cost.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] Technical solution 1:
[0007] A method for detecting a human hand-robot contact state comprises the following steps:
[0008] S1. Constructing a physical scene and a virtual scene, wherein the physical scene includes a color camera, a depth camera, a first target and a second target, and the virtual scene includes a virtual camera and a virtual second target model, and the second target and the virtual second target model have the same motion state;
[0009] S2. Obtaining, by means of a color camera and a depth camera, a color image and a depth image including the first target and the second target blocked by the first target, respectively;
[0010] S3, obtaining a synthetic depth image including a virtual second target model through a virtual camera;
[0011] S4. Calculate the depth pixel coordinates p′ (u ) of the first target in the depth pixel coordinate system according to the color image and the depth image. d , v d );
[0012] S5. Calculate the depth pixel coordinate p′(u d , v d ) is the three-dimensional coordinate P in the depth camera coordinate system e (x e ,y e , z e );
[0013] S6. The depth pixel coordinate p′(u d , v d ) is mapped to the synthesized depth image to obtain the synthesized depth pixel coordinate p′ v (u d , v d );
[0014] S7: Calculate the synthetic depth pixel coordinate p′ v (u d , v d ) is the three-dimensional coordinate P in the virtual camera coordinate system v (x v ,y v , z v );
[0015] S8, according to the three-dimensional coordinates P e (x e ,y e , z e ) and the three-dimensional coordinates P v (x v ,y v , z v ) to determine whether the first target and the second target are in contact.
[0016] Furthermore, the step S4 is specifically as follows:
[0017] Detect the color pixel coordinates p(u c , v c ); Calculate the depth pixel coordinates p′(u ) of the first target in the depth pixel coordinate system according to the mapping relationship between the color pixel coordinate system and the depth pixel coordinate system. d , v d ).
[0018] Furthermore, the step S5 is specifically as follows: according to the intrinsic parameter matrix M of the depth camera d Calculate the three-dimensional coordinates P of the depth pixel coordinates in the depth camera coordinate system e (x e ,y e , z e ).
[0019] Furthermore, the step S7 is specifically as follows: using the depth camera intrinsic parameter matrix M d Calculate the synthetic depth pixel coordinate p′ v (u d , v d ) The three-dimensional coordinate P in the virtual camera coordinate system v (x v ,y v , z v ).
[0020] Furthermore, the relative position of the depth camera to the second target is consistent with the relative position of the virtual camera to the virtual second target model; the step S8 is specifically: calculating the three-dimensional coordinate P e (x e ,y e , z e ) and the three-dimensional coordinates P v (x v ,y v , z v ) between e , P v ); if d(P e , P v ) is less than a preset threshold, it is considered that the first target is in contact with the second target.
[0021] Furthermore, the method further includes: acquiring a synthetic color image including a virtual second target model through the virtual camera;
[0022] Different pixel labels are set for different parts of the virtual second target model; according to the synthetic depth pixel coordinate p′ v (u d , v d ), obtain the synthetic color pixel coordinates in the corresponding synthetic color image; query the pixel label at the synthetic color pixel coordinates, and the virtual second target model part obtained from the pixel label is the contact part between the first target and the second target.
[0023] Technical solution 2:
[0024] A human hand-robot contact state detection system, comprising:
[0025] A physical scene, the physical scene comprising a color camera, a depth camera, a first target, and a second target; the color camera is used to obtain a color image including the first target and the second target blocked by the first target, and the depth camera is used to obtain a depth image including the first target and the second target blocked by the first target
[0026] A virtual scene, wherein the virtual scene includes a virtual camera and a virtual second target model, the second target and the virtual second target model have the same motion state, and the virtual camera is used to obtain a synthetic depth image including the virtual second target model;
[0027] A distance detection module is used to calculate the depth pixel coordinates p′ (u ) of the first target in the depth pixel coordinate system according to the color image and the depth image. d , v d ), and calculate the depth pixel coordinate p′(u d , v d ) is the three-dimensional coordinate P in the depth camera coordinate system e (x e ,y e , z e ); The depth pixel coordinate p′(u d , v d ) is mapped to the synthesized depth image to obtain the synthesized depth pixel coordinate p′ v (u d v d ), and calculate the synthetic depth pixel coordinate p′ v (u d , v d ) is the three-dimensional coordinate P in the virtual camera coordinate system v (x v ,y v , z v ); and according to the three-dimensional coordinates P e (x e ,y e , z e ) and the three-dimensional coordinates P v (x v ,y v , z v ) to determine whether the first target and the second target are in contact.
[0028] Furthermore, it also includes a target detection module, which is used to detect the color pixel coordinates p(u c , v c ).
[0029] Furthermore, the relative position of the depth camera to the second target is consistent with the relative position of the virtual camera to the virtual second target model, specifically: calculate the three-dimensional coordinates P e (x e ,y e , z e ) and the three-dimensional coordinates P v (x v ,y v , z v ) between e , P v ); if d(P e , P v ) is less than a preset threshold, it is considered that the first target is in contact with the second target.
[0030] Furthermore, it also includes: a contact position determination module;
[0031] Acquiring a synthetic color image including a virtual second target model through the virtual camera;
[0032] Different pixel labels are set for different parts of the virtual second target model;
[0033] The contact position determination module is used to synthesize the depth pixel coordinate p′ v (u d , v d ), obtain the synthetic color pixel coordinates in the corresponding synthetic color image; query the pixel label at the synthetic color pixel coordinates, and the virtual second target model part obtained from the pixel label is the contact part between the first target and the second target.
[0034] Compared with the prior art, the present invention has the following characteristics and beneficial effects:
[0035] 1. The present invention only requires a single depth camera to accurately determine the contact between a human hand and a robot, with small computational complexity and low hardware cost.
[0036] 2. The present invention further solves the problem of how to determine the contact point between the human hand and the robot by setting different pixel labels at different parts of the virtual robot model and querying the pixel labels of the pixel coordinates of the contact points. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a schematic diagram of the system of the present invention;
[0038] Figure 2 is a schematic diagram of the virtual scene of the present invention;
[0039] Figure 3 This is a schematic diagram of the system workflow of the present invention;
[0040] Figure 4 This is a schematic diagram of the color image of the present invention;
[0041] Figure 5 This is a schematic diagram of the synthetic depth image according to the present invention;
[0042] Figure 6 Schematic diagram of the human hand-robot contact state detection method of the present invention.
[0043] Among them, 1. RGB-D camera; 2. robot; 3. computer; 3-1. augmented reality registration module; 3-2. image synthesis module; 3-3. hand recognition module; 3-4. distance detection module; 3-5. contact part judgment module; 4. virtual robot model. DETAILED DESCRIPTION
[0044] First, some professional terms involved in the present invention are explained:
[0045] RGB-D camera: The RGB-D camera is equipped with a color camera and a depth camera, which can simultaneously capture color images and depth images of the scene.
[0046] Depth image: A depth image is a special grayscale image in which the value of each pixel represents the distance between the camera and the scene.
[0047] World coordinate system: Select a reference coordinate system in the scene to describe the position of the camera and objects. This coordinate system is called the world coordinate system.
[0048] Camera coordinate system: A coordinate system with the camera light point as the center, the X and Y axes parallel to the sides of the image, and the optical axis as the Z axis.
[0049] Pixel coordinate system: A coordinate system with the upper left corner of the image as the origin, pixels as the unit of measurement, and the X and Y axes parallel to the two sides of the image.
[0050] Robot base coordinate system: A rectangular coordinate system based on the robot mounting base and used to describe the movement of the robot body.
[0051] The present invention is described in more detail below with reference to the embodiments.
[0052] Embodiment 1
[0053] like Figure 1 and Figure 2 As shown, a human hand-robot contact state detection system includes: a physical scene, a computer and a virtual scene. The physical scene includes an RGB-D camera and a robot; the virtual scene includes a virtual robot model and a virtual camera.
[0054] The RGB-D camera and the robot are connected to the computer for communication. The RGB-D camera collects and sends the color image and depth image of the human hand and the robot to the computer. Figure 4 The robot is blocked by the human hand in the image and depth image, and it is impossible to directly determine whether the robot is in contact with the human hand. The robot sends the motion status data of each joint to the computer.
[0055] like Figure 3 As shown, the computer runs the augmented reality registration module, image synthesis module, hand recognition module, and distance detection module according to the received color image and depth image. The execution steps of each module are as follows:
[0056] The transformation matrix M between the RGB camera and the robot base coordinate system in the RGB-D camera is obtained through robot hand-eye calibration. Augmented reality registration module: Taking the robot base coordinate system as the world coordinate system, the virtual robot model is superimposed on the world coordinate system using the transformation matrix M to complete augmented reality registration and achieve consistency between the virtual robot model base coordinate system and the robot base coordinate system, such as Figure 5 shown.
[0057] Image synthesis module: using the depth camera intrinsic parameter M in the RGB-D camera d Establish a virtual camera imaging model. Use the transformation matrix M and the inherent parameters of the RGB-D camera to obtain the mapping relationship between the color camera and the depth camera, and then obtain the transformation matrix D between the depth camera and the world coordinate system. W Using the transformation matrix D W A virtual camera with the same posture as the RGB-D camera is set in the virtual scene. The virtual camera imaging model uses the depth buffer technology to record the depth value of the virtual robot model and generate a synthetic depth image and a synthetic color image with the same resolution as the depth image.
[0058] Hand recognition module: Uses YOLOV5 and other target detection algorithms to identify hands in color images and calculates the pixel coordinates p(u c , v c ). Alternatively, calculate the pixel coordinates p(u c , v c ).
[0059] Distance detection module: According to the mapping relationship between the color pixel coordinate system and the depth pixel coordinate system, the depth pixel coordinate p′(u d , v d ). According to the intrinsic parameter matrix M of the depth camera d , calculate the depth pixel coordinate p′(u d , vd ) is the three-dimensional coordinate P in the depth camera coordinate system e (x e ,y e , z e ); The depth pixel coordinate p′(u d , v d ) is mapped to the synthesized depth image to obtain the synthesized depth pixel coordinate p′ v (u d v d );Use the depth camera internal parameter matrix M d Calculate the synthetic depth pixel coordinate p′ v (u d , v d ) is the three-dimensional coordinate P in the virtual camera coordinate system v (x v ,y v , z v );Calculate the three-dimensional coordinates P e (x e ,y e , z e ) and the three-dimensional coordinates P v (x v ,y v , z v ) between e , P v ); if d(P e , P v ) is less than the preset threshold, it is considered that the robot is in contact with the human hand.
[0060] like Figure 6 As shown in the figure, in the camera perspective projection direction, since the closest point of the robot to the center of the human hand is located in the blocked area, the depth value of the closest point cannot be directly obtained by a single depth camera. The technicians of the present invention fully considered the principle of camera perspective projection, discovered and utilized the characteristic that the pixel coordinates of the center of the human hand and the above-mentioned closest point in the depth image are consistent. On this basis, a virtual scene consistent with the physical scene information is constructed, and the center of the human hand is projected to the depth camera coordinate system and the virtual camera coordinate system respectively, and the obtained three-dimensional coordinates P e (x e ,y e , z e ), three-dimensional coordinates P v (x v ,y v , z v) can represent the three-dimensional coordinates of the palm of the human hand in the physical scene and the three-dimensional coordinates of the closest point, respectively. The distance between the two is the distance between the palm of the human hand and the closest point. Obviously, the human hand-robot contact state detection system described in this embodiment only needs a single depth camera to accurately determine the contact state between the human hand and the robot, with small calculation amount and low hardware cost.
[0061] Embodiment 2
[0062] The steps to create a virtual scene are as follows:
[0063] S1. Build a virtual robot model based on the robot's size parameters, use different colors to render each joint arm of the robot, and generate pixel labels corresponding to each joint arm to facilitate subsequent judgment of which joint arm of the robot is in contact with the human hand.
[0064] S2. According to the robot structure, add the degree of freedom (dof) nodes of each joint on the virtual robot model.
[0065] S3. A virtual robot kinematic model is established according to the robot DH parameters. The kinematic model updates the dof nodes of the virtual robot model according to the motion state data of each joint of the robot, so that the motion of the virtual robot model is consistent with that of the robot.
[0066] S4, loading the virtual robot model and the virtual camera to establish a virtual scene.
[0067] Embodiment 3
[0068] Furthermore, the human hand-robot contact state detection system also includes a contact position judgment module.
[0069] If the first embodiment determines that the human hand and the robot are in contact, the center of the human hand is used as the contact point, and the contact position determination module obtains the synthetic depth pixel coordinate p′ of the center of the human hand v (u d , v d ). Since the same virtual camera imaging model is used to synthesize color images and depth images with the same resolution in the virtual robot environment, the pixel coordinate p′ of the center of the hand in the synthesized depth image is v (u d , v d ) is consistent with the pixel coordinates of the center of the human hand in the synthetic color image. Then the contact position judgment module directly queries the pixel coordinates p′ v (u d , v d ) can determine which joint arm of the robot is in contact with the human hand.
[0070] The improvement of this embodiment is that by setting different pixel labels at different parts of the virtual robot model and querying the pixel labels of the pixel coordinates of the contact points, the problem of how to determine the contact part between the human hand and the robot is further solved. This method is simple and easy to implement.
[0071] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
Claims
1. A method for detecting human hand-robot contact state, characterized in that: The following steps are involved: S1. Constructing a physical scene and a virtual scene, wherein the physical scene includes a color camera, a depth camera, a first target and a second target, and the virtual scene includes a virtual camera and a virtual second target model, and the second target and the virtual second target model have the same motion state; S2. Obtaining, by means of a color camera and a depth camera, a color image and a depth image including the first target and the second target blocked by the first target, respectively; S3, obtaining a synthetic depth image including a virtual second target model through a virtual camera; S4. Calculate the depth pixel coordinates p′ (u ) of the first target in the depth pixel coordinate system according to the color image and the depth image. d , v d ); S5. Calculate the depth pixel coordinate p′(u d , v d ) is the three-dimensional coordinate P in the depth camera coordinate system e (x e ,y e , z e ); S6. The depth pixel coordinate p′(u d , v d ) is mapped to the synthesized depth image to obtain the synthesized depth pixel coordinate p′ v (u d , v d ); S7: Calculate the synthetic depth pixel coordinate p′ v (u d , v d ) is the three-dimensional coordinate P in the virtual camera coordinate system v (x v ,y v , z v ); S8, according to the three-dimensional coordinates P e (x e ,y e , z e ) and the three-dimensional coordinates P v (x v ,y v , z v ) to determine whether the first target and the second target are in contact.
2. A method for detecting human hand-robot contact state according to claim 1, characterized in that: The step S4 is specifically as follows: Detect the color pixel coordinates p(u c , v c ); Calculate the depth pixel coordinates p′(u ) of the first target in the depth pixel coordinate system according to the mapping relationship between the color pixel coordinate system and the depth pixel coordinate system. d , v d ).
3. The method for detecting the human hand-robot contact state according to claim 1, characterized in that: The step S5 is specifically as follows: according to the intrinsic parameter matrix M of the depth camera d Calculate the three-dimensional coordinates P of the depth pixel coordinates in the depth camera coordinate system e (x e ,y e , z e ).
4. The method for detecting the human hand-robot contact state according to claim 1, characterized in that: The step S7 is specifically as follows: using the depth camera intrinsic parameter matrix M d Calculate the synthetic depth pixel coordinate p′ v (u d , v d ) The three-dimensional coordinate P in the virtual camera coordinate system v (x v ,y v , z v ).
5. The method for detecting the human hand-robot contact state according to claim 1, characterized in that: The relative position of the depth camera to the second target is consistent with the relative position of the virtual camera to the virtual second target model; the step S8 is specifically: calculating the three-dimensional coordinate P e (x e ,y e , z e ) and the three-dimensional coordinates P v (x v ,y v , z v ) between e , P v ); if d(P e , P v ) is less than a preset threshold, it is considered that the first target is in contact with the second target.
6. The method for detecting the human hand-robot contact state according to claim 1, characterized in that: Also includes: Acquiring a synthetic color image including a virtual second target model through the virtual camera; Different pixel labels are set for different parts of the virtual second target model; according to the synthetic depth pixel coordinate p′ v (u d , v d ), obtain the synthetic color pixel coordinates in the corresponding synthetic color image; query the pixel label at the synthetic color pixel coordinates, and the virtual second target model part obtained from the pixel label is the contact part between the first target and the second target.
7. A human hand-robot contact state detection system, characterized in that: include: A physical scene, the physical scene comprising a color camera, a depth camera, a first target, and a second target; the color camera is used to obtain a color image including the first target and the second target occluded by the first target, and the depth camera is used to obtain a depth image including the first target and the second target occluded by the first target; A virtual scene, wherein the virtual scene includes a virtual camera and a virtual second target model, the second target and the virtual second target model have the same motion state, and the virtual camera is used to obtain a synthetic depth image including the virtual second target model; A distance detection module is used to calculate the depth pixel coordinates p′ (u ) of the first target in the depth pixel coordinate system according to the color image and the depth image. d , v d ), and calculate the depth pixel coordinate p′(u d , v d ) is the three-dimensional coordinate P in the depth camera coordinate system e (x e ,y e , z e ); The depth pixel coordinate p′(u d , v d ) is mapped to the synthesized depth image to obtain the synthesized depth pixel coordinate p′ v (u d v d ), and calculate the synthetic depth pixel coordinate p′ v (u d , v d ) is the three-dimensional coordinate P in the virtual camera coordinate system v (x v ,y v , z v ); and according to the three-dimensional coordinates P e (x e ,y e , z e ) and the three-dimensional coordinates P v (x v ,y v , z v ) to determine whether the first target and the second target are in contact.
8. The human hand-robot contact state detection system according to claim 7, characterized in that: The target detection module is used to detect the color pixel coordinates p(u c , v c ).
9. The human hand-robot contact state detection system according to claim 7, characterized in that: The relative position of the depth camera to the second target is consistent with the relative position of the virtual camera to the virtual second target model. Specifically, the three-dimensional coordinates P are calculated. e (x e ,y e , z e ) and the three-dimensional coordinates P v (x v ,y v , z v ) between e , P v ); if d(P e , P v ) is less than a preset threshold, it is considered that the first target is in contact with the second target.
10. The human hand-robot contact state detection system according to claim 7, characterized in that: Also includes: Contact position judgment module; Acquiring a synthetic color image including a virtual second target model through the virtual camera; Different pixel labels are set for different parts of the virtual second target model; The contact position determination module is used to synthesize the depth pixel coordinate p′ v (u d , v d ), obtain the synthetic color pixel coordinates in the corresponding synthetic color image; query the pixel label at the synthetic color pixel coordinates, and the virtual second target model part obtained from the pixel label is the contact part between the first target and the second target.
