A method for automatically generating 6D posture trajectory of a facial therapy robot

Through the automatic generation method of 6D posture trajectory, the facial physiotherapy robot uses a 3D camera to collect data in real time, generates point clouds and performs distance constraint processing, solving the problem of inability to match the preset trajectory, achieving matching movements with the human face, and improving the physiotherapy effect and security.

CN118485809BActive Publication Date: 2024-09-27SHENZHEN DEYI MEDICAL TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410911768.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-09-27
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

The preset running trajectory of the facial physiotherapy robot cannot match different human faces, resulting in poor physiotherapy effects. When the position of the human head is adjusted, the physiotherapy parts may come into contact with the skin, affecting safety and effectiveness.

Method used

The 6D posture trajectory automatic generation method is used to collect facial images in real time through a 3D camera, generate point cloud data, and perform distance constraint processing to ensure that the physical therapy piece maintains a safe distance from the face. Target trajectory data is generated based on the point cloud data to control the physical therapy piece at least Move in three degrees of freedom to achieve matching movements with the face.

Benefits of technology

It improves the effect and safety of physical therapy, ensures that the physical therapy piece is kept at an appropriate distance from the face, adapts to changes in the human face, and enhances the personalization and safety of physical therapy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118485809B
    Figure CN118485809B
Patent Text Reader

Abstract

The present invention discloses a method for automatically generating a 6D posture trajectory of a facial therapy robot and a facial therapy robot, wherein the method comprises: obtaining a facial image collected in real time by a 3D camera of the facial therapy robot; generating point cloud data based on the facial image; performing distance constraint processing on the point cloud data to obtain fallback point cloud data, wherein the distance between the fallback point cloud data and a target facial area is greater than a preset safety distance; generating target trajectory data according to the fallback point cloud data; and controlling a therapy component of the therapy robot to move in at least three degrees of freedom according to the target trajectory data to perform therapy on the target facial area. The present invention solves the problem that the running trajectory of the therapy component of the facial therapy robot cannot match the human face during operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of physical therapy technology, and in particular to a method for automatically generating a 6D posture trajectory of a facial physical therapy robot. Background Art

[0002] At present, facial therapy robots are mostly set to run along a preset / fixed path, but the sizes and shapes of different human faces receiving therapy are different. Therapy with a preset running trajectory will affect the final therapy effect.

[0003] In addition, facial therapy requires that the therapy parts cannot contact human skin. During the therapy process, the human body will inevitably adjust the position of the head, causing the preset running trajectory to contact human skin, affecting the therapy effect. Summary of the invention

[0004] The main purpose of the present invention is to provide a method for automatically generating a 6D posture trajectory of a facial therapy robot, so as to solve the problem that the running trajectory of the therapy piece of the facial therapy robot cannot match the human face during operation.

[0005] In one embodiment, a facial therapy robot 6D posture trajectory automatic generation method can be used for a facial therapy robot, and the facial therapy robot 6D posture trajectory automatic generation method includes:

[0006] Step S1, obtaining a facial image captured in real time by a 3D camera of a facial therapy robot;

[0007] Step S2, generating point cloud data based on the facial image;

[0008] Step S3, performing distance constraint processing on the point cloud data to obtain fallback point cloud data, wherein the distance between the fallback point cloud data and the target facial area is greater than a preset safety distance;

[0009] Step S4, generating target trajectory data according to the fallback point cloud data;

[0010] Step S5: According to the target trajectory data, control the therapy parts of the therapy robot to move in at least three degrees of freedom to perform therapy on the target facial area.

[0011] In one embodiment, the step S3 of performing distance constraint processing on the point cloud data so that the distance between the point cloud data and the target facial area is greater than a preset safety distance includes:

[0012] Multiply the point cloud data by a unit vector with a preset multiple to obtain the fallback point cloud data.

[0013] In one embodiment, step S4 further includes:

