Robot control method, device, electronic device and storage medium
By collecting images to determine the following surface of the robot massage area and calculating the expected contact force and target posture, the problems of poor followability and versatility of the contact surface in robot massage control are solved, and better massage effect and adaptability are achieved.
Patent Information
- Application Number
- CN202211229771.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-09
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-10-09
AI Technical Summary
Existing robot massage control methods have problems with poor contact surface followability and versatility when dealing with different human back curves and body shapes.
By acquiring images of the target object, the following surface of the area to be massaged is determined, and the expected contact force and target posture are calculated based on the surface to achieve force-position hybrid control, thereby improving the robot's followability and versatility to the contact surface.
The robot's followability and versatility to the contact surface have been significantly improved, and it can adapt to different human back curves and body shapes, providing a better massage experience.
Smart Images

Figure CN115533906B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotics technology, and in particular to a robot control method, device, electronic equipment and storage medium. Background Art
[0002] At present, the force control of massage robots usually adopts PID (Proportion Integral Differential) control or flexible control (such as impedance control or admittance control) and other control methods. However, the height of the human back curve is different, and the body shape of different people is also different. As a result, the above control methods will have problems such as poor contact surface tracking and poor versatility. Summary of the Invention
[0003] In view of this, an object of the present invention is to provide a robot control method, device, electronic device and storage medium, which can significantly improve the robot's followability with respect to a contact surface and significantly improve the robot's versatility.
[0004] In a first aspect, an embodiment of the present invention provides a method for controlling a robot, comprising: acquiring an image of an area to be massaged of a target object, and determining a following surface corresponding to the area to be massaged based on the image; determining an expected contact force and a target posture of the robot according to the following surface; and controlling the robot to perform a massage operation on the area to be massaged based on the expected contact force and the target posture.
[0005] In one embodiment, the step of determining the expected contact force of the robot based on the following surface includes: determining the actual stiffness corresponding to the current massage position based on the following surface and the current massage position of the end of the massage component of the robot; determining the expected contact force corresponding to the current massage position based on the actual stiffness; wherein the expected contact force is negatively correlated with the actual stiffness.
[0006] In one embodiment, the step of determining the actual stiffness corresponding to the current massage position based on the following surface and the current massage position of the end of the massage component of the robot includes: determining the current curvature and current vertical coordinate that match the current massage position of the end of the massage component of the robot from the following surface; determining the thickness value corresponding to the current massage position based on the following surface, and calculating the height difference between the thickness value and the current vertical coordinate; and determining the actual stiffness at the current massage position based on the height difference and the current curvature.
[0007] In one embodiment, the step of determining the expected contact force corresponding to the current massage position based on the actual stiffness includes: determining the expected contact force corresponding to the current massage position based on the actual stiffness, a first coefficient corresponding to the actual stiffness, a preset initial contact force and a second coefficient of the initial contact force.
[0008] In one embodiment, the step of determining the target posture of the robot based on the following surface includes: determining the current horizontal coordinate, current vertical coordinate and current vertical coordinate that match the current massage position of the end of the massage component of the robot from the following surface; determining the reference zero position of the robot in the force control direction based on the current vertical coordinate, and determining the expected position of the robot based on the current horizontal coordinate and the current vertical coordinate; determining the target posture of the robot based on the reference zero position and the expected position; wherein the target posture is used to make the end of the massage component perpendicular to the current massage position.
[0009] In one embodiment, the step of controlling the robot to perform a massage operation on the area to be massaged based on the expected contact force and the target posture includes: obtaining the actual contact force applied by the end of the massage component of the robot to the previous massage position; determining the contact force deviation corresponding to the current massage position based on the actual contact force corresponding to the previous massage position and the expected contact force corresponding to the current massage position; and controlling the robot to perform a massage operation on the current massage position based on the contact force deviation corresponding to the current massage position and the target posture.
[0010] In one embodiment, the step of controlling the robot to perform a massage operation for the current massage position based on the contact force deviation and the target posture corresponding to the current massage position includes: determining a massage position deviation based on the admittance parameter and the contact force deviation corresponding to the current massage position; solving a target instruction position corresponding to each joint point in the massage component of the robot based on the massage position deviation and the target posture corresponding to the current massage position; and controlling the robot to perform a massage operation for the current massage position based on the target instruction position.
[0011] In one embodiment, before the step of determining the massage position deviation based on the admittance parameter corresponding to the current massage position and the contact force deviation, the method further includes: adjusting the admittance parameter corresponding to the previous massage position according to the curvature change rate and / or the actual stiffness change rate of the current curvature matched with the current massage position, to obtain the admittance parameter corresponding to the current massage position; wherein the admittance parameter is positively correlated with the curvature change rate and the actual stiffness change rate.
[0012] In one embodiment, the step of determining the following surface corresponding to the area to be massaged based on the image includes: if the image includes a depth map, using a specified surface fitting tool to fit the initial surface corresponding to the area to be massaged based on depth information corresponding to the depth map; or, if the image includes a two-dimensional image, converting the two-dimensional image into a three-dimensional image, and using the specified surface fitting tool to fit the initial surface corresponding to the area to be massaged based on the three-dimensional image; and smoothing the initial surface to obtain the following surface corresponding to the area to be massaged.
[0013] In a second aspect, an embodiment of the present invention further provides a control device for a robot, comprising: a surface determination module for capturing an image of an area to be massaged of a target object, and determining a following surface corresponding to the area to be massaged based on the image; a parameter determination module for determining an expected contact force and a target posture of the robot according to the following surface; and a control module for controlling the robot to perform a massage operation on the area to be massaged based on the expected contact force and the target posture.
[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement any one of the methods provided in the first aspect.
[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement any one of the methods provided in the first aspect.
[0016] The embodiments of the present invention provide a robot control method, device, electronic device, and storage medium. The method first captures an image of the target object's area to be massaged, and determines a following surface corresponding to the area to be massaged based on the image. The robot's desired contact force and target posture are then determined based on the following surface. The method then controls the robot to perform a massage operation on the area to be massaged based on the desired contact force and target posture. The method determines a corresponding following surface based on the image corresponding to the area to be massaged. The following surface can reflect the shape of the contact surface at the area to be massaged. By determining the desired contact force and target posture based on the following surface, the desired contact force and target posture can be used to implement force-position hybrid control of the robot. This significantly improves the robot's ability to follow the contact surface and significantly improves the robot's versatility.
[0017] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purposes and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0018] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A schematic flow chart of a robot control method provided by an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of a curved surface of a human back provided by an embodiment of the present invention;
[0022] Figure 3 A control block diagram of a robot control method provided by an embodiment of the present invention;
[0023] Figure 4 A schematic structural diagram of a robot control device provided by an embodiment of the present invention;
[0024] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0026] Robotic force control typically involves sensing contact force or torque using a force sensor and performing closed-loop control of that force or torque through the robot's controller. This approach, such as PID (Proportion Integral Differential) control based on force feedback, suffers from poor position tracking of the force contact surface. Force control performance is often poor in situations where the contact surface changes at a high rate, requiring targeted and tedious controller parameter adjustments to achieve limited improvement. Furthermore, PID control suffers from poor versatility. Related technologies also propose compliant control methods such as impedance and admittance. While compliant control uses force as an intermediate control variable, it can better respond to external interference forces and achieve the desired position target in a noisy environment. However, since the control target of compliant control methods remains position, they also suffer from poor force tracking due to the high rate of change of the contact surface. Existing control methods typically rely on independent control of position and force for massage. However, due to the varying heights of the human back, using only force control will result in the aforementioned poor contact surface tracking. In addition, the existing control method cannot automatically adapt to the stiffness of different parts of the human body, nor can it be used for different people's body shapes. Therefore, the existing control method still has the problem of poor versatility.
[0027] Based on this, the present invention provides a robot control method, device, electronic device and storage medium, which can significantly improve the robot's followability with respect to the contact surface and significantly improve the robot's versatility.
[0028] To facilitate understanding of this embodiment, a control method for a robot disclosed in an embodiment of the present invention is first described in detail. Figure 1 The flowchart of a robot control method shown in FIG. 1 mainly includes the following steps S102 to S106:
[0029] Step S102, collects an image of the area to be massaged of the target object, and determines a following surface corresponding to the area to be massaged based on the image. The target object may be a human body to be massaged, and the area to be massaged may include many parts of the human body such as the back, shoulders, and waist. The image may include a depth map or a two-dimensional image (such as an RGB (Red-Green-Blue) image). The following surface is also a three-dimensional surface, which is used to describe the contact surface shape or the height trend of the surface of the area to be massaged. In one embodiment, the image of the area to be massaged can be collected by an image acquisition device, which may include an ordinary camera or a depth camera, so as to construct a three-dimensional surface at the area to be massaged based on the image.
[0030] Step S104 determines the robot's desired contact force and target posture based on the following surface. The desired contact force is the force that the robot's massage components are expected to exert on the massaged area, and the target posture includes the robot's "zero position" and desired position in the force control direction. In one embodiment, assuming the distal end of the massage component is at the current massage position, the coordinates, curvature, and other parameters of the following surface that match the current massage position can be determined. Based on these coordinates and / or curvature, the desired contact force and target posture of the robot's massage components for the current massage position can be determined.
[0031] Step S106: Based on the desired contact force and the target posture, the robot is controlled to perform a massage operation on the massage area. In one embodiment, a massage position deviation corresponding to the current massage position can be determined based on the desired contact force. The target command positions corresponding to each joint point in the robot's massage components are then calculated based on the massage position deviation and the target posture. The robot is then controlled to perform a massage operation on the current massage position based on the target command positions.
[0032] The robot control method provided by an embodiment of the present invention determines a corresponding following surface based on the corresponding image of the area to be massaged. The following surface can reflect the shape of the contact surface at the area to be massaged. By determining the expected contact force and target posture based on the following surface, the above-mentioned expected contact force and target posture can be used to realize force-position hybrid control of the robot, thereby better improving the robot's followability with respect to the contact surface and significantly improving the robot's versatility.
[0033] Considering that the following surface is the basis of force-position hybrid control, an embodiment of the present invention provides an implementation method for constructing a following surface. Optionally, an image of the area to be massaged can be obtained through a camera, and an initial surface of the area to be massaged can be obtained based on the image type. The initial surface is smoothed to obtain a following surface corresponding to the area to be massaged. The following surface is also the "zero surface" that is expected to be followed. An embodiment of the present invention exemplarily provides an implementation method for obtaining the initial surface:
[0034] (1) If the image includes a depth map, a designated surface fitting tool is used to fit the initial surface corresponding to the area to be massaged based on the depth information corresponding to the depth map. If the image is a depth map, the depth information of the depth map can be extracted, and the surface fitting tool is used to fit the depth map based on the depth information to obtain the corresponding surface. For example, assuming that the area to be massaged is the back, a depth map of the back of the human body can be collected, and the surface fitting tool is used to fit the depth map of the back of the human body to obtain the surface of the back of the human body (that is, the initial surface mentioned above).
[0035] (2) If the image includes a two-dimensional image, the two-dimensional image is converted into a three-dimensional image, and a specified surface fitting tool is used to fit the initial surface corresponding to the area to be massaged based on the three-dimensional image. If the image is an RGB image (i.e., a two-dimensional image), since the RGB image has no depth information, it is necessary to use a two-dimensional-three-dimensional model reconstruction algorithm (such as the smplify algorithm) to obtain the initial surface of the area to be massaged. For example, assuming that the area to be massaged is the back, the smplify algorithm is used to process the RGB image of the human back to obtain the surface of the human back.
[0036] After obtaining the human back surface, it can be smoothed using surface fitting tools, such as Figure 2 A schematic diagram of a human back surface is shown to obtain a smooth following surface.
[0037] Based on the aforementioned following surface, an embodiment of the present invention provides an implementation method for determining the target posture of the robot based on the following surface, as shown in (1) to (3) below:
[0038] (1) From the following surface, determine the current horizontal coordinate, current vertical coordinate, and current vertical coordinate that match the current massage position of the end of the robot's massage component. The following surface is denoted as z(t) = f(x(t), y(t)), where x(t) is the horizontal coordinate, y(t) is the vertical coordinate, and z(t) is the vertical coordinate.
[0039] (2) Determine the robot's reference zero position in the force-controlled direction based on the current vertical coordinate, and determine the robot's desired position based on the current horizontal and vertical coordinates. In one embodiment, the current vertical coordinate z(t) of the following surface can be used as the "zero position" in the force-controlled direction of the robot, and its current horizontal coordinate x(t) and current vertical coordinate y(t) can be used as the robot's desired position.
[0040] (3) Determine the target posture of the robot based on the reference zero position and the desired position. The target posture is used to make the end of the massage component perpendicular to the current massage position. In one embodiment, the reference zero position and the desired position can be converted into a command position in the form of a digital value, that is, the vertical coordinate z(0) is converted into the command value z c , and convert the current horizontal coordinate x(t) matching the current massage position into the instruction value X c , and convert the current ordinate y(t) matching the current massage position into the instruction value Y c , and use the preset rotation matrix R, instruction value X c , command value Y c and command value z c Construct a homogeneous transformation matrix, where if the end remains unchanged, the rotation matrix R remains unchanged, and the homogeneous transformation matrix is the above target pose.
[0041] In addition, an embodiment of the present invention further provides an implementation method for determining the expected contact force of the robot based on the following curved surface, as shown in steps 1 to 2 below:
[0042] Step 1: Determine the actual stiffness corresponding to the current massage position based on the following surface and the current massage position of the end of the robot's massage component. For details, see steps 1.1 to 1.3 below:
[0043] Step 1.1: Determine the current curvature and current vertical coordinate that match the current massage position of the end of the robot's massage component from the following surface. The current vertical coordinate is z(t) as mentioned above. In addition, the current curvature can be calculated according to the following formula:
[0044] Where λ is the current curvature, x'(t) is the first derivative of the current horizontal coordinate x(t), x"(t) is the second derivative of the current horizontal coordinate x(t), y'(t) is the first derivative of the current horizontal coordinate y(t), and y"(t) is the second derivative of the current horizontal coordinate y(t).
[0045] Step 1.2: Determine the thickness value corresponding to the current massage position based on the following curved surface, and calculate the height difference between the thickness value and the current vertical coordinate. The thickness value corresponding to the current massage position is also the thickness value of the human body at the current massage position.
[0046] Step 1.3: Determine the actual stiffness at the current massage position based on the height difference and the current curvature. In one embodiment, the actual stiffness K(t) can be calculated according to the following formula:
[0047] Where c0 is the constant coefficient and h is the thickness value.
[0048] Step 2: Determine the expected contact force corresponding to the current massage position based on the actual stiffness. The expected contact force is negatively correlated with the actual stiffness. In one embodiment, the expected contact force corresponding to the current massage position can be determined based on the actual stiffness, the first coefficient corresponding to the actual stiffness, the preset initial contact force, and the second coefficient of the initial contact force. Assuming that the first coefficient is c and the second coefficient is 0, the expected contact force F d Expressed as:
[0049] F d =cK(t)+F0, where F0 is the initial contact force. In practical applications, when the actual stiffness K(t) is large, it indicates that the current massage position is closer to the human skeleton, so it is necessary to reduce the expected contact force F d On the contrary, when the actual stiffness K(t) is small, it indicates that the current massage position is relatively soft, so it is necessary to increase the expected contact force Fd The embodiment of the present invention uses the positional characteristics and physical characteristics of the "zero surface" (such as stiffness and human tissue structure) to adaptively change the control parameters. For example, when encountering skeletal areas such as the spine, the desired contact force is reduced, thereby reducing the massage intensity; when encountering harder, unrelaxed muscles, the system rigidity is increased; when encountering the softer area of the waist, the robot system rigidity is reduced, etc., thereby effectively controlling the tracking performance and the comfort of the user experience.
[0050] Regarding the aforementioned step S106, the embodiment of the present invention further provides an implementation method for controlling the robot to perform a massage operation on the area to be massaged based on the desired contact force and the target posture, as shown in the following steps a to c:
[0051] Step a: Acquire the actual contact force applied by the end of the robot's massage component to the previous massage position. The actual contact force is denoted as F. In one embodiment, a force sensor can be used to collect the actual contact force F corresponding to the previous massage position. In practical applications, embodiments of the present invention can guide position control at any time using the motion trajectory on the "zero surface" as the "zero position" reference for position control. Simultaneously, force control is performed based on the zero position using the actual contact force F of the force sensor as a force control reference, thereby achieving force-position hybrid control.
[0052] Step b: Determine the contact force deviation corresponding to the current massage position based on the actual contact force corresponding to the previous massage position and the expected contact force corresponding to the current massage position. In one embodiment, the difference between the actual contact force corresponding to the previous massage position and the expected contact force corresponding to the current massage position is the contact force deviation.
[0053] Step c: Based on the contact force deviation and target posture corresponding to the current massage position, the robot is controlled to perform a massage operation at the current massage position. For ease of understanding, the steps of controlling the robot to perform a massage operation at the current massage position can be performed as follows: Steps c1 to c3:
[0054] Step c1, based on the admittance parameter and contact force deviation corresponding to the current massage position, determine the massage position deviation. The admittance parameter includes the expected mass M d , expected damping B d , expected stiffness K d In one embodiment, the massage position deviation can be output using an admittance control algorithm, as shown in the following formula:
[0055]
[0056] e=z-z0;
[0057] z c=z0+e, where e is the deviation between the actual position z and the reference zero position z0, i.e. the above massage position deviation, z c is the command position.
[0058] Step c2, according to the massage position deviation and target posture corresponding to the current massage position, solve the target command position corresponding to each joint point in the massage component of the robot. In one embodiment, the target command position q corresponding to each joint point in the massage component of the robot can be solved by inverse kinematics. c .
[0059] Step c3: Based on the target command position, control the robot to perform a massage operation at the current massage position.
[0060] To facilitate understanding of the aforementioned embodiments, an embodiment of the present invention provides an application example of a robot control method, see Figure 3 The control block diagram of a robot control method shown in FIG: (1) obtaining the instruction value X corresponding to the current massage position c and Y c , and determine the zero position z0 according to the following surface; (2) obtain the actual contact force F applied by the robot at the previous massage position and the expected contact force F corresponding to the current massage position through the force sensor d , using admittance control according to the actual contact force F and the expected contact force F d , determine the massage position deviation e; (3) using inverse kinematics according to the command value X c 、Y c , zero position z0 and massage position deviation e, solve the target command position q c ; (4) Set the target command position q c The input is to the joint position control, so that the robot performs the massage operation for the current massage position through the joint position control.
[0061] Furthermore, before determining the massage position deviation based on the admittance parameter and contact force deviation corresponding to the current massage position, the admittance parameter can also be adjusted. Specifically, the admittance parameter corresponding to the previous massage position can be adjusted based on the curvature change rate and / or the actual stiffness change rate of the current curvature matched to the current massage position to obtain the admittance parameter corresponding to the current massage position. Among them, the admittance parameter is positively correlated with the curvature change rate and the actual stiffness change rate. For example, when the curvature λ changes significantly or the actual stiffness K(t) changes significantly, the admittance parameter can be changed accordingly, such as increasing the damping B d , or increase the stiffness K d To ensure the stability of force-position mixed control and the comfort of massage. The specific process is as follows:
[0062] When the curvature λ changes greatly, that is, k>klim When K d =f(k), for example: K d =K0e k , where K0 is the desired stiffness initially preset according to the curvature.
[0063] When the actual stiffness K(t) changes greatly, that is, K(t)-K(t-1)>k lim When K d =f(ΔK), for example: K d =K1e ΔK , Among them, K1 is the expected stiffness preset according to the actual environment stiffness.
[0064] The embodiment of the present invention can better control the followability and the comfort of user experience by adaptively changing the admittance parameters through the position characteristics and physical characteristics (such as stiffness and human tissue structure) of the "zero surface".
[0065] To sum up, the control method of the robot provided in the embodiment of the present invention builds a following surface, so the shape of the contact surface (the trend of the surface) can be known, so the shape of the following surface can be controlled by position while the contact force can be controlled by force control to achieve better force control following performance; in addition, the admittance parameters can be adjusted according to the adaptability of the following surface, so there is no need to debug the controller parameters separately for each different contact surface, working condition, application scenario, etc., thereby significantly improving the versatility of the robot.
[0066] Regarding the robot control method provided in the above embodiment, the present invention provides a robot control device, see Figure 4 The schematic diagram of the structure of a robot control device shown in FIG. 1 mainly includes the following parts:
[0067] a curved surface determination module 402 for collecting an image of the area to be massaged of the target object and determining a following curved surface corresponding to the area to be massaged based on the image;
[0068] a parameter determination module 404 for determining the desired contact force and target pose of the robot according to the following surface;
[0069] The control module 406 is used to control the robot to perform a massage operation on the area to be massaged based on the expected contact force and the target posture.
[0070] The control device of the robot provided in an embodiment of the present invention determines a corresponding following surface based on the corresponding image of the area to be massaged. The following surface can reflect the shape of the contact surface at the area to be massaged. By determining the expected contact force and target posture based on the following surface, the above-mentioned expected contact force and target posture can be used to realize force-position hybrid control of the robot, thereby better improving the robot's followability with respect to the contact surface and significantly improving the versatility of the robot.
[0071] In one embodiment, the parameter determination module 404 is further used to: determine the actual stiffness corresponding to the current massage position based on the following surface and the current massage position of the end of the massage component of the robot; determine the expected contact force corresponding to the current massage position based on the actual stiffness; wherein the expected contact force is negatively correlated with the actual stiffness.
[0072] In one embodiment, the parameter determination module 404 is further used to: determine the current curvature and current vertical coordinate that match the current massage position of the end of the massage component of the robot from the following surface; determine the thickness value corresponding to the current massage position based on the following surface, and calculate the height difference between the thickness value and the current vertical coordinate; and determine the actual stiffness at the current massage position based on the height difference and the current curvature.
[0073] In one embodiment, the parameter determination module 404 is further configured to determine an expected contact force corresponding to the current massage position according to the actual stiffness, the first coefficient corresponding to the actual stiffness, the preset initial contact force, and the second coefficient of the initial contact force.
[0074] In one embodiment, the parameter determination module 404 is further used to: determine the current horizontal coordinate, current vertical coordinate, and current vertical coordinate that match the current massage position of the end of the massage component of the robot from the following surface; determine the reference zero position of the robot in the force control direction based on the current vertical coordinate, and determine the desired position of the robot based on the current horizontal coordinate and the current vertical coordinate; determine the target posture of the robot based on the reference zero position and the desired position; wherein the target posture is used to make the end of the massage component perpendicular to the current massage position.
[0075] In one embodiment, the control module 406 is also used to: obtain the actual contact force applied by the end of the robot's massage component to the previous massage position; determine the contact force deviation corresponding to the current massage position based on the actual contact force corresponding to the previous massage position and the expected contact force corresponding to the current massage position; and control the robot to perform a massage operation for the current massage position based on the contact force deviation and target posture corresponding to the current massage position.
[0076] In one embodiment, the control module 406 is also used to: determine the massage position deviation based on the admittance parameters and contact force deviation corresponding to the current massage position; solve the target instruction position corresponding to each joint point in the robot's massage component based on the massage position deviation and target posture corresponding to the current massage position; and control the robot to perform a massage operation for the current massage position based on the target instruction position.
[0077] In one embodiment, the control module 406 is further configured to adjust the admittance parameter corresponding to the previous massage position based on the curvature change rate and / or the actual stiffness change rate of the current curvature matched with the current massage position, to obtain the admittance parameter corresponding to the current massage position; wherein the admittance parameter is positively correlated with the curvature change rate and the actual stiffness change rate.
[0078] In one embodiment, the surface determination module 402 is further used to: if the image includes a depth map, use a specified surface fitting tool to fit an initial surface corresponding to the area to be massaged based on depth information corresponding to the depth map; or, if the image includes a two-dimensional image, convert the two-dimensional image into a three-dimensional image, and use a specified surface fitting tool to fit the initial surface corresponding to the area to be massaged based on the three-dimensional image; and smooth the initial surface to obtain a following surface corresponding to the area to be massaged.
[0079] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference can be made to the corresponding content in the aforementioned method embodiment.
[0080] An embodiment of the present invention provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, which, when executed by the processor, executes:
[0081] A robot control method includes: acquiring an image of a target object at an area to be massaged, and determining a following surface corresponding to the area to be massaged based on the image; determining a desired contact force and a target posture of the robot based on the following surface; and controlling the robot to perform a massage operation on the area to be massaged based on the desired contact force and the target posture.
[0082] The electronic device provided by an embodiment of the present invention determines a corresponding following surface based on the corresponding image of the area to be massaged. The following surface can reflect the shape of the contact surface at the area to be massaged. By determining the expected contact force and target posture based on the following surface, the above-mentioned expected contact force and target posture can be used to realize force-position hybrid control of the robot, thereby better improving the robot's followability with respect to the contact surface and significantly improving the robot's versatility.
[0083] In one embodiment, the step of determining the expected contact force of the robot based on the following surface includes: determining the actual stiffness corresponding to the current massage position based on the following surface and the current massage position of the end of the massage component of the robot; determining the expected contact force corresponding to the current massage position based on the actual stiffness; wherein the expected contact force is negatively correlated with the actual stiffness.
[0084] In one embodiment, the step of determining the actual stiffness corresponding to the current massage position based on the following surface and the current massage position of the end of the massage component of the robot includes: determining the current curvature and current vertical coordinate that match the current massage position of the end of the massage component of the robot from the following surface; determining the thickness value corresponding to the current massage position based on the following surface, and calculating the height difference between the thickness value and the current vertical coordinate; and determining the actual stiffness at the current massage position based on the height difference and the current curvature.
[0085] In one embodiment, the step of determining the expected contact force corresponding to the current massage position based on the actual stiffness includes: determining the expected contact force corresponding to the current massage position based on the actual stiffness, a first coefficient corresponding to the actual stiffness, a preset initial contact force, and a second coefficient of the initial contact force.
[0086] In one embodiment, the step of determining the target posture of the robot based on the following surface includes: determining the current horizontal coordinate, current vertical coordinate and current vertical coordinate that match the current massage position of the end of the massage component of the robot from the following surface; determining the reference zero position of the robot in the force control direction based on the current vertical coordinate, and determining the expected position of the robot based on the current horizontal coordinate and the current vertical coordinate; determining the target posture of the robot based on the reference zero position and the expected position; wherein the target posture is used to make the end of the massage component perpendicular to the current massage position.
[0087] In one embodiment, the steps of controlling the robot to perform a massage operation on the area to be massaged based on the expected contact force and the target posture include: obtaining the actual contact force applied by the end of the robot's massage component to the previous massage position; determining the contact force deviation corresponding to the current massage position based on the actual contact force corresponding to the previous massage position and the expected contact force corresponding to the current massage position; and controlling the robot to perform the massage operation on the current massage position based on the contact force deviation and the target posture corresponding to the current massage position.
[0088] In one embodiment, the steps of controlling the robot to perform a massage operation for the current massage position according to the contact force deviation and target posture corresponding to the current massage position include: determining the massage position deviation based on the admittance parameter and contact force deviation corresponding to the current massage position; solving the target instruction position corresponding to each joint point in the robot's massage component according to the massage position deviation and target posture corresponding to the current massage position; and controlling the robot to perform a massage operation for the current massage position based on the target instruction position.
[0089] In one embodiment, before the step of determining the massage position deviation based on the admittance parameter and contact force deviation corresponding to the current massage position, the method further includes: adjusting the admittance parameter corresponding to the previous massage position according to the curvature change rate and / or the actual stiffness change rate of the current curvature matched with the current massage position, to obtain the admittance parameter corresponding to the current massage position; wherein the admittance parameter is positively correlated with the curvature change rate and the actual stiffness change rate.
[0090] In one embodiment, the step of determining a following surface corresponding to the area to be massaged based on an image includes: if the image includes a depth map, using a specified surface fitting tool to fit an initial surface corresponding to the area to be massaged based on depth information corresponding to the depth map; or, if the image includes a two-dimensional image, converting the two-dimensional image into a three-dimensional image, and using a specified surface fitting tool to fit the initial surface corresponding to the area to be massaged based on the three-dimensional image; and smoothing the initial surface to obtain a following surface corresponding to the area to be massaged.
[0091] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of the present invention. The electronic device 100 includes: a processor 50, a memory 51, a bus 52 and a communication interface 53. The processor 50, the communication interface 53 and the memory 51 are connected via the bus 52; the processor 50 is used to execute an executable module stored in the memory 51, such as a computer program.
[0092] The memory 51 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage. The system network element communicates with at least one other network element via at least one communication interface 53 (which may be wired or wireless), and may utilize the Internet, a wide area network, a local area network, a metropolitan area network, or the like.
[0093] The bus 52 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 5Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0094] Among them, the memory 51 is used to store programs, and the processor 50 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 50 or implemented by the processor 50.
[0095] The processor 50 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method may be completed by hardware integrated logic circuits or software instructions in the processor 50. The processor 50 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It may implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present invention may be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or the like. The storage medium is located in the memory 51 , and the processor 50 reads the information in the memory 51 and completes the steps of the above method in combination with its hardware.
[0096] The computer program product of a readable storage medium provided in an embodiment of the present invention includes a computer-readable storage medium storing program code, wherein the program code includes instructions that can be used to execute:
[0097] A robot control method includes: acquiring an image of a target object at an area to be massaged, and determining a following surface corresponding to the area to be massaged based on the image; determining a desired contact force and a target posture of the robot based on the following surface; and controlling the robot to perform a massage operation on the area to be massaged based on the desired contact force and the target posture.
[0098] The readable storage medium provided by an embodiment of the present invention determines a corresponding following surface based on the corresponding image of the area to be massaged. The following surface can reflect the shape of the contact surface at the area to be massaged. By determining the expected contact force and target posture based on the following surface, the above-mentioned expected contact force and target posture can be used to realize force-position hybrid control of the robot, thereby better improving the robot's followability with respect to the contact surface and significantly improving the robot's versatility.
[0099] In one embodiment, the step of determining the expected contact force of the robot based on the following surface includes: determining the actual stiffness corresponding to the current massage position based on the following surface and the current massage position of the end of the massage component of the robot; determining the expected contact force corresponding to the current massage position based on the actual stiffness; wherein the expected contact force is negatively correlated with the actual stiffness.
[0100] In one embodiment, the step of determining the actual stiffness corresponding to the current massage position based on the following surface and the current massage position of the end of the massage component of the robot includes: determining the current curvature and current vertical coordinate that match the current massage position of the end of the massage component of the robot from the following surface; determining the thickness value corresponding to the current massage position based on the following surface, and calculating the height difference between the thickness value and the current vertical coordinate; and determining the actual stiffness at the current massage position based on the height difference and the current curvature.
[0101] In one embodiment, the step of determining the expected contact force corresponding to the current massage position based on the actual stiffness includes: determining the expected contact force corresponding to the current massage position based on the actual stiffness, a first coefficient corresponding to the actual stiffness, a preset initial contact force, and a second coefficient of the initial contact force.
[0102] In one embodiment, the step of determining the target posture of the robot based on the following surface includes: determining the current horizontal coordinate, current vertical coordinate and current vertical coordinate that match the current massage position of the end of the massage component of the robot from the following surface; determining the reference zero position of the robot in the force control direction based on the current vertical coordinate, and determining the expected position of the robot based on the current horizontal coordinate and the current vertical coordinate; determining the target posture of the robot based on the reference zero position and the expected position; wherein the target posture is used to make the end of the massage component perpendicular to the current massage position.
[0103] In one embodiment, the steps of controlling the robot to perform a massage operation on the area to be massaged based on the expected contact force and the target posture include: obtaining the actual contact force applied by the end of the robot's massage component to the previous massage position; determining the contact force deviation corresponding to the current massage position based on the actual contact force corresponding to the previous massage position and the expected contact force corresponding to the current massage position; and controlling the robot to perform the massage operation on the current massage position based on the contact force deviation and the target posture corresponding to the current massage position.
[0104] In one embodiment, the steps of controlling the robot to perform a massage operation for the current massage position according to the contact force deviation and target posture corresponding to the current massage position include: determining the massage position deviation based on the admittance parameter and contact force deviation corresponding to the current massage position; solving the target instruction position corresponding to each joint point in the robot's massage component according to the massage position deviation and target posture corresponding to the current massage position; and controlling the robot to perform a massage operation for the current massage position based on the target instruction position.
[0105] In one embodiment, before the step of determining the massage position deviation based on the admittance parameter and contact force deviation corresponding to the current massage position, the method further includes: adjusting the admittance parameter corresponding to the previous massage position according to the curvature change rate and / or the actual stiffness change rate of the current curvature matched with the current massage position, to obtain the admittance parameter corresponding to the current massage position; wherein the admittance parameter is positively correlated with the curvature change rate and the actual stiffness change rate.
[0106] In one embodiment, the step of determining a following surface corresponding to the area to be massaged based on an image includes: if the image includes a depth map, using a specified surface fitting tool to fit an initial surface corresponding to the area to be massaged based on depth information corresponding to the depth map; or, if the image includes a two-dimensional image, converting the two-dimensional image into a three-dimensional image, and using a specified surface fitting tool to fit the initial surface corresponding to the area to be massaged based on the three-dimensional image; and smoothing the initial surface to obtain a following surface corresponding to the area to be massaged.
[0107] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0108] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A robot control method, characterized in that: include: Acquire an image of a target object at a region to be massaged, and determine a following curved surface corresponding to the region to be massaged based on the image; Determining the expected contact force and target posture of the robot based on the following curved surface, wherein the step of determining the expected contact force of the robot based on the following curved surface includes: determining, from the following curved surface, a current curvature and a current vertical coordinate that match the current massage position of the end of the massage component of the robot; determining a thickness value corresponding to the current massage position based on the following curved surface, and calculating a height difference between the thickness value and the current vertical coordinate; determining an actual stiffness at the current massage position based on the height difference and the current curvature; determining an expected contact force corresponding to the current massage position based on the actual stiffness; wherein the expected contact force is negatively correlated with the actual stiffness; Based on the expected contact force and the target posture, the robot is controlled to perform a massage operation on the area to be massaged.
2. The method according to claim 1, characterized in that The step of determining the expected contact force corresponding to the current massage position according to the actual stiffness includes: An expected contact force corresponding to the current massage position is determined according to the actual stiffness, a first coefficient corresponding to the actual stiffness, a preset initial contact force, and a second coefficient of the initial contact force.
3. The method according to claim 1, characterized in that The step of determining the target posture of the robot according to the following curved surface comprises: Determining, from the following curved surface, a current horizontal coordinate, a current vertical coordinate, and a current vertical coordinate that match a current massage position of the end of the massage component of the robot; Determining a reference zero position of the robot in a force control direction according to the current vertical coordinate, and determining a desired position of the robot according to the current horizontal coordinate and the current vertical coordinate; The target posture of the robot is determined according to the reference zero position and the desired position; wherein the target posture is used to make the end of the massage component perpendicular to the current massage position.
4. The method according to claim 1, wherein The step of controlling the robot to perform a massage operation on the area to be massaged based on the expected contact force and the target posture includes: obtaining an actual contact force applied by a distal end of a massage component of the robot to a forward massage position; determining a contact force deviation corresponding to the current massage position based on the actual contact force corresponding to the previous massage position and the expected contact force corresponding to the current massage position; The robot is controlled to perform a massage operation on the current massage position according to the contact force deviation and the target posture corresponding to the current massage position.
5. The method according to claim 4, characterized in that The step of controlling the robot to perform a massage operation at the current massage position according to the contact force deviation and the target posture corresponding to the current massage position includes: determining a massage position deviation based on the admittance parameter corresponding to the current massage position and the contact force deviation; Determining the target command position corresponding to each joint point in the massage component of the robot according to the massage position deviation corresponding to the current massage position and the target posture; Based on the target command position, the robot is controlled to perform a massage operation for the current massage position.
6. The method according to claim 5, characterized in that Before determining the massage position deviation based on the admittance parameter corresponding to the current massage position and the contact force deviation, the method further includes: According to the curvature change rate and / or the actual stiffness change rate of the current curvature matched with the current massage position, the admittance parameter corresponding to the previous massage position is adjusted to obtain the admittance parameter corresponding to the current massage position; wherein the admittance parameter is positively correlated with the curvature change rate and the actual stiffness change rate.
7. The method according to claim 1, characterized in that The step of determining a following curved surface corresponding to the area to be massaged based on the image comprises: If the image includes a depth map, fitting an initial curved surface corresponding to the area to be massaged based on depth information corresponding to the depth map using a specified surface fitting tool; or, if the image includes a two-dimensional image, converting the two-dimensional image into a three-dimensional image, and fitting the initial curved surface corresponding to the area to be massaged based on the three-dimensional image using the specified surface fitting tool; The initial curved surface is smoothed to obtain a following curved surface corresponding to the area to be massaged.
8. A robot control device, characterized in that: include: a curved surface determination module, configured to acquire an image of a target object at an area to be massaged, and determine a following curved surface corresponding to the area to be massaged based on the image; A parameter determination module is configured to determine an expected contact force and a target posture of the robot based on the following curved surface, wherein the step of determining the expected contact force of the robot based on the following curved surface comprises: determining, from the following curved surface, a current curvature and a current vertical coordinate that match a current massage position of a distal end of a massage component of the robot; determining a thickness value corresponding to the current massage position based on the following curved surface, and calculating a height difference between the thickness value and the current vertical coordinate; determining an actual stiffness at the current massage position based on the height difference and the current curvature; and determining an expected contact force corresponding to the current massage position based on the actual stiffness; wherein the expected contact force is negatively correlated with the actual stiffness; A control module is configured to control the robot to perform a massage operation on the area to be massaged based on the expected contact force and the target posture.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Dot matrix wave massage robot
CN215308157U