Robotic arm motion control method, device, electronic equipment and storage medium
By querying the alternative motion configurations in the predetermined database to correct the motion path of the robotic arm, the problem of high computing resources occupied by robotic arm path planning is solved, rapid obstacle avoidance is achieved and work efficiency is improved.
Patent Information
- Application Number
- CN202411431016.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-10-14
AI Technical Summary
The robotic arm motion path planning occupies a high level of computing resources, especially when facing moving obstacles, new joint motion configurations need to be calculated online to avoid obstacles.
The initial motion path is determined based on the target position and initial position of the manipulator, and when a collision risk is detected, alternative motion configurations in the predetermined database are queried to determine the target motion configuration that meets the predetermined conditions, and the initial motion path is corrected based on this configuration. .
It realizes rapid updating of motion paths to avoid obstacles when there is a risk of collision, reduces the occupation of computing resources and improves work efficiency.
Smart Images

Figure CN118952225B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent robots, and in particular to a method, device, electronic equipment and storage medium for controlling the motion of a robot arm. Background Art
[0002] In the control scenario of the robot arm, the problem of path and start and end point selection in the task space needs to be converted online to the configuration space that provides joint motion configuration. Especially when facing moving obstacles, it is necessary to calculate the new joint motion configuration online and update the motion path to avoid obstacles, resulting in extremely high computing costs and resource usage. Summary of the invention
[0003] The embodiments of the present application provide a robot arm motion control method, device, electronic device and storage medium to solve the technical problem that path planning occupies a high computing resource.
[0004] According to one aspect of an embodiment of the present application, a method for controlling a robotic arm motion is provided, including: determining an initial motion path based on a target position and an initial position of the robotic arm; during movement of the robotic arm along the initial motion path, in response to detecting a collision risk on the initial motion path, querying a predetermined database for alternative motion configurations corresponding to the target position; determining a target motion configuration that meets predetermined conditions among the alternative motion configurations; and correcting the initial motion path based on the target motion configuration.
[0005] Further, determining the target motion configuration that meets a predetermined condition from among the candidate motion configurations includes: determining the candidate motion configuration that has no collision risk and has the smallest change in the joint posture of the robot arm as the target motion configuration.
[0006] Furthermore, the determination of the alternative motion configuration with no collision risk and the smallest change in the joint posture of the robot arm as the target motion configuration includes: determining the current motion configuration of the robot arm based on the initial motion path; respectively determining the mean square errors between multiple alternative motion configurations and the current motion configuration; detecting whether there is a collision risk among the multiple alternative motion configurations; and determining the alternative motion configuration with no collision risk and the smallest mean square error as the target motion configuration.
[0007] Further, the determining of the initial motion path based on the target position and initial position of the robotic arm includes: generating a three-dimensional grid diagram of the space in which the robotic arm is currently located; based on the target position and initial position of the robotic arm, determining at least one path node without collision risk in the three-dimensional grid diagram; wherein the distance cost required to reach the target position from the initial position through the path node is the lowest; and determining the initial motion path based on the initial position, the at least one path node and the target position.
[0008] Furthermore, the method further includes: updating the three-dimensional grid map based on a predetermined frequency; and updating the initial motion path based on the updated three-dimensional grid map.
[0009] Furthermore, the method also includes: determining at least one target position; determining a predetermined step length based on the joints included in the robotic arm and the boundaries of the joints; generating a corresponding alternative motion configuration for each target position based on the predetermined step length and a predetermined error threshold; and storing the target position and the corresponding alternative motion configuration in a predetermined database.
[0010] Further, based on the predetermined step size and the predetermined error threshold, a corresponding alternative motion configuration is generated for each of the target positions, including: determining a predetermined number of alternative motion configurations corresponding to each of the target positions based on the predetermined error threshold; based on a predetermined step size, the links included in the robotic arm, and the joints between the links, generating a predetermined number of alternative motion configurations for the target position.
[0011] According to another aspect of an embodiment of the present application, a robotic arm motion control device is also provided, including: a planning module, used to determine an initial motion path based on a target position and an initial position of the robotic arm; a query module, used to query a predetermined database for alternative motion configurations corresponding to the target position in response to detecting a collision risk in the initial motion path during the movement of the robotic arm along the initial motion path; a determination module, used to determine a target motion configuration that meets predetermined conditions among the alternative motion configurations; and a correction module, used to correct the initial motion path based on the target motion configuration.
[0012] Furthermore, the determination module is specifically used to: determine the alternative motion configuration with no collision risk and the smallest change in the joint posture of the robot arm as the target motion configuration.
[0013] Furthermore, the determination module is specifically used to: determine the current motion configuration of the robotic arm based on the initial motion path; respectively determine the mean square errors between multiple alternative motion configurations and the current motion configuration; detect whether there is a collision risk among the multiple alternative motion configurations; and determine the alternative motion configuration with no collision risk and the smallest mean square error as the target motion configuration.
[0014] Furthermore, the planning module is specifically used to: generate a three-dimensional grid map of the space where the robotic arm is currently located; based on the target position and initial position of the robotic arm, determine at least one path node in the three-dimensional grid map where there is no collision risk; wherein the distance cost required to reach the target position from the initial position through the path node is the lowest; and determine the initial motion path based on the initial position, the at least one path node and the target position.
[0015] Furthermore, the planning module is further used to: update the three-dimensional grid map based on a predetermined frequency; and update the initial motion path based on the updated three-dimensional grid map.
[0016] Furthermore, the planning module is also used to: determine at least one target position; determine a predetermined step length based on the joints included in the robotic arm and the boundaries of the joints; generate a corresponding alternative motion configuration for each target position based on the predetermined step length and a predetermined error threshold; and store the target position and the corresponding alternative motion configuration in a predetermined database.
[0017] Furthermore, the planning module is also used to: determine a predetermined number of alternative motion configurations corresponding to each target position based on a predetermined error threshold; and generate a predetermined number of alternative motion configurations for the target position based on a predetermined step size, the links included in the robotic arm, and the joints between the links.
[0018] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the steps in the above method are executed when the program is run.
[0019] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the program stored in the memory.
[0020] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.
[0021] The embodiment of the present application proposes a method, device, electronic device and storage medium for controlling the motion of a robotic arm. The method determines an initial motion path based on the target position and initial position of the robotic arm; in the process of the robotic arm moving along the initial motion path, in response to detecting that there is a collision risk in the initial motion path, querying the alternative motion configuration corresponding to the target position in a predetermined database; determining a target motion configuration that meets predetermined conditions in the alternative motion configuration; and correcting the initial motion path based on the target motion configuration. In this way, when there is a risk of collision, it is only necessary to query the alternative motion configuration in the database according to the existing corresponding relationship and select the most suitable configuration therefrom to achieve path update to complete obstacle avoidance. There is no need to convert the start and end point path into the desired optimal configuration through online calculation, which greatly reduces the resources required for calculation and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0023] Figure 1 is a flow chart of a method for controlling motion of a robotic arm according to an embodiment of the present application;
[0024] Figure 2 is a flow chart of a method for controlling motion of a robotic arm according to an embodiment of the present application;
[0025] Figure 3 is a structural diagram of a robot arm motion control device according to an embodiment of the present application;
[0026] Figure 4 It is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] In this embodiment, a method for controlling the motion of a robot arm is provided. Figure 1 is a flow chart of a method for controlling the motion of a robot arm according to an embodiment of the present application. Figure 1 As shown, the process includes the following steps:
[0030] S10: determining an initial motion path based on the target position and initial position of the robotic arm;
[0031] S20: During the movement of the robot arm along the initial motion path, in response to detecting that there is a collision risk in the initial motion path, querying a predetermined database for an alternative motion configuration corresponding to the target position;
[0032] S30: determining a target motion configuration that meets a predetermined condition among the candidate motion configurations;
[0033] S40: Correcting the initial motion path based on the target motion configuration.
[0034] In this embodiment, the robot arm may be a mechanically controlled arm with one or more joints, which may work autonomously or perform operations such as gripping and moving in collaboration with humans. The target position may refer to the final position that the end of the robot arm needs to reach, and the initial position may refer to the initial position where the motion path of the end of the robot arm begins. Here, the end of the robot arm refers to the execution end of the robot arm used to perform an operation, such as the gripping end used to grip an object.
[0035] In one embodiment, determining the initial motion path may refer to determining the initial motion path of the end of the robot arm from the initial position to the target position in the task space. Here, the initial motion path may be the shortest motion path of the end of the robot arm from the initial position to the target position. Exemplarily, it may be determined by The algorithm determines this initial motion path.
[0036] In one embodiment, the initial motion path has a collision risk, which may refer to the possibility of collision of the end of the robot arm along the initial motion path, for example, the robot arm may collide with a worker, other fixed obstacles or moving obstacles. It may include the possibility of collision of at least one of the end of the robot arm, the robot arm connecting rod and the robot arm joint when the end of the robot arm follows the initial motion path. The joint connects two adjacent connecting rods.
[0037] In one embodiment, when the robot arm moves along the initial motion path, it is detected that there is a collision risk in the initial motion path, which may refer to detecting that an obstacle that may cause a collision appears on the part of the path where the robot arm has not completed the movement in the initial motion path. For example, the initial motion path is from the initial position To the target location , when the robot moves to the first position in the initial motion path When arrive If a worker appears on the path between the vehicles, it is determined that there is a collision risk.
[0038] In one embodiment, a predetermined database may store a plurality of sets of correspondences between target positions and alternative motion configurations, and each set of correspondences may include a target position and at least one alternative motion configuration corresponding to the target position. The alternative motion configuration may refer to the motion configuration required for the end of the robot arm to move to the target position. The motion configuration may refer to the joint configuration of the robot arm during the movement of a motion path.
[0039] In one embodiment, the alternative motion configurations corresponding to the target position may include alternative motion configurations corresponding to the target position and the initial position, that is, the corresponding alternative motion configurations are motion configurations required to move from the corresponding initial position to the corresponding target position.
[0040] In one embodiment, querying the candidate motion configurations corresponding to the target position may refer to querying all the candidate motion configurations corresponding to the target position. Step S30 may include: selecting a target motion configuration that meets a predetermined condition from among all the candidate motion configurations corresponding to the target position.
[0041] In one embodiment, satisfying the predetermined condition may include at least one of the following: minimum change relative to the initial motion path, minimum motion path length, minimum joint motion amplitude, no collision risk, etc. At this time, the selected target motion configuration is the motion configuration that best suits the current situation of the robot arm among all the alternative motion configurations.
[0042] In one embodiment, correcting the initial motion path based on the target motion configuration may include: correcting the initial motion path based on the target motion configuration, and controlling the manipulator to move along the corrected motion path. Here, the target motion configuration may include the motion configuration of the joints of the manipulator, such as angle changes of the joints, coordination changes of the joints, etc.
[0043] In one embodiment, when there are multiple alternative motion configurations among all alternative motion configurations that meet predetermined conditions, one is arbitrarily selected from the multiple alternative motion configurations that meet the predetermined conditions as the target motion configuration, or the one with the highest historical usage times or historical usage frequency is selected from the multiple alternative motion configurations that meet the predetermined conditions as the target motion configuration.
[0044] In this way, when there is a risk of collision, you only need to query the alternative configurations in the database according to the existing correspondence and select the most suitable configuration from them to update the motion path to achieve obstacle avoidance. There is no need to obtain the expected optimal configuration based on the start and end point positions through online calculation, which greatly reduces the resources required for calculation and improves work efficiency.
[0045] In some embodiments, step S30 may include:
[0046] The alternative motion configuration with no collision risk and the smallest change in the joint posture of the robot arm is determined as the target motion configuration.
[0047] In one embodiment, the minimum change in the joint posture of the robotic arm may include the minimum change in the joint posture of the robotic arm compared to the initial motion path, or the minimum change in the joint posture compared to the current posture of the robotic arm. For example, the minimum change in the joint posture of the robotic arm may mean that among all the alternative motion configurations, the target motion configuration has the smallest change compared to the motion configuration corresponding to the initial motion path.
[0048] In one embodiment, the minimum change in the joint posture of the robotic arm may refer to the minimum change in the joint posture of the robotic arm when it is adjusted from the current posture to the target motion configuration. For example, the minimum change in the joint posture of the robotic arm when it is adjusted from the current posture to the posture of the target motion configuration at the current position.
[0049] In one embodiment, determining the candidate motion configuration with no collision risk and minimal change in the joint posture of the robot arm as the target motion configuration may include:
[0050] Determine the current motion configuration of the robotic arm based on the initial motion path; respectively determine the mean square errors between multiple alternative motion configurations and the current motion configuration; detect whether there is a collision risk among the multiple alternative motion configurations; and determine the alternative motion configuration with no collision risk and the smallest mean square error as the target motion configuration.
[0051] In one embodiment, the current motion configuration may refer to the joint configuration required for the robot arm to move along the initial motion path, for example, it may include the joint configuration or joint posture corresponding to the robot arm moving along the initial motion path to the current position.
[0052] In one embodiment, the current motion configuration is calculated With multiple alternative motion configurations The mean square error is also called the root mean square error (RMSE). The mean square error indicates the error amplitude between the alternative motion configuration and the current motion configuration, that is, the magnitude of the change. The larger the mean square error, the greater the change in the robot arm joint posture required to adjust to the alternative motion configuration. Therefore, the alternative motion configuration with the smallest mean square error is selected, and the robot arm joint posture change required during adjustment is the smallest.
[0053] In one embodiment, detecting whether the multiple alternative motion configurations have a collision risk may refer to determining whether the alternative motion configurations have a collision risk based on a first model corresponding to the robotic arm and a second model corresponding to an obstacle with a collision risk. The obstacle may be a person or other moving or fixed object. The first model may be a three-dimensional grid map corresponding to the space where the robotic arm is located, and the second model may be a cylinder model corresponding to the obstacle.
[0054] In one embodiment, determining whether an alternative motion configuration has a collision risk based on a first model corresponding to the robotic arm and a second model corresponding to an obstacle with a collision risk may include: determining a minimum distance between the first model and the second model; and determining that the alternative motion configuration has a collision risk when the minimum distance is less than a predetermined threshold. The predetermined threshold may be 0 or a pre-set safety distance.
[0055] Exemplarily, the first model corresponding to the robotic arm is represented as , is the motion configuration of the robot arm, and the second model corresponding to the obstacle such as the worker in the task space is expressed as , represents a three-dimensional space. Then the collision risk can be defined as: , where d represents the distance.
[0056] In this way, by choosing a new motion configuration with no collision risk and the smallest joint change compared to the current motion configuration, it is possible to reduce the amplitude of the joint posture change of the robot arm on the basis of avoiding the collision impact of moving personnel on the established motion path, select the most efficient change state for adjustment, and further improve work efficiency.
[0057] In some embodiments, step S10 may include:
[0058] Generate a three-dimensional grid map of the space where the robot arm is currently located;
[0059] Based on the target position and the initial position of the robot arm, at least one path node without collision risk is determined in the three-dimensional grid map; wherein the distance cost required to reach the target position from the initial position through the path node is the lowest;
[0060] An initial motion path is determined based on the initial position, the at least one path node, and the target position.
[0061] In one embodiment, generating a three-dimensional grid map of the space where the robot arm is currently located may include: generating a three-dimensional grid map of the space where the robot arm is currently located based on the space where the robot arm is currently located and the position of an object in the space where the robot arm is currently located. Here, the position of the object may refer to the position of an obstacle that causes a collision risk.
[0062] In one embodiment, generating a three-dimensional grid map of the space where the robot arm is currently located may include: generating a three-dimensional grid map of the space where the robot arm is currently located in the task space. Here, the task space is used to generate and store a motion path formed by an initial position and a target position of the robot arm, and the joint motion configuration corresponding to the motion path is generated and stored in the configuration space.
[0063] In one embodiment, the three-dimensional grid graph includes a plurality of cells, and the center of each cell is a position, i.e., a node, i.e., the node x at the end of the robot arm in the space. The initial position is , assuming the current position is , the next position to be determined , determined in subsequent positions that do not overlap with any obstacles.
[0064] In one embodiment, at least one path node is determined in all positions of the three-dimensional grid graph. Determining the initial motion path based on the initial position, the at least one path node and the target position may refer to forming an initial motion path based on the initial position, the at least one path node and the target position.
[0065] In one embodiment, the current location is , the next path node to be determined is the position It is the node closest to the current position without collision risk. The target position and the initial position can be regarded as one of the path nodes.
[0066] In one embodiment, the distance cost required to reach the target position from the initial position through the path node is the lowest, which may refer to the shortest distance required to reach the target position from the initial position through the path node. For example, the path node is located on the shortest path from the initial position to the target position, that is, the initial motion path is the shortest path from the initial position to the target position.
[0067] In one embodiment, the distance cost can be determined based on the Euclidean distance from the path node to the target location and the distance cost corresponding to the previous path node before the path node. For example, the distance cost can be equal to the sum of the Euclidean distance and the distance cost of the previous path node.
[0068] Exemplarily, generating a three-dimensional grid diagram of the space where the robot is currently located may include: gridding the working frame of the robot to generate a three-dimensional grid unit. The node is the path node, located at the center of the cell, indicating the position of the end effector in the task space. Then, if the end effector is at the current node , the next path point of the end effector , will search from subsequent nodes that do not overlap with any obstacles.
[0069] For each reachable and executable node , the next node Based on the shortest distance selection, it is defined as follows: .in From the initial position arrive Passing Node The total distance cost, It is a slave node To Node The Euclidean distance cost, Indicates from To Node By planning the path The actual distance cost is as follows: .in Is a node To Node The distance cost, It is a slave node To Node The node with the smallest total distance cost is selected as , until the end effector reaches the target node.
[0070] In this way, the initial motion path composed of path nodes determined based on the shortest path principle is the shortest path without collision risk between the initial position and the target position, which can further improve the movement efficiency of the robot arm. The path can be reset later when there is a collision risk to reduce the collision risk.
[0071] In some embodiments, after step S10, the method may further include:
[0072] updating the three-dimensional grid map based on a predetermined frequency;
[0073] The initial motion path is updated based on the updated three-dimensional grid map.
[0074] In one embodiment, updating the three-dimensional grid map may refer to updating the three-dimensional grid map based on dynamic changes in the space where the robotic arm is located.
[0075] For example, in a dynamic environment, in order for the end effector's path planning to be able to know the worker's position in real time , the grid map needs to be updated in real time. Is the starting point for the update. The Open list contains all the successor nodes without obstacles. The list contains the cost function values of the successor nodes without obstacles. First, consider the moving obstacles as relatively stationary and plan from arrive The path points of each local path are based on Next, the specific step length is determined based on the map update frequency. , replan the local path and generate arrive All path planning .
[0076] In this way, in response to real-time changes in the dynamic environment, such as the movement of workers or changes in the position of movable objects, the three-dimensional grid map and the initial motion path can be updated in real time, which is conducive to the accurate detection of collision risks.
[0077] In this embodiment, a method for controlling the motion of a robot arm is provided. Figure 2 is a flow chart of a method for controlling the motion of a robot arm according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0078] S11: Determine at least one target position;
[0079] S21: determining a predetermined step length based on the joints included in the robotic arm and the boundaries of the joints;
[0080] S31: generating a corresponding candidate motion configuration for each target position based on a predetermined step length and a predetermined error threshold;
[0081] S41: storing the target position and the corresponding candidate motion configuration in a predetermined database;
[0082] S51: Determine an initial motion path based on the target position and initial position of the robot arm;
[0083] S61: During the movement of the robot arm along the initial motion path, in response to detecting that there is a collision risk in the initial motion path, querying a predetermined database for an alternative motion configuration corresponding to a target position;
[0084] S71: Determine a target motion configuration that meets a predetermined condition from among the candidate motion configurations;
[0085] S81: Correcting the initial motion path based on the target motion configuration.
[0086] In this embodiment, the specific implementation methods and related embodiments of steps S51-S81 can refer to the specific implementation methods and related embodiments of steps S10-S40 in the aforementioned embodiment, and will not be repeated here.
[0087] In one embodiment, the alternative motion configurations are generated based on forward kinematics. The boundaries of the joints may refer to the range of motion of the joints constituting the robot arm and / or the connecting rods connected to the joints. The predetermined step size and the predetermined error threshold determine the number of alternative motion configurations corresponding to the target position.
[0088] In one embodiment, the predetermined step length is a joint adjustment step length associated with a change in joint angle. Step S31 may include: determining the joint angle based on the boundary of the joint and the predetermined step length. Based on the change of the joint angle and the predetermined error threshold, determine each target position to generate a corresponding alternative motion configuration. The predetermined error threshold ζ is a pre-set value, and the predetermined error threshold is closely aligned with the grid size of the path node stored in the predetermined database.
[0089] Exemplarily, the predetermined database is generated based on forward kinematics. The kinematic equations are used to calculate the position of the end using the robot parameters (such as the robot joint angles and the robot link lengths). Assume that a robot is characterized by a series of q links. The angle of each joint is Each joint is represented as a local coordinate system, for example, the three-axis coordinates are . Robotic arm connecting rod is considered as the coordinate change between two consecutive joints. The rotation and translation changes are represented by the following matrices:
[0090]
[0091] in, Indicates from Around arrive The angle change, express Around arrive The angle change, Indicates along The last link is the link closest to the end of the robot arm. The change of is obtained by the following equation: .in, The translational portion of is the position of the end effector. , and The value of depends on the type of robot. Finally, considering that the database needs to be based on a certain Provides configuration of alternative motion configuration sets , so that the end effector position The configurations within the task space error limit, i.e., the predetermined error threshold ζ, are classified as follows: The elements of Among them, the end effector position Configuration with robot arm motion The relationship between is expressed based on the forward kinematics of the robot arm as , express The second norm of the error between y and x.
[0092] In this way, the joint configuration step obtained based on the joints and joint boundaries is used to generate alternative motion configurations in combination with the error limit threshold of the joint activity, so that at least one set of joint activity configurations required to reach each target position can be accurately obtained, which is conducive to subsequent accurate search and application in the database.
[0093] In some embodiments, step S31 may include:
[0094] Determining a predetermined number of alternative motion configurations corresponding to each of the target positions based on a predetermined error threshold;
[0095] A predetermined number of candidate motion configurations are generated for the target position based on a predetermined step length, links included in the robot arm, and joints between the links.
[0096] In one embodiment, determining the predetermined number of alternative motion configurations corresponding to each target position based on a predetermined error threshold may include: determining the predetermined number of alternative motion configurations corresponding to each target position based on a predetermined step length and a predetermined error threshold.
[0097] In one embodiment, the predetermined numbers corresponding to different target positions may be the same or different. Generating a predetermined number of alternative motion configurations for the target position based on a predetermined step length, the connecting rods included in the robotic arm, and the joints between the connecting rods may include: generating a predetermined number of alternative motion configurations for the target position based on a predetermined step length, a change in the position of the connecting rods included in the robotic arm, and a change in the angle of the joints between the connecting rods.
[0098] The change in the position of the connecting rod may be determined according to the change in the angle of the joint between the connecting rods and the rotation and translation of the joint between the connecting rods.
[0099] In this way, the predetermined step size is related to the joint boundary, and the predetermined error threshold is related to the error limit of the joint movement. The number of alternative motion configurations determined by these two parameters can more accurately characterize the joint changes required to reach the target position and the maximum boundary of the range of motion, thereby maximizing the number of alternative motion configurations while controlling the error, so as to provide more flexible selection of the target motion configuration for application when there is a risk of collision in the future.
[0100] As a possible implementation, a method for controlling the motion of a robotic arm is provided, comprising:
[0101] The position of the end of the robot arm, i.e. the actuator, is Indicates and ,in is the task state in the three-dimensional task space. The motion configuration of the robot arm is expressed as ,and ,in yes The configuration state in the configuration space. In the task space, there is a configuration The area occupied by the robot arm is represented as The calculation of the occupied area is based on the forward kinematics of the robot. It takes into account the lengths and radii of the individual robot links, as well as the precise position offsets associated with the robot joints. End effector position Configuration with robot arm The relationship between is based on the forward kinematics of the robot, such as: ,in represents forward dynamics. To meet safety requirements, the robot motion control must take workers into account, and they can be considered as moving obstacles. The area occupied by the worker in the task space is In addition, considering the entire robot body, the dangerous robot state is marked as ,in is defined as: , Represents the empty set.
[0102] Here, the safe task state and robot arm configuration are defined as follows:
[0103] Unobstructed executor status in task space: , that is, in space X except outside the area.
[0104] Barrier-free robot configuration in configuration space: , that is, the alternative motion configuration set Medium Other sports configurations.
[0105] Assume that the robot arm needs to plan Step from the initial state Move to the target state C, in the The iterative position of the end effector at step 1 is marked as , from the initial position Move to target location The motion path of the end effector can be expressed as This embodiment does not consider the direction of the robot arm, and aims to generate the shortest collision-free path for the robot arm motion control, which can be expressed as the following optimization problem:
[0106]
[0107] Constraints: (4b)
[0108] (4c)
[0109] (4d)
[0110] (4e)
[0111] in, and are the minimum and maximum distances between two consecutive path points, It is The joint configuration of the robot arm during the step, and and are the robot arm states planned in the task space and configuration space, respectively, and q is the number of dimensions. Note that during human-machine collaboration, workers may move continuously. and Changes are possible at every step.
[0112] Formula (4b) shows that the planner needs to ensure the safety of the end effector in the task space. In order to ensure that the task can be executed efficiently and safely, formula (4c) is introduced to limit the distance between path points to a certain range. In order to ensure that the joint configuration matches the position of the end effector, a nonlinear mapping formula (4d) is introduced. In order to ensure that the entire robot arm is collision-free, formula (4e) is introduced. Although (4e) includes (4b), (4b) is replaced by The algorithm determines , while formula (4e) is determined by the motion path reset in the configuration space.
[0113] The robot workspace is converted into a 3D mesh in real time. In order to satisfy Formula (4b) in the task space, we use The algorithm removes the node containing the worker and Plan the path of the end effector.
[0114] Equation (4d) describes a highly nonlinear mapping from joint configurations to end-effector positions. Robotic arm motion is usually controlled in configuration space. To find the configuration , so that the robot can reach the desired path point , the traditional method uses the inverse kinematics algorithm:
[0115] ,
[0116] in , indicating that The pseudo-inverse of the Jacobian matrix of the manipulator is calculated at . In the case of , since the robot arm is kinematically cumbersome, the kinematics are usually the desired provides an optimization-based solution. However, if collision checking is integrated into inverse kinematics, the online It is very difficult to use forward kinematics to build a joint configuration database offline. Such a database provides multiple Therefore, instead of solving a collision-checked configuration online directly , but pre-compute the expected There are multiple configuration candidates, which naturally satisfy formula (4d).
[0117] Formula (4e) requires that there should be no collision between the robot and the worker. This constraint is satisfied in the configuration space through the Online Mechanical Arm Reconfigure Mechanism (OMRM). middle, OMRM will , reconfiguration cost and collision checking to select an optimal joint configuration from the database Optimal joint configuration replace , so that .
[0118] By solving the established optimization problem in real time, the end effector follows the shortest planned path during the entire task execution process, and there is no collision between the robot body and the worker. The path planning algorithm processes each path point of the end effector in the task space If the joint configuration obtained from the actual robot arm In case of a collision with a worker, OMRM will handle the reconfiguration of the robot arm in the configuration space to avoid the obstacle.
[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, 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, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0120] In this embodiment, a robot arm motion control device is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0121] Figure 3 is a structural block diagram of a robot arm motion control device according to an embodiment of the present application, such as Figure 3 As shown, the device includes: a planning module 100, used to determine an initial motion path based on a target position and an initial position of a robot arm; a query module 200, used to query an alternative motion configuration corresponding to the target position in a predetermined database in response to detecting a collision risk in the initial motion path during the movement of the robot arm along the initial motion path; a determination module 300, used to determine a target motion configuration that meets a predetermined condition in the alternative motion configurations; and a correction module 400, used to correct the initial motion path based on the target motion configuration.
[0122] Furthermore, the determination module 300 is specifically used to determine the candidate motion configuration with no collision risk and the smallest change in the joint posture of the robot arm as the target motion configuration.
[0123] Furthermore, the determination module 300 is specifically used to: determine the current motion configuration of the robotic arm based on the initial motion path; respectively determine the mean square errors between multiple alternative motion configurations and the current motion configuration; detect whether there is a collision risk among the multiple alternative motion configurations; and determine the alternative motion configuration with no collision risk and the smallest mean square error as the target motion configuration.
[0124] Furthermore, the planning module 100 is specifically used to: generate a three-dimensional grid map of the space where the robot arm is currently located; based on the target position and initial position of the robot arm, determine at least one path node in the three-dimensional grid map where there is no collision risk; wherein the distance cost required to reach the target position from the initial position through the path node is the lowest; and determine the initial motion path based on the initial position, the at least one path node and the target position.
[0125] Furthermore, the planning module 100 is further configured to: update the three-dimensional grid map based on a predetermined frequency; and update the initial motion path based on the updated three-dimensional grid map.
[0126] Furthermore, the planning module 100 is also used to: determine at least one target position; determine a predetermined step length based on the joints included in the robotic arm and the boundaries of the joints; generate a corresponding alternative motion configuration for each target position based on the predetermined step length and a predetermined error threshold; and store the target position and the corresponding alternative motion configuration in a predetermined database.
[0127] Furthermore, the planning module 100 is also used to: determine a predetermined number of alternative motion configurations corresponding to each target position based on a predetermined error threshold; and generate a predetermined number of alternative motion configurations for the target position based on a predetermined step size, the links included in the robotic arm, and the joints between the links.
[0128] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0129] An embodiment of the present application also provides an electronic device, which may be a robot or used in a robot. Figure 4 is a structural diagram of an electronic device according to an embodiment of the present application, such as Figure 4 As shown, it includes a processor 41, a communication interface 42, a memory 43 and a communication bus 44, wherein the processor 41, the communication interface 42 and the memory 43 communicate with each other through the communication bus 44, and the memory 43 is used to store computer programs; the processor 41 is used to implement the following steps when executing the program stored in the memory 43: determining an initial motion path based on the target position and the initial position of the robot arm; during the movement of the robot arm along the initial motion path, in response to detecting that there is a collision risk in the initial motion path, querying the alternative motion configuration corresponding to the target position in a predetermined database; determining a target motion configuration that meets a predetermined condition in the alternative motion configuration; and correcting the initial motion path based on the target motion configuration.
[0130] Further, determining the target motion configuration that meets a predetermined condition from among the candidate motion configurations includes: determining the candidate motion configuration that has no collision risk and has the smallest change in the joint posture of the robot arm as the target motion configuration.
[0131] Furthermore, the determination of the alternative motion configuration with no collision risk and the smallest change in the joint posture of the robot arm as the target motion configuration includes: determining the current motion configuration of the robot arm based on the initial motion path; respectively determining the mean square errors between multiple alternative motion configurations and the current motion configuration; detecting whether there is a collision risk among the multiple alternative motion configurations; and determining the alternative motion configuration with no collision risk and the smallest mean square error as the target motion configuration.
[0132] Further, the determining of the initial motion path based on the target position and initial position of the robotic arm includes: generating a three-dimensional grid diagram of the space in which the robotic arm is currently located; based on the target position and initial position of the robotic arm, determining at least one path node without collision risk in the three-dimensional grid diagram; wherein the distance cost required to reach the target position from the initial position through the path node is the lowest; and determining the initial motion path based on the initial position, the at least one path node and the target position.
[0133] Furthermore, the method further includes: updating the three-dimensional grid map based on a predetermined frequency; and updating the initial motion path based on the updated three-dimensional grid map.
[0134] Furthermore, the method also includes: determining at least one target position; determining a predetermined step length based on the joints included in the robotic arm and the boundaries of the joints; generating a corresponding alternative motion configuration for each target position based on the predetermined step length and a predetermined error threshold; and storing the target position and the corresponding alternative motion configuration in a predetermined database.
[0135] Further, based on the predetermined step size and the predetermined error threshold, a corresponding alternative motion configuration is generated for each of the target positions, including: determining a predetermined number of alternative motion configurations corresponding to each of the target positions based on the predetermined error threshold; based on a predetermined step size, the links included in the robotic arm, and the joints between the links, generating a predetermined number of alternative motion configurations for the target position.
[0136] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0137] The communication interface is used for communication between the above terminal and other devices.
[0138] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0139] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0140] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the robot arm motion control method described in any of the above embodiments.
[0141] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the robot arm motion control method described in any one of the above embodiments.
[0142] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0143] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
[0144] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A method for controlling the motion of a robotic arm, characterized in that: include: Determine an initial motion path based on the target position and initial position of the robot arm; During the movement of the robot arm along the initial motion path, in response to detecting that there is a collision risk on the initial motion path, querying a predetermined database for an alternative motion configuration corresponding to the target position; determining a current motion configuration of the robotic arm based on the initial motion path; determining mean square errors between a plurality of candidate motion configurations and the current motion configuration, respectively; detecting whether the plurality of candidate motion configurations have a collision risk; Determine the candidate motion configuration with no collision risk and the smallest mean square error as the target motion configuration; The initial motion path is modified based on the target motion configuration.
2. The method according to claim 1, characterized in that The determining of the initial motion path based on the target position and the initial position of the robot arm comprises: Generate a three-dimensional grid map of the space where the robot arm is currently located; Based on the target position and the initial position of the robot arm, at least one path node without collision risk is determined in the three-dimensional grid map; wherein the distance cost required to reach the target position from the initial position through the path node is the lowest; An initial motion path is determined based on the initial position, the at least one path node, and the target position.
3. The method according to claim 2, characterized in that The method further comprises: updating the three-dimensional grid map based on a predetermined frequency; The initial motion path is updated based on the updated three-dimensional grid map.
4. The method according to claim 1, characterized in that: The method further comprises: determining at least one target location; Determining a predetermined step length based on the joints included in the robotic arm and the boundaries of the joints; Based on the predetermined step length and the predetermined error threshold, a corresponding alternative motion configuration is generated for each target position; the predetermined step length is a joint adjustment step length related to the change of the joint angle; the predetermined error threshold is related to the error limit of the joint movement; The target position and the corresponding candidate motion configuration are stored in a predetermined database.
5. The method according to claim 4, characterized in that The generating a corresponding candidate motion configuration for each target position based on the predetermined step length and the predetermined error threshold comprises: Determining a predetermined number of alternative motion configurations corresponding to each of the target positions based on a predetermined error threshold; A predetermined number of candidate motion configurations are generated for the target position based on a predetermined step length, links included in the robot arm, and joints between the links.
6. A robot arm motion control device, characterized in that: include: A planning module for determining an initial motion path based on the target position and initial position of the robot arm; A query module, configured to query a predetermined database for an alternative motion configuration corresponding to the target position in response to detecting that there is a collision risk on the initial motion path during the movement of the robot arm along the initial motion path; a determination module, configured to determine a current motion configuration of the robotic arm based on the initial motion path; determining mean square errors between a plurality of candidate motion configurations and the current motion configuration, respectively; detecting whether the plurality of candidate motion configurations have a collision risk; Determine the candidate motion configuration with no collision risk and the smallest mean square error as the target motion configuration; A correction module is used to correct the initial motion path based on the target motion configuration.
7. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the robot arm motion control method as claimed in any one of claims 1 to 5 when executed by the processor.
8. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the robot arm motion control method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Initial reference generation for robot optimization motion planning
CN113552877A
Picking mechanical arm multi-thread path planning method based on improved ABIT method
CN118238149A