[0014] Cache target trajectory data of duration, wherein the target trajectory data of duration includes target trajectory data at a first moment and target trajectory data at a second moment after the first moment;

[0015] According to the target trajectory data at the second moment, smoothing processing is performed on the target trajectory data at the first moment, so that the target trajectory data at the first moment is smoother and satisfies the distance constraint.

[0016] In one embodiment, the target trajectory data at the first moment is smoothed according to the target trajectory data at the second moment, so that the target trajectory data at the first moment is smoother and satisfies the distance constraint, including:

[0017] Based on the preset physical therapy needs, generate the objective function corresponding to each time period;

[0018] Taking minimization of the objective function as a convergence condition, the target trajectory data at the first moment is iteratively smoothed until convergence, so that the target trajectory data at the first moment is smoother and satisfies the distance constraint.

[0019] In one embodiment, the objective function is a similarity function between a path corresponding to the target trajectory data and a path preset based on the therapy requirements.

[0020] In one embodiment, the step S4 includes:

[0021] Step S41, calculating the normal vector of the local plane corresponding to the fallback point cloud data;

[0022] Step S42: Calculate the target trajectory data based on the normal vector.

[0023] In one embodiment, the target trajectory data includes a first deflection angle, a second deflection angle, and a third deflection angle; wherein axes corresponding to the first deflection angle, the second deflection angle, and the third deflection angle are perpendicular to each other;

[0024] The step S42 includes: based on satisfying the first deflection angle constraint condition, the second deflection angle constraint condition and the third deflection angle constraint condition, calculating and generating corresponding target trajectory data, wherein:

[0025] The first deflection angle constraint condition includes: a first formula: ,

[0026] And the second formula: ;

[0027] Among them, the normal vector of the local plane , R X represents the first deflection angle;

[0028] The second deflection angle constraint condition includes: a third formula: ,

[0029] And, the fourth formula: ;

[0030] Among them, R Y represents the second deflection angle; the third deflection angle constraint condition is: the third deflection angle is equal to 180°.

[0031] In one embodiment, the time span of the target trajectory data of the buffered duration can be used to identify unexpected motion.

[0032] In one embodiment, the number of the 3D cameras is multiple and arranged to capture facial images at multiple angles;

[0033] The step S1 includes: obtaining multi-angle facial images captured by multiple 3D cameras of the facial therapy robot.

[0034] The method for automatically generating 6D posture trajectories of a facial therapy robot of the present application generates point cloud data by acquiring a facial image collected in real time by a 3D camera of the facial therapy robot; then the point cloud data is subjected to distance constraint processing to obtain fallback point cloud data, the distance between the fallback point cloud data and the target facial area being greater than a preset safety distance; finally, target trajectory data is generated based on the fallback point cloud data, and based on the target trajectory data, the physiotherapy robot's physiotherapy parts are controlled to move in at least three degrees of freedom to perform physiotherapy on the target facial area. By generating point cloud data based on the facial image collected in real time, the point cloud data is matched with the human face, and by performing distance constraint processing on the point cloud data, the generated target trajectory data can enable the physiotherapy parts to maintain a safe distance from the face during operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0036] Figure 1 This is a flow chart of an embodiment of a method for automatically generating 6D posture trajectories of a facial therapy robot according to the present invention;

[0037] Figure 2 A schematic diagram of local plane normal vectors of an embodiment of a method for automatically generating 6D posture trajectories of a facial therapy robot according to the present invention;

[0038] Figure 3This is a flowchart of another embodiment of the method for automatically generating 6D posture trajectories of a facial therapy robot according to the present invention.

[0039] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0041] In addition, in the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the protection scope required by the present invention.

[0042] The facial therapy robot 6D posture trajectory automatic generation method of the present application can be applied to the facial therapy robot. The facial therapy robot 6D posture trajectory automatic generation method can enable the facial therapy robot to move the therapy parts along the human face and maintain a safe distance during operation, thereby improving the therapy effect while improving the safety of the therapy.

