A method and device for determining the increment of joint movement of a robot
Through the robot joint movement increment determination method, the robot handles the multi-constraint problem in the drag teaching interaction mode, calculates the resistance of the joint motion opposite direction, solves the shortcomings of multi-constraint processing in the existing technology, and ensures human-computer interaction Security.
Patent Information
- Application Number
- CN202310214757.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-07
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-03-07
AI Technical Summary
The prior art is difficult to effectively deal with the multi-constraint problems that robots have in drag teaching interaction mode, such as self-collision, joint overlimits, environmental collisions and singular configurations, resulting in a security threat to human-computer interaction.
Provide a robot's joint movement increment determination method. By obtaining joint position information, determine the constraint space of each constraint scene, and calculate the resistance force opposite to the direction of joint movement, and determine the joint movement increase in each constraint scene based on the resistance force. The size and direction of the quantity are used to map multiple constraints to the same acting space to achieve the processing of multiple constraints.
The movement increment of computer robot joints in the same action space is realized, effectively avoiding multiple constraints, and ensuring the safety and stability of human-computer interaction.
Smart Images

Figure CN116061188B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method for determining a joint movement increment of a robot. Background Art
[0002] With the continuous development of robotics technology, collaborative robots have been widely used in many fields such as industry, medical treatment, and aviation exploration. In these application scenarios, collaborative robots can respond flexibly to human dragging behavior with the help of compliant control technology, realizing the interactive mode of dragging teaching. This interactive mode reduces the difficulty of robot programming for operators, allowing robots to be quickly deployed in customized application scenarios.
[0003] In the interactive mode of drag-and-drop teaching, the robot may sometimes collide with itself, collide with obstacles in the workspace, exceed the joint limit, or have strange configuration problems. These situations will make human-machine interaction impossible to continue, and threaten the safety of the operator and the robot body. Therefore, it is necessary to avoid robot collisions, joint limit exceeds, and strange configuration problems to ensure the safety of human-machine interaction.
[0004] In the prior art, a hybrid method, that is, a hybrid virtual force method and a variable damping method, is usually used to solve the avoidance problem. However, the hybrid method is often used to describe a single constraint problem and lacks effective application to a multi-constraint problem.
[0005] Therefore, how to process multiple constraints simultaneously is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0006] The present application provides a method for determining a joint movement increment of a robot to process multiple constraints simultaneously. The present application also provides a device for determining a joint movement increment of a robot.
[0007] In a first aspect, the present application provides a method for determining a joint movement increment of a robot, comprising:
[0008] Obtaining position information of at least one joint of the robot;
[0009] Determine, according to the position information, the constraint space of the target joint corresponding to each different constraint scene in the preset constraint scene;
[0010] calculating a resistance force opposite to a movement direction of the target joint in each constraint space;
[0011] The movement increment size and direction of the target joint in each constraint scenario are determined according to each of the resistance forces.
[0012] Optionally, the preset constraint scenarios include: self-collision avoidance, joint limit avoidance, environmental collision avoidance, and singular configuration avoidance, and the calculation of the resistance force opposite to the movement direction of the target joint in each constraint space includes:
[0013] The resistance force opposite to the movement direction of the target joint in the constraint spaces corresponding to self-collision avoidance, joint limit avoidance, environmental collision avoidance and singular configuration avoidance is calculated respectively.
[0014] Optionally, the at least one joint is two joints, and the calculating of the resistance force opposite to the movement direction of the target joint in the constraint space corresponding to the self-collision avoidance includes:
[0015] Calculate the distance between the two link models determined by the two joint position information and the two closest distance points between the two link models;
[0016] Determine an output value of the first resistance function according to the distance between the two connecting rod models, a preset safety distance threshold, and a preset danger threshold;
[0017] The value of the first resistance force is determined by multiplying the output value of the first resistance ground function by the output value of the first resistance force direction function; the output value of the first resistance force direction function is determined by the vectors of the two closest distance points between the two connecting rod models.
[0018] Optionally, the calculating of the resistance force opposite to the movement direction of the target joint in the constraint space corresponding to the environmental collision avoidance includes:
[0019] Calculate the distance between the link model and the obstacle determined by the joint position information and the two closest distance points between the link model and the obstacle;
[0020] Determining an output value of a second resistance function according to a distance between the link model and the obstacle, a preset safety distance threshold, and a preset danger threshold;
[0021] The value of the second resistance force is determined by multiplying the output value of the second resistance ground function by the output value of the second resistance force direction function; the output value of the second resistance force direction function is determined by the vectors of the two closest distance points between the connecting rod model and the obstacle.
[0022] Optionally, the calculating of the resistance force opposite to the movement direction of the target joint in the constraint space corresponding to the joint limit avoidance includes:
[0023] Determine an output value of a third resistance function according to the distance of the joint limit, a preset safety distance threshold, and a preset danger threshold;
[0024] The value of the third resistance force is determined by multiplying the output value of the third resistance ground function by the output value of the third resistance force direction function; the output value of the third resistance force direction function is determined by the distance of the joint limit.
[0025] Optionally, the calculation of the resistance force in the constraint space corresponding to the singular configuration avoidance that is opposite to the movement direction of the target joint includes:
[0026] Determine an output value of a fourth resistance function according to the constraint distance of the singular configuration, a preset safety distance threshold, and a preset danger threshold;
[0027] The value of the fourth resistance force is determined by multiplying the output value of the fourth resistance ground function by the output value of the fourth resistance force direction function; the output value of the fourth resistance force direction function is determined by the posture vector of the robot and the tiny displacement of the joint end.
[0028] Optionally, the method further includes:
[0029] According to the movement increment size and direction of the target joint in each constraint scenario, the total increment size and direction of each node in the corresponding constraint scenario are determined.
[0030] Optionally, the method further includes adding the movement increment size of the target joint in each constraint scenario according to the direction to obtain joint increment information;
[0031] According to the joint increment information, a joint control instruction is sent to the robot.
[0032] Optionally, before obtaining the position information of at least one joint of the robot, the method further includes:
[0033] Obtaining a geometric model of the outer contour shape of each link of the robot;
[0034] The geometric model is converted into a target model; the target model is used for collision detection.
[0035] In a second aspect, the present application further provides a device for determining a joint movement increment of a robot, the device comprising:
[0036] A first acquisition unit, used to acquire position information of at least one joint of the robot;
[0037] A first determining unit, configured to determine, according to the position information, a constraint space of a target joint corresponding to each different constraint scene in a preset constraint scene;
[0038] A first calculation unit, used for calculating a resistance force opposite to a movement direction of the target joint in each constraint space;
[0039] The second determining unit is used to determine the movement increment size and direction of the target joint in each constraint scenario according to each resistance force.
[0040] Optionally, the preset constraint scenarios include: self-collision avoidance, joint limit avoidance, environment collision avoidance and singular configuration avoidance, and the first computing unit is specifically used for:
[0041] The resistance force opposite to the movement direction of the target joint in the constraint spaces corresponding to self-collision avoidance, joint limit avoidance, environmental collision avoidance and singular configuration avoidance is calculated respectively.
[0042] Optionally, the at least one joint is two joints, and the first computing unit is specifically configured to:
[0043] Calculate the distance between the two link models determined by the two joint position information and the two closest distance points between the two link models;
[0044] Determine an output value of the first resistance function according to the distance between the two connecting rod models, a preset safety distance threshold, and a preset danger threshold;
[0045] The value of the first resistance force is determined by multiplying the output value of the first resistance ground function by the output value of the first resistance force direction function; the output value of the first resistance force direction function is determined by the vectors of the two closest distance points between the two connecting rod models.
[0046] Optionally, the first computing unit is specifically configured to:
[0047] Calculate the distance between the link model and the obstacle determined by the joint position information and the two closest distance points between the link model and the obstacle;
[0048] Determining an output value of a second resistance function according to a distance between the link model and the obstacle, a preset safety distance threshold, and a preset danger threshold;
[0049] The value of the second resistance force is determined by multiplying the output value of the second resistance ground function by the output value of the second resistance force direction function; the output value of the second resistance force direction function is determined by the vectors of the two closest distance points between the connecting rod model and the obstacle.
[0050] Optionally, the first computing unit is specifically configured to:
[0051] Determine an output value of a third resistance function according to the distance of the joint limit, a preset safety distance threshold, and a preset danger threshold;
[0052] The value of the third resistance force is determined by multiplying the output value of the third resistance ground function by the output value of the third resistance force direction function; the output value of the third resistance force direction function is determined by the distance of the joint limit.
[0053] Optionally, the first computing unit is specifically configured to:
[0054] Determine an output value of a fourth resistance function according to the constraint distance of the singular configuration, a preset safety distance threshold, and a preset danger threshold;
[0055] The value of the fourth resistance force is determined by multiplying the output value of the fourth resistance ground function by the output value of the fourth resistance force direction function; the output value of the fourth resistance force direction function is determined by the posture vector of the robot and the tiny displacement of the joint end.
[0056] Optionally, the device further comprises:
[0057] The third determination unit is used to determine the total increment size and direction of each node in the corresponding constraint scene according to the movement increment size and direction of the target joint in each constraint scene.
[0058] Optionally, the device further comprises an obtaining unit, configured to add the movement increment size of the target joint in each constraint scenario according to the direction to obtain joint increment information;
[0059] The sending unit is used to send joint control instructions to the robot according to the joint increment information.
[0060] Optionally, the device further includes:
[0061] A second acquisition unit is used to acquire a geometric model of the object outer contour shape of each connecting rod of the robot;
[0062] The conversion unit is used to convert the geometric model into a target model; the target model is used for collision detection.
[0063] In a third aspect, an embodiment of the present application provides a device, comprising a memory and a processor, wherein the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes any method described in the first aspect.
[0064] In a fourth aspect, an embodiment of the present application provides a computer storage medium, in which a code is stored. When the code is executed, a device executing the code implements the method described in any one of the first aspects above.
[0065] Compared with the prior art, this application has the following beneficial effects:
[0066] In this application, the position information of at least one joint of the robot can be obtained, and then the constraint space of the target joint corresponding to each different constraint scene in the preset constraint scene can be determined based on the position information, and then the resistance force opposite to the movement direction of the target joint in each constraint space is calculated, and the movement increment size and direction of the target joint in each constraint scene are determined based on each resistance force. In this application, a variety of constraints can be mapped to the same action space, that is, the constraint space, through a local space mapping method, and then the joint movement increment of the robot in each constraint scene can be calculated in the mapping space to achieve simultaneous processing of multiple constraints. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in this embodiment or 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0068] Figure 1 A flowchart of a method for determining a joint movement increment of a robot provided in an embodiment of the present application;
[0069] Figure 2 A flowchart of another method for determining a joint movement increment of a robot provided in an embodiment of the present application;
[0070] Figure 3 A schematic structural diagram of a specific implementation of a device for determining a joint movement increment of a robot provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0072] With the continuous development of robotics technology, collaborative robots have been widely used in many fields such as industry, medical treatment, and aviation exploration. In these application scenarios, collaborative robots can respond flexibly to human dragging behavior with the help of compliant control technology, realizing the interactive mode of dragging teaching. This interactive mode reduces the difficulty of robot programming for operators, allowing robots to be quickly deployed in customized application scenarios.
[0073] In the interactive mode of drag-and-drop teaching, the robot may sometimes collide with itself, collide with obstacles in the workspace, exceed the joint limit, or have strange configuration problems. These situations will make human-machine interaction impossible to continue, and threaten the safety of the operator and the robot body. Therefore, it is necessary to avoid robot collisions, joint limit exceeds, and strange configuration problems to ensure the safety of human-machine interaction.
[0074] In the prior art, a hybrid method, that is, a hybrid virtual force method and a variable damping method, is usually used to solve the avoidance problem. However, the hybrid method is often used to describe a single constraint problem and lacks effective application to a multi-constraint problem.
[0075] In this application, the position information of at least one joint of the robot can be obtained, and then the constraint space of the target joint corresponding to each different constraint scene in the preset constraint scene can be determined based on the position information, and then the resistance force opposite to the movement direction of the target joint in each constraint space is calculated, and the movement increment size and direction of the target joint in each constraint scene are determined based on each resistance force. In this application, a variety of constraints can be mapped to the same action space, that is, the constraint space, through a local space mapping method, and then the joint movement increment of the robot in each constraint scene can be calculated in the mapping space to achieve simultaneous processing of multiple constraints.
[0076] It should be noted that the method and device for determining the joint movement increment of a robot provided in this application are used in the field of artificial intelligence. The above is only an example and does not limit the application field of the method and device provided in this application.
[0077] The method provided in the embodiment of the present application can be executed on a robot control system.
[0078] In order to make the technical personnel in this field better understand the present application, the present application is further described in detail below in combination with the drawings and specific implementation methods. The method provided in the present application embodiment is described below by taking the first device as an example.
[0079] Figure 1 A flowchart for determining the joint movement increment of a robot provided in an embodiment of the present application.
[0080] like Figure 1 As shown, the method includes:
[0081] S101: Acquire position information of at least one joint of the robot.
[0082] The first device may establish a collision model of the robot itself before acquiring the position information of at least one joint of the robot.
[0083] Specifically, the geometric model of the outer contour shape of each link of the robot is converted into a target model, and the structure of the geometric model is converted to be consistent with the structure of the target model, that is, converted into a collision model structure such as AABB or OBB that can perform collision detection. Then, the position information of at least one joint of the robot is obtained.
[0084] S102: Determine, according to the position information, a constraint space of a target joint corresponding to each different constraint scene in a preset constraint scene.
[0085] After obtaining the position information of at least one joint, the first device can determine the constraint space of the target joint corresponding to each different constraint scenario in the preset constraint scenario based on the position information, wherein the preset constraint scenario may include: self-collision avoidance, joint limit avoidance, environmental collision avoidance and singular configuration avoidance, and of course it can also be any combination of several of them.
[0086] S103: Calculate the resistance force opposite to the movement direction of the target joint in each constraint space.
[0087] The first device can respectively calculate the resistance force opposite to the movement direction of the target joint in the constraint space corresponding to self-collision avoidance, joint limit avoidance, environmental collision avoidance and singular configuration avoidance, that is, the virtual force.
[0088] Specifically, the calculation of the resistance force in the constraint space corresponding to the self-collision avoidance and in the opposite direction to the movement direction of the target joint may be performed by the following steps:
[0089] Get the position information of the robot's joints, and then use the robot's forward kinematics to determine the spatial position of each link model. It should be noted that each link can be similarly regarded as a body part of the robot. For example, get the position information of the robot's arm joints, and then determine the spatial position of the arm based on the position information of the arm joints. Then use the collision detection algorithm FCL to get the distance d between the two links of the robot that need to calculate the self-collision ij The coordinates of the two points closest to the two models and The link information between the links of self-collision is calculated as needed, which can also be called the information of the two links that violate the constraint, forming a local constraint space. It needs to be explained that in the local constraint space, only the two link models that form the constraint are affected, and other link models are not affected. In addition, the self-collision avoidance can be converted into an active constraint, and then the value of the first resistance force is determined according to the product of the output value of the first resistance function and the output value of the first resistance direction function, that is, the virtual force under self-collision avoidance. It needs to be explained that the virtual force is to provide a force vector away from obstacles and close to the target for objects at any position, so as to affect the robot to move in the direction away from obstacles. Because the force vector does not really exist, it is called a virtual force. For example, when the arms of the two robots move toward the chest, a resistance force opposite to the movement direction of the robot's arms will be generated to resist the arms and avoid collision with the chest.
[0090] The specific first resistance formula is as follows:
[0091]
[0092] Where Ω is the set of all possible link pairs that may collide. ij is a virtual force, which can also be called the first resistance force, ds is the preset safety distance threshold, and dc is the preset danger distance threshold. ij ,d s ,d c ) is the virtual force function, which can also be called the first resistance function. The specific formula is as follows:
[0093]
[0094] Where λ is the gain coefficient. Virtual force direction function D(P i ,P j ) Ensure that the direction of the virtual force is the direction in which the active constraint index decreases fastest. For example, the formula of the virtual force direction function in the case of self-collision is as follows:
[0095]
[0096] Among them, the coordinates of the two points closest to the two models are and It can also be called P i and P j , the output value of the first resistance force direction function is determined by the vectors of the two nearest distance points between the two link models.
[0097] Optionally, in order to make the calculated virtual force more accurate, the virtual force can be optimized by analyzing the operator's intention. The specific formula is as follows:
[0098] f′ ij=Φ(f ij ,X)f ij
[0099] Among them, the function Φ determines the operator's intention based on the robot end torque sensor data: if the operator's operation in a certain direction is to make the two links move away from each other, the virtual force in this direction is 0. If the operator's operation is to make the two links approach each other, the virtual force is retained in this direction, and X represents the position of the force application point. Then the damping coefficient of the admittance controller can be generated based on the virtual force.
[0100] B d (t) = B0 + B e (t)
[0101] Where B0 is the preset damping coefficient, B e (t) Damping increment associated with virtual force:
[0102] B e (t) = λ e |f′ ij |
[0103] where λ e is the gain coefficient. The optimized virtual force and damping coefficient are brought into the control space admittance controller to generate a virtual control space displacement increment. Through the local constraint space mapping, the displacement increment is converted into the corresponding joint increment. In this way, the self-collision judgment of the two link models is completed and the corresponding joint increment is calculated. That is, the amount that the joint needs to move in a certain direction to avoid collision.
[0104] The resistance force in the opposite direction of the target joint movement in the constraint space corresponding to the joint environment collision avoidance can be calculated, specifically:
[0105] Obtain the position information of the robot's joints to estimate the position of the obstacle, and then determine the spatial position of each link model through the robot's forward kinematics solution. It should be noted that each link can be similarly regarded as a body part of the robot. For example, obtain the position information of the robot's arm joints, and then determine the spatial position of the arm based on the position information of the arm joints. Then, the collision detection algorithm FCL can be used to obtain the distance between the robot's link and the obstacle that needs to be calculated for collision. Here, it can also be d ij The coordinates of the two points closest to the connecting rod and the obstacle and Determine the local constraint space composed of the link that violates the constraint and the robot base, and then transform the self-collision avoidance into an active constraint. Then, determine the value of the second resistance force according to the product of the output value of the second resistance ground function and the output value of the second resistance direction function, which is the virtual force under environmental collision avoidance.
[0106] The specific second resistance formula is as follows:
[0107]
[0108] where f ij M(d ij ,d s ,d c ) can also be the second virtual force function, or the second resistance function. The specific formula is as follows:
[0109]
[0110] Where λ is the gain coefficient. Virtual force direction function D(P i ,P j ) Ensure that the direction of the virtual force is the direction in which the active constraint index decreases fastest. For example, the formula of the virtual force direction function under environmental collision avoidance is as follows:
[0111]
[0112] Among them, the coordinates of the two points closest to the connecting rod and the obstacle so far and It can also be called P i and P j .
[0113] Optionally, in order to make the calculated virtual force more accurate, the virtual force can be optimized by analyzing the operator's intention. The specific formula is as follows:
[0114] f i ' j =Φ(f ij ,X)f ij
[0115] The function Φ determines the operator's intention based on the robot's end torque sensor data: if the operator's operation in a certain direction is to move the two links away from each other, the virtual force in that direction is 0. If the operator's operation is to move the two links closer to each other, the virtual force is retained in that direction, and X represents the position of the force application point. Then, the damping coefficient of the admittance controller can be generated based on the virtual force, f′ ij is the optimized virtual force.
[0116] B d (t) = B0 + B e (t)
[0117] Where B0 is the preset damping coefficient, Be (t) is the damping increment due to the fictitious force:
[0118] B e (t) = λ e |f′ ij |
[0119] where λ e is the gain coefficient. The optimized virtual force and damping coefficient are brought into the control space admittance controller to generate a virtual control space displacement increment. Through the local constraint space mapping, the displacement increment is converted into the corresponding joint increment. In this way, a collision judgment between the link and the environment is completed, and the corresponding joint increment is calculated. That is, the amount that the joint needs to move in a certain direction to avoid collision.
[0120] The resistance force in the opposite direction of the target joint movement in the constraint space corresponding to the joint limit avoidance can be calculated, specifically:
[0121] The position information of the robot joints is obtained. When it is determined that the position information of the robot joints exceeds the preset limit position, limit avoidance can be performed.
[0122] Of course, the speed, acceleration and driving torque information of the robot's joints can also be obtained, and then the speed, acceleration and driving torque information of the robot's joints can be compared with the preset joint limit speed, limit acceleration and maximum driving torque to perform extreme avoidance of the robot's joints.
[0123] Determine the local constraint space of the joint that violates the constraint, then calculate the joint limit distance d, calculate the virtual force, and use the current position x of the joint and its current joint limit position x lim Example:
[0124]
[0125] Of course, x is not limited to the current position of the joint, but can also be the velocity, acceleration, and driving torque of the joint. lim It is not limited to the extreme position of the current joint, but may also correspond to the joint extreme speed, extreme acceleration, and maximum driving torque.
[0126] f ij The virtual force under the joint limit avoidance can also be called the third resistance. The third resistance is calculated as follows:
[0127] f ij =M(d,d s ,d c )D(x,x lim )
[0128] Virtual force direction function D(x,x lim ) Ensure that the direction of the virtual force is the direction in which the active constraint index decreases fastest. For example, the formula of the virtual force direction function under joint limit avoidance is as follows:
[0129]
[0130] It should be noted that M(d,d s ,d c ) is the third virtual force function, and its specific formula is the same as the second virtual force function M(d ij ,d s ,d c ) Similarly, replace d in the formula of the second virtual function ij Just use d instead.
[0131] The principle of subsequent optimization of virtual force is the same as above and will not be described in detail here.
[0132] The optimized virtual force and damping coefficient are brought into the control space admittance controller to generate a virtual control space displacement increment. Taking the position limit of the avoidance joint as an example, the displacement increment is converted into the corresponding joint increment through the local constraint space mapping. In this way, a joint limit avoidance judgment is completed and the corresponding joint increment is calculated. That is, in order to avoid the current position of the joint exceeding the limit position, the amount that the joint needs to move in a certain direction.
[0133] The resistance force in the opposite direction of the target joint motion in the constraint space corresponding to the singular configuration avoidance can be calculated, specifically:
[0134] The first device obtains the position information of the robot's joints, and then calculates the robot's Jacobian matrix and its condition number. Through the condition number decomposition of the Jacobian matrix, the joints that have lost degrees of freedom are determined, and the local constraint space composed of the joints is determined. The resistance force in the opposite direction of the target joint movement in the constraint space corresponding to the singular configuration avoidance can be calculated. Specifically:
[0135] d = cond(J) - δ lim
[0136] Where cond() is the calculation matrix condition number, J is the robot Jacobian matrix, δ lim is the preset judgment matrix singular threshold, and d is the constraint distance of the singular configuration.
[0137] f ij The virtual force under the singular configuration avoidance can also be called the fourth resistance. The fourth resistance is calculated as follows:
[0138] f ij =M(d,d s ,dc )D(x)
[0139] It should be noted that M(d,d s ,d c ) is the fourth virtual force function, and its specific formula is the same as the third virtual force function M(d ij ,d s ,d c ) is similar to that in which the joint limit distance d in the formula of the third virtual function is replaced by the constraint distance d of the singular configuration.
[0140] Here, we take the six-dimensional pose vector x of the robot end as an example. The D(x) function represents the algorithm for calculating the robot Jacobian matrix based on the robot's pose vector x. x Represents a small displacement of the end.
[0141]
[0142] The principle of subsequent optimization of virtual force is the same as above and will not be described in detail here.
[0143] The optimized virtual force and damping coefficient are introduced into the control space admittance controller to generate a virtual control space displacement increment. Through the local constraint space mapping, the displacement increment is converted into the corresponding joint increment. In this way, a singular configuration avoidance judgment is completed and the corresponding joint increment is calculated.
[0144] S104: Determine the movement increment size and direction of the target joint in each constraint scenario according to each resistance force.
[0145] The first device determines the movement increment size and direction of the target joint in each constraint scenario according to each resistance force.
[0146] In this way, the first device can determine the movement increment size and direction of a single constraint of the target joint in each constraint scenario.
[0147] In this application, the position information of at least one joint of the robot can be obtained, and then the constraint space of the target joint corresponding to each different constraint scene in the preset constraint scene can be determined based on the position information, and then the resistance force opposite to the movement direction of the target joint in each constraint space is calculated, and the movement increment size and direction of the target joint in each constraint scene are determined based on each resistance force. In this application, a variety of constraints can be mapped to the same action space, that is, the constraint space, through a local space mapping method, and then the joint movement increment of the robot in each constraint scene can be calculated in the mapping space to achieve simultaneous processing of multiple constraints.
[0148] On the basis of the above embodiments, the present application can also provide another embodiment, which can be called Embodiment 2. After determining the movement increment of each node in each constraint scenario, the present application can also add "determine the total increment size and direction of each node in the corresponding constraint scenario according to the movement increment size and direction of the target joint in each constraint scenario", "add the movement increment size of the target joint in each constraint scenario according to the direction to obtain joint increment information, and send joint control instructions to the robot according to the joint increment information". The specific flow chart is as follows: Figure 2 As shown, specifically:
[0149] S201: According to the movement increment size and direction of the target joint in each constraint scenario, the total increment size and direction of each node in the corresponding constraint scenario are determined.
[0150] Specifically, taking the self-collision constraint as an example, the arm may collide with the chest, and the arm may also collide with the head. The joint increment generated to avoid a collision between the arm and the chest is 3 cm to the left, and the joint increment generated to avoid a collision between the arm and the head is 3 cm downward. It is necessary to add up all the movement increments generated by the joints that may collide under the self-collision constraint, that is, the movement increments of the arm under the self-collision constraint are 3 cm to the left and 3 cm downward.
[0151] Of course, other constraint scenarios are based on the same principle and will not be described here. Moreover, this is just an example and does not make any specific limitation.
[0152] S202: Add the movement increments of the target joints in each constraint scenario according to the direction to obtain joint increment information, and send joint control instructions to the robot according to the joint increment information.
[0153] The first device can add the movement increment sizes of the target joints in each constraint scenario according to the direction to obtain joint increment information. For example, the movement increment generated by the arm in the self-collision constraint is 3 cm to the left and 3 cm downward, and the movement increment generated by the environmental collision constraint is 1 cm downward. The movement increment of the arm in each constraint scenario is added to 3 cm to the left and 4 cm downward, thereby obtaining the joint increment information of the arm. According to the joint increment information, joint control instructions are sent to the robot to control the joint movement according to the joint increment and direction in the joint increment information.
[0154] The above are some specific implementations of the method for determining the joint movement increment of the robot provided by the embodiment of the present application. Based on this, the present application also provides a corresponding device. The device provided by the embodiment of the present application will be introduced from the perspective of functional modularization. The device and the method for determining the joint movement increment of the robot described above can be referred to each other.
[0155] Figure 3 A schematic diagram of a specific implementation of a device for determining a joint movement increment of a robot provided in an embodiment of the present application. This is referred to as Specific Implementation Method 3, and is referred to as Figure 3 The device may include:
[0156] A first acquisition unit 300 is used to acquire position information of at least one joint of the robot;
[0157] A first determining unit 310 is used to determine the constraint space of the target joint corresponding to each different constraint scene in the preset constraint scene according to the position information;
[0158] A first calculation unit 320, used for calculating a resistance force opposite to the movement direction of the target joint in each constraint space;
[0159] The second determining unit 330 is used to determine the movement increment size and direction of the target joint in each constraint scenario according to each resistance force.
[0160] Optionally, the preset constraint scenarios include: self-collision avoidance, joint limit avoidance, environment collision avoidance and singular configuration avoidance, and the first computing unit is specifically used for:
[0161] The resistance force opposite to the movement direction of the target joint in the constraint spaces corresponding to self-collision avoidance, joint limit avoidance, environmental collision avoidance and singular configuration avoidance is calculated respectively.
[0162] Optionally, the at least one joint is two joints, and the first computing unit is specifically configured to:
[0163] Calculate the distance between the two link models determined by the two joint position information and the two closest distance points between the two link models;
[0164] Determine an output value of the first resistance function according to the distance between the two connecting rod models, a preset safety distance threshold, and a preset danger threshold;
[0165] The value of the first resistance force is determined by multiplying the output value of the first resistance ground function by the output value of the first resistance force direction function; the output value of the first resistance force direction function is determined by the vectors of the two closest distance points between the two connecting rod models.
[0166] Optionally, the first computing unit is specifically configured to:
[0167] Calculate the distance between the link model and the obstacle determined by the joint position information and the two closest distance points between the link model and the obstacle;
[0168] Determining an output value of a second resistance function according to a distance between the link model and the obstacle, a preset safety distance threshold, and a preset danger threshold;
[0169] The value of the second resistance force is determined by multiplying the output value of the second resistance ground function by the output value of the second resistance force direction function; the output value of the second resistance force direction function is determined by the vectors of the two closest distance points between the connecting rod model and the obstacle.
[0170] Optionally, the first computing unit is specifically configured to:
[0171] Determine an output value of a third resistance function according to the distance of the joint limit, a preset safety distance threshold, and a preset danger threshold;
[0172] The value of the third resistance force is determined by multiplying the output value of the third resistance ground function by the output value of the third resistance force direction function; the output value of the third resistance force direction function is determined by the distance of the joint limit.
[0173] Optionally, the first computing unit is specifically configured to:
[0174] Determine an output value of a fourth resistance function according to the constraint distance of the singular configuration, a preset safety distance threshold, and a preset danger threshold;
[0175] The value of the fourth resistance force is determined by multiplying the output value of the fourth resistance ground function by the output value of the fourth resistance force direction function; the output value of the fourth resistance force direction function is determined by the posture vector of the robot and the tiny displacement of the joint end.
[0176] Optionally, the device further comprises:
[0177] The third determination unit is used to determine the total increment size and direction of each node in the corresponding constraint scene according to the movement increment size and direction of the target joint in each constraint scene.
[0178] Optionally, the device further comprises an obtaining unit, configured to add the movement increment size of the target joint in each constraint scenario according to the direction to obtain joint increment information;
[0179] The sending unit is used to send joint control instructions to the robot according to the joint increment information.
[0180] Optionally, the device further includes:
[0181] A second acquisition unit is used to acquire a geometric model of the object outer contour shape of each connecting rod of the robot;
[0182] The conversion unit is used to convert the geometric model into a target model; the target model is used for collision detection.
[0183] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.
[0184] The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the method described in any embodiment of the present application.
[0185] The computer storage medium stores codes, and when the codes are executed, a device executing the codes implements the method described in any embodiment of the present application.
[0186] The "first" and "second" in the names such as "first" and "second" (if any) mentioned in the embodiments of the present application are only used as name identifiers and do not represent the first or second in order.
[0187] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0188] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0189] The above description is merely an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A method for determining the increment of joint movement of a robot, characterized in that: include: Acquiring position information of at least one joint of the robot; Determine, according to the position information, the constraint space of the target joint corresponding to each different constraint scene in the preset constraint scene; calculating a resistance force opposite to a movement direction of the target joint in each constraint space; Determine the movement increment size and direction of the target joint in each constraint scenario according to each of the resistance forces; The preset constraint scenarios include: self-collision avoidance, joint limit avoidance, environmental collision avoidance, and singular configuration avoidance. The calculation of the resistance force opposite to the movement direction of the target joint in each constraint space includes: Respectively calculating the resistance force opposite to the movement direction of the target joint in the constraint spaces corresponding to self-collision avoidance, joint limit avoidance, environmental collision avoidance and singular configuration avoidance; The at least one joint is two joints, and the calculation of the resistance force opposite to the movement direction of the target joint in the constraint space corresponding to the self-collision avoidance includes: Calculate the distance between the two link models determined by the two joint position information and the two closest distance points between the two link models; Determine an output value of the first resistance function according to the distance between the two connecting rod models, a preset safety distance threshold, and a preset danger threshold; The value of the first resistance is determined by multiplying the output value of the first resistance function by the output value of the first resistance direction function; the output value of the first resistance direction function is determined by the vectors of the two closest distance points between the two connecting rod models; The calculation of the resistance force opposite to the movement direction of the target joint in the constraint space corresponding to the environmental collision avoidance includes: Calculate the distance between the link model and the obstacle determined by the joint position information and the two closest distance points between the link model and the obstacle; Determining an output value of a second resistance function according to a distance between the link model and the obstacle, a preset safety distance threshold, and a preset danger threshold; The value of the second resistance is determined according to the product of the output value of the second resistance function and the output value of the second resistance direction function; the output value of the second resistance direction function is determined by the vectors of the two closest distance points between the connecting rod model and the obstacle; The calculating of the resistance force opposite to the movement direction of the target joint in the constraint space corresponding to the joint limit avoidance includes: Determine an output value of a third resistance function according to the distance of the joint limit, a preset safety distance threshold, and a preset danger threshold; Determine the value of the third resistance force according to the product of the output value of the third resistance force function and the output value of the third resistance force direction function; the output value of the third resistance force direction function is determined by the distance of the joint limit; The calculating of the resistance force in the constraint space corresponding to the singular configuration avoidance and opposite to the movement direction of the target joint comprises: Determine an output value of a fourth resistance function according to the constraint distance of the singular configuration, a preset safety distance threshold, and a preset danger threshold; The value of the fourth resistance is determined by multiplying the output value of the fourth resistance function by the output value of the fourth resistance direction function; the output value of the fourth resistance direction function is determined by the posture vector of the robot and the tiny displacement of the joint end.
2. The method according to claim 1, characterized in that The method further comprises: According to the movement increment size and direction of the target joint in each constraint scenario, the total increment size and direction of each node in the corresponding constraint scenario are determined.
3. The method according to claim 2, characterized in that The method further includes adding the movement increment size of the target joint in each constraint scenario according to the direction to obtain joint increment information; According to the joint increment information, a joint control instruction is sent to the robot.
4. The method according to claim 1, characterized in that: Before obtaining the position information of at least one joint of the robot, the method further includes: Obtaining a geometric model of the outer contour shape of each link of the robot; The geometric model is converted into a target model; the target model is used for collision detection.
5. A device for determining the increment of joint movement of a robot, characterized in that: include: A first acquisition unit, used to acquire position information of at least one joint of the robot; A first determining unit, configured to determine, according to the position information, a constraint space of a target joint corresponding to each different constraint scene in a preset constraint scene; A first calculation unit, used for calculating a resistance force opposite to a movement direction of the target joint in each constraint space; A second determination unit, used to determine the movement increment size and direction of the target joint in each constraint scenario according to each resistance force; The preset constraint scenarios include: self-collision avoidance, joint limit avoidance, environmental collision avoidance and singular configuration avoidance, and the first computing unit is specifically used for: Respectively calculating the resistance force opposite to the movement direction of the target joint in the constraint spaces corresponding to self-collision avoidance, joint limit avoidance, environmental collision avoidance and singular configuration avoidance; The at least one joint is two joints, and the first computing unit is specifically configured to: Calculate the distance between the two link models determined by the two joint position information and the two closest distance points between the two link models; Determine an output value of the first resistance function according to the distance between the two connecting rod models, a preset safety distance threshold, and a preset danger threshold; The value of the first resistance is determined by multiplying the output value of the first resistance function by the output value of the first resistance direction function; the output value of the first resistance direction function is determined by the vectors of the two closest distance points between the two connecting rod models; Calculate the distance between the link model and the obstacle determined by the joint position information and the two closest distance points between the link model and the obstacle; Determining an output value of a second resistance function according to a distance between the link model and the obstacle, a preset safety distance threshold, and a preset danger threshold; The value of the second resistance is determined according to the product of the output value of the second resistance function and the output value of the second resistance direction function; the output value of the second resistance direction function is determined by the vectors of the two closest distance points between the connecting rod model and the obstacle; Determine an output value of a third resistance function according to the distance of the joint limit, a preset safety distance threshold, and a preset danger threshold; Determine the value of the third resistance force according to the product of the output value of the third resistance force function and the output value of the third resistance force direction function; the output value of the third resistance force direction function is determined by the distance of the joint limit; Determine an output value of a fourth resistance function according to the constraint distance of the singular configuration, a preset safety distance threshold, and a preset danger threshold; The value of the fourth resistance is determined by multiplying the output value of the fourth resistance function by the output value of the fourth resistance direction function; the output value of the fourth resistance direction function is determined by the posture vector of the robot and the tiny displacement of the joint end.
