Obstacle Avoidance Method, Device and Intelligent Device
By calculating and mapping joint repulsion to the end, and determining the position and joint angle with the end preset attitude, the problem of task failure when the robot avoids obstacles is solved, and the task success rate and compliance of the end posture are improved.
Patent Information
- Application Number
- CN202211014783.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-08-23
AI Technical Summary
Existing robots may cause the task currently being executed to fail when avoiding obstacles, and it is impossible to ensure that the end pose meets the task requirements.
By calculating the repulsive force experienced by each joint and mapping it to the end, the end synthesized repulsive force is obtained. According to the preset attitude of the end and the synthetic repulsive force, determine the position of the end at the next moment and reverse the joint angle of each joint to ensure that the end attitude meets the task requirements.
It improves the task success rate of the robot when performing obstacle avoidance actions, ensuring that the end posture meets the preset requirements, thereby avoiding task failure.
Smart Images

Figure CN115357020B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of intelligent devices, and particularly relates to an obstacle avoidance method, apparatus, intelligent device, and computer-readable storage medium. Background Art
[0002] Currently, more and more tasks can be implemented by intelligent devices (such as robots). For example, making coffee through a robot, sweeping the floor through a robot, and so on. However, during the operation of a robot (or the robotic arm of a robot), it is very likely to encounter obstacles. At this time, the robot needs to perform obstacle avoidance actions.
[0003] In existing methods, considering that a robot includes multiple joints, when avoiding obstacles, how each joint avoids obstacles is considered separately, that is, the trajectories of each joint avoiding obstacles are considered separately. In this method, although each joint can successfully avoid obstacles, that is, the robot can successfully avoid obstacles, it may also cause the task being executed by the robot itself to fail. Summary of the Invention
[0004] Embodiments of this application provide an obstacle avoidance method, apparatus, and intelligent device, which can solve the problem that the existing robots may cause the currently executed task to fail when avoiding obstacles.
[0005] In a first aspect, an embodiment of this application provides an obstacle avoidance method, which is applied to an intelligent device including at least two joints, and includes:
[0006] If it is determined that there is an obstacle, calculate the repulsive force received by each joint;
[0007] Calculate the force synthesized by the repulsive forces received by each joint at the end of the intelligent device to obtain the resultant repulsive force at the end;
[0008] Determine the position of the end at the next moment according to the current position, current speed of the end, and the resultant repulsive force at the end;
[0009] Determine the joint angles corresponding to each joint at the next moment according to the preset posture of the end and the position of the end at the next moment, where the preset posture of the end is determined according to the task currently executed by the intelligent device;
[0010] Drive the corresponding joint to reach the joint angle according to each of the joint angles.
[0011] Optionally, the determining the position of the end at the next moment according to the current position, current speed of the end, and the resultant repulsive force at the end includes:
[0012] Determine the translational acceleration of the end according to the current position, current speed, preset position, preset speed, preset acceleration of the end and the resultant repulsive force at the end, where the preset position, preset speed and preset acceleration are determined according to the task currently executed by the intelligent device;
[0013] Determine the position of the end at the next moment according to the translational acceleration of the end and the control period of the intelligent device.
[0014] Optionally, after driving each joint to the joint angle according to each joint angle, it includes:
[0015] If the position at the next moment is different from the preset position, determine the translational speed of the end at the next moment according to the translational acceleration of the end;
[0016] Take the translational speed of the end at the next moment as the current speed of the end, and take the position at the next moment as the current position of the end, and return to the step of calculating the repulsive force received by each joint and subsequent steps until the position of the end at the next moment is the same as the preset position.
[0017] Optionally, calculating the resultant force of the repulsive forces received by each joint at the end of the intelligent device to obtain the resultant repulsive force at the end includes:
[0018] If the task currently executed by the intelligent device is the target task, calculate the resultant force of the repulsive forces received by each joint at the end of the intelligent device to obtain the resultant repulsive force at the end, where when the intelligent device executes the target task, the posture of the end of the intelligent device needs to meet preset requirements, and the preset requirements are determined according to the target task.
[0019] Optionally, calculating the resultant force of the repulsive forces received by each joint at the end of the intelligent device to obtain the resultant repulsive force at the end includes:
[0020] Determine the torque received by each joint according to the repulsive force received by each joint and the transpose of the Jacobian matrix corresponding to each joint;
[0021] Determine the resultant repulsive force at the end according to the torque received by each joint and the inverse of the transpose of the Jacobian matrix of the end.
[0022] Optionally, the obstacle avoidance method further includes:
[0023] If the task currently executed by the intelligent device is not the target task, calculate the acceleration of each joint according to the repulsive force received by each joint;
[0024] Determine the positions of each joint at the next moment according to the acceleration of each joint;
[0025] Determine the joint angles of each joint at the next moment according to the positions of each joint at the next moment, and drive each joint to reach the corresponding joint angle at the next moment.
[0026] Optionally, calculating the repulsive forces received by each joint includes:
[0027] For any one joint, calculate the repulsive force received by the joint according to the following method: determine the repulsive force received by the joint according to the maximum range of the preset repulsive force field, the position of the obstacle, and the position of the obstacle closest to the joint.
[0028] In a second aspect, an obstacle avoidance device provided by an embodiment of the present application is applied to an intelligent device including at least two joints, and includes:
[0029] A repulsive force calculation module, configured to calculate the repulsive forces received by each joint if it is determined that there is an obstacle;
[0030] An end resultant repulsive force calculation module, configured to calculate the resultant force of the repulsive forces received by each joint at the end of the intelligent device to obtain an end resultant repulsive force;
[0031] An end position determination module at the next moment, configured to determine the position of the end at the next moment according to the current position, the current speed of the end, and the end resultant repulsive force;
[0032] A joint angle calculation module, configured to determine the corresponding joint angles of each joint at the next moment according to the preset posture of the end and the position of the end at the next moment, where the preset posture of the end is determined according to the task currently executed by the intelligent device;
[0033] A joint control module, configured to drive the corresponding joint to reach the joint angle according to each joint angle.
[0034] In a third aspect, an embodiment of the present application provides an intelligent device, including at least two joints, a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0036] Fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on an intelligent device including at least two joints, it enables the intelligent device to execute the method described in the first aspect above.
[0037] The beneficial effects of the embodiments of the present application compared with the prior art are as follows:
[0038] In the embodiments of the present application, since the repulsive forces received by each joint are mapped to the end, therefore, the position of the end at the next moment can be calculated by combining other information of the end. At the same time, since the preset posture of the end and the limitation of the position of the end at the next moment are added when calculating the joint angles of each joint, therefore, after each joint rotates according to the obtained joint angles, the posture of the end is also restricted by the preset posture of the end. And since the preset posture of the end is determined according to the task currently executed by the intelligent device, therefore, when the intelligent device is performing an obstacle avoidance action, the end is still ensured to be restricted by the preset posture, which can improve the success rate of the executed task. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art.
[0040] Figure 1 It is a flowchart of an obstacle avoidance method provided by an embodiment of the present application;
[0041] Figure 2 It is a schematic structural diagram of an obstacle avoidance device provided by an embodiment of the present application;
[0042] Figure 3 It is a schematic structural diagram of an intelligent device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0043] In the following description, specific details such as specific system structures and technologies are proposed for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, the detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0044] It should be understood that when used in the specification and the appended claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0045] It should also be understood that the term "and / or" used in the specification and appended claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0046] Reference to "one embodiment" or "some embodiments" etc. described in the specification of this application means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0047] Embodiment 1:
[0048] Currently, the styles, functions, etc. of intelligent devices are diverse, and the types of tasks that intelligent devices can perform are also increasing. During the process of an intelligent device performing a task, it is very likely to encounter an obstacle. At this time, the intelligent device needs to perform an obstacle avoidance action.
[0049] During the process of performing the obstacle avoidance action, if only considering separately how each joint avoids the obstacle trajectory, that is, only considering the obstacle avoidance action in the joint space, it is very likely to cause the task execution to fail. This is because, in the tasks performed by the intelligent device, some tasks require the posture of the end of the intelligent device to always meet specific requirements. If the posture of the end does not meet the specific requirements when the intelligent device performs the obstacle avoidance action, it will cause the task execution to fail. For example, when the task performed by the intelligent device is to carry coffee to the destination, then during the movement of the intelligent device, even during the process of the intelligent device performing the obstacle avoidance action, it is required that the end of the intelligent device always maintains a posture such that the cup mouth of the coffee cup is facing up to ensure that the coffee does not spill from the coffee cup until it reaches the destination. Otherwise, once the posture of the end does not meet the requirement of the cup mouth facing up, it will cause the coffee carried by the end to spill, resulting in the failure of the task execution.
[0050] In order to improve the success rate of the task execution, an embodiment of this application provides an obstacle avoidance method. In this obstacle avoidance method, when it is determined that there is an obstacle, the repulsive forces received by the determined respective joints are mapped to the end to obtain the resultant repulsive force at the end, and based on this resultant repulsive force at the end, the current position and speed of the end, the position of the end at the next moment is determined, and then in combination with the preset posture of the end, the joint angles of each joint of the intelligent device are inversely deduced, so as to perform corresponding control on each joint according to each joint angle.
[0051] Since the repulsive forces received by each joint are mapped to the end, and the limitation of the preset posture of the end is also added when calculating the joint angles of each joint, when each joint rotates according to the obtained joint angles, the posture of the end is also restricted by the preset posture of the end, thereby improving the success rate of the executed task.
[0052] The obstacle avoidance method provided by the embodiment of the present application will be described below with reference to the accompanying drawings.
[0053] Figure 1 The flowchart of an obstacle avoidance method provided by the embodiment of the present application is shown. This obstacle avoidance method is applied to an intelligent device including at least two joints. Hereinafter, a robot with a robotic arm is taken as an example for description. In the embodiment of the present application, the robot includes a control center, a driver, and a servo motor, and each servo motor is connected to the corresponding driver. After the control center sends the drive signals corresponding to the joint angles of each joint to the corresponding driver, the driver will control the corresponding servo motor to run to control each joint to finally rotate to its corresponding joint angle, which is described in detail as follows:
[0054] Step S11, if it is determined that there is an obstacle, calculate the repulsive forces received by each joint.
[0055] In the embodiment of the present application, the control center can obtain the environmental information around the intelligent device through an external vision device (such as a 3D camera) or an electronic skin installed on the intelligent device, and then determine whether there is an obstacle around the intelligent device according to the environmental information, and calculate the virtual repulsive forces received by each joint when there is an obstacle. Of course, the control center can also determine that there is an obstacle around the robot after the robot collides with an object, and then calculate the actual repulsive forces received by each joint.
[0056] In some embodiments, considering that the end of the robotic arm will affect whether the task is successfully executed, the control center can focus on whether there is an obstacle around the robotic arm through an external vision device, or install an electronic skin on the robotic arm of the robot to obtain the obstacle information around the robotic arm, such as obtaining the positions of the obstacles around the robotic arm, and calculate the repulsive forces received by each joint according to the positions of the obstacles.
[0057] Step S12, calculate the force synthesized by the repulsive forces received by each joint at the end of the above-mentioned robot to obtain the end synthesized repulsive force.
[0058] Specifically, the repulsive force received by the end of the robot is the end synthesized repulsive force, which is calculated by the control center and is the resultant force corresponding to the repulsive forces of each joint in series with it. For a robot with a robotic arm, the repulsive force received by the end of the robotic arm is the force synthesized by the repulsive forces of each joint of the robotic arm at the end.
[0059] Step S13: Determine the position of the end effector at the next moment according to the current position, current speed of the end effector and the synthetic repulsive force of the end effector.
[0060] Wherein, the current position and current speed of the end effector refer to the position and speed of the end effector at the current moment.
[0061] Wherein, the position of the end effector at the next moment refers to the position corresponding to the next control moment of the robot. In the embodiments of the present application, the position of the end effector is represented by coordinates in the Cartesian space, and the coordinates can be three-dimensional coordinates.
[0062] In the embodiments of the present application, when the end effector is affected by the synthetic repulsive force of the end effector, the acceleration of the end effector will change. At this time, the control center can estimate the acceleration of the end effector according to the synthetic repulsive force of the end effector, the current position and current speed of the end effector, and then perform double integration on the acceleration of the end effector to obtain the position of the end effector at the next moment.
[0063] Step S14: Determine the corresponding joint angles of each joint at the next moment according to the preset posture of the end effector and the position of the end effector at the next moment, wherein the preset posture of the end effector is determined according to the task currently executed by the intelligent device.
[0064] Wherein, the preset posture of the end effector refers to the posture that is expected to be maintained by the end effector, and it is determined according to the task currently executed by the intelligent device. For example, assuming that the end effector of the robotic arm is a gripper, and the task currently executed by the robotic arm is "carry coffee from position A to position B", then the preset posture of the gripper is: the posture corresponding to the gripper carrying coffee and the coffee not spilling.
[0065] It should be noted that the preset posture can be one posture or multiple postures, as long as it can ensure the successful execution of the current task. For example, when the cup mouth of the coffee cup is facing up, even if the gripper rotates on a plane, the coffee usually will not spill. At this time, since the coffee does not spill, that is, multiple postures involved in the rotation process of the gripper can all enable the task of "carrying coffee from position A to position B" to be successfully executed. That is, multiple postures involved in the rotation process of the gripper can be set as the preset posture of the gripper.
[0066] In the embodiments of the present application, the control center combines the inverse kinematics of the robot and calculates the corresponding joint angles of each joint at the next moment according to the preset posture of the end effector and the position of the end effector at the next moment.
[0067] Step S15: Drive the corresponding joint to reach the above joint angle according to each of the above joint angles.
[0068] Specifically, the movement of each joint of the robot is achieved by the operation of a servo motor installed at the joint part, and each servo motor is connected to a corresponding driver. In the embodiment of the present application, the control center of the robot can send the drive signals corresponding to the joint angles of each joint to the corresponding driver, and then the driver controls the operation of the corresponding servo motor to control each joint to finally rotate to its corresponding joint angle.
[0069] In the embodiment of the present application, after it is determined that there is an obstacle, first calculate the repulsive forces received by each joint, and then map the repulsive forces received by each joint to the end of the robot to obtain the force received by the end - the resultant repulsive force at the end. After that, determine the position of the end at the next moment according to the current position, current speed of the end and the resultant repulsive force at the end, and determine the joint angles corresponding to the preset posture according to the position of the end at the next moment and the preset posture of the end. Finally, drive each joint to rotate to the joint angles corresponding to each joint. Since the repulsive forces received by each joint are mapped to the end, therefore, it is possible to calculate the position of the end at the next moment in combination with other information of the end. At the same time, since the calculation of the joint angles of each joint adds the restrictions of the preset posture of the end and the position of the end at the next moment, therefore, after each joint rotates according to the obtained joint angles, the posture of the end is also restricted by the preset posture of the end. And since the preset posture of the end is determined according to the task currently executed by the intelligent device, therefore, when the intelligent device is performing an obstacle - avoidance action, the end is still guaranteed to be restricted by the preset posture, which can improve the success rate of the executed task.
[0070] In some embodiments, in order to make the robot, when avoiding obstacles, the obstacle - avoidance position as close as possible to the preset position (the preset position is the position of the destination that the robot needs to reach when completing the task, which is determined according to the task currently executed by the intelligent device. For example, if the robot needs to move coffee from position A to position B, then the position of position B is the preset position), the obstacle - avoidance speed as close as possible to the preset speed (the preset speed is the speed that the user hopes the robot to adopt when completing the task, which is determined according to the task currently executed by the intelligent device) and the obstacle - avoidance acceleration as close as possible to the preset acceleration (the preset acceleration is the acceleration that the user hopes the robot to adopt when completing the task, which is determined according to the task currently executed by the intelligent device), then the restrictions of the preset position, preset speed and preset acceleration will be added when calculating the position of the end at the next moment.
[0071] The above step S13 includes:
[0072] A1. Determine the translational acceleration of the end according to the current position of the end, the current speed, the preset position, the preset speed, the preset acceleration, and the resultant repulsive force of the end, where the preset position, the preset speed, and the preset acceleration are determined according to the task currently executed by the intelligent device.
[0073] Assume that in the Cartesian space, the current position of the end of the robot is x, and the current speed (or translational speed) is The preset position, the preset speed, and the preset acceleration are x d , and According to the admittance control principle, the translational acceleration of the end of the robot at the current moment can be calculated as follows:
[0074]
[0075] In the above formula, M, B, and K are positive definite virtual mass matrix, damping matrix, and stiffness matrix respectively, and in the matrices of M, B, and K, the values of the matrices are all greater than 0. For the convenience of calculation, M, B, and K can be set as 3×3 matrices. In the above formula, F is the resultant repulsive force of the end.
[0076] The values in the above formula can all be three-dimensional coordinates, that is: x = [x, y, z] T , x d = [x d , y d , z d T ,
[0077] A2. Determine the position of the end at the next moment according to the translational acceleration of the end and the control period of the intelligent device.
[0078] In the embodiment of the present application, the translational acceleration of the end is integrated twice to obtain the position of the end in the Cartesian space at the next moment, that is, the position of the end at the next moment is determined according to the following formula:
[0079]
[0080]
[0081] In the above formula, T is the control period of the robot controller.
[0082] In the embodiments of the present application, since the position, speed, and acceleration of the preset are added to calculate the position of the end at the next moment, the determined position of the end at the next moment is closer to the preset position, the translational speed is closer to the preset speed, and the translational acceleration is also closer to the preset acceleration. At the same time, since the preset position, speed, and acceleration are usually values set according to the currently executed task, and the currently executed task is related to the user's needs, when the position of the end of the robot at the next moment is closer to the preset position, it indicates that the operation of the robot is more in line with the user's needs, thus improving the user experience.
[0083] In some embodiments, after the above step S15, it includes:
[0084] B1. If the position at the next moment is different from the preset position, determine the translational speed of the end at the next moment according to the translational acceleration of the end.
[0085] Specifically, compare the calculated position of the end at the next moment with the preset position. If it is determined that the two are different, it indicates that the end of the robot has not reached the preset position. Then, integrate the current translational acceleration of the end once to calculate the translational speed of the end at the next moment.
[0086] B2. Take the translational speed of the end at the next moment as the current speed of the end, and take the position at the next moment as the current position of the end, and return to the step of calculating the repulsive force received by each joint and subsequent steps until the position at the next moment is the same as the preset position.
[0087] Specifically, when it is determined that the end of the robot has not reached the preset position, since the position of the end has changed, it is necessary to recalculate the repulsive force received by each joint, and by taking the translational speed at the next moment as the current speed of the end and taking the position of the end at the next moment as the current position of the end, to calculate parameters such as the position of the end at the new next moment. After calculating the position of the end at the next moment each time, compare the newly calculated position with the preset position to timely determine whether the end has reached the preset position.
[0088] In the embodiments of the present application, since the position at the next moment is compared with the preset position after calculating the position of the end at the next moment, it is possible to timely know whether the end of the robot has reached the preset position. In addition, since the repulsive force received by each joint and the new position of the end are recalculated after the end of the robot has not reached the preset position, it is possible to ensure that the robot still maintains the same posture and moves forward towards the preset position during the obstacle avoidance process, thereby improving the success rate of the executed task.
[0089] In some embodiments, considering that the joint angles can be represented in joint space or Cartesian space, and the pose of the end effector needs to be represented in Cartesian space. Therefore, when it is necessary to keep the pose of the end effector unchanged, the representation of the joint angles in Cartesian space will be selected for calculation. At this time, the embodiments of the present application need to first map the repulsive forces received by each joint to the end effector, so as to subsequently calculate the joint angles corresponding to each joint when the end effector maintains a preset pose represented in Cartesian space based on the resultant repulsive force obtained by mapping. That is, step S12 of the embodiments of the present application includes:
[0090] If the task currently executed by the above intelligent device is the target task, calculate the force synthesized by the repulsive forces received by each joint at the end of the above intelligent device to obtain the resultant repulsive force at the end. Among them, when the above intelligent device executes the above target task, the pose of the end of the above intelligent device needs to meet a preset requirement, and the preset requirement is determined according to the above target task.
[0091] Specifically, each task that the robot can execute is pre-divided: if, during the execution of the task, the pose of the end effector needs to meet a preset requirement (for example, the pose of the end effector needs to maintain a fixed pose, or the pose of the end effector can only change within a limited range), then the task will be classified as a target task. Conversely, if, during the execution of the task, the pose of the end effector does not need to meet a preset requirement (that is, the pose of the end effector can be any pose), then the task will be classified as a non-target task.
[0092] In the embodiments of the present application, when the robot executes a task, it can determine whether the currently executed task is a target task according to the pre-classification result of each task. If it is a target task, after determining the repulsive forces received by each joint, map each repulsive force to the end effector to calculate the resultant repulsive force at the end. Since each repulsive force is mapped to the end effector when it is determined that the currently executed task is a target task, it can be ensured that subsequently, based on the resultant repulsive force at the end and the preset pose of the end effector, the joint angles corresponding to each joint can be calculated, thereby ensuring that the calculated joint angles are restricted by the preset pose of the end effector.
[0093] In some embodiments, when the task executed by the robot is not a target task, the above obstacle avoidance method further includes:
[0094] C1. If the task currently executed by the above intelligent device is not the above target task, calculate the acceleration of each joint according to the repulsive forces received by each joint.
[0095] C2. Determine the position of each joint at the next moment according to the acceleration of each joint respectively.
[0096] Specifically, the acceleration of each joint is calculated in combination with the admittance algorithm, and then the acceleration of each joint obtained by calculation is integrated twice to obtain the position of each joint at the next moment.
[0097] C3. Determine the joint angles of each joint at the next moment according to the positions of each joint at the next moment, and drive each joint to reach the corresponding joint angle at the next moment.
[0098] Specifically, after determining the positions of each joint at the next moment, calculate the joint angles of each joint at the next moment according to the inverse kinematics of the robot, and control each joint to rotate to the corresponding joint angle through a servo motor.
[0099] In the embodiment of the present application, since it is determined that the task executed by the robot has no requirement for the posture of the end, the repulsive forces received by each joint are not mapped to the end of the robot, that is, the acceleration of each joint is directly calculated according to the repulsive forces received by each joint. Therefore, the joint angles of each joint at the next moment can be quickly calculated, thereby improving the control speed of the robot.
[0100] In some embodiments, calculating the resultant force of the repulsive forces received by each joint at the end of the intelligent device to obtain the resultant repulsive force at the end includes:
[0101] D1. Determine the torque received by each joint according to the repulsive force received by each joint and the transpose of the Jacobian matrix corresponding to each joint.
[0102] D2. Determine the resultant repulsive force at the end according to the torque received by each joint and the inverse of the transpose of the Jacobian matrix at the end.
[0103] In the embodiment of the present application, according to the statics formula of the serial robot, the repulsive forces received by each joint are converted into the torques received by each joint:
[0104]
[0105] where τ j is the torque corresponding to joint j, j = 1, 2..N, and N is the total number of joints. For example, when the total number of joints is 6, then N is 6. In the above formula, is the transpose of the Jacobian matrix of joint j, T is the control period of the robot controller, and f i is the value of the repulsive force received by joint j. Since each joint may receive multiple repulsive forces, when calculating the torque corresponding to each joint, it is necessary to perform an accumulative calculation on each repulsive force.
[0106] After calculating the torques received by each joint, map each torque to the end of the robot according to the following formula to obtain the resultant repulsive force F corresponding to the end:
[0107]
[0108] Among them, is the inverse of the transpose of the Jacobian matrix of the end of the robot, τ is the joint torque vector, that is, τ = [τ 1 , τ 2 ,.., τ N T , and N is the total number of joints. If the total number of joints is 6 and the joint numbers closer to the end joint are larger, then is
[0109] In the embodiments of the present application, when converting the repulsive forces received by each joint into the torques received by each joint, considering that each joint may receive multiple repulsive forces, the calculated torques are more accurate, and thus the subsequent calculated resultant repulsive force at the end can be ensured to be more accurate.
[0110] In some embodiments, calculating the repulsive forces received by each joint in the above step S11 includes:
[0111] For any one joint, calculate the repulsive force received by the joint according to the following method: determine the repulsive force received by the joint according to the maximum range of the preset repulsive force field, the position of the obstacle, and the position of the obstacle closest to the joint.
[0112] In the embodiments of the present application, the effect of the robot moving in the opposite direction of the obstacle can be achieved by establishing a virtual repulsive force field. Among them, the repulsive force field can be calculated according to the following formula:
[0113]
[0114] Among them, η is the repulsive force field coefficient, d max > 0, d max is the maximum range of the repulsive force field, p ob is the position of the obstacle, p i is the position of the obstacle closest to the joint i of the robot, i = 1, 2, 3..., N, and this N is the number of joints, d = |p ob - p i | is the distance from the obstacle to the joint i of the robot. When d ≤ d max , the repulsive force field will generate a repulsive force on the robot.
[0115] In the above repulsive force field formula, the first half is used to determine the magnitude of the repulsive force, and the second half It is used to determine the direction of the repulsive force, that is, the latter part is used to determine the direction for each joint of the robot to avoid obstacles.
[0116] In the embodiment of the present application, since the repulsive force corresponding to each joint is restricted by the distance from the obstacle to the joint, therefore, it can be ensured that the repulsive force corresponding to each joint is more accurate.
[0117] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0118] Embodiment Two
[0119] Corresponding to the obstacle avoidance method provided in the above embodiment, Figure 2 The structural block diagram of the obstacle avoidance device provided in the embodiment of the present application is shown. For the sake of convenience of description, only the parts related to the embodiment of the present application are shown.
[0120] Refer to Figure 2 , the obstacle avoidance device 2 is applied to an intelligent device, and includes: a repulsive force calculation module 21, an end synthetic repulsive force calculation module 22, a position determination module 23 for the end at the next moment, a joint angle calculation module 24, and a joint control module 25. Among them:
[0121] The repulsive force calculation module 21 is used to calculate the repulsive force received by each joint if it is determined that there is an obstacle.
[0122] The end synthetic repulsive force calculation module 22 is used to calculate the force synthesized by the repulsive forces received by each joint at the end of the above intelligent device to obtain the end synthetic repulsive force.
[0123] The position determination module 23 for the end at the next moment is used to determine the position of the end at the next moment according to the current position of the end, the current speed, and the end synthetic repulsive force.
[0124] The joint angle calculation module 24 is used to determine the joint angles corresponding to each joint at the next moment according to the preset posture of the end and the position of the end at the next moment, wherein the preset posture of the end is determined according to the task currently executed by the intelligent device.
[0125] The joint control module 25 is used to drive the corresponding joint to reach the above joint angle according to each of the above joint angles.
[0126] In the embodiments of the present application, since the repulsive forces received by each joint are mapped to the end, each joint is restricted by the preset pose of the end after rotating according to the obtained joint angles. Moreover, since the preset pose of the end is determined according to the task currently executed by the intelligent device, when the intelligent device is performing an obstacle avoidance action, the end is still restricted by the preset pose, which can improve the success rate of the executed task.
[0127] In some embodiments, the position determination module 23 of the end at the next moment includes:
[0128] A translational acceleration calculation unit of the end, configured to determine the translational acceleration of the end according to the current position of the end, the current velocity, the preset position, the preset velocity, the preset acceleration, and the resultant repulsive force of the end, wherein the preset position, the preset velocity, and the preset acceleration are determined according to the task currently executed by the intelligent device.
[0129] A position prediction unit of the end, configured to determine the position of the end at the next moment according to the translational acceleration of the end and the control period of the intelligent device.
[0130] In some embodiments, the obstacle avoidance device 2 further includes:
[0131] A position comparison module, configured to, if the position at the next moment is different from the preset position, determine the translational velocity of the end at the next moment according to the translational acceleration of the end.
[0132] A new current velocity determination module of the end, configured to use the translational velocity of the end at the next moment as the current velocity of the end, and use the position at the next moment as the current position of the end, and return to the step of calculating the repulsive forces received by each joint and subsequent steps until the position of the end at the next moment is the same as the preset position.
[0133] In some embodiments, the resultant repulsive force calculation module 22 of the end is specifically configured to:
[0134] If the task currently executed by the intelligent device is a target task, calculate the force synthesized by the repulsive forces received by each joint at the end of the intelligent device to obtain the resultant repulsive force of the end, wherein when the intelligent device is performing the target task, the pose of the end of the intelligent device needs to meet preset requirements, and the preset requirements are determined according to the target task.
[0135] In some embodiments, calculating the force synthesized by the repulsive forces received by each joint at the end of the intelligent device to obtain the resultant repulsive force of the end includes:
[0136] According to the repulsive forces received by each joint and the transpose of the Jacobian matrix corresponding to each joint, the torques received by each joint are determined respectively.
[0137] According to the torques received by each joint and the inverse of the transpose of the Jacobian matrix of the above-mentioned end, the resultant repulsive force of the above-mentioned end is determined.
[0138] In some embodiments, the above-mentioned obstacle avoidance device 2 further includes:
[0139] An acceleration calculation module in joint space, configured to calculate the acceleration of each joint according to the repulsive force received by each joint if the task currently executed by the intelligent device is not the above-mentioned target task.
[0140] A position calculation module in joint space, configured to determine the position of each joint at the next moment respectively according to the acceleration of each joint.
[0141] A joint control module in joint space, configured to determine the joint angle of each joint at the next moment according to the position of each joint at the next moment, and drive each joint to reach the corresponding joint angle at the next moment.
[0142] In some embodiments, when calculating the repulsive force received by each joint, the above-mentioned repulsive force calculation module 21 is specifically configured to:
[0143] For any one joint, calculate the repulsive force received by the above-mentioned joint according to the following method: determine the repulsive force received by the above-mentioned joint according to the maximum range of the preset repulsive force field, the position of the above-mentioned obstacle, and the position closest to the above-mentioned joint of the above-mentioned obstacle.
[0144] It should be noted that for the information interaction, execution process, etc. between the above-mentioned devices / units, since they are based on the same concept as the method embodiments of the present application, their specific functions and the technical effects brought, please refer to the method embodiment part specifically, and will not be elaborated here.
[0145] Embodiment Three:
[0146] Figure 3 It is a schematic structural diagram of an intelligent device provided by an embodiment of the present application. As Figure 3 shown, the intelligent device 3 of this embodiment includes: at least two joints ( Figure 3 not shown in the figure), at least one processor 30 ( Figure 3 only one processor is shown in the figure), a memory 31, and a computer program 32 stored in the above-mentioned memory 31 and operable on the above-mentioned at least one processor 30. When the above-mentioned processor 30 executes the above-mentioned computer program 32, the steps in any of the above-mentioned method embodiments are implemented.
[0147] The above-mentioned intelligent device 3 can be a robotic arm, a robot including a robotic arm, or other intelligent machines capable of semi-autonomous or fully autonomous operation. The intelligent device may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art can understand that Figure 3 This is merely an example of the intelligent device 3 and does not constitute a limitation on the intelligent device 3. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0148] The so-called processor 30 may be a central processing unit (CPU). The processor 30 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0149] In some embodiments, the memory 31 may be an internal storage unit of the intelligent device 3, such as the hard disk or memory of the intelligent device 3. In other embodiments, the memory 31 may also be an external storage device of the intelligent device 3, such as a plug-in hard disk equipped on the intelligent device 3, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 31 may also include both the internal storage unit and the external storage device of the intelligent device 3. The memory 31 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program, etc. The memory 31 may also be used to temporarily store data that has been output or will be output.
[0150] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.
[0151] An embodiment of this application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the processor executes the computer program, the steps in any of the foregoing method embodiments are implemented.
[0152] An embodiment of this application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in any of the foregoing method embodiments can be implemented.
[0153] An embodiment of this application provides a computer program product. When the computer program product runs on an intelligent device, the intelligent device is enabled to execute the steps in any of the foregoing method embodiments.
[0154] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of the present application, a computer program can be used to instruct the relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / smart device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.
[0155] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0156] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present application.
[0157] In the embodiments provided by the present application, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical, or other form.
[0158] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0159] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An obstacle avoidance method, characterized in that, it is applied to an intelligent device including at least two joints, and includes: If it is determined that there is an obstacle, calculate the repulsive forces received by each joint; Calculate the force synthesized by the repulsive forces received by each joint at the end of the intelligent device to obtain the resultant repulsive force at the end; According to the current position, current speed of the end and the resultant repulsive force at the end, determine the position of the end at the next moment; According to the preset posture of the end and the position of the end at the next moment, determine the corresponding joint angles of each joint at the next moment, wherein the preset posture of the end is determined according to the task currently executed by the intelligent device; Drive the corresponding joints to reach the joint angles according to each of the joint angles.
2. The obstacle avoidance method according to claim 1, characterized in that, The determining the position of the end at the next moment according to the current position, current speed of the end and the resultant repulsive force at the end includes: According to the current position, current speed of the end, preset position, preset speed, preset acceleration and the resultant repulsive force at the end, determine the translational acceleration of the end, wherein the preset position, preset speed and preset acceleration are determined according to the task currently executed by the intelligent device; According to the translational acceleration of the end and the control period of the intelligent device, determine the position of the end at the next moment.
3. The obstacle avoidance method according to claim 2, characterized in that, After driving each joint to reach the joint angle according to each of the joint angles, it includes: If the position at the next moment is different from the preset position, determine the translational speed of the end at the next moment according to the translational acceleration of the end; Take the translational speed of the end at the next moment as the current speed of the end, and take the position at the next moment as the current position of the end, and return to the step of calculating the repulsive forces received by each joint and subsequent steps until the position of the end at the next moment is the same as the preset position.
4. The obstacle avoidance method according to claim 1, characterized in that, The calculating the force synthesized by the repulsive forces received by each joint at the end of the intelligent device to obtain the resultant repulsive force at the end includes: If the task currently executed by the intelligent device is a target task, calculate the force synthesized by the repulsive forces received by each joint at the end of the intelligent device to obtain the resultant repulsive force at the end, wherein when the intelligent device executes the target task, the posture of the end of the intelligent device needs to meet preset requirements, and the preset requirements are determined according to the target task.
5. The obstacle avoidance method according to claim 1, characterized in that, The calculating the force synthesized by the repulsive forces received by each joint at the end of the intelligent device to obtain the resultant repulsive force at the end includes: According to the repulsive force received by each joint and the transpose of the Jacobian matrix corresponding to each joint, respectively determine the torque received by each joint; According to the torque received by each joint and the inverse of the transpose of the Jacobian matrix of the end, determine the resultant repulsive force at the end.
6. The obstacle avoidance method according to claim 4, wherein, the obstacle avoidance method further includes: if the task currently executed by the intelligent device is not the target task, calculating the acceleration of each joint according to the repulsive force received by each joint; determining the position of each joint at the next moment according to the acceleration of each joint respectively; determining the joint angle of each joint at the next moment according to the position of each joint at the next moment, and driving each joint to reach the corresponding joint angle at the next moment.
7. The obstacle avoidance method according to any one of claims 1 to 6, wherein, calculating the repulsive force received by each joint includes: for any one joint, calculating the repulsive force received by the joint according to the following method: determining the repulsive force received by the joint according to the maximum range of the preset repulsive force field, the position of the obstacle, and the position of the obstacle closest to the joint.
8. An obstacle avoidance device, wherein, applied to an intelligent device including at least two joints, and includes: a repulsive force calculation module, configured to calculate the repulsive force received by each joint if it is determined that there is an obstacle; a resultant repulsive force calculation module at the end, configured to calculate the resultant force of the repulsive forces received by each joint at the end of the intelligent device to obtain a resultant repulsive force at the end; a position determination module for the end at the next moment, configured to determine the position of the end at the next moment according to the current position of the end, the current speed, and the resultant repulsive force at the end; a joint angle calculation module, configured to determine the corresponding joint angle of each joint at the next moment according to the preset posture of the end and the position of the end at the next moment, wherein the preset posture of the end is determined according to the task currently executed by the intelligent device; a joint control module, configured to drive the corresponding joint to reach the joint angle according to each of the joint angles.
9. An intelligent device, including at least two joints, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, when the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, wherein, when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Optimal obstacle avoidance control method and device for robotic arms based on artificial potential field gravitational factor
CN108287469A
Mechanical arm path planning method
CN113084811A