[0043] Reference Figure 1 In one embodiment, a facial therapy robot 6D posture trajectory automatic generation method can be used for a facial therapy robot, and the facial therapy robot 6D posture trajectory automatic generation method includes:

[0044] Step S1, obtaining a facial image captured in real time by a 3D camera of a facial therapy robot;

[0045] In this embodiment, the 3D camera may use speckle laser measurement to collect a 3D image of the target face in real time through a speckle laser and an infrared sensor.

[0046] Step S2, generating point cloud data based on the facial image; wherein, the conversion between the real-time facial image and the point cloud data is a conventional technical means, which will not be described in detail here.

[0047] Step S3, performing distance constraint processing on the point cloud data to obtain fallback point cloud data, wherein the distance between the fallback point cloud data and the target facial area is greater than a preset safety distance;

[0048] For example, the generated point cloud image theoretically fits the human face, but the physiotherapy parts of the physiotherapy robot need to keep a distance from the human face during operation; at the same time, the position of the human face will inevitably change during the physiotherapy process, causing the physiotherapy parts to contact the human body;

[0049] In step S3, by performing distance constraint processing on the point cloud data, the distance between the obtained fallback point cloud data and the target facial area is greater than a preset safety distance, wherein the distance between the fallback point cloud data and the target facial area may refer to the distance between the point cloud data of the facial area and the data points corresponding to the fallback point cloud data.

[0050] Step S4, generating target trajectory data according to the fallback point cloud data;

[0051] The specific calculation method for generating target trajectory data based on the fallback point cloud data is not limited here.

[0052] Step S5: According to the target trajectory data, control the therapy parts of the therapy robot to move in at least three degrees of freedom to perform therapy on the target facial area.

[0053] The therapy device can realize 6-axis motion, such as 3-axis translation and 3-axis rotation. In this embodiment, after the hand-eye calibration, tool calibration, binocular calibration and optimization calibration, the therapy robot can obtain matching data from the 3D camera and the pixels obtained from the RGB camera. And matching 3D camera 3D data After dual-targeting Then the three-dimensional data of the matched target point can be obtained ; The target three-dimensional data based on the 3D camera coordinate system is calibrated by hand and eye Then the target 3D data can be expressed in the tool coordinates of the robot arm. ; After tool calibration After conversion, the target 3D data can be output based on the base coordinate system of the robot arm. ; After subsequent optimization and calibration , which can make the output value closer to the true value ;

[0054] The expression is as follows:

[0055] .

[0056] The facial therapy robot 6D posture trajectory automatic generation method of the present application obtains the facial image collected in real time by the 3D camera of the facial therapy robot to generate point cloud data; then the point cloud data is processed with distance constraints to obtain fallback point cloud data, and the distance between the fallback point cloud data and the target facial area is greater than the preset safety distance; finally, target trajectory data is generated according to the fallback point cloud data, and according to the target trajectory data, the therapy parts of the therapy robot are controlled to move in at least three degrees of freedom to perform therapy on the target facial area, and the point cloud data is generated according to the facial image collected in real time, so that the point cloud data is matched with the human face, and the point cloud data is processed with distance constraints so that the generated target trajectory data can enable the therapy parts to maintain a safe distance from the face during operation.

[0057] Reference Figure 2 In one embodiment, the step S3 performs distance constraint processing on the point cloud data so that the distance between the point cloud data and the target facial area is greater than a preset safety distance, including: multiplying the point cloud data by a preset multiple of a unit vector to obtain fallback point cloud data.

[0058] In this embodiment, according to the unit vector of the point cloud , the 6D point is vectored back, where the relationship between u, v, and w satisfies the following formula: .

[0059] Assuming the safety distance is H, the point cloud point After vector backoff, keep a safe distance from the facial area and backoff point cloud data It can be expressed as: ;

