Mechanical arm control method, device, equipment and medium
Through the generation method of slice processing and obstacle avoidance control parameters, the problem that the robotic arm cannot reach the designated position due to obstacle blocking in complex environments is solved, and more flexible and accurate robotic arm movement is achieved.
Patent Information
- Application Number
- CN202411976147.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-11
AI Technical Summary
When the robotic arm moves in three-dimensional space, it cannot accurately reach the designated position due to obstacles, especially in complex environments, and it is difficult to move normally.
By determining the area of obstacles within the range of motion of the robot arm, the initial motion trajectory is sliced, the motion coverage area and the obstacle intersection area are obtained, the obstacle avoidance position information is determined, and the obstacle avoidance control parameters are generated based on the starting point, end point and obstacle avoidance position information, and the robotic arm movement is controlled to bypass the obstacle.
It effectively solves the problem that the robotic arm cannot reach its destination due to obstacles blocking, improves the movement space and movement flexibility of the robotic arm, and ensures the correctness and accuracy of the movement trajectory.
Smart Images

Figure CN119589682A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a method, device, equipment and medium for controlling a robotic arm. Background Art
[0002] At present, the arm of a humanoid robot is usually controlled by moving from position 1 to position 2 in a three-dimensional space, that is, the coordinates of the two positions in the three-dimensional space are inversely calculated to find the movement direction and angle of each robot arm. If the straight-line distance between the two positions in the three-dimensional space is far, then there are many possibilities for the movement trajectory of each robot arm of the humanoid robot to be combined into the movement trajectory of the entire arm. In actual use scenarios, the trajectory is uncontrollable and cannot be accurately executed according to the predetermined movement trajectory. Especially in complex environments, there will be problems such as obstacles that prevent the robot from moving normally to the specified position. Summary of the invention
[0003] In order to solve the above technical problems, the embodiments of the present application provide a robot arm control method, device, equipment and medium.
[0004] In a first aspect, an embodiment of the present application provides a method for controlling a robotic arm, the method comprising:
[0005] Determine the area of obstacles within the range of motion of the robot arm;
[0006] Determine an initial motion trajectory according to the starting position information and the ending position information of the robotic arm;
[0007] Slicing the initial motion trajectory to obtain at least one process position information;
[0008] Acquire a motion coverage area corresponding to when the end joint of the robotic arm moves along the initial motion trajectory, and determine an obstacle intersection area of the motion coverage area and the obstacle area;
[0009] Determine at least one obstacle avoidance position information according to the obstacle intersection area and each process position information;
[0010] Obtaining obstacle avoidance control parameters of the robotic arm according to the starting position information, the end position information and each obstacle avoidance position information;
[0011] The movement of the robotic arm is controlled according to the obstacle avoidance control parameters.
[0012] In one embodiment, the robotic arm includes a head end joint, and determining the obstacle avoidance position information according to the obstacle intersection area and each process position information includes:
[0013] Determine the process position information located in the obstacle intersection area among the process position information as the position information to be adjusted;
[0014] Each of the position information to be adjusted is offset toward the head end joint to obtain the obstacle avoidance position information of the end joint.
[0015] In one embodiment, the robotic arm includes an intermediate joint, and the method further includes:
[0016] Determining the intermediate joint motion trajectory corresponding to the intermediate joint according to the initial motion trajectory;
[0017] The determining the obstacle avoidance position information according to the obstacle intersection area and each process position information further includes:
[0018] Slicing the motion trajectory of the intermediate joint to obtain process position information of at least one intermediate joint;
[0019] Determine the intermediate joint process position information to be adjusted from each of the intermediate joint process position information according to the obstacle area and / or the obstacle avoidance position information of the terminal joint;
[0020] The process position information of each of the intermediate joints to be adjusted is offset toward the head end joint to obtain the obstacle avoidance position information of the intermediate joint.
[0021] In one embodiment, the obtaining the obstacle avoidance control parameter of the robot arm according to the starting position information, the end position information and each obstacle avoidance position information includes:
[0022] Generate a position array according to the starting point position information, each obstacle avoidance position information and the end point position information;
[0023] An inverse operation is performed according to two adjacent position information in the position array to obtain the obstacle avoidance control parameter.
[0024] In one embodiment, performing an inverse operation based on two adjacent position information of the position array to obtain the obstacle avoidance control parameters of the robotic arm includes:
[0025] Determining the joint offset of the end joint according to two adjacent position information in the position array;
[0026] Determine the transformation matrix of the two adjacent position information according to the joint offset and the joint rotation angle of the end joint, and obtain the inverse matrix of the transformation matrix;
[0027] The angle value of the joint rotation angle is determined according to the inverse matrix and the two adjacent position information.
[0028] In one embodiment, determining the area of obstacles within the range of motion of the robotic arm includes:
[0029] Detect obstacles within the motion range, obtain the length of the obstacle, and determine the area of the obstacle with the obstacle as the center and the obstacle length as the radius.
[0030] In one embodiment, the slicing process is performed on the initial motion trajectory to obtain at least one process position information, including:
[0031] Determining the slicing accuracy according to the joint size information of the end shutdown of the robotic arm;
[0032] Slicing the initial motion trajectory according to the slicing accuracy to obtain a plurality of slicing areas;
[0033] A corresponding piece of process position information is determined according to each of the slice areas.
[0034] In a second aspect, an embodiment of the present application provides a robot arm control device, the robot arm control device comprising:
[0035] A first determination module is used to determine the area of obstacles within the motion range of the robotic arm;
[0036] A second determination module, used to determine an initial motion trajectory according to the starting position information and the end position information of the robotic arm;
[0037] A processing module, used for slicing the initial motion trajectory to obtain at least one process position information;
[0038] A first acquisition module is used to acquire a motion coverage area corresponding to when the end joint of the robot arm moves along the initial motion trajectory, and determine an obstacle intersection area of the motion coverage area and the obstacle area;
[0039] A third determination module, configured to determine at least one obstacle avoidance position information according to the obstacle intersection area and each process position information;
[0040] A second acquisition module, used for acquiring the obstacle avoidance control parameters of the robotic arm according to the starting position information, the end position information and each obstacle avoidance position information;
[0041] A control module is used to control the movement of the robotic arm according to the obstacle avoidance control parameters.
[0042] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is run by the processor, the robot arm control method provided in the first aspect is executed.
[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which executes the robot arm control method provided in the first aspect when running on a processor.
[0044] The robot arm control method provided in the above-mentioned application determines the obstacle area within the movement range of the robot arm; determines the initial movement trajectory according to the starting position information and the end position information of the robot arm; slices the initial movement trajectory to obtain at least one process position information; obtains the movement coverage area corresponding to the end joint of the robot arm when it moves along the initial movement trajectory, and determines the obstacle intersection area of the movement coverage area and the obstacle area; determines at least one obstacle avoidance position information according to the obstacle intersection area and each process position information; obtains the obstacle avoidance control parameters of the robot arm according to the starting position information, the end position information and each obstacle avoidance position information; controls the movement of the robot arm according to the obstacle avoidance control parameters, so as to solve the problem that the robot arm cannot reach the destination point due to being blocked by obstacles during the movement, and greatly improves the space for the robot arm to move and the flexibility of movement. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope of protection of the present application. In each of the drawings, similar components are numbered similarly.
[0046] Figure 1 A schematic diagram of a process of a robotic arm control method provided by an embodiment of the present application is shown;
[0047] Figure 2 A schematic diagram of an application scenario of the robot arm control method provided by an embodiment of the present application is shown;
[0048] Figure 3 A schematic diagram showing another application scenario of the robot arm control method provided in an embodiment of the present application is shown;
[0049] Figure 4 Another schematic diagram of the process of controlling a robot arm provided by an embodiment of the present application is shown;
[0050] Figure 5 Another schematic diagram of a process of controlling a robot arm according to an embodiment of the present application is shown;
[0051] Figure 6 A structural schematic diagram of a robot arm control device provided in an embodiment of the present application is shown.
[0052] Icons: 600 - robot arm control device, 601 - first determination module, 602 - second determination module, 603 - processing module, 604 - first acquisition module, 605 - third determination module, 606 - second acquisition module, 607 - control module. DETAILED DESCRIPTION
[0053] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0054] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0055] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.
[0056] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0057] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0058] Example 1
[0059] The embodiment of the present application provides a robot arm control method, which solves the problem that the robot arm cannot reach the destination point due to being blocked by obstacles during movement, and greatly improves the space for movement and movement flexibility of the robot arm.
[0060] See also Figure 1 , the robot arm control method includes:
[0061] Step S101, determining the area of obstacles within the motion range of the robot arm.
[0062] In this embodiment, the mechanical arm includes a plurality of joints, for example, the mechanical arm includes a head end joint, a terminal joint, or the mechanical arm includes a head end joint, a terminal joint and at least one intermediate joint. Each joint includes a motor, and the mechanical arm is driven to move by the motor. The range of motion of the mechanical arm can be a three-dimensional spherical area with the head end joint as the center and the length of the mechanical arm as the radius, or a circular area with the head end joint as the center and the length of the mechanical arm as the radius, or an arc area with the head end joint as the center and the length of the mechanical arm as the radius, which can be determined according to actual conditions and is not limited here. The scene image of the range of motion of the mechanical arm can be captured by a camera, and the obstacle information can be determined from the scene image based on the image recognition technology, and the obstacle area can be determined according to the obstacle information. Alternatively, the obstacle information can be detected by a proximity sensor, or the obstacle information within the range of motion of the mechanical arm can be identified by other methods, which is not limited here. It should be supplemented that the mechanical arm can be a component of a robot, and the robot can be a robot of various forms, for example, the robot can be a humanoid robot, which is not limited here.
[0063] In this embodiment, step S101 includes:
[0064] Detect obstacles within the motion range, obtain the length of the obstacle, and determine the area of the obstacle with the obstacle as the center and the obstacle length as the radius.
[0065] For example, if the length of the obstacle is 10 cm, the obstacle is taken as the center and 10 cm is the radius to determine the area of the obstacle.
[0066] Step S102, determining an initial motion trajectory according to the starting position information and the ending position information of the robot arm.
[0067] See also Figure 2 The robotic arm includes a head joint A, middle joints B, C and a terminal joint D. The range of motion of the robotic arm can be a fan-shaped range 200 with the head joint A as the center and the length between the head joint A and the terminal joint D as the radius. Obstacles 100 within the fan-shaped range 200 can be identified. At the start time, the middle joint B of the robotic arm is located at position B0, the middle joint C is located at position C0 and the terminal joint D is located at position D0. Positions B0, C0 and D0 can be used as the starting positions of the robotic arm, or position D0 can be used as the starting position of the robotic arm, without limitation. The terminal position information of the robotic arm can be determined based on the actual execution of the task. For example, Figure 1In the example, the position B1 of the middle joint B, the position C1 of the middle joint C and the position D1 of the end joint D are used as the end position information. Alternatively, the position D1 of the end joint D is used as the end position information, which is not limited here.
[0068] When position D0 is used as the starting position of the robot and position D1 is used as the end position information, the initial motion trajectory includes a first initial motion trajectory 201. When positions B0, C0 and D0 are used as the starting position of the robot and positions B1, C1 and D1 are used as the end position information, the initial motion trajectory includes: a first initial motion trajectory 201, a second initial motion trajectory 202 and a third initial motion trajectory 203.
[0069] Step S103, slicing the initial motion trajectory to obtain at least one process position information.
[0070] In this embodiment, step S103 includes:
[0071] Determining the slicing accuracy according to the joint size information of the end shutdown of the robotic arm;
[0072] Slicing the initial motion trajectory according to the slicing accuracy to obtain a plurality of slicing areas;
[0073] A corresponding piece of process position information is determined according to each of the slice areas.
[0074] For example, see Figure 3 , slice processing is performed between the starting point coordinate D0 and the end point coordinate Dn to obtain process coordinates D1, D2, ..., Dn-1. Similarly, slice processing is performed between the starting point coordinate B0 and the end point coordinate Bn to obtain process coordinates B1, B2, ..., Bn-1. Slicing processing is performed between the starting point coordinate C0 and the end point coordinate Cn to obtain process coordinates C1, C2, ..., Cn-1.
[0075] Step S104, obtaining a motion coverage area corresponding to the movement of the end joint of the robot arm along the initial motion trajectory, and determining an obstacle intersection area of the motion coverage area and the obstacle area.
[0076] In this embodiment, the end joint of the robotic arm may have a certain size. When the end joint of the robotic arm moves along the initial motion trajectory, it will cover a certain spatial area. If there is an intersection between the motion coverage area and the obstacle area, it means that the end joint of the robotic arm will collide with an obstacle when moving along the initial motion trajectory. The obstacle intersection area can be understood as an area where a collision may occur and affect the robotic arm's inability to reach the final position.
[0077] Step S105: determining at least one obstacle avoidance position information according to the obstacle intersection area and each process position information.
[0078] See also Figure 4 , step S105 includes:
[0079] Step S1051, determining the process position information located in the obstacle intersection area among the process position information as the position information to be adjusted;
[0080] Step S1052, each of the position information to be adjusted is offset toward the head end joint to obtain the obstacle avoidance position information of the end joint.
[0081] See also Figure 3 , the process coordinate n-1 is the position information to be adjusted. After the process coordinate n-1 is offset toward the head end joint A, the obstacle intersection area is avoided, and the new position information Dn-1 of the end joint is obtained to achieve obstacle avoidance.
[0082] In one embodiment, the robotic arm includes an intermediate joint, and the robotic arm control method further includes: determining an intermediate joint motion trajectory corresponding to the intermediate joint according to the initial motion trajectory.
[0083] Step S1043 also includes: slicing the motion trajectory of the intermediate joint to obtain at least one intermediate joint process position information;
[0084] Determine the intermediate joint process position information to be adjusted from each of the intermediate joint process position information according to the obstacle area and / or the obstacle avoidance position information of the terminal joint;
[0085] The process position information of each of the intermediate joints to be adjusted is offset toward the head end joint to obtain the obstacle avoidance position information of the intermediate joint.
[0086] Please see again Figure 3 The process coordinate n-1 of joint C is the position information to be adjusted. After the process coordinate Cn-1 is offset toward the head end joint A, the obstacle intersection area is avoided, and the new position information Cn-1 of the end joint is obtained to achieve obstacle avoidance.
[0087] Step S106, obtaining obstacle avoidance control parameters of the robot arm according to the starting position information, the end position information and each obstacle avoidance position information.
[0088] Please see again Figure 2If an inverse operation is performed based on the starting point coordinates D0 (x0, y0, z0) and the end point coordinates D1 (x1, y1, z1), the movement directions and angles of the motors of joints A, B, C and D can be obtained, and then the four motors can be directly controlled to move, and their trajectories are roughly in the shape of an arc like the first initial motion trajectory 201. If there is an obstacle 100 on the trajectory, then in this case it is impossible to move from the starting position D0 (x0, y0, z0) to the end position D1 (x1, y1, z1).
[0089] It can be understood that in this embodiment, the starting position information, the end position information and the obstacle avoidance position information can be three-dimensional coordinate information. For example, they can be the starting point coordinates, obstacle avoidance coordinates and end point coordinates respectively. After determining the starting point coordinates (x0, y0, z0), obstacle avoidance coordinates (xi, yi, zi) and end point coordinates (x1, y1, z1), the inverse operation of the two-point coordinates is used to calculate the obstacle avoidance control parameters of the robot arm at each coordinate. The obstacle avoidance control parameters may include movement direction and movement angle, etc.
[0090] Step S107: controlling the movement of the robotic arm according to the obstacle avoidance control parameters.
[0091] The robot arm is driven and controlled according to the obstacle avoidance control parameters of the robot arm, so that the robot arm can bypass obstacles to reach the destination, solving the problem in the prior art that the robot arm's motion trajectory is blocked by obstacles, causing the robot arm to be unable to reach the specified position. Especially for complex scenarios such as engineering logistics, the accuracy of the robot arm's motion trajectory can be ensured, obstacles can be bypassed to reach the destination, operational efficiency can be improved, and the motion trajectory can be accurately reached. The robot arm does not need to use other sensors such as cameras to assist in motion control, which greatly saves costs, greatly reduces the difficulty of development, and also improves stability and reliability. It should be added that the calculation speed can be improved by mainly adjusting the process position information within the obstacle area.
[0092] See also Figure 5 , step S106 includes:
[0093] Step S1061, generating a position array according to the starting position information, each obstacle avoidance position information and the end position information.
[0094] Step S1062: performing an inverse operation based on two adjacent position information of the position array to obtain the obstacle avoidance control parameter.
[0095] In this embodiment, two adjacent position information of the position array can be divided, for example, the first position information and the second position information, as two adjacent position information, the second position information and the third position information. By performing inverse operations on the first position information and the second position information, the obstacle avoidance control parameters of the robot arm moving from the first position information to the second position information can be obtained. By performing inverse operations on the second position information and the third position information, the obstacle avoidance control parameters of the robot arm moving from the second position information to the third position information can be obtained. By performing inverse operations on the two adjacent position information in turn, multiple obstacle avoidance control parameters of the robot arm moving from the starting position through each obstacle avoidance position information to the end position information can be obtained.
[0096] In this embodiment, step S1062 includes:
[0097] Determining the joint offset of the end joint according to two adjacent position information in the position array;
[0098] Determine the transformation matrix of the two adjacent position information according to the joint offset and the joint rotation angle of the end joint, and obtain the inverse matrix of the transformation matrix;
[0099] The angle value of the joint rotation angle is determined according to the inverse matrix and the two adjacent position information.
[0100] For example, it is assumed that two adjacent position information in the position array are coordinate points P A (x a ,y a , z a ) and P B (x b ,y b , z b ), then the coordinate point P A , coordinate point P B The transformation matrix between them is as follows:
[0101]
[0102] Among them, θ is the joint rotation angle around the z axis, x t ,y t , z t is the joint offset, which can be calculated based on the coordinate point P A (x a ,y a , z a ) and P B (x b ,y b , z b ) Calculate the joint offset x t ,y t, z t .
[0103] Furthermore, the following inverse matrix is determined according to the transformation matrix T:
[0104]
[0105] Then according to the inverse matrix, coordinate point P A (x a ,y a , z a ), P B (x b ,y b , z b ), joint offset x t ,y t , z t The following conversion formula is used to determine the angle value of the joint rotation angle.
[0106]
[0107] According to the above conversion formula, the joint offset x t ,y t , z t , coordinate point P A (x a ,y a , z a ) and P B (x b ,y b , z b ) is substituted into the equation, the angle value of the joint rotation angle θ can be obtained, and obstacle avoidance control is performed based on the angle value of the joint rotation angle θ.
[0108] for Figure 3For the actual application scenario, first, determine whether the coordinates of the obstacle are within the range of motion of the robot's mechanical arm. Because the mechanical arm moves in an arc, you only need to substitute the coordinates of the obstacle into the range of motion to determine whether the obstacle is within the arc. If the obstacle is within the arc, the obstacle will block the movement of the mechanical arm, and then the motion trajectory is sliced. Determine the motion trajectory of the end joint of the mechanical arm. For example, take the smallest obstacle as an example, such as 10cm, and derive the circular area with the obstacle as the center and a radius of 10cm as the obstacle area. Determine the intersection of the mechanical arm's motion arc trajectory and the obstacle area, and obtain the coordinate points corresponding to the obstacle area according to the intersection. The mechanical arm motion slicing is performed according to a fixed slicing accuracy (such as 1cm), and several process coordinate points from the end D to DN can be generated. Several process coordinate points located in the intersection are offset for obstacle avoidance adjustment, and the inverse operation of the two adjacent position information is performed based on the adjusted obstacle avoidance position information to obtain the obstacle avoidance control parameters. Based on the obstacle avoidance control parameters, the arm moves to the specified position and flexibly avoids obstacles.
[0109] The robot arm control method provided in the present embodiment determines the obstacle area within the movement range of the robot arm; determines the initial movement trajectory according to the starting position information and the end position information of the robot arm; slices the initial movement trajectory to obtain at least one process position information; obtains the movement coverage area corresponding to the end joint of the robot arm when it moves along the initial movement trajectory, and determines the obstacle intersection area of the movement coverage area and the obstacle area; determines at least one obstacle avoidance position information according to the obstacle intersection area and each process position information; obtains the obstacle avoidance control parameters of the robot arm according to the starting position information, the end position information and each obstacle avoidance position information; controls the movement of the robot arm according to the obstacle avoidance control parameters, so that the robot arm can avoid obstacles to perform tasks, solves the problem that the robot arm cannot reach the destination point due to obstacles blocking the movement, and greatly improves the space for the robot arm to move and the flexibility of movement.
[0110] Example 2
[0111] In addition, an embodiment of the present application provides a robotic arm control device.
[0112] Specifically, Figure 6 As shown, the robot arm control device 600 includes:
[0113] A first determination module 601 is used to determine the area of obstacles within the motion range of the robot arm;
[0114] A second determination module 602 is used to determine an initial motion trajectory according to the starting position information and the ending position information of the robot arm;
[0115] A processing module 603 is used to perform slicing processing on the initial motion trajectory to obtain at least one process position information;
[0116] A first acquisition module 604 is used to acquire a motion coverage area corresponding to when the end joint of the robot arm moves along the initial motion trajectory, and determine an obstacle intersection area of the motion coverage area and the obstacle area;
[0117] A third determination module 605 is used to determine at least one obstacle avoidance position information according to the obstacle intersection area and each process position information;
[0118] A second acquisition module 606 is used to acquire the obstacle avoidance control parameters of the robot arm according to the starting position information, the end position information and each obstacle avoidance position information;
[0119] The control module 607 is used to control the movement of the robotic arm according to the obstacle avoidance control parameters.
[0120] In one embodiment, the robotic arm includes a head end joint, and determining the obstacle avoidance position information according to the obstacle intersection area and each process position information includes:
[0121] Determine the process position information located in the obstacle intersection area among the process position information as the position information to be adjusted;
[0122] Each of the position information to be adjusted is offset toward the head end joint to obtain the obstacle avoidance position information of the end joint.
[0123] In one embodiment, the robotic arm includes an intermediate joint, and the method further includes:
[0124] Determining the intermediate joint motion trajectory corresponding to the intermediate joint according to the initial motion trajectory;
[0125] The determining the obstacle avoidance position information according to the obstacle intersection area and each process position information further includes:
[0126] Slicing the motion trajectory of the intermediate joint to obtain process position information of at least one intermediate joint;
[0127] Determine the intermediate joint process position information to be adjusted from each of the intermediate joint process position information according to the obstacle area and / or the obstacle avoidance position information of the terminal joint;
[0128] The process position information of each of the intermediate joints to be adjusted is offset toward the head end joint to obtain the obstacle avoidance position information of the intermediate joint.
[0129] In one embodiment, the obtaining the obstacle avoidance control parameter of the robot arm according to the starting position information, the end position information and each obstacle avoidance position information includes:
[0130] Generate a position array according to the starting point position information, each obstacle avoidance position information and the end point position information;
[0131] An inverse operation is performed according to two adjacent position information of the position array to obtain the obstacle avoidance control parameter.
[0132] In one embodiment, performing an inverse operation based on two adjacent position information of the position array to obtain the obstacle avoidance control parameters of the robotic arm includes:
[0133] Determining the joint offset of the end joint according to two adjacent position information in the position array;
[0134] Determine the transformation matrix of the two adjacent position information according to the joint offset and the joint rotation angle of the end joint, and obtain the inverse matrix of the transformation matrix;
[0135] The angle value of the joint rotation angle is determined according to the inverse matrix and the two adjacent position information.
[0136] In one embodiment, determining the area of obstacles within the range of motion of the robotic arm includes:
[0137] Detect obstacles within the motion range, obtain the length of the obstacle, and determine the area of the obstacle with the obstacle as the center and the obstacle length as the radius.
[0138] In one embodiment, the slicing process is performed on the initial motion trajectory to obtain at least one process position information, including:
[0139] Determining the slicing accuracy according to the joint size information of the end shutdown of the robotic arm;
[0140] Slicing the initial motion trajectory according to the slicing accuracy to obtain a plurality of slicing areas;
[0141] A corresponding piece of process position information is determined according to each of the slice areas.
[0142] The robot arm control device 600 provided in this embodiment can implement the robot arm control method provided in Example 1, and will not be described again here to avoid repetition.
[0143] The robot arm control device provided in this embodiment determines the obstacle area within the movement range of the robot arm; determines the initial movement trajectory according to the starting position information and the end position information of the robot arm; slices the initial movement trajectory to obtain at least one process position information; obtains the movement coverage area corresponding to the end joint of the robot arm when it moves along the initial movement trajectory, and determines the obstacle intersection area of the movement coverage area and the obstacle area; determines at least one obstacle avoidance position information according to the obstacle intersection area and each process position information; obtains the obstacle avoidance control parameters of the robot arm according to the starting position information, the end position information and each obstacle avoidance position information; controls the movement of the robot arm according to the obstacle avoidance control parameters, so as to solve the problem that the robot arm cannot reach the destination point due to being blocked by obstacles during movement, and greatly improves the space for robot arm activities and movement flexibility.
[0144] Example 3
[0145] In addition, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, the robot arm control method provided in Example 1 is executed.
[0146] The electronic device provided in this embodiment can implement the robot arm control method provided in Example 1, and will not be described again here to avoid repetition.
[0147] Example 4
[0148] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the robot arm control method provided in Example 1 is implemented.
[0149] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0150] The computer-readable storage medium provided in this embodiment can implement the robot arm control method provided in Example 1, and will not be described again here to avoid repetition.
[0151] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.
[0152] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0153] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A robot arm control method, characterized in that: The method comprises: Determine the area of obstacles within the range of motion of the robot arm; Determine an initial motion trajectory according to the starting position information and the ending position information of the robotic arm; Slicing the initial motion trajectory to obtain at least one process position information; Acquire a motion coverage area corresponding to when the end joint of the robotic arm moves along the initial motion trajectory, and determine an obstacle intersection area of the motion coverage area and the obstacle area; Determine at least one obstacle avoidance position information according to the obstacle intersection area and each process position information; Obtaining obstacle avoidance control parameters of the robotic arm according to the starting position information, the end position information and each obstacle avoidance position information; The movement of the robotic arm is controlled according to the obstacle avoidance control parameters.
2. The method according to claim 1, characterized in that The robotic arm includes a head end joint, and the obstacle avoidance position information is determined according to the obstacle intersection area and each process position information, including: Determine the process position information located in the obstacle intersection area among the process position information as the position information to be adjusted; Each of the position information to be adjusted is offset toward the head end joint to obtain the obstacle avoidance position information of the end joint.
3. The method according to claim 2, characterized in that The robotic arm includes an intermediate joint, and the method further includes: Determining the intermediate joint motion trajectory corresponding to the intermediate joint according to the initial motion trajectory; The determining the obstacle avoidance position information according to the obstacle intersection area and each process position information further includes: Slicing the motion trajectory of the intermediate joint to obtain process position information of at least one intermediate joint; Determine the intermediate joint process position information to be adjusted from each of the intermediate joint process position information according to the obstacle area and / or the obstacle avoidance position information of the terminal joint; The process position information of each of the intermediate joints to be adjusted is offset toward the head end joint to obtain the obstacle avoidance position information of the intermediate joint.
4. The method according to claim 1, characterized in that The obtaining the obstacle avoidance control parameter of the robot arm according to the starting position information, the end position information and each obstacle avoidance position information comprises: Generate a position array according to the starting point position information, each obstacle avoidance position information and the end point position information; An inverse operation is performed according to two adjacent position information of the position array to obtain the obstacle avoidance control parameter.
5. The method according to claim 4, characterized in that The performing an inverse operation according to two adjacent position information of the position array to obtain the obstacle avoidance control parameters of the robotic arm includes: Determining the joint offset of the end joint according to two adjacent position information in the position array; Determine the transformation matrix of the two adjacent position information according to the joint offset and the joint rotation angle of the end joint, and obtain the inverse matrix of the transformation matrix; The angle value of the joint rotation angle is determined according to the inverse matrix and the two adjacent position information.
6. The method according to claim 1, characterized in that The determining of the obstacle area within the motion range of the robotic arm comprises: Detect obstacles within the motion range, obtain the length of the obstacle, and determine the area of the obstacle with the obstacle as the center and the obstacle length as the radius.
7. The method according to claim 6, characterized in that The slicing process of the initial motion trajectory to obtain at least one process position information includes: Determining the slicing accuracy according to the joint size information of the end joint of the robotic arm; Slicing the initial motion trajectory according to the slicing accuracy to obtain a plurality of slicing areas; A corresponding piece of process position information is determined according to each of the slice areas.
8. A robot arm control device, characterized in that: The device comprises: A first determination module is used to determine the area of obstacles within the motion range of the robotic arm; A second determination module, used to determine an initial motion trajectory according to the starting position information and the end position information of the robotic arm; A processing module, used for slicing the initial motion trajectory to obtain at least one process position information; A first acquisition module is used to acquire a motion coverage area corresponding to when the end joint of the robot arm moves along the initial motion trajectory, and determine an obstacle intersection area of the motion coverage area and the obstacle area; A third determination module, configured to determine at least one obstacle avoidance position information according to the obstacle intersection area and each process position information; A second acquisition module, used for acquiring the obstacle avoidance control parameters of the robotic arm according to the starting position information, the end position information and each obstacle avoidance position information; A control module is used to control the movement of the robotic arm according to the obstacle avoidance control parameters.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is run by the processor, the robot arm control method according to any one of claims 1 to 7 is executed.
10. A computer-readable storage medium, characterized in that: The computer program is stored therein, and when the computer program is run on a processor, the robot arm control method according to any one of claims 1 to 7 is executed.