Method, device and equipment for generating initial joint state of mechanical arm and medium
By acquiring the initial pose and working path of the robotic arm's end effector, determining the state of the first joint, and predicting the movement step length, the problem of the robotic arm's initial joint state selection relying on human experience is solved, thereby improving the operational completeness of the robotic arm's end effector tool.
Patent Information
- Application Number
- CN202211057224.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-30
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-08-30
AI Technical Summary
In existing technologies, the selection of the starting joint state of a robotic arm mainly relies on human experience, which results in the robotic arm's end-effector being unable to fully complete tasks on complex curved surfaces or in narrow spaces.
By acquiring the initial pose set and working path of the working tool held at the end of the robotic arm, the first joint state set is determined, and the movement step length in each joint state is predicted. Based on the movement step length, the starting joint state of the robotic arm is determined to ensure that the working tool meets the preset constraints on the working path.
It improves the operational integrity of the robotic arm's end effector, ensuring that the tool can successfully complete tasks on complex curved surfaces or in narrow spaces.
Smart Images

Figure CN117681183B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of robots, and in particular to a method and device for generating a starting joint state of a robot arm, a computer device and a storage medium. BACKGROUND
[0002] For a given work path, the robot arm end needs to hold a work tool to move the work tool along the given work path to complete the work task. For a complex curved surface or a narrow space, the selection of the starting joint state of the robot arm directly affects the completeness of the entire work.
[0003] Currently, the starting joint state of the robot arm is mainly specified by the operator according to experience, which causes the work tool held by the robot arm end to be unable to complete the work. SUMMARY
[0004] Therefore, the purpose of the present application is to provide a method and device for generating a starting joint state of a robot arm, a computer device and a storage medium, which can improve the work completeness of the work tool held by the robot arm end.
[0005] According to a first aspect of an embodiment of the present application, a method for generating a starting joint state of a robot arm is provided, comprising the following steps:
[0006] obtaining an initial pose set of a work tool held by a robot arm end and a work path;
[0007] determining a first joint state set of the robot arm according to the initial pose set;
[0008] predicting a movement step of the work tool when the work tool is controlled to move on the work path by the robot arm in each first joint state in the first joint state set; the movement step is used to indicate the number of path nodes moved through between the initial pose corresponding to the at least one first joint state and the first path node not satisfying a preset constraint condition when the work tool moves along each path node of the work path;
[0009] determining a starting joint state of the robot arm from the at least one first joint state according to the movement step corresponding to the at least one first joint state.
[0010] According to a second aspect of an embodiment of the present application, a device for generating a starting joint state of a robot arm is provided, comprising:
[0011] an initial pose set obtaining module configured to obtain an initial pose set of a work tool held by a robot arm end and a work path;
[0012] a state set determination module configured to determine a first joint state set of the robot arm according to the initial pose set;
[0013] a movement step prediction module configured to predict a movement step of the work tool when the work tool is controlled by the robot arm in each first joint state in the first joint state set to move on the work path, the movement step being used to indicate a number of path nodes moved through between the initial pose corresponding to the at least one first joint state and a first path node that does not satisfy a preset constraint condition when the work tool moves along the path nodes of the work path;
[0014] a starting joint state determination module configured to determine a starting joint state of the robot arm from the at least one first joint state according to the movement step corresponding to the at least one first joint state.
[0015] According to a third aspect of the embodiments of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores a computer program which is adapted to be loaded and executed by the processor to implement the method for generating a starting joint state of a robot arm according to any one of the above.
[0016] According to a fourth aspect of the embodiments of the present application, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the method for generating a starting joint state of a robot arm according to any one of the above.
[0017] The embodiments of the present application determine the starting joint state of the robot arm through the initial pose set of the work tool gripped by the end of the robot arm and the work path, determine the first joint state set of the robot arm according to the initial pose set, predict the movement step of the work tool when the work tool is controlled by the robot arm in each first joint state in the first joint state set to move on the work path, the movement step being used to indicate the number of path nodes moved through between the initial pose corresponding to the at least one first joint state and the first path node that does not satisfy the preset constraint condition when the work tool moves along the path nodes of the work path, and determine the starting joint state of the robot arm from the at least one first joint state according to the movement step corresponding to the at least one first joint state. The embodiments of the present application determine the starting joint state of the robot arm through the movement step of the first joint state, and improve the work completeness of the work tool.
[0018] It should be understood that the general description above and the detailed description below are only exemplary and explanatory, and cannot limit the present application.
[0019] For better understanding and implementation, the present application is described in detail below with reference to the accompanying drawings. Attached Figure Description
[0020] Figure 1 A schematic diagram illustrating an application scenario of a method for generating the initial joint state of a robotic arm according to an embodiment of this application;
[0021] Figure 2 A flowchart illustrating a method for generating the initial joint state of a robotic arm according to an embodiment of this application.
[0022] Figure 3 This is a flowchart illustrating step S10 of a method for generating the initial joint state of a robotic arm according to an embodiment of this application.
[0023] Figure 4 This is a flowchart illustrating step S30 of a method for generating the initial joint state of a robotic arm according to an embodiment of this application.
[0024] Figure 5 This is a flowchart illustrating step S33 of a method for generating the initial joint state of a robotic arm according to an embodiment of this application.
[0025] Figure 6 This is a flowchart illustrating step S34 of a method for generating the initial joint state of a robotic arm according to an embodiment of this application.
[0026] Figure 7 This is a flowchart illustrating step S40 of a method for generating the initial joint state of a robotic arm according to an embodiment of this application.
[0027] Figure 8 A structural block diagram of a device for generating the initial joint state of a robotic arm according to an embodiment of this application;
[0028] Figure 9 This is a schematic block diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0030] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0031] The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the description of the application and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It also will be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0032] The following description refers to the accompanying drawings. In the following description, same numbers represent similar features that have a similar function and / or structure. The following examples of embodiments are described in enough detail to enable those with ordinary skill in the art to make and use it. Elements described in connection with one embodiment are generally applicable to other embodiments, except as explicitly noted. The following description of examples of embodiments is not meant to limit or restrict the scope or application of the application. The scope of the application is defined only in the claims.
[0033] In addition, in the description of the application, unless otherwise specified, "multiple" refers to two or more. "And / or", describes the association between the associated objects, which means that there can be three relationships, for example, A and / or B, which can mean: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the associated objects before and after are in an "or" relationship.
[0034] Please refer to Figure 1 , which is a schematic diagram of the application scenario of the method for generating a starting joint state of a mechanical arm. The application scenario of the method for generating a starting joint state of a mechanical arm of the application embodiment includes a mechanical arm 10 and a work object 20. The mechanical arm 10 can be fixed on a base. Optionally, the base can be mobile, and the mechanical arm 10 can move with the base in addition to its own movement. Optionally, the base can also be fixed, and the mechanical arm 10 only has its own movement. The application embodiment takes the base as an example, which is fixed and only has the movement of the mechanical arm 10, to illustrate the method for generating a starting joint state of a mechanical arm of the application.
[0035] The mechanical arm 10 comprises a plurality of joints, which refers to a device connecting two components. The connection is not a fixed connection, but a limited relative movement can occur. Optionally, the movement can include rotation and translation. The joint at the end of the mechanical arm 10 clamps a work tool. The mechanical arm 10 moves the work tool along a given work path by controlling the movement of each joint, thereby completing the work task on the work object 20. The work tool can be a cleaning tool, a welding tool, a spraying tool, etc. In the embodiment of the present application, the work tool is taken as a cleaning tool for example. For example, the cleaning tool is a towel, a cloth, and a glass scraper, etc.
[0036] The mechanical arm 10 further comprises one or more processors; the processors can be used to execute the starting joint state generation method of the mechanical arm of the present application, control the movement of each joint, and thereby drive the movement of the mechanical arm 10.
[0037] Optionally, the processors can be built into the mechanical arm 10 as a whole with the mechanical arm 10; the processors can also be external to the mechanical arm 10 to independently control the movement of the mechanical arm 10. Optionally, the processors can also only execute the control of the movement of each joint, that is, the starting joint state generation method of the mechanical arm of the embodiment of the present application can also be executed by other processing centers connected with the processors, and the other processing centers further transmit the planned starting joint state of the mechanical arm to the processors, and the processors further control the movement of each joint.
[0038] Example 1
[0039] Please refer to Figure 2 which is a flowchart of the starting joint state generation method of the mechanical arm provided by an embodiment of the present application. The starting joint state generation method of the mechanical arm provided by the embodiment of the present application comprises the following steps:
[0040] S10: Obtain an initial pose set of a work tool clamped at the end of the mechanical arm and a work path.
[0041] The work path is a path that the work tool clamped at the end of the mechanical arm needs to move to complete the work task.
[0042] The work path can be evenly segmented to obtain a plurality of work path segments, each work path segment comprises two path nodes at the beginning and the end, and a plurality of path nodes arranged along the work path are obtained. Each path node can correspond to a work direction, and the work direction can be a normal direction perpendicular to the straight line where the work path segment is located.
[0043] The initial pose comprises an initial position and an initial attitude direction, and the initial pose set comprises a plurality of initial poses.
[0044] The initial position of the working tool held at the end of the robotic arm can be the position of a path node randomly selected from the working path. In this embodiment, the initial position is the position of the first path node on the working path.
[0045] The orientation of the working tool is the direction in which the working tool is oriented. In this embodiment, the initial orientation of the working tool at the end of the robotic arm can be an angle less than or equal to the working direction of the path node.
[0046] S20: Determine the first joint state set of the robotic arm based on the initial pose set.
[0047] The first joint state set includes several first joint states. In this embodiment, given an initial pose, the first joint state set of the robotic arm corresponding to the initial pose can be calculated using the inverse kinematics model of the robotic arm. The pose of the tool's coordinate system relative to the base coordinate system is also included. 0 T t , is represented as:
[0048]
[0049] in, i-1 T i The pose of joint i relative to joint i-1 is represented as:
[0050] i-1 T i =Trans(a i-1 0 0)·Rot(X i-1 α i-1 )·Trans(0 0 d i )·Rot(Z i θ i-1 )
[0051] Among them, T t The coordinate system O represents the working tool held at the end effector of the robotic arm. t X t Y t Z t The pose relative to the robotic arm's end effector coordinate system O6X6Y6Z6 is represented as:
[0052]
[0053] For the six-joint robot arm, there are at most eight valid inverse solutions for each initial pose, i.e., one initial pose can be solved to obtain at most eight first joint states of the robot arm. For example, the initial pose set includes 3 initial poses, and 4, 5 and 6 valid inverse solutions are obtained respectively by inverse kinematics solving the 3 initial poses according to the inverse kinematics model, and 15 first joint states of the robot arm are obtained.
[0054] S30: predicting a movement step of the work tool when the work tool moves on the work path under control of each first joint state in the first joint state set, respectively; the movement step is used to indicate the number of path nodes moved through between the initial pose corresponding to the at least one first joint state and the first path node that does not satisfy the preset constraint condition when the work tool moves along the path nodes of the work path.
[0055] Wherein, when the work tool moves on the work path, the position change of the work tool is also accompanied by the change of the joint state of the robot arm, and therefore the joint state of the robot arm can be predicted. The joint state prediction is to predict the corresponding joint state of the robot arm when the work tool moves from the starting position to the next position on the work path under control of the first joint state.
[0056] In the embodiments of the present application, a plurality of path nodes arranged on the work path are sequentially numbered to obtain path nodes numbered P1, P2, …, Pn. The starting position of the work tool can be the position of the path node P1, so that the corresponding joint state of the work tool when moving from the position of the path node P1 to the positions of the path nodes P2, P3, …, Pn can be predicted. Optionally, the starting position of the work tool can be the position of the path node P2, so that the corresponding joint state of the work tool when moving from the position of the path node P2 to the positions of the path nodes P3, P4, …, Pn can be predicted.
[0057] When the work tool moves from the starting position to the next position, a joint state is predicted to be obtained, and if the predicted joint state satisfies the preset constraint condition, a movement step can be obtained. Wherein, the preset constraint condition includes one or more of the position error constraint condition, the attitude range constraint condition, the joint limit constraint condition and the collision detection constraint condition.
[0058] Specifically, the work tool is moved from the position of the path node P1 to the position of the path node P2, a first joint state is predicted, and if the first joint state satisfies the preset constraint condition, it is recorded as a movement step. The work tool is moved from the position of the path node P2 to the position of the path node P3, a second joint state is obtained, and if the second joint state satisfies the preset constraint condition, it is recorded as a movement step. The work tool is moved from the position of the path node P1 to the positions of the path nodes P2, P3,..., Pn in turn, n-1 joint states are predicted, and if the n-1 predicted joint states all satisfy the preset constraint condition, the movement step is n-1.
[0059] S40: determining a starting joint state of the mechanical arm from the at least one first joint state according to a movement step corresponding to the at least one first joint state.
[0060] In the embodiment of the present application, if the mechanical arm can control the work tool to move from the starting position to the position of the last path node in a certain first joint state, the first joint state can be directly taken as the starting joint state of the mechanical arm. If there are multiple first joint states that can control the work tool to move from the starting position to the position of the last path node, one of the first joint states can be selected as the starting joint state of the mechanical arm. The multiple first joint states that can control the work tool to move from the starting position to the position of the last path node can also be compared with the reference joint state of the mechanical arm, and the first joint state closest to the reference joint state is taken as the starting joint state of the mechanical arm. The reference joint state of the mechanical arm is the joint state of the mechanical arm after starting.
[0061] If the mechanical arm cannot control the work tool to move from the starting position to the position of the last path node in any first joint state, the first joint states can be clustered to obtain multiple clustering groups. For each clustering group, the first joint state closest to the reference joint state in the clustering group is taken as the starting joint state of the mechanical arm. The first joint state with the largest movement step in the clustering group can also be taken as the starting joint state of the mechanical arm. The distance and the deduction step of the reference joint state in the clustering group can also be weighted to calculate the cost, and the first joint state with the minimum cost is taken as the starting joint state of the mechanical arm.
[0062] According to the embodiment of the present application, the initial pose set of the work tool held by the end of the mechanical arm and the work path are acquired; the first joint state set of the mechanical arm is determined according to the initial pose set; the moving step of the work tool when the work tool moves on the work path under the control of each first joint state in the first joint state set is predicted; the moving step is used to indicate the number of path nodes moved through between the initial pose corresponding to the at least one first joint state and the first path node that does not satisfy the preset constraint condition when the work tool moves along the path nodes of the work path; and the starting joint state of the mechanical arm is determined from the at least one first joint state according to the moving step corresponding to the at least one first joint state. According to the embodiment of the present application, the starting joint state of the mechanical arm is determined through the moving step of the first joint state, and the work completeness of the work tool is improved.
[0063] In an optional embodiment, referring to Figure 3 , the step S10 of acquiring the initial pose set of the work tool held by the end of the mechanical arm and the work path includes S11-S14, and specifically as follows:
[0064] S11: Acquire the work path of the end of the mechanical arm.
[0065] In the embodiment of the present application, the work path of the end of the mechanical arm can be automatically generated by a preset path planning algorithm. Specifically, the preset path planning algorithm can be the plough method and the slice method.
[0066] S12: Select one path node from the work path as an initial path node, and take the position of the initial path node as the initial position of the work tool.
[0067] In the embodiment of the present application, the positions of the path nodes P1, P2,..., Pn can be represented as (x1, y1, z1), (x2, y2, z2),..., (xn, yn, zn), and one path node can be selected as the initial path node. In the embodiment of the present application, the path node P1 is selected as the initial path node, and the initial position of the work tool held by the end of the mechanical arm is (x1, y1, z1).
[0068] S13: Acquire a plurality of pose directions of the work tool; wherein the included angle between each pose direction and the work direction corresponding to the initial path node is less than or equal to a preset angle.
[0069] In the embodiment of the present application, the work direction of the path node Pk can be represented as n k , k = 1, 2,..., n. The pose direction Z t of the work tool held by the end of the mechanical arm is allowed to be within a preset angle range with the work direction n kThere is a maximum β of the tilt angle. Wherein, β is a preset angle. The tilt angle can be increased by a step β step Tilt Z sequentially t to the maximum included angle β, while the tilt angle is increased by a step α step Rotate n k by [0, 2π), to obtain a plurality of pose directions of the working tool.
[0070] S14: Obtain an initial pose set of the working tool at the end of the mechanical arm according to the initial position and the plurality of pose directions.
[0071] In the embodiments of the present application, the mechanical arm is located at the same initial position, and there are different pose directions, thereby generating different initial poses.
[0072] Through the plurality of path nodes on the working path and the working direction of each path node, the initial pose set of the working tool at the end of the mechanical arm can be automatically and quickly determined.
[0073] In an optional embodiment, please refer to Figure 4 , the working path includes a plurality of path nodes arranged along the working path, and the step S30 of predicting the movement step of the working tool when the working tool moves on the working path under the control of the mechanical arm in each first joint state in the first joint state set includes steps S31-S33, which are as follows:
[0074] S31: Calculate the pose joint mapping parameter corresponding to at least one first joint state and the position of the working tool corresponding to at least one first joint state;
[0075] S32: Input at least one first joint state, the pose joint mapping parameter corresponding to at least one first joint state, the position of the working tool, and the position of the path node into the mechanical arm working prediction model, to predict the second joint state of the mechanical arm when the working tool is controlled to move to the corresponding path node under the control of at least one first joint state;
[0076] S33: Obtain the movement step of at least one first joint state according to the second joint state of the mechanical arm corresponding to at least one first joint state.
[0077] In the embodiments of the present application, the mechanical arm working prediction model can be represented as:
[0078]
[0079] Wherein, J k represents the pose joint mapping parameter, which is the partial derivative of the pose at the end of the mechanical arm and the joint angle of the robot, p represents the position of the working tool, θ k represents the first joint state, p k+1θ represents the position of the path node. k+1 Let k represent the state of the second joint, k = 1, 2, ..., n.
[0080] Specifically, based on the first joint state θ k Based on the kinematic model of the robotic arm, the position p of the working tool can be calculated. The robotic arm is in its first joint state θ. k As the joint state for starting the operation, control the operation tool to move from position p to position p of the (k+1)th path node. k+1 At that time, the second joint state θ is predicted and obtained through the robotic arm operation prediction model. k+1 If the predicted second joint state θ k+1 By satisfying the preset constraints, the movement step size of the first joint state can be obtained. Here, the (k+1)th path node is the path node corresponding to position p, that is, the next work position of the work tool after completing the work at position p. For example, if the position p of the work tool is the position of the first path node P1 on the work path, then the next path node P2 is the path node corresponding to position p.
[0081] By using a robotic arm operation prediction model and preset constraints, the movement step size of the robotic arm in the second joint state and the first joint state at the corresponding path node can be predicted automatically and quickly.
[0082] In an optional embodiment, please refer to Figure 5 Step S33, which involves obtaining the movement step size for each first joint state based on the second joint state of the robotic arm corresponding to each first joint state, includes steps S34 to S36, as follows:
[0083] S34: When the working tool is on the corresponding path node, determine whether the second joint state of the robotic arm corresponding to at least one first joint state satisfies the preset constraint conditions.
[0084] S35: If not, obtain the number of path nodes that the working tool corresponding to at least one first joint state has moved through before the corresponding path node, and use the number as the movement step size of the corresponding at least one first joint state.
[0085] S36: If so, control the work tool to move to the next path node after the corresponding path node, and determine whether the state of the second joint of the robot arm on the next path node meets the preset constraint conditions, until the work tool is controlled to move to the last path node.
[0086] If the second joint state satisfies the preset constraint condition, the work tool continues to move from the path node to the next path node until the last path node, otherwise, the work tool stops moving and records the moving step.
[0087] Specifically, the work tool moves from the position of the path node P1 to the position of the path node P2, and a second joint state is predicted. If the second joint state satisfies the preset constraint condition, the moving step is recorded as 1. If the second joint state does not satisfy the preset constraint condition, the moving step is recorded as 0. On the basis that the second joint state satisfies the preset constraint condition, a second joint state corresponding to the path node P3 can be obtained, and the preset constraint condition is continued to be judged for the second joint state. If the second joint state satisfies the preset constraint condition, the moving step is recorded as 2, and if the second joint state satisfies the preset constraint condition, the moving step is recorded as 1, and the second joint state corresponding to the path node P4 is no longer solved. After obtaining a second joint state corresponding to a path node, the preset constraint condition is judged for the second joint state, so that the moving step of the first joint state is automatically and quickly determined.
[0088] In an optional embodiment, referring to Figure 6 The preset constraint condition includes a position error constraint condition, an attitude range constraint condition, a joint limit constraint condition, and a collision detection constraint condition. Each path node corresponds to a work direction. The step S34 of judging whether the second joint state of the mechanical arm corresponding to at least one first joint state satisfies the preset constraint condition when the work tool is on the corresponding path node includes S341-S344, and the details are as follows:
[0089] S341: According to the second joint state of the mechanical arm, the work position of the work tool is predicted. If the deviation between the work position and the position of the corresponding path node is within a first preset range, it is determined that the second joint state of the mechanical arm satisfies the position error constraint condition;
[0090] S342: According to the second joint state of the mechanical arm, the work attitude direction of the work tool is predicted. If the included angle between the work attitude direction and the work direction of the corresponding path node is within a second preset range, it is determined that the second joint state of the mechanical arm satisfies the attitude range constraint condition;
[0091] S343: According to the second joint state of the mechanical arm, the joint angles of each joint of the mechanical arm are determined. If the joint angle of each joint is within a third preset range, it is determined that the second joint state of the mechanical arm satisfies the joint limit constraint condition;
[0092] S344: determining a spatial region of the robot arm according to the second joint state of the robot arm, and determining that the second joint state of the robot arm satisfies the collision detection constraint condition if the spatial region of the robot arm does not overlap with the spatial region where the work object is located.
[0093] In the embodiment of the present application, by judging the position error constraint condition, the attitude range constraint condition, the joint limit constraint condition and the collision detection constraint condition of the second joint state, if any one of the constraint conditions is not satisfied, the second joint state prediction of the next path node is not performed, thereby improving the accuracy of the joint state prediction.
[0094] In an optional embodiment, the step S40 of determining the starting joint state of the robot arm from the at least one first joint state according to the movement step corresponding to the at least one first joint state comprises S41, and specifically as follows:
[0095] S41: if there is a movement step equal to the total number of path nodes on the work path, calculating the sum of squared distances of the first joint state with the movement step equal to the total number of path nodes and the reference joint state of the robot arm, and taking the first joint state with the smallest sum of squared distances as the starting joint state of the robot arm.
[0096] In the embodiment of the present application, taking the first joint state with the smallest sum of squared distances as the starting joint state of the robot arm can make the robot arm take the minimum time to adjust from the reference joint state to the starting joint state, thereby improving the adjustment efficiency of the joint state of the robot arm.
[0097] In an optional embodiment, referring to Figure 7 , the step S40 of determining the starting joint state of the robot arm from the at least one first joint state according to the movement step corresponding to the at least one first joint state comprises S42-S45, and specifically as follows:
[0098] S42: if there is no movement step equal to the total number of path nodes on the work path, obtaining the number of first joint states with non-zero movement step;
[0099] S43: if the number is greater than or equal to a preset threshold, clustering all the first joint states with non-zero movement step to obtain a plurality of clustering groups;
[0100] S44: traversing each clustering group, calculating the sum of squared distances of each first joint state in the current clustering group and the reference joint state of the robot arm, and performing weighted summation on the sum of squared distances corresponding to each first joint state and the reciprocal of the corresponding movement step to obtain the cost of each first joint state;
[0101] S45: repeat traversing each cluster group until a first joint state with minimum cost in each cluster group is determined, and take the first joint state with minimum cost in each cluster group as the starting joint state of the robot arm.
[0102] In the embodiment of the application, by clustering the first joint states with non-zero movement steps, a first joint state with minimum cost is determined from each cluster group as the starting joint state of the robot arm, thereby ensuring the diversity of the starting state of the robot arm.
[0103] Example 2
[0104] The following is an apparatus embodiment of the application, which can be used to execute the method in the method embodiment 1 of the application. For details not disclosed in the apparatus embodiment of the application, refer to the method in the method embodiment 1 of the application.
[0105] Please refer to Figure 8 which shows a structural schematic diagram of a starting joint state generation apparatus of a robot arm provided by an embodiment of the application. The starting joint state generation apparatus 7 of the robot arm provided by the embodiment of the application comprises:
[0106] An initial pose set acquisition module 71 is configured to acquire an initial pose set of a work tool held by an end of the robot arm and a work path;
[0107] A state set determination module 72 is configured to determine a first joint state set of the robot arm according to the initial pose set;
[0108] A movement step prediction module 73 is configured to predict a movement step of the work tool when the work tool moves on the work path under control of the robot arm in at least one first joint state in the first joint state set; the movement step is used to indicate a number of path nodes moved through between an initial pose corresponding to the at least one first joint state and a first path node not satisfying a preset constraint condition when the work tool moves along the path nodes of the work path;
[0109] A starting joint state determination module 74 is configured to determine a starting joint state of the robot arm from the at least one first joint state set according to the movement step of each at least one first joint state.
[0110] Optionally, the initial pose set acquisition module comprises:
[0111] A work path acquisition unit is configured to acquire a work path of an end of the robot arm;
[0112] An initial position obtaining unit is configured to select a path node from the work path as an initial path node, and take a position of the initial path node as an initial position of the work tool;
[0113] The posture direction acquisition unit is configured to acquire a plurality of posture directions of the work tool; each posture direction corresponds to an angle between the work direction of the initial path node and a preset angle.
[0114] The initial pose set acquisition unit is configured to acquire an initial pose set of the work tool at the end of the mechanical arm according to the initial position and the plurality of posture directions.
[0115] Optionally, the movement step prediction module comprises:
[0116] The position calculation unit is configured to calculate the pose-joint mapping parameter corresponding to the at least one first joint state and the position of the work tool corresponding to the at least one first joint state.
[0117] The second joint state prediction unit is configured to input the at least one first joint state, the pose-joint mapping parameter corresponding to the at least one first joint state, the position of the work tool, and the position of the path node into the mechanical arm work prediction model to predict a second joint state of the mechanical arm when the work tool is controlled to move to the corresponding path node in the at least one first joint state.
[0118] The movement step acquisition unit is configured to acquire the movement step of the at least one first joint state according to the second joint state of the mechanical arm corresponding to the at least one first joint state.
[0119] Optionally, the movement step acquisition unit comprises:
[0120] The constraint condition judgment unit is configured to judge whether the second joint state of the mechanical arm corresponding to the at least one first joint state satisfies a preset constraint condition when the work tool is at the corresponding path node.
[0121] The first movement step determination unit is configured to, if not, acquire the number of path nodes through which the work tool corresponding to the at least one first joint state moves before the corresponding path node, and take the number as the movement step of the corresponding at least one first joint state.
[0122] The second movement step determination unit is configured to, if yes, control the work tool to move to the next path node after the corresponding path node, judge whether the second joint state of the mechanical arm at the next path node satisfies the preset constraint condition, and stop until the work tool moves to the last path node.
[0123] Optionally, the constraint condition judgment unit comprises:
[0124] The first constraint condition judging unit is configured to predict a working position of the working tool according to the second joint state of the robot arm; and if a deviation between the working position and a position of the corresponding path node is within a first preset range, it is determined that the second joint state of the robot arm satisfies a position error constraint condition.
[0125] The second constraint condition judging unit is configured to predict a working posture direction of the working tool according to the second joint state of the robot arm; and if an included angle between the working posture direction and a working direction of the corresponding path node is within a second preset range, it is determined that the second joint state of the robot arm satisfies a posture range constraint condition.
[0126] The third constraint condition judging unit is configured to determine joint angles of each joint of the robot arm according to the second joint state of the robot arm; and if the joint angles of each joint are within a third preset range, it is determined that the second joint state of the robot arm satisfies a joint limit constraint condition.
[0127] The fourth constraint condition judging unit is configured to determine a space region of the robot arm according to the second joint state of the robot arm; and if the space region of the robot arm does not overlap with a space region where the work object is located, it is determined that the second joint state of the robot arm satisfies a collision detection constraint condition.
[0128] Optionally, the initial joint state determining module comprises:
[0129] The first initial joint state determining is configured to, if there is a moving step equal to the total number of path nodes on the working path, calculate a sum of squared distances between the first joint state with the total number of moving steps and the reference joint state of the robot arm, and take the first joint state with the smallest sum of squared distances as the initial joint state of the robot arm.
[0130] Optionally, the initial joint state determining module comprises:
[0131] The number obtaining unit is configured to, if there is no moving step equal to the total number of path nodes on the working path, obtain a number of first joint states with a non-zero moving step;
[0132] The cluster group obtaining unit is configured to, if the number is greater than or equal to a preset threshold, cluster all the first joint states with a non-zero moving step to obtain a plurality of cluster groups;
[0133] The cost obtaining unit is configured to traverse each cluster group, calculate a sum of squared distances between each first joint state in the current cluster group and the reference joint state of the robot arm, and perform weighted summation on the sum of squared distances corresponding to each first joint state and the reciprocal of the corresponding moving step to obtain a cost of each first joint state.
[0134] The cluster group traversal unit is configured to repeatedly traverse each cluster group until a first joint state with a minimum cost in each cluster group is determined, and the first joint state with the minimum cost in each cluster group is taken as a starting joint state of the robot arm.
[0135] According to the initial pose set, a first joint state set of the robot arm is determined; the moving step of the work tool when the work tool moves on the work path under control of each first joint state in the first joint state set is predicted; the moving step is used to indicate the number of path nodes that the work tool moves through from an initial pose corresponding to at least one first joint state to a first path node that does not satisfy the preset constraint condition when the work tool moves along each path node of the work path; and a starting joint state of the robot arm is determined from the at least one first joint state according to the moving step corresponding to the at least one first joint state. According to the embodiment of the application, the starting joint state of the robot arm is determined through the moving step of the first joint state, and the work completeness of the work tool is improved.
[0136] Example 3
[0137] The following is an equipment embodiment of the application, which can be used to execute the method in the method embodiment 1 of the application. For details not disclosed in the equipment embodiment of the application, refer to the method in the method embodiment 1 of the application.
[0138] Please refer to Figure 9 The application further provides an electronic device 300, which can be specifically a computer, a mobile phone, a tablet computer, an interactive tablet, etc. In the exemplary embodiments of the application, the electronic device 300 is an interactive tablet, which can include at least one processor 301, at least one memory 302, at least one display, at least one network interface 303, a user interface 304, and at least one communication bus 305.
[0139] The user interface 304 is mainly used to provide an input interface for a user and acquire data input by the user. Optionally, the user interface can further include a standard wired interface and a wireless interface.
[0140] The network interface 303 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0141] The communication bus 305 is used to realize the connection and communication among the components.
[0142] The processor 301 can include one or more processing cores. The processor connects various parts within the entire electronic device by various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Alternatively, the processor can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA). The processor can integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes an operating system, a user interface, and an application program; the GPU is responsible for rendering and drawing the content to be displayed by the display layer; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor, but can be realized by a separate chip.
[0143] The memory 302 can include a random access memory (RAM) and a read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, codes, code sets or instruction sets. The memory can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory can also be at least one storage device located away from the above-mentioned processor. As a computer storage medium, the memory can include an operating system, a network communication module, a user interface module, and an operation application.
[0144] The processor can be used to call the application program of the video resolution adjustment method stored in the memory, and specifically execute the method steps of the above-mentioned embodiment 1. The specific execution process can be referred to the specific description of embodiment 1, which will not be repeated here.
[0145] Example 4
[0146] The application further provides a computer readable storage medium, which stores a computer program. The instructions are suitable for being loaded and executed by a processor to perform the method steps of the embodiment 1 shown above. The specific execution process can refer to the specific description shown in the embodiment, which will not be repeated here. The device where the storage medium is located can be a personal computer, a notebook computer, a smart phone, a tablet computer, or the like electronic device.
[0147] For the device embodiment, since it basically corresponds to the method embodiment, the relevant part can refer to the part of the method embodiment. The device embodiment described above is only schematic, and the components shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purpose of the application according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0148] Those skilled in the art should understand that the embodiments of the application can be provided as a method, a system, or a computer program product. Therefore, the application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the application can adopt a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.
[0149] The application is described with reference to flowcharts and / or block diagrams according to the method, device (system), and computer program product of the embodiments of the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device implemented in the flowcharts and / or block diagrams. Figure One The flow or multiple flows and / or blocks Figure One The device for selected functions in one block or multiple blocks. These computer program instructions can also be stored in a computer readable storage medium, which can guide the computer or other programmable data processing devices to work in a specific way, so that the instructions stored in the computer readable storage medium produce a manufactured product including instruction devices, which implement the flowcharts and / or block diagrams. Figure One The flow or multiple flows and / or blocks Figure One The device for selected functions in one block or multiple blocks.
[0150] These computer program instructions can also be loaded into computer or other programmable data processing devices to cause a series of operational steps to be performed on the computer or other programmable devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable devices provide steps for implementing the functions of the flow Figure One one or more flows and / or blocks Figure One one or more blocks or steps of functions selected from a flow or flows and / or blocks.
[0151] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0152] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the processor can execute instructions. The memory can also include non-volatile memory, such as read only memory (ROM), electrically programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), erasable programmable read only memory (EPROM), flash memory, or a combination of non-volatile memories in different types. The memory is an example of computer readable media.
[0153] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory media such as modulated data signals and carrier waves.
[0154] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to encompass a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not include only those elements recited, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0155] The above merely provides an example of the present application, and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall fall into the scope of claims of the present application.
Claims
1. A method for generating a starting joint state of a robot arm, characterized in that, The method comprises the following steps: obtaining an initial pose set of a work tool held by an end of a robot arm and a work path; determining a first joint state set of the robot arm according to the initial pose set; predicting a moving step of the work tool when the robot arm is controlled to move the work tool on the work path in at least one first joint state in the first joint state set; the moving step is used to indicate the number of path nodes moved through from an initial pose corresponding to the at least one first joint state to a first path node not satisfying a preset constraint condition when the work tool moves along the work path; determining a starting joint state of the robot arm from the at least one first joint state according to the moving step corresponding to the at least one first joint state.
2. The method for generating a starting joint state of a robot arm according to claim 1, wherein: the work path comprises a plurality of path nodes arranged along the work path; the step of predicting the moving step of the work tool when the robot arm is controlled to move the work tool on the work path in at least one first joint state in the first joint state set comprises: calculating a pose-joint mapping parameter corresponding to the at least one first joint state and a position of the work tool corresponding to the at least one first joint state; inputting the at least one first joint state, the pose-joint mapping parameter corresponding to the at least one first joint state, the position of the work tool and the position of the path node into a robot arm work prediction model to predict a second joint state of the robot arm when the work tool is controlled to move to the path node in the at least one first joint state; obtaining the moving step of the at least one first joint state according to the second joint state of the robot arm corresponding to the at least one first joint state.
3. The method for generating a starting joint state of a robot arm according to claim 2, wherein: the step of obtaining the moving step of the at least one first joint state according to the second joint state of the robot arm corresponding to the at least one first joint state comprises: judging whether the second joint state of the robot arm corresponding to the at least one first joint state satisfies a preset constraint condition when the work tool is on the path node; if not, obtaining the number of path nodes moved through by the work tool corresponding to the at least one first joint state before the path node, and taking the number as the moving step of the corresponding at least one first joint state; if yes, controlling the work tool to move to a next path node after the path node, judging whether the second joint state of the robot arm on the next path node satisfies the preset constraint condition, and stopping until the work tool is controlled to move to a last path node.
4. The method for generating a starting joint state of a robot arm according to claim 3, wherein: The preset constraint conditions include a position error constraint condition, a posture range constraint condition, a joint limit constraint condition, and a collision detection constraint condition; each path node corresponds to a work direction; The step of judging whether the second joint state of the mechanical arm corresponding to the at least one first joint state satisfies the preset constraint condition when the work tool is on the path node corresponding to the path node includes: According to the second joint state of the mechanical arm, the work position of the work tool is predicted; if the deviation between the work position and the position corresponding to the path node is within a first preset range, it is determined that the second joint state of the mechanical arm satisfies the position error constraint condition; According to the second joint state of the mechanical arm, the work posture direction of the work tool is predicted; if the included angle between the work posture direction and the work direction corresponding to the path node is within a second preset range, it is determined that the second joint state of the mechanical arm satisfies the posture range constraint condition; According to the second joint state of the mechanical arm, the joint angle of each joint of the mechanical arm is determined; if the joint angle of each joint is within a third preset range, it is determined that the second joint state of the mechanical arm satisfies the joint limit constraint condition; According to the second joint state of the mechanical arm, the space region of the mechanical arm is determined; if the space region of the mechanical arm does not overlap with the space region where the work object is located, it is determined that the second joint state of the mechanical arm satisfies the collision detection constraint condition.
5. The method for generating a starting joint state of a mechanical arm according to claim 1, wherein the step of determining the starting joint state of the mechanical arm from the at least one first joint state according to the movement step corresponding to the at least one first joint state includes: If there is a movement step equal to the total number of path nodes on the work path, the distance square sum of the first joint state with the movement step equal to the total number of path nodes and the reference joint state of the mechanical arm is calculated, and the first joint state with the smallest distance square sum is taken as the starting joint state of the mechanical arm.
6. The method for generating a starting joint state of a mechanical arm according to claim 1, wherein the step of determining the starting joint state of the mechanical arm from the at least one first joint state according to the movement step corresponding to the at least one first joint state includes: If there is no movement step equal to the total number of path nodes on the work path, the number of first joint states with a movement step of zero is obtained; If the number is greater than or equal to a preset threshold, all first joint states with a movement step of zero are clustered to obtain a plurality of clusters; Each cluster is traversed, the distance square sum of each first joint state in the current cluster and the reference joint state of the mechanical arm is calculated, the distance square sum corresponding to each first joint state and the reciprocal of the corresponding movement step are weighted and summed to obtain the cost of each first joint state. Repeating the traversing each of the cluster groups until determining a first joint state with minimum cost in each of the cluster groups, and taking the first joint state with minimum cost in each of the cluster groups as the starting joint state of the robot arm.
7. The method of claim 1 to 6, wherein: The step of obtaining an initial pose set of a work tool at the end of the robot arm and a work path comprises: obtaining a work path of the robot arm; selecting an initial path node from the work path, and taking a position of the initial path node as an initial position of the work tool; obtaining a plurality of pose directions of the work tool; wherein an included angle between each of the pose directions and a work direction corresponding to the initial path node is less than or equal to a preset angle; obtaining an initial pose set of the work tool at the end of the robot arm according to the initial position and the plurality of pose directions.
8. A device for generating a starting joint state of a robot arm, characterized in that comprises: an initial pose set obtaining module configured to obtain an initial pose set of a work tool held at the end of a robot arm and a work path; a state set determining module configured to determine a first joint state set of the robot arm according to the initial pose set; a moving step predicting module configured to predict a moving step of the work tool when the work tool is controlled to move on the work path by the robot arm in at least one first joint state in the first joint state set; the moving step is used to indicate a number of path nodes moved through between an initial pose corresponding to the at least one first joint state and a first path node not satisfying a preset constraint condition when the work tool moves along the path nodes of the work path; a starting joint state determining module configured to determine a starting joint state of the robot arm from the at least one first joint state set according to the moving step of each of the at least one first joint state.
9. A computer device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Control device and robot system
CN108972541A
Pose determination method, apparatus and device and storage medium
CN110794434A