[0060] It should be noted that if you maintain a posture for a long time, your muscles will become sore. Therefore, during the physical therapy process, the position of the human face will inevitably change. However, after the position change, the human face will quickly return to approximately the same position as before. For example, if you twist your neck, at this time, because the human face will quickly return to its original position, the physical therapy device does not need to adjust in real time according to the changes in the user's facial position. At this time, you only need to maintain the original work within a safe distance.

[0061] For this scenario, in one embodiment, step S4 also includes:

[0062] Cache target trajectory data of duration, wherein the target trajectory data of duration includes target trajectory data at a first moment and target trajectory data at a second moment after the first moment;

[0063] According to the target trajectory data at the second moment, smoothing processing is performed on the target trajectory data at the first moment, so that the target trajectory data at the first moment is smoother and satisfies the distance constraint.

[0064] In this embodiment, each time the target trajectory data is generated, it can be cached in the cache of the physiotherapy robot first, so that the target trajectory data in the cache is continuous trajectory data for a period of time, and "a period of time" can be 0.5 seconds to 3 seconds.

[0065] According to the target trajectory data at the second moment, the target trajectory data at the first moment is smoothed, which can be understood as:

[0066] (1) The first moment refers to a time point, and the second moment refers to multiple time points cached after the first moment; in other embodiments, the first moment may also refer to multiple consecutive time points;

[0067] (2) confirming whether the next target trajectory data corresponds to the human face quickly returning to the approximately same position as the original position after the position change, based on the target trajectory data cached at multiple time points after the first moment, that is, the target trajectory data at the second moment;

[0068] (3) If yes, the target trajectory data at the first moment is maintained roughly as it is; if no, the target trajectory data at the first moment is allowed to smoothly follow the target trajectory data at the second moment;

[0069] Then, the trajectory data at the first moment is smoothed. The whole process of (3) can be called smoothing.

[0070] (4) Using the target trajectory data at the first moment to control the operation of the physical therapy device;

[0071] By analogy, each first moment fully considers whether the second moment corresponds to the human face. After the position changes, the human face will quickly return to the roughly same position as before, so that the physiotherapy device working according to the trajectory data of the first moment will not follow the user's sudden head swing;

[0072] It should be noted that "the human face will quickly return to the same position as before", but it is not exactly the same position as before, so when controlling the trajectory at the first moment, it is still necessary to confirm that the trajectory data at the first moment maintains a safe distance from the human face. Therefore, after confirming the target trajectory data at the first moment through the second moment, it is necessary to confirm whether the target trajectory at the first moment meets the distance constraint. If not, it is necessary to perform multiple smoothing processes on the target trajectory data composed of the first moment and the second moment until the target trajectory data at the first moment meets the distance constraint.

[0073] In one embodiment, according to the target trajectory data at the second moment, smoothing the target trajectory data at the first moment so that the target trajectory data at the first moment is smoother and satisfies the distance constraint includes:

[0074] Based on the preset physical therapy needs, generate the objective function corresponding to each time period;

[0075] Taking minimization of the objective function as a convergence condition, the target trajectory data at the first moment is iteratively smoothed until convergence, so that the target trajectory data at the first moment is smoother and satisfies the distance constraint.

[0076] It should be noted that in the process of iterative smoothing, the path of the trajectory will change. Different physical therapy needs have different requirements for path changes. In this embodiment, minimizing the objective function can make the movement path of the physical therapy head more suitable for actual physical therapy needs. The objective function can be a similarity function between the path corresponding to the target trajectory data and the path preset based on the physical therapy needs.

[0077] In this embodiment, iteratively smoothing the target trajectory data at the first moment until convergence may include:

[0078] (1) An update step that updates the current estimate in a way that decreases the value of the objective function without considering any constraints;

[0079] (2) Based on the trajectory data at the first moment updated in (1), calculate whether the safe distance constraint is satisfied. If not, adjust the trajectory data at the first moment until the distance constraint is just satisfied, and then repeat step (1) until the trajectory data at the first moment output in step (1) satisfies both the safe distance constraint and the requirement of minimizing the objective function.

[0080] In one embodiment, the objective function is a similarity function between a path corresponding to the target trajectory data and a path preset based on the therapy requirements.

[0081] Reference Figure 3 In one embodiment, the step S4 comprises:

[0082] Step S41, calculating the normal vector of the local plane corresponding to the fallback point cloud data;

[0083] It should be noted that, when the sampling surface of the point cloud is smooth, the local area of ​​any point can be fitted by a plane. This embodiment uses a method based on local plane fitting to estimate the normal vector. For each scanning point p in the point cloud data, i, search for the K nearest neighboring points, then the scan point p and its K nearest neighboring points constitute a local plane P, and the normal vector n of the fitted local plane P can be the required normal vector n. At this time, the normal vector n of the local plane P in the sense of least squares can be expressed as: ;

[0084] Among them, argmin f (x) indicates when f The value of x when (x) reaches its minimum value.

[0085] The normal vector n of the local plane P can be obtained by principal components analysis (PCA). The centroid of the K-domain points , the normal vector satisfy , for the covariance matrix Characteristic analysis, the eigenvector corresponding to the minimum eigenvalue is the normal vector of the local plane P.

[0086] Taking M as the cost function, by minimizing the cost function, the value of pi can be obtained. The relationship between M and pi satisfies the following formula: ; Where T is the transposition symbol, indicating that (PrPo)T is the transposition of (Pi-Po).

[0087] Step S42: Calculate the target trajectory data based on the normal vector, where the target trajectory data includes a first deflection angle R X , the second deflection angle R Y and the third deflection angle R Z , wherein the first deflection angle R X , the second deflection angle R Y and the third deflection angle R Z The corresponding axes are perpendicular to each other;

[0088] In this embodiment, the step S42 of calculating the target trajectory data based on the normal vector includes:

[0089] Based on satisfying the first deflection angle R X Constraints, second deflection angle R Y Constraints and the third deflection angle R Z Constraints are calculated to generate the corresponding trajectory data to be processed. It should be noted that the constraints can also be understood as an output model, that is, after the normal vector input value is output to the model (constraints), the corresponding deflection angle can be calculated;

[0090] Exemplarily, the first deflection angle R X The constraints include: The first formula: ;

[0091] And the second formula: ;

[0092] Among them, the normal vector of the local plane , R X Represents the first deflection angle R X ;

[0093] Represents the value of the unit normal vector in the X-axis direction; α represents the normal vector and Axis angle; W represents the normal vector value in the Z-axis direction. It should be noted that after the system is calibrated, the back-off point cloud data obtained by the 3D camera can be transformed into the robot arm output coordinate system, which can control the robot arm to move to the specified target position. To control the robot arm to move to the target posture, relevant posture control is also required. The robot arm posture output is composed of the deflection angle Controlled by its unit normal vector Figure it out.

[0094] Attitude output deflection angle To surround Axis rotation angle, the end of the robot arm rotates around Axis rotation angle In space, when the robot arm is working, the tool end should be facing the target object. According to the robot structure layout, the tool end of the robot arm is facing downward, and the unit normal vector of the object middle , Control the robot arm to swing left and right, and according to the spatial relationship between the object to be measured and the end of the tool, The movement angle in the direction should be Within the range, when the end of the robot arm is deflected to the left (for example, rotated to the 135° position), its normal vector is middle , The value should be between , the first deflection angle The output model of is shown in the first formula.

[0095] When the end of the robot arm is deflected to the right (for example, rotated to -135°), its normal vector is middle , The value should be between , The output model exists as shown in the second formula.

[0096] Exemplarily, the second deflection angle R Y Constraints include: The third formula: ;

[0097] And, the fourth formula: ;

[0098] Among them, R Y The second deflection angle R Y ; Indicates the unit normal vector value in the Y-axis direction; Represents the normal vector and Axis angle;

[0099] Robot arm attitude output deflection angle middle Expressed as the rotation angle around the Y axis, the end of the robot arm rotates around the X axis Space; when the robot arm is working, the tool end of the robot arm is facing downward, and the unit normal vector of the same object is middle ; Control the robot arm to swing back and forth, and according to the spatial relationship between the object to be measured and the end of the tool, The movement angle in the direction should be When the end of the robot arm deflects forward (for example, rotates to a 45° position), its normal vector is , The value should be between , the following relationship exists:

[0100] ; When the end of the robot arm is deflected backward (for example, rotated to -45°), then its normal vector , The value should be between , there exists a relation of the fourth formula.

[0101] Tool end rotation of the robot arm The target posture can be achieved, and Axis deflection angle The angle of The angle can be set to a fixed value as required.

[0102] For example, the third deflection angle R Z The constraint condition is: the third deflection angle R Z Equal to 180°. This is because when the robot arm is working, the tool end is always facing downward. After analysis, its parameter value can be set to 180°;

[0103] In summary, the output from normal vector to robot 6D posture is completed.

[0104] In one embodiment, the time span of the target trajectory data of the buffered duration can be used to identify unexpected motion, for example, 0.5 seconds to 3 seconds.

[0105] In one embodiment, there are multiple 3D cameras, and they are arranged to capture facial images at multiple angles; step S1 includes: acquiring multi-angle facial images captured by multiple 3D cameras of the facial therapy robot.

[0106] In this embodiment, since the areas of the human face that require physical therapy are mainly divided into three parts: the forehead, the left face and the right face, it is difficult to obtain full side face data by using the normal frontal face photography method. Therefore, it is necessary to add corresponding photography angles to ensure that the key points of the face can be identified while obtaining the three-dimensional information of the side face.

[0107] Therefore, this embodiment uses multiple 3D cameras and arranges them to capture facial images from multiple angles.

[0108] In some embodiments, the point cloud data may also be smoothed and denoised to obtain fallback point cloud data;

[0109] It should be noted that the real-time facial images captured by the 3D camera contain interference from non-target areas and noise, in order to improve the quality of the point cloud data.

[0110] The point cloud segmentation of this embodiment adopts a straight-through filtering method, sets a value range according to the extreme value and structure range of a certain dimension, and generates new point cloud data;

[0111] The smoothing and noise reduction of the point cloud data in this embodiment adopts Gaussian filtering, processes the nearby point cloud based on statistics, determines whether it is noise, searches N domain points based on the KD_Tree domain, and calculates the average Euclidean distance from the sampling point to the domain point;

[0112] Initial point cloud coordinates , sample area search point set , the average Euclidean distance from the sampling point to the domain point The distance can be expressed as: , initial point cloud The average Euclidean distance to its K neighborhood points The mean and standard deviation They can be expressed as: , The average Euclidean distance from the sampling point to the domain point in the three-dimensional point cloud acquired by the 3D camera should form a Gaussian distribution. By setting its mean and variance and replacing the original data with the calculated Gaussian smoothed data, the effect of point cloud denoising and data smoothing can be achieved.

[0113] The present application also proposes a physiotherapy robot, which includes a 3D camera, a physiotherapy piece, a processor, and a memory, wherein the memory stores a 6D posture adaptive program, and when the 6D posture adaptive program is executed by the processor, the following steps are implemented:

[0114] Step S1, obtaining a facial image captured in real time by a 3D camera of a facial therapy robot;

[0115] Step S2, generating point cloud data based on the facial image;

[0116] Step S3, performing distance constraint processing on the point cloud data to obtain fallback point cloud data, wherein the distance between the fallback point cloud data and the target facial area is greater than a preset safety distance;

[0117] Step S4, generating target trajectory data according to the fallback point cloud data;

[0118] Step S5: According to the target trajectory data, control the therapy parts of the therapy robot to move in at least three degrees of freedom to perform therapy on the target facial area.

[0119] In one embodiment, the step S3 of performing distance constraint processing on the point cloud data so that the distance between the point cloud data and the target facial area is greater than a preset safety distance includes:

[0120] Multiply the point cloud data by a unit vector with a preset multiple to obtain the fallback point cloud data.

[0121] In one embodiment, step S4 further includes:

[0122] Cache target trajectory data of duration, wherein the target trajectory data of duration includes target trajectory data at a first moment and target trajectory data at a second moment after the first moment;

[0123] According to the target trajectory data at the second moment, smoothing processing is performed on the target trajectory data at the first moment, so that the target trajectory data at the first moment is smoother and satisfies the distance constraint.

[0124] In one embodiment, the target trajectory data at the first moment is smoothed according to the target trajectory data at the second moment, so that the target trajectory data at the first moment is smoother and satisfies the distance constraint, including:

[0125] Based on the preset physical therapy needs, generate the objective function corresponding to each time period;

[0126] Taking minimization of the objective function as a convergence condition, the target trajectory data at the first moment is iteratively smoothed until convergence, so that the target trajectory data at the first moment is smoother and satisfies the distance constraint.

[0127] In one embodiment, the objective function is a similarity function between a path corresponding to the target trajectory data and a path preset based on the therapy requirements.

[0128] In one embodiment, the step S4 includes:

[0129] Step S41, calculating the normal vector of the local plane corresponding to the fallback point cloud data;

[0130] Step S42: Calculate the target trajectory data based on the normal vector.

[0131] In one embodiment, the target trajectory data includes a first deflection angle, a second deflection angle, and a third deflection angle; wherein axes corresponding to the first deflection angle, the second deflection angle, and the third deflection angle are perpendicular to each other; and step S42 includes:

[0132] Based on satisfying the first deflection angle constraint condition, the second deflection angle constraint condition and the third deflection angle constraint condition, the corresponding target trajectory data is calculated and generated, wherein,

[0133] The first deflection angle constraint condition includes: a first formula: ;

[0134] And the second formula: ;

[0135] Among them, the normal vector of the local plane , R X represents the first deflection angle;

[0136] The second deflection angle constraint condition includes: a third formula: ;

[0137] And, the fourth formula: ; Among them, R Y represents the second deflection angle; the third deflection angle constraint condition is: the third deflection angle is equal to 180°.

[0138] In one embodiment, the time span of the target trajectory data of the buffered duration can be used to identify unexpected motion.

[0139] In one embodiment, there are multiple 3D cameras, and they are arranged to capture facial images at multiple angles; step S1 includes: acquiring multi-angle facial images captured by multiple 3D cameras of the facial therapy robot.

[0140] The above descriptions are only optional embodiments of the present invention, and are not intended to limit the patent scope of the present invention. All equivalent structural changes made using the contents of the present invention's specification and drawings, or directly / indirectly applied in other related technical fields, are included in the patent protection scope of the present invention.

Claims

1. A method for automatically generating 6D posture trajectory of a facial therapy robot, characterized in that: Applicable to a facial therapy robot, the facial therapy robot 6D posture trajectory automatic generation method includes: Step S1, obtaining a facial image captured in real time by a 3D camera of a facial therapy robot; Step S2, generating point cloud data based on the facial image; Step S3, performing distance constraint processing on the point cloud data to obtain fallback point cloud data, wherein the distance between the fallback point cloud data and the target facial area is greater than a preset safety distance; Step S4, generating target trajectory data according to the fallback point cloud data; Step S5: According to the target trajectory data, control the therapy parts of the therapy robot to move in at least three degrees of freedom to perform therapy on the target facial area.

2. The method for automatically generating a 6D posture trajectory of a facial therapy robot according to claim 1, characterized in that: The step S3, performing distance constraint processing on the point cloud data so that the distance between the point cloud data and the target facial area is greater than a preset safety distance, includes: Multiply the point cloud data by a unit vector with a preset multiple to obtain the fallback point cloud data.

3. The method for automatically generating 6D posture trajectory of a facial therapy robot according to claim 1, characterized in that: The step S4 further comprises: Cache target trajectory data of duration, wherein the target trajectory data of duration includes target trajectory data at a first moment and target trajectory data at a second moment after the first moment; According to the target trajectory data at the second moment, smoothing processing is performed on the target trajectory data at the first moment, so that the target trajectory data at the first moment is smoother and satisfies the distance constraint.

4. The method for automatically generating 6D posture trajectory of a facial therapy robot according to claim 3, characterized in that: The step of smoothing the target trajectory data at the first moment according to the target trajectory data at the second moment, so as to make the target trajectory data at the first moment smoother and satisfy the distance constraint, includes: Based on the preset physical therapy needs, generate the objective function corresponding to each time period; Taking minimization of the objective function as a convergence condition, the target trajectory data at the first moment is iteratively smoothed until convergence, so that the target trajectory data at the first moment is smoother and satisfies the distance constraint.

5. The method for automatically generating 6D posture trajectory of a facial therapy robot according to claim 4, characterized in that: The objective function is a similarity function between the path corresponding to the target trajectory data and the path preset based on the therapy needs.

6. The method for automatically generating 6D posture trajectory of a facial therapy robot according to any one of claims 1 to 5, characterized in that: The step S4 comprises: Step S41, calculating the normal vector of the local plane corresponding to the fallback point cloud data; Step S42: Calculate the target trajectory data based on the normal vector.

7. The method for automatically generating 6D posture trajectory of a facial therapy robot according to claim 6, characterized in that: The target trajectory data includes a first deflection angle, a second deflection angle, and a third deflection angle; wherein the axes corresponding to the first deflection angle, the second deflection angle, and the third deflection angle are perpendicular to each other; and the step S42 includes: Based on satisfying the first deflection angle constraint condition, the second deflection angle constraint condition and the third deflection angle constraint condition, the corresponding target trajectory data is calculated and generated, wherein, The first deflection angle constraint condition includes: First formula: , And, the second formula: ; Among them, the normal vector of the local plane , R X represents the first deflection angle, V represents the value of the unit normal vector in the X-axis direction; α represents the angle between the normal vector and the Z-axis, and W represents the value of the normal vector in the Z-axis direction; The second deflection angle constraint condition includes: The third formula: , And, the fourth formula: ; Among them, R Y represents the second deflection angle, u represents the unit normal vector value in the Y-axis direction; Represents the angle between the normal vector and the Z axis; The third deflection angle constraint condition is: the third deflection angle is equal to 180°.

8. The method for automatically generating 6D posture trajectory of a facial therapy robot according to claim 3, characterized in that: The time span of the target trajectory data of the buffered duration can be used to identify unexpected motion.

9. The method for automatically generating 6D posture trajectory of a facial therapy robot according to claim 1, characterized in that: The number of the 3D cameras is multiple and they are arranged to capture facial images at multiple angles; the step S1 comprises: Acquire multi-angle facial images collected by multiple 3D cameras of the facial therapy robot.

Citation Information

Patent Citations

  • Physical therapy robot and physical therapy method thereof

    CN115157246A

  • Motion track generation method and device and processing equipment

    CN115713547A

  • Operation auxiliary robot collision avoidance method, device and equipment based on computer vision and storage medium

    CN117462258A

  • Physiotherapy probe integrated on collaborative robot and control method thereof

    CN117899374A

  • Face spatial positioning method, face spatial positioning system, and non-transitory computer-readable recording medium

    US20190213392A1