WO2022198994A1 - Robot arm motion planning method and apparatus, and readable storage medium and robot arm - Google Patents

Robot arm motion planning method and apparatus, and readable storage medium and robot arm Download PDF

Info

Publication number
WO2022198994A1
WO2022198994A1 PCT/CN2021/124620 CN2021124620W WO2022198994A1 WO 2022198994 A1 WO2022198994 A1 WO 2022198994A1 CN 2021124620 W CN2021124620 W CN 2021124620W WO 2022198994 A1 WO2022198994 A1 WO 2022198994A1
Authority
WO
WIPO (PCT)
Prior art keywords
pose
random
motion planning
robotic arm
random pose
Prior art date
Application number
PCT/CN2021/124620
Other languages
French (fr)
Chinese (zh)
Inventor
陈金亮
刘益彰
熊友军
Original Assignee
深圳市优必选科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市优必选科技股份有限公司 filed Critical 深圳市优必选科技股份有限公司
Publication of WO2022198994A1 publication Critical patent/WO2022198994A1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1664Programme controls characterised by programming, planning systems for manipulators characterised by motion, path, trajectory planning
    • B25J9/1666Avoiding collision or forbidden zones
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J18/00Arms
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1679Programme controls characterised by the tasks executed

Definitions

  • the present application belongs to the field of robotics technology, and in particular relates to a method, device, computer-readable storage medium and a robotic arm for motion planning of a robotic arm.
  • RRT Rapidly-exploring Random Trees
  • BiRRT Bi-directional Rapidly Expanding Random Trees
  • the embodiments of the present application provide a robotic arm motion planning method, device, computer-readable storage medium, and robotic arm to solve the problems of lack of guidance and low efficiency in the existing robotic arm motion planning methods.
  • a first aspect of the embodiments of the present application provides a method for planning a motion of a robotic arm, which may include:
  • the second random pose is used as a random sampling result in a preset robotic arm motion planning algorithm to perform motion planning for the robotic arm.
  • the iterative optimization of the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose may include:
  • the first random pose is iteratively optimized according to the gravitational field function to obtain an optimized second random pose.
  • the iterative optimization of the first random pose according to the gravitational field function to obtain an optimized second random pose may include:
  • the current random pose is updated and calculated according to the gradient of the current random pose to obtain an updated random pose
  • the updated random pose is taken as the new current random pose, and the execution of the calculation of the current random pose according to the gravitational field function is returned to.
  • the updated random pose is determined as the optimized second random pose.
  • the establishing the gravitational field function corresponding to the virtual optimal pose may include:
  • q goal is the virtual optimal pose
  • q is the current random pose
  • d(q,q goal ) is the distance between q and q goal
  • preset distance threshold is the preset distance threshold
  • U att (q) is the gravitational field function
  • calculating the gradient of the current random pose according to the gravitational field function may include:
  • the gradient of the current random pose is calculated according to the following formula:
  • the update calculation of the current random pose according to the gradient of the current random pose to obtain an updated random pose may include:
  • the current random pose is updated and calculated according to the following formula:
  • q is the current random pose
  • is the preset more
  • the new step size, q' is the updated random pose.
  • determining the virtual optimal motion planning path of the robotic arm moving from the preset initial pose to the preset target pose may include:
  • a straight path connecting the initial pose and the target pose is determined as the virtual optimal motion planning path.
  • a second aspect of the embodiments of the present application provides a robotic arm motion planning device, which may include:
  • the virtual path determination module is used to determine the virtual optimal motion planning path of the robot arm moving from the preset initial pose to the preset target pose;
  • a random sampling module for performing random sampling in the free space of the robotic arm to obtain the first random pose of the robotic arm
  • an iterative optimization module configured to iteratively optimize the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose
  • a motion planning module configured to use the second random pose as a random sampling result in a preset motion planning algorithm of the manipulator to perform motion planning for the manipulator.
  • the iterative optimization module may include:
  • a pose mapping unit configured to map the first random pose onto the virtual optimal motion planning path to obtain a virtual optimal pose corresponding to the first random pose
  • a gravitational field function establishment unit configured to establish a gravitational field function corresponding to the virtual optimal pose
  • An iterative optimization unit configured to iteratively optimize the first random pose according to the gravitational field function to obtain an optimized second random pose.
  • the iterative optimization unit may include:
  • the current random pose determination subunit is used to use the first random pose as the current random pose
  • a gradient calculation subunit configured to calculate the gradient of the current random pose according to the gravitational field function
  • an update calculation subunit configured to update and calculate the current random pose according to the gradient of the current random pose to obtain an updated random pose
  • the current random pose update subunit is configured to use the updated random pose as a new current random pose if the gradient of the current random pose does not meet the preset iteration termination condition;
  • the second random pose determination subunit is configured to determine the updated random pose as the optimized second random pose if the gradient of the current random pose satisfies the iteration termination condition.
  • the gravitational field function establishment unit is specifically configured to establish the gravitational field function according to the following formula:
  • q goal is the virtual optimal pose
  • q is the current random pose
  • d(q,q goal ) is the distance between q and q goal
  • preset distance threshold is the preset distance threshold
  • U att (q) is the gravitational field function
  • the gradient calculation subunit is specifically configured to calculate the gradient of the current random pose according to the following formula:
  • update calculation subunit is specifically configured to update and calculate the current random pose according to the following formula:
  • q is the current random pose
  • is the preset update step size
  • q′ is the updated random pose
  • the virtual path determination module is specifically configured to determine a straight line path connecting the initial pose and the target pose as the virtual optimal motion planning path.
  • a third aspect of the embodiments of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned robotic arm motion planning methods is implemented. step.
  • a fourth aspect of the embodiments of the present application provides a robotic arm, including a memory, a processor, and a computer program stored in the memory and executable on the processor, when the processor executes the computer program The steps of implementing any one of the above-mentioned robotic arm motion planning methods.
  • a fifth aspect of the embodiments of the present application provides a computer program product, which, when the computer program product runs on a robotic arm, causes the robotic arm to execute the steps of any of the above-mentioned methods for motion planning of a robotic arm.
  • the embodiments of the present application determine a virtual optimal motion planning path for the robotic arm to move from a preset initial pose to a preset target pose; Perform random sampling in the free space of the arm to obtain the first random pose of the robotic arm; iteratively optimize the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose pose; use the second random pose as a random sampling result in a preset robotic arm motion planning algorithm to perform motion planning for the robotic arm.
  • the virtual optimal motion planning path in the ideal state is used as the guiding basis for random sampling, and the original random pose (ie the first random pose) obtained by random sampling is iteratively optimized, so that it is transferred to the virtual Traction in the direction of the optimal motion planning path to obtain the optimized random pose (ie, the second random pose), and the random sampling result obtained in this way has obvious orientation.
  • the motion planning of the robotic arm is carried out. , which can reduce a large number of invalid searches and greatly improve the planning efficiency.
  • FIG. 1 is a flowchart of an embodiment of a method for planning a motion of a robotic arm in an embodiment of the present application
  • FIG. 2 is a schematic flowchart of iterative optimization of a first random pose according to a virtual optimal motion planning path
  • FIG. 3 is a schematic flowchart of iterative optimization of the first random pose according to the gravitational field function
  • FIG. 4 is a structural diagram of an embodiment of a robotic arm motion planning device in an embodiment of the application.
  • FIG. 5 is a schematic block diagram of a robotic arm in an embodiment of the present application.
  • the term “if” may be contextually interpreted as “when” or “once” or “in response to determining” or “in response to detecting” .
  • the phrases “if it is determined” or “if the [described condition or event] is detected” may be interpreted, depending on the context, to mean “once it is determined” or “in response to the determination” or “once the [described condition or event] is detected. ]” or “in response to detection of the [described condition or event]”.
  • an embodiment of a robotic arm motion planning method in the embodiment of the present application may include:
  • Step S101 determining a virtual optimal motion planning path for the robotic arm to move from a preset initial pose to a preset target pose.
  • the set composed of the poses of all joints of the manipulator can be described by the configuration space, that is, the C space, and when the manipulator and obstacles are considered, the C space is divided into two spaces , namely the obstacle space C Obs and the free space C free .
  • C Obs can be described by the following formula:
  • C Obs is a set of poses that satisfy the following conditions: the pose (ie q) belongs to the C space and the robot arm (ie Robot(q)) under this pose and the obstacle (ie Obs) do not intersect empty, the two collide.
  • C free can be described by the following formula:
  • C free is the complement of C Obs .
  • C free is an optional area in which the robotic arm can move and find the optimal trajectory and the shortest time.
  • the basic idea of the manipulator motion planning algorithm is to establish a path diagram for solving the manipulator motion planning problem based on C free .
  • the specific process can include:
  • the collision-free path ⁇ of the manipulator is obtained by sampling according to the motion planning algorithm of the manipulator in the free space C free , and the path must satisfy ⁇ [0,1] ⁇ C free , where 0 represents the starting time point of the motion planning , 1 indicates the termination time point of the motion planning, the robot arm pose at any planning time point between the start time point and the termination time point of the path is within the range of the free space C free , and the path
  • a straight path connecting the initial pose and the target pose may be determined as the virtual optimal motion planning path.
  • this virtual optimal motion planning path is only an optimal path in an ideal state, because this path may pass through the obstacle space, so it is often not feasible in practice.
  • the path can be used as the guiding basis for the actual motion planning, reducing the random search without direction in the process of motion planning.
  • step S102 random sampling is performed in the free space of the manipulator to obtain a first random pose of the manipulator.
  • random sampling in free space may be performed in any manner in the prior art.
  • the result obtained by random sampling using the prior art is recorded as the first random pose.
  • Step S103 iteratively optimize the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose.
  • step S103 may specifically include the following process:
  • Step S1031 mapping the first random pose to the virtual optimal motion planning path to obtain a virtual optimal pose corresponding to the first random pose.
  • the projection of the first random pose on the virtual optimal motion planning path may be used as the virtual optimal pose.
  • Step S1032 establishing a gravitational field function corresponding to the virtual optimal pose.
  • the gravitational field function can be established according to the following formula:
  • q goal is the virtual optimal pose
  • q is the current random pose
  • d(q,q goal ) is the distance between q and q goal
  • U att (q) is the gravitational field function.
  • the gravitational field function is a piecewise function, when When , the magnitude of gravitational potential energy is proportional to the square of the distance from the current random pose to the virtual optimal pose; and when When , reduce the value of the gravitational calculation function, so as to avoid the problem of excessive gravitational force when the current random pose is far from the virtual optimal pose.
  • Step S1033 Perform iterative optimization on the first random pose according to the gravitational field function to obtain an optimized second random pose.
  • step S1033 may specifically include the following process:
  • Step S10331 taking the first random pose as the current random pose.
  • Step S10332 Calculate the gradient of the current random pose according to the gravitational field function.
  • the gravitational field function can be derived from the distance to obtain the gradient calculation formula shown in the following formula:
  • Step S10333 Perform update calculation on the current random pose according to the gradient of the current random pose to obtain an updated random pose.
  • the current random pose can be updated and calculated according to the following formula:
  • q is the current random pose
  • is the preset update step size, and its specific value can be set according to the actual situation
  • q' is the update random pose. Since the gradient direction is the fastest rising direction of the function, the local optimal solution can be obtained through gradient iteration.
  • Step S10334 Determine whether the gradient of the current random pose satisfies a preset iteration termination condition.
  • the iteration termination condition may be: the gradient of the current planned path is less than a preset gradient threshold, or the iterative optimization duration is greater than a preset duration threshold.
  • the specific values of the gradient threshold and the duration threshold can be set according to actual conditions. In this way, the duration of iterative optimization can be controlled, so as to ensure that the overall sampling efficiency will not be affected due to excessive time consumption while expanding in the direction of the gravitational field.
  • step S10335 is performed; if the gradient of the current random pose meets the iteration termination condition, step S10336 is performed.
  • Step S10335 taking the updated random pose as the new current random pose.
  • Step S10336 Determine the updated random pose as the optimized random pose.
  • the optimized random pose is recorded as the second random pose here.
  • Step S104 using the second random pose as a random sampling result in the preset robotic arm motion planning algorithm to perform motion planning for the robotic arm.
  • any manipulator motion planning algorithm in the prior art can be used to plan the motion of the manipulator, including but not limited to specific planning algorithms such as RRT or BiRRT.
  • specific planning algorithms such as RRT or BiRRT.
  • RRT or BiRRT specific planning algorithms
  • the embodiment of the present application optimizes the random sampling process based on the existing robotic arm motion planning algorithm. For each random sampling, the optimized second random bit is used. The original first random pose is used as the random sampling result, and the motion planning of the robotic arm is performed based on this random sampling result.
  • the embodiment of the present application uses the ideal virtual optimal motion planning path as the guiding basis for random sampling, and performs iterative optimization on the original random pose (ie, the first random pose) obtained by random sampling, so as to make it a Traction in the direction of the virtual optimal motion planning path to obtain the optimized random pose (ie the second random pose), the random sampling result obtained in this way has obvious orientation, and the robotic arm is moved based on the random sampling result.
  • Planning can reduce a large number of invalid searches and greatly improve the planning efficiency.
  • FIG. 4 shows a structural diagram of an embodiment of a robotic arm motion planning apparatus provided in an embodiment of the present application.
  • a robotic arm motion planning device may include:
  • a virtual path determination module 401 configured to determine a virtual optimal motion planning path for the robotic arm to move from a preset initial pose to a preset target pose;
  • a random sampling module 402 configured to perform random sampling in the free space of the robotic arm to obtain a first random pose of the robotic arm
  • an iterative optimization module 403, configured to iteratively optimize the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose;
  • the motion planning module 404 is configured to use the second random pose as a random sampling result in a preset motion planning algorithm of the manipulator to perform motion planning for the manipulator.
  • the iterative optimization module may include:
  • a pose mapping unit configured to map the first random pose onto the virtual optimal motion planning path to obtain a virtual optimal pose corresponding to the first random pose
  • a gravitational field function establishment unit configured to establish a gravitational field function corresponding to the virtual optimal pose
  • An iterative optimization unit configured to iteratively optimize the first random pose according to the gravitational field function to obtain an optimized second random pose.
  • the iterative optimization unit may include:
  • the current random pose determination subunit is used to use the first random pose as the current random pose
  • a gradient calculation subunit configured to calculate the gradient of the current random pose according to the gravitational field function
  • an update calculation subunit configured to update and calculate the current random pose according to the gradient of the current random pose to obtain an updated random pose
  • the current random pose update subunit is configured to use the updated random pose as a new current random pose if the gradient of the current random pose does not meet the preset iteration termination condition;
  • the second random pose determination subunit is configured to determine the updated random pose as the optimized second random pose if the gradient of the current random pose satisfies the iteration termination condition.
  • the gravitational field function establishment unit is specifically configured to establish the gravitational field function according to the following formula:
  • q goal is the virtual optimal pose
  • q is the current random pose
  • d(q,q goal ) is the distance between q and q goal
  • preset distance threshold is the preset distance threshold
  • U att (q) is the gravitational field function
  • the gradient calculation subunit is specifically configured to calculate the gradient of the current random pose according to the following formula:
  • update calculation subunit is specifically configured to update and calculate the current random pose according to the following formula:
  • q is the current random pose
  • is the preset update step size
  • q′ is the updated random pose
  • the virtual path determination module is specifically configured to determine a straight line path connecting the initial pose and the target pose as the virtual optimal motion planning path.
  • FIG. 5 shows a schematic block diagram of a robotic arm provided by an embodiment of the present application. For the convenience of description, only parts related to the embodiment of the present application are shown.
  • the robotic arm 5 of this embodiment includes: a processor 50 , a memory 51 , and a computer program 52 stored in the memory 51 and executable on the processor 50 .
  • the processor 50 executes the computer program 52
  • the steps in each of the above embodiments of the robotic arm motion planning method are implemented, for example, steps S101 to S104 shown in FIG. 1 .
  • the processor 50 executes the computer program 52
  • the functions of the modules/units in each of the foregoing apparatus embodiments such as the functions of the modules 401 to 404 shown in FIG. 4, are implemented.
  • the computer program 52 can be divided into one or more modules/units, and the one or more modules/units are stored in the memory 51 and executed by the processor 50 to complete the this application.
  • the one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the robotic arm 5 .
  • FIG. 5 is only an example of the robot arm 5, and does not constitute a limitation to the robot arm 5. It may include more or less components than the one shown, or combine some components, or different components
  • the robotic arm 5 may further include an input and output device, a network access device, a bus, and the like.
  • the processor 50 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 51 may be an internal storage unit of the robotic arm 5 , such as a hard disk or a memory of the robotic arm 5 .
  • the memory 51 may also be an external storage device of the robotic arm 5, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the robotic arm 5 card, Flash Card, etc.
  • the memory 51 may also include both an internal storage unit of the robotic arm 5 and an external storage device.
  • the memory 51 is used to store the computer program and other programs and data required by the robotic arm 5 .
  • the memory 51 can also be used to temporarily store data that has been output or will be output.
  • the disclosed apparatus/robot and method may be implemented in other ways.
  • the device/manipulator embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated modules/units if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like.
  • the computer-readable storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) ), random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable storage medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer-readable Storage media exclude electrical carrier signals and telecommunications signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Manipulator (AREA)

Abstract

The present application belongs to the technical field of robots, and particularly relates to a robot arm motion planning method and apparatus, and a computer-readable storage medium and a robot arm. The method comprises: determining a virtual optimal motion planning path of a robot arm moving from a preset initial pose to a preset target pose; performing random sampling in a free space of the robot arm, so as to obtain a first random pose of the robot arm; performing iterative optimization on the first random pose according to the virtual optimal motion planning path, so as to obtain an optimized second random pose; and taking the second random pose as a random sampling result in a preset robot arm motion planning algorithm to perform motion planning on the robot arm. By means of the present application, a virtual optimal motion planning path is taken as a guidance basis during random sampling, and iterative optimization is performed on an original random pose obtained by means of the random sampling, such that a random sampling result has an obvious guidance quality, and a large number of invalid searches can be reduced, thereby greatly improving the planning efficiency.

Description

一种机械臂运动规划方法、装置、可读存储介质及机械臂A robotic arm motion planning method, device, readable storage medium, and robotic arm
本申请要求于2021年03月22日在中国专利局提交的、申请号为202110301669.4的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202110301669.4 filed with the Chinese Patent Office on March 22, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请属于机器人技术领域,尤其涉及一种机械臂运动规划方法、装置、计算机可读存储介质及机械臂。The present application belongs to the field of robotics technology, and in particular relates to a method, device, computer-readable storage medium and a robotic arm for motion planning of a robotic arm.
背景技术Background technique
在现有技术中,一般是使用快速扩展随机树(Rapidly-exploring Random Trees,RRT)或者双向快速扩展随机树(Bi-directional RRT,BiRRT)等规划算法对机械臂进行运动规划。但这些算法是在整个自由空间中随机均匀采样,缺乏导向性,存在大量的无效搜索,效率较低。In the prior art, planning algorithms such as Rapidly-exploring Random Trees (RRT) or Bi-directional Rapidly Expanding Random Trees (Bi-directional RRT, BiRRT) are generally used to plan the motion of the robotic arm. However, these algorithms are random and uniform sampling in the entire free space, lack of guidance, there are a large number of invalid searches, and the efficiency is low.
技术问题technical problem
有鉴于此,本申请实施例提供了一种机械臂运动规划方法、装置、计算机可读存储介质及机械臂,以解决现有的机械臂运动规划方法缺乏导向性、效率较低的问题。In view of this, the embodiments of the present application provide a robotic arm motion planning method, device, computer-readable storage medium, and robotic arm to solve the problems of lack of guidance and low efficiency in the existing robotic arm motion planning methods.
技术解决方案technical solutions
本申请实施例的第一方面提供了一种机械臂运动规划方法,可以包括:A first aspect of the embodiments of the present application provides a method for planning a motion of a robotic arm, which may include:
确定机械臂从预设的初始位姿运动至预设的目标位姿的虚拟最优运动规划路径;Determine the virtual optimal motion planning path for the robotic arm to move from the preset initial pose to the preset target pose;
在所述机械臂的自由空间中进行随机采样,得到所述机械臂的第一随机位姿;Perform random sampling in the free space of the robotic arm to obtain the first random pose of the robotic arm;
根据所述虚拟最优运动规划路径对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿;Iteratively optimizes the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose;
将所述第二随机位姿作为预设的机械臂运动规划算法中的随机采样结果对所述机械臂进行运动规划。The second random pose is used as a random sampling result in a preset robotic arm motion planning algorithm to perform motion planning for the robotic arm.
进一步地,所述根据所述虚拟最优运动规划路径对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿,可以包括:Further, the iterative optimization of the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose may include:
将所述第一随机位姿映射至所述虚拟最优运动规划路径上,得到与所述第一随机位姿对应的虚拟最优位姿;mapping the first random pose to the virtual optimal motion planning path to obtain a virtual optimal pose corresponding to the first random pose;
建立与所述虚拟最优位姿对应的引力场函数;establishing a gravitational field function corresponding to the virtual optimal pose;
根据所述引力场函数对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿。The first random pose is iteratively optimized according to the gravitational field function to obtain an optimized second random pose.
进一步地,所述根据所述引力场函数对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿,可以包括:Further, the iterative optimization of the first random pose according to the gravitational field function to obtain an optimized second random pose may include:
将所述第一随机位姿作为当前随机位姿;taking the first random pose as the current random pose;
根据所述引力场函数计算所述当前随机位姿的梯度;Calculate the gradient of the current random pose according to the gravitational field function;
根据当前随机位姿的梯度对所述当前随机位姿进行更新计算,得到更新随机位姿;The current random pose is updated and calculated according to the gradient of the current random pose to obtain an updated random pose;
若所述当前随机位姿的梯度不满足预设的迭代终止条件,则将所述更新随机位姿作为新的当前随机位姿,并返回执行所述根据所述引力场函数计算所述当前随机位姿的梯度的步骤及其后续步骤;If the gradient of the current random pose does not meet the preset iteration termination condition, the updated random pose is taken as the new current random pose, and the execution of the calculation of the current random pose according to the gravitational field function is returned to. The steps of the gradient of the pose and its subsequent steps;
若所述当前随机位姿的梯度满足所述迭代终止条件,则将所述更新随机位姿确定为优化后的第二随机位姿。If the gradient of the current random pose satisfies the iteration termination condition, the updated random pose is determined as the optimized second random pose.
进一步地,所述建立与所述虚拟最优位姿对应的引力场函数,可以包括:Further, the establishing the gravitational field function corresponding to the virtual optimal pose may include:
根据下式建立所述引力场函数:The gravitational field function is established according to the following formula:
Figure PCTCN2021124620-appb-000001
Figure PCTCN2021124620-appb-000001
其中,q goal为所述虚拟最优位姿,q为所述当前随机位姿,
Figure PCTCN2021124620-appb-000002
为预设的尺度因子,d(q,q goal)为q与q goal之间的距离,
Figure PCTCN2021124620-appb-000003
为预设的距离阈值,U att(q)为所述引力场函数。
Wherein, q goal is the virtual optimal pose, q is the current random pose,
Figure PCTCN2021124620-appb-000002
is the preset scale factor, d(q,q goal ) is the distance between q and q goal ,
Figure PCTCN2021124620-appb-000003
is the preset distance threshold, and U att (q) is the gravitational field function.
进一步地,所述根据所述引力场函数计算所述当前随机位姿的梯度,可以包括:Further, calculating the gradient of the current random pose according to the gravitational field function may include:
根据下式计算所述当前随机位姿的梯度:The gradient of the current random pose is calculated according to the following formula:
Figure PCTCN2021124620-appb-000004
Figure PCTCN2021124620-appb-000004
其中,
Figure PCTCN2021124620-appb-000005
为所述当前随机位姿的梯度。
in,
Figure PCTCN2021124620-appb-000005
is the gradient of the current random pose.
进一步地,所述根据当前随机位姿的梯度对所述当前随机位姿进行更新计算,得到更新随机位姿,可以包括:Further, the update calculation of the current random pose according to the gradient of the current random pose to obtain an updated random pose may include:
根据下式对所述当前随机位姿进行更新计算:The current random pose is updated and calculated according to the following formula:
Figure PCTCN2021124620-appb-000006
Figure PCTCN2021124620-appb-000006
其中,q为所述当前随机位姿,
Figure PCTCN2021124620-appb-000007
为所述当前随机位姿的梯度,η为预设的更
Among them, q is the current random pose,
Figure PCTCN2021124620-appb-000007
is the gradient of the current random pose, η is the preset more
新步长,q′为所述更新随机位姿。The new step size, q' is the updated random pose.
进一步地,所述确定机械臂从预设的初始位姿运动至预设的目标位姿的虚拟最优运动规划路径,可以包括:Further, the determining the virtual optimal motion planning path of the robotic arm moving from the preset initial pose to the preset target pose may include:
将连接所述初始位姿和所述目标位姿的直线路径确定为所述虚拟最优运动规划路径。A straight path connecting the initial pose and the target pose is determined as the virtual optimal motion planning path.
本申请实施例的第二方面提供了一种机械臂运动规划装置,可以包括:A second aspect of the embodiments of the present application provides a robotic arm motion planning device, which may include:
虚拟路径确定模块,用于确定机械臂从预设的初始位姿运动至预设的目标位姿的虚拟最优运动规划路径;The virtual path determination module is used to determine the virtual optimal motion planning path of the robot arm moving from the preset initial pose to the preset target pose;
随机采样模块,用于在所述机械臂的自由空间中进行随机采样,得到所述机械臂的第一随机位姿;a random sampling module for performing random sampling in the free space of the robotic arm to obtain the first random pose of the robotic arm;
迭代优化模块,用于根据所述虚拟最优运动规划路径对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿;an iterative optimization module, configured to iteratively optimize the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose;
运动规划模块,用于将所述第二随机位姿作为预设的机械臂运动规划算法中的随机采样结果对所述机械臂进行运动规划。A motion planning module, configured to use the second random pose as a random sampling result in a preset motion planning algorithm of the manipulator to perform motion planning for the manipulator.
进一步地,所述迭代优化模块可以包括:Further, the iterative optimization module may include:
位姿映射单元,用于将所述第一随机位姿映射至所述虚拟最优运动规划路径上,得到与所述第一随机位姿对应的虚拟最优位姿;a pose mapping unit, configured to map the first random pose onto the virtual optimal motion planning path to obtain a virtual optimal pose corresponding to the first random pose;
引力场函数建立单元,用于建立与所述虚拟最优位姿对应的引力场函数;a gravitational field function establishment unit, configured to establish a gravitational field function corresponding to the virtual optimal pose;
迭代优化单元,用于根据所述引力场函数对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿。An iterative optimization unit, configured to iteratively optimize the first random pose according to the gravitational field function to obtain an optimized second random pose.
进一步地,所述迭代优化单元可以包括:Further, the iterative optimization unit may include:
当前随机位姿确定子单元,用于将所述第一随机位姿作为当前随机位姿;The current random pose determination subunit is used to use the first random pose as the current random pose;
梯度计算子单元,用于根据所述引力场函数计算所述当前随机位姿的梯度;a gradient calculation subunit, configured to calculate the gradient of the current random pose according to the gravitational field function;
更新计算子单元,用于根据当前随机位姿的梯度对所述当前随机位姿进行更新计算,得到更新随机位姿;an update calculation subunit, configured to update and calculate the current random pose according to the gradient of the current random pose to obtain an updated random pose;
当前随机位姿更新子单元,用于若所述当前随机位姿的梯度不满足预设的迭代终止条件,则将所述更新随机位姿作为新的当前随机位姿;The current random pose update subunit is configured to use the updated random pose as a new current random pose if the gradient of the current random pose does not meet the preset iteration termination condition;
第二随机位姿确定子单元,用于若所述当前随机位姿的梯度满足所述迭代终止条件,则将所述更新随机位姿确定为优化后的第二随机位姿。The second random pose determination subunit is configured to determine the updated random pose as the optimized second random pose if the gradient of the current random pose satisfies the iteration termination condition.
进一步地,所述引力场函数建立单元具体用于根据下式建立所述引力场函数:Further, the gravitational field function establishment unit is specifically configured to establish the gravitational field function according to the following formula:
Figure PCTCN2021124620-appb-000008
Figure PCTCN2021124620-appb-000008
其中,q goal为所述虚拟最优位姿,q为所述当前随机位姿,
Figure PCTCN2021124620-appb-000009
为预设的尺度因子,d(q,q goal)为q与q goal之间的距离,
Figure PCTCN2021124620-appb-000010
为预设的距离阈值,U att(q)为所述引力场函数。
Wherein, q goal is the virtual optimal pose, q is the current random pose,
Figure PCTCN2021124620-appb-000009
is the preset scale factor, d(q,q goal ) is the distance between q and q goal ,
Figure PCTCN2021124620-appb-000010
is the preset distance threshold, and U att (q) is the gravitational field function.
进一步地,所述梯度计算子单元具体用于根据下式计算所述当前随机位姿的梯度:Further, the gradient calculation subunit is specifically configured to calculate the gradient of the current random pose according to the following formula:
Figure PCTCN2021124620-appb-000011
Figure PCTCN2021124620-appb-000011
其中,
Figure PCTCN2021124620-appb-000012
为所述当前随机位姿的梯度。
in,
Figure PCTCN2021124620-appb-000012
is the gradient of the current random pose.
进一步地,所述更新计算子单元具体用于根据下式对所述当前随机位姿进行更新计算:Further, the update calculation subunit is specifically configured to update and calculate the current random pose according to the following formula:
Figure PCTCN2021124620-appb-000013
Figure PCTCN2021124620-appb-000013
其中,q为所述当前随机位姿,
Figure PCTCN2021124620-appb-000014
为所述当前随机位姿的梯度,η为预设的更新步长,q′为所述更新随机位姿。
Among them, q is the current random pose,
Figure PCTCN2021124620-appb-000014
is the gradient of the current random pose, η is the preset update step size, and q′ is the updated random pose.
进一步地,所述虚拟路径确定模块具体用于将连接所述初始位姿和所述目标位姿的直线路径确定为所述虚拟最优运动规划路径。Further, the virtual path determination module is specifically configured to determine a straight line path connecting the initial pose and the target pose as the virtual optimal motion planning path.
本申请实施例的第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述任一种机械臂运动规划方法的步骤。A third aspect of the embodiments of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned robotic arm motion planning methods is implemented. step.
本申请实施例的第四方面提供了一种机械臂,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述任一种机械臂运动规划方法的步骤。A fourth aspect of the embodiments of the present application provides a robotic arm, including a memory, a processor, and a computer program stored in the memory and executable on the processor, when the processor executes the computer program The steps of implementing any one of the above-mentioned robotic arm motion planning methods.
本申请实施例的第五方面提供了一种计算机程序产品,当计算机程序产品在机械臂上运行时,使得机械臂执行上述任一种机械臂运动规划方法的步骤。A fifth aspect of the embodiments of the present application provides a computer program product, which, when the computer program product runs on a robotic arm, causes the robotic arm to execute the steps of any of the above-mentioned methods for motion planning of a robotic arm.
有益效果beneficial effect
本申请实施例与现有技术相比存在的有益效果是:本申请实施例确定机械臂从预设的初始位姿运动至预设的目标位姿的虚拟最优运动规划路径;在所述机械臂的自由空间中进行随机采样,得到所述机械臂的第一随机位姿;根据所述虚拟最优运动规划路径对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿;将所述第二随机位姿作为预设的机械臂运动规划算法中的随机采样结果对所述机械臂进行运动规划。通过本申请实施例,以理想状态的虚拟最优运动规划路径作为随机采样时的导向依据,对随机采样得到的原始随机位姿(即第一随机位姿)进行迭代优化,从而将其向虚拟最优运动规划路径的方向上牵引,得到优化后的随机位姿(即第二随机位姿),这样得到的随机采样结果具有明显的导向性,基于这样的随机采样结果对机械臂进行运动规划,能够减少大量的无效搜索,极大提升了规划效率。The beneficial effects of the embodiments of the present application compared with the prior art are: the embodiments of the present application determine a virtual optimal motion planning path for the robotic arm to move from a preset initial pose to a preset target pose; Perform random sampling in the free space of the arm to obtain the first random pose of the robotic arm; iteratively optimize the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose pose; use the second random pose as a random sampling result in a preset robotic arm motion planning algorithm to perform motion planning for the robotic arm. Through the embodiment of the present application, the virtual optimal motion planning path in the ideal state is used as the guiding basis for random sampling, and the original random pose (ie the first random pose) obtained by random sampling is iteratively optimized, so that it is transferred to the virtual Traction in the direction of the optimal motion planning path to obtain the optimized random pose (ie, the second random pose), and the random sampling result obtained in this way has obvious orientation. Based on such random sampling results, the motion planning of the robotic arm is carried out. , which can reduce a large number of invalid searches and greatly improve the planning efficiency.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所 需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only for the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1为本申请实施例中一种机械臂运动规划方法的一个实施例流程图;1 is a flowchart of an embodiment of a method for planning a motion of a robotic arm in an embodiment of the present application;
图2为根据虚拟最优运动规划路径对第一随机位姿进行迭代优化的示意流程图;2 is a schematic flowchart of iterative optimization of a first random pose according to a virtual optimal motion planning path;
图3为根据引力场函数对第一随机位姿进行迭代优化的示意流程图;FIG. 3 is a schematic flowchart of iterative optimization of the first random pose according to the gravitational field function;
图4为本申请实施例中一种机械臂运动规划装置的一个实施例结构图;4 is a structural diagram of an embodiment of a robotic arm motion planning device in an embodiment of the application;
图5为本申请实施例中一种机械臂的示意框图。FIG. 5 is a schematic block diagram of a robotic arm in an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
为使得本申请的发明目的、特征、优点能够更加的明显和易懂,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,下面所描述的实施例仅仅是本申请一部分实施例,而非全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。In order to make the purpose, features and advantages of the invention of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the following The described embodiments are only some, but not all, embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It is to be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described feature, integer, step, operation, element and/or component, but does not exclude one or more other features , whole, step, operation, element, component and/or the presence or addition of a collection thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terminology used in the specification of the application herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural unless the context clearly dictates otherwise.
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be further understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items .
如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" may be contextually interpreted as "when" or "once" or "in response to determining" or "in response to detecting" . Similarly, the phrases "if it is determined" or "if the [described condition or event] is detected" may be interpreted, depending on the context, to mean "once it is determined" or "in response to the determination" or "once the [described condition or event] is detected. ]" or "in response to detection of the [described condition or event]".
另外,在本申请的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
请参阅图1,本申请实施例中一种机械臂运动规划方法的一个实施例可以包括:Referring to FIG. 1, an embodiment of a robotic arm motion planning method in the embodiment of the present application may include:
步骤S101、确定机械臂从预设的初始位姿运动至预设的目标位姿的虚拟最优运动规划路径。Step S101 , determining a virtual optimal motion planning path for the robotic arm to move from a preset initial pose to a preset target pose.
在本申请实施例中,可以通过位姿空间(configuration space)描述机械臂所有关节的位姿构成的集合,即C空间,而当考虑机械臂和障碍物时,C空间会分为两个空间,即障碍物空间C Obs和自由空间C freeIn this embodiment of the present application, the set composed of the poses of all joints of the manipulator can be described by the configuration space, that is, the C space, and when the manipulator and obstacles are considered, the C space is divided into two spaces , namely the obstacle space C Obs and the free space C free .
其中,C Obs可以用下式进行描述: Among them, C Obs can be described by the following formula:
Figure PCTCN2021124620-appb-000015
Figure PCTCN2021124620-appb-000015
即C Obs为满足以下条件的位姿构成的集合:该位姿(即q)属于C空间且在该位姿下的机械臂(即Robot(q))与障碍物(即Obs)相交不为空,两者发生碰撞。 That is, C Obs is a set of poses that satisfy the following conditions: the pose (ie q) belongs to the C space and the robot arm (ie Robot(q)) under this pose and the obstacle (ie Obs) do not intersect empty, the two collide.
相应地,C free可以用下式进行描述: Correspondingly, C free can be described by the following formula:
C free=C-C Obs C free = CC Obs
即C free为C Obs的补集。 That is, C free is the complement of C Obs .
C free是机械臂能够在其中运动并发现轨迹最优、时间最短的可选区域。机械臂运动规划算法的基本思想是基于C free建立用于解决机械臂运动规划问题的路径图,其具体流程可以包括: C free is an optional area in which the robotic arm can move and find the optimal trajectory and the shortest time. The basic idea of the manipulator motion planning algorithm is to establish a path diagram for solving the manipulator motion planning problem based on C free . The specific process can include:
(1)确定机械臂的工作空间W;(1) Determine the workspace W of the robotic arm;
(2)确定工作空间W中的障碍物Obs以及机械臂Robot;(2) Determine the obstacles Obs in the workspace W and the robotic arm Robot;
(3)确定机械臂对应的C空间,以及障碍物空间C Obs和自由空间C free(3) Determine the C space corresponding to the robotic arm, as well as the obstacle space C Obs and the free space C free ;
(4)确定机械臂的初始位姿q init和目标位姿q end(4) Determine the initial pose q init and the target pose q end of the robotic arm;
(5)在自由空间C free中根据机械臂运动规划算法采样获得机械臂的无碰撞路径τ,该路径需满足τ[0,1]→C free,其中,0表示运动规划的起始时间点,1表示运动规划的终止时间点,该路径在从起始时间点至终止时间点之间的任意一个规划时间点时的机械臂位姿均处在自由空间C free的范围内,且该路径在起始时间点时的机械臂位姿为初始位姿,即τ[0]=q init,该路径在终止时间点时的机械臂位姿为目标位姿,即τ[1]=q end(5) The collision-free path τ of the manipulator is obtained by sampling according to the motion planning algorithm of the manipulator in the free space C free , and the path must satisfy τ[0,1]→C free , where 0 represents the starting time point of the motion planning , 1 indicates the termination time point of the motion planning, the robot arm pose at any planning time point between the start time point and the termination time point of the path is within the range of the free space C free , and the path The pose of the robotic arm at the start time point is the initial pose, that is, τ[0]=q init , and the pose of the robotic arm at the end time point of the path is the target pose, that is, τ[1]=q end .
在本申请实施例中,可以将连接初始位姿和目标位姿的直线路径确定为虚拟最优运动规划路径。需要注意的是,这条虚拟最优运动规划路径仅仅只是一条理想状态下的最优路径,因为这条路径可能会通过障碍物空间,因此在实际中往往并不可行。但是该路径可以作为实际的运动规划的导向依据,减少运动规划过程中无方向的随机搜索。In this embodiment of the present application, a straight path connecting the initial pose and the target pose may be determined as the virtual optimal motion planning path. It should be noted that this virtual optimal motion planning path is only an optimal path in an ideal state, because this path may pass through the obstacle space, so it is often not feasible in practice. However, the path can be used as the guiding basis for the actual motion planning, reducing the random search without direction in the process of motion planning.
步骤S102、在机械臂的自由空间中进行随机采样,得到机械臂的第一随机位姿。In step S102, random sampling is performed in the free space of the manipulator to obtain a first random pose of the manipulator.
在本申请实施例中,可以采用现有技术中的任意一种方式在自由空间中进行随机采样。为了便于区分,此处将采用现有技术进行随机采样得到的结果记为第一随机位姿。In the embodiments of the present application, random sampling in free space may be performed in any manner in the prior art. In order to facilitate the distinction, the result obtained by random sampling using the prior art is recorded as the first random pose.
步骤S103、根据虚拟最优运动规划路径对第一随机位姿进行迭代优化,得到优化后的第二随机位姿。Step S103 , iteratively optimize the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose.
如图2所示,步骤S103具体可以包括如下过程:As shown in FIG. 2, step S103 may specifically include the following process:
步骤S1031、将第一随机位姿映射至虚拟最优运动规划路径上,得到与第一随机位姿对应的虚拟最优位姿。Step S1031 , mapping the first random pose to the virtual optimal motion planning path to obtain a virtual optimal pose corresponding to the first random pose.
在本申请实施例中,可以将第一随机位姿在虚拟最优运动规划路径上的投影作为虚拟最优位姿。In this embodiment of the present application, the projection of the first random pose on the virtual optimal motion planning path may be used as the virtual optimal pose.
步骤S1032、建立与虚拟最优位姿对应的引力场函数。Step S1032, establishing a gravitational field function corresponding to the virtual optimal pose.
具体地,可以根据下式建立引力场函数:Specifically, the gravitational field function can be established according to the following formula:
Figure PCTCN2021124620-appb-000016
Figure PCTCN2021124620-appb-000016
其中,q goal为虚拟最优位姿,q为当前随机位姿,
Figure PCTCN2021124620-appb-000017
为预设的尺度因子,其具体取值可以根据实际情况进行设置,d(q,q goal)为q与q goal之间的距离,
Figure PCTCN2021124620-appb-000018
为预设的距离阈值,其具体取值可以根据实际情况进行设置,U att(q)为引力场函数。从上式中可以看出,引力场函数是个分段函数,当
Figure PCTCN2021124620-appb-000019
时,引力势能的大小与当前随机位姿到虚拟最优位姿的距离的平方成正比;而当
Figure PCTCN2021124620-appb-000020
时,降低引力计算函数的取值,从而避免当前随机位姿距离虚拟最优位姿较远时引力过大的问题。
Among them, q goal is the virtual optimal pose, q is the current random pose,
Figure PCTCN2021124620-appb-000017
is a preset scale factor, and its specific value can be set according to the actual situation, d(q,q goal ) is the distance between q and q goal ,
Figure PCTCN2021124620-appb-000018
is the preset distance threshold, and its specific value can be set according to the actual situation, U att (q) is the gravitational field function. It can be seen from the above formula that the gravitational field function is a piecewise function, when
Figure PCTCN2021124620-appb-000019
When , the magnitude of gravitational potential energy is proportional to the square of the distance from the current random pose to the virtual optimal pose; and when
Figure PCTCN2021124620-appb-000020
When , reduce the value of the gravitational calculation function, so as to avoid the problem of excessive gravitational force when the current random pose is far from the virtual optimal pose.
步骤S1033、根据引力场函数对第一随机位姿进行迭代优化,得到优化后的第二随机位姿。Step S1033: Perform iterative optimization on the first random pose according to the gravitational field function to obtain an optimized second random pose.
如图3所示,步骤S1033具体可以包括如下过程:As shown in FIG. 3, step S1033 may specifically include the following process:
步骤S10331、将第一随机位姿作为当前随机位姿。Step S10331, taking the first random pose as the current random pose.
步骤S10332、根据引力场函数计算当前随机位姿的梯度。Step S10332: Calculate the gradient of the current random pose according to the gravitational field function.
具体地,可以将引力场函数对距离求导,从而得到如下式所示的梯度计算公式:Specifically, the gravitational field function can be derived from the distance to obtain the gradient calculation formula shown in the following formula:
Figure PCTCN2021124620-appb-000021
Figure PCTCN2021124620-appb-000021
其中,
Figure PCTCN2021124620-appb-000022
为当前随机位姿的梯度。
in,
Figure PCTCN2021124620-appb-000022
is the gradient of the current random pose.
步骤S10333、根据当前随机位姿的梯度对当前随机位姿进行更新计算,得到更新随机位姿。Step S10333: Perform update calculation on the current random pose according to the gradient of the current random pose to obtain an updated random pose.
具体地,可以根据下式对当前随机位姿进行更新计算:Specifically, the current random pose can be updated and calculated according to the following formula:
Figure PCTCN2021124620-appb-000023
Figure PCTCN2021124620-appb-000023
其中,q为当前随机位姿,
Figure PCTCN2021124620-appb-000024
为当前随机位姿的梯度,η为预设的更新步长,其具体取值可以根据实际情况进行设置,q′为更新随机位姿。由于梯度方向是函数上升最快的方向,通过梯度迭代可以获取局部最优解。
Among them, q is the current random pose,
Figure PCTCN2021124620-appb-000024
is the gradient of the current random pose, η is the preset update step size, and its specific value can be set according to the actual situation, and q' is the update random pose. Since the gradient direction is the fastest rising direction of the function, the local optimal solution can be obtained through gradient iteration.
步骤S10334、判断当前随机位姿的梯度是否满足预设的迭代终止条件。Step S10334: Determine whether the gradient of the current random pose satisfies a preset iteration termination condition.
在本申请实施例中,迭代终止条件可以为:当前规划路径的梯度小于预设的梯度阈值,或迭代优化时长大于预设的时长阈值。其中,梯度阈值和时长阈值的具体取值均可以根据实际情况进行设置。通过这样的方式,可以对迭代优化时长进行控制,从而保证在向引力场方向扩展的同时不至于因此耗费过多的时间而影响整体的采样效率。In this embodiment of the present application, the iteration termination condition may be: the gradient of the current planned path is less than a preset gradient threshold, or the iterative optimization duration is greater than a preset duration threshold. The specific values of the gradient threshold and the duration threshold can be set according to actual conditions. In this way, the duration of iterative optimization can be controlled, so as to ensure that the overall sampling efficiency will not be affected due to excessive time consumption while expanding in the direction of the gravitational field.
若当前随机位姿的梯度不满足预设的迭代终止条件,则执行步骤S10335;若当前随机位姿的梯度满足迭代终止条件,则执行步骤S10336。If the gradient of the current random pose does not meet the preset iteration termination condition, step S10335 is performed; if the gradient of the current random pose meets the iteration termination condition, step S10336 is performed.
步骤S10335、将更新随机位姿作为新的当前随机位姿。Step S10335, taking the updated random pose as the new current random pose.
在执行步骤S10335之后,返回执行步骤S10332及其后续步骤。After executing step S10335, return to executing step S10332 and its subsequent steps.
步骤S10336、将更新随机位姿确定为优化后的随机位姿。Step S10336: Determine the updated random pose as the optimized random pose.
为了便于区分,此处将优化后的随机位姿记为第二随机位姿。For the convenience of distinction, the optimized random pose is recorded as the second random pose here.
步骤S104、将第二随机位姿作为预设的机械臂运动规划算法中的随机采样结果对机械臂进行运动规划。Step S104 , using the second random pose as a random sampling result in the preset robotic arm motion planning algorithm to perform motion planning for the robotic arm.
在本申请实施例中,可以使用现有技术中的任意一种机械臂运动规划算法来对机械臂进行运动规划,包括但不限于RRT或BiRRT等具体的规划算法,具体的规划过程可以参见现有技术内容,此处对其不再赘述。但需要注意的是,本申请实施例在现有的机械臂运动规划算法的基础上,对其中的随机采样的过程进行了优化,对于每一次的随机采样,均以优化后的第二随机位姿来代替原始的第一随机位姿作为随机采样结果,并基于这一随机采样结果对机械臂进行运动规划。In this embodiment of the present application, any manipulator motion planning algorithm in the prior art can be used to plan the motion of the manipulator, including but not limited to specific planning algorithms such as RRT or BiRRT. For the specific planning process, please refer to the present There are technical contents, which will not be repeated here. However, it should be noted that the embodiment of the present application optimizes the random sampling process based on the existing robotic arm motion planning algorithm. For each random sampling, the optimized second random bit is used. The original first random pose is used as the random sampling result, and the motion planning of the robotic arm is performed based on this random sampling result.
综上,本申请实施例以理想状态的虚拟最优运动规划路径作为随机采样时的导向依据,对随机采样得到的原始随机位姿(即第一随机位姿)进行迭代优化,从而将其向虚拟最优运动规划路径的方向上牵引,得到优化后的随机位姿(即第二随机位姿),这样得到的随机采样结果具有明显的导向性,基于这样的随机采样结果对机械臂进行运动规划,能够减少大量的无效搜索,极大提升了规划效率。To sum up, the embodiment of the present application uses the ideal virtual optimal motion planning path as the guiding basis for random sampling, and performs iterative optimization on the original random pose (ie, the first random pose) obtained by random sampling, so as to make it a Traction in the direction of the virtual optimal motion planning path to obtain the optimized random pose (ie the second random pose), the random sampling result obtained in this way has obvious orientation, and the robotic arm is moved based on the random sampling result. Planning can reduce a large number of invalid searches and greatly improve the planning efficiency.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
对应于上文实施例所述的一种机械臂运动规划方法,图4示出了本申请实施例提供的一种机械臂运动规划装置的一个实施例结构图。Corresponding to the robotic arm motion planning method described in the above embodiment, FIG. 4 shows a structural diagram of an embodiment of a robotic arm motion planning apparatus provided in an embodiment of the present application.
本实施例中,一种机械臂运动规划装置可以包括:In this embodiment, a robotic arm motion planning device may include:
虚拟路径确定模块401,用于确定机械臂从预设的初始位姿运动至预设的目标位姿的虚拟最优运动规划路径;A virtual path determination module 401, configured to determine a virtual optimal motion planning path for the robotic arm to move from a preset initial pose to a preset target pose;
随机采样模块402,用于在所述机械臂的自由空间中进行随机采样,得到所述机械臂的第一随机位姿;A random sampling module 402, configured to perform random sampling in the free space of the robotic arm to obtain a first random pose of the robotic arm;
迭代优化模块403,用于根据所述虚拟最优运动规划路径对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿;an iterative optimization module 403, configured to iteratively optimize the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose;
运动规划模块404,用于将所述第二随机位姿作为预设的机械臂运动规划算法中的随机采样结果对所述机械臂进行运动规划。The motion planning module 404 is configured to use the second random pose as a random sampling result in a preset motion planning algorithm of the manipulator to perform motion planning for the manipulator.
进一步地,所述迭代优化模块可以包括:Further, the iterative optimization module may include:
位姿映射单元,用于将所述第一随机位姿映射至所述虚拟最优运动规划路径上,得到与所述第一随机位姿对应的虚拟最优位姿;a pose mapping unit, configured to map the first random pose onto the virtual optimal motion planning path to obtain a virtual optimal pose corresponding to the first random pose;
引力场函数建立单元,用于建立与所述虚拟最优位姿对应的引力场函数;a gravitational field function establishment unit, configured to establish a gravitational field function corresponding to the virtual optimal pose;
迭代优化单元,用于根据所述引力场函数对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿。An iterative optimization unit, configured to iteratively optimize the first random pose according to the gravitational field function to obtain an optimized second random pose.
进一步地,所述迭代优化单元可以包括:Further, the iterative optimization unit may include:
当前随机位姿确定子单元,用于将所述第一随机位姿作为当前随机位姿;The current random pose determination subunit is used to use the first random pose as the current random pose;
梯度计算子单元,用于根据所述引力场函数计算所述当前随机位姿的梯度;a gradient calculation subunit, configured to calculate the gradient of the current random pose according to the gravitational field function;
更新计算子单元,用于根据当前随机位姿的梯度对所述当前随机位姿进行更新计算,得到更新随机位姿;an update calculation subunit, configured to update and calculate the current random pose according to the gradient of the current random pose to obtain an updated random pose;
当前随机位姿更新子单元,用于若所述当前随机位姿的梯度不满足预设的迭代终止条件,则将所述更新随机位姿作为新的当前随机位姿;The current random pose update subunit is configured to use the updated random pose as a new current random pose if the gradient of the current random pose does not meet the preset iteration termination condition;
第二随机位姿确定子单元,用于若所述当前随机位姿的梯度满足所述迭代终止条件,则将所述更新随机位姿确定为优化后的第二随机位姿。The second random pose determination subunit is configured to determine the updated random pose as the optimized second random pose if the gradient of the current random pose satisfies the iteration termination condition.
进一步地,所述引力场函数建立单元具体用于根据下式建立所述引力场函数:Further, the gravitational field function establishment unit is specifically configured to establish the gravitational field function according to the following formula:
Figure PCTCN2021124620-appb-000025
Figure PCTCN2021124620-appb-000025
其中,q goal为所述虚拟最优位姿,q为所述当前随机位姿,
Figure PCTCN2021124620-appb-000026
为预设的尺度因子,d(q,q goal)为q与q goal之间的距离,
Figure PCTCN2021124620-appb-000027
为预设的距离阈值,U att(q)为所述引力场函数。
Wherein, q goal is the virtual optimal pose, q is the current random pose,
Figure PCTCN2021124620-appb-000026
is the preset scale factor, d(q,q goal ) is the distance between q and q goal ,
Figure PCTCN2021124620-appb-000027
is the preset distance threshold, and U att (q) is the gravitational field function.
进一步地,所述梯度计算子单元具体用于根据下式计算所述当前随机位姿的梯度:Further, the gradient calculation subunit is specifically configured to calculate the gradient of the current random pose according to the following formula:
Figure PCTCN2021124620-appb-000028
Figure PCTCN2021124620-appb-000028
其中,
Figure PCTCN2021124620-appb-000029
为所述当前随机位姿的梯度。
in,
Figure PCTCN2021124620-appb-000029
is the gradient of the current random pose.
进一步地,所述更新计算子单元具体用于根据下式对所述当前随机位姿进行更新计算:Further, the update calculation subunit is specifically configured to update and calculate the current random pose according to the following formula:
Figure PCTCN2021124620-appb-000030
Figure PCTCN2021124620-appb-000030
其中,q为所述当前随机位姿,
Figure PCTCN2021124620-appb-000031
为所述当前随机位姿的梯度,η为预设的更新步长,q′为所述更新随机位姿。
Among them, q is the current random pose,
Figure PCTCN2021124620-appb-000031
is the gradient of the current random pose, η is the preset update step size, and q′ is the updated random pose.
进一步地,所述虚拟路径确定模块具体用于将连接所述初始位姿和所述目标位姿的直线路径确定为所述虚拟最优运动规划路径。Further, the virtual path determination module is specifically configured to determine a straight line path connecting the initial pose and the target pose as the virtual optimal motion planning path.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置,模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described devices, modules and units can be referred to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
图5示出了本申请实施例提供的一种机械臂的示意框图,为了便于说明,仅示出了与本申请实施例相关的部分。FIG. 5 shows a schematic block diagram of a robotic arm provided by an embodiment of the present application. For the convenience of description, only parts related to the embodiment of the present application are shown.
如图5所示,该实施例的机械臂5包括:处理器50、存储器51以及存储在所述存储器51中并可在所述处理器50上运行的计算机程序52。所述处理器50执行所述计算机程序52时实现上述各个机械臂运动规划方法实施例中的步骤,例如图1所示的步骤S101至步骤S104。或者,所述处理器50执行所述计算机程序52时实现上述各装置实施例中各模块/单元的功能,例如图4所示模块401至模块404的功能。As shown in FIG. 5 , the robotic arm 5 of this embodiment includes: a processor 50 , a memory 51 , and a computer program 52 stored in the memory 51 and executable on the processor 50 . When the processor 50 executes the computer program 52 , the steps in each of the above embodiments of the robotic arm motion planning method are implemented, for example, steps S101 to S104 shown in FIG. 1 . Alternatively, when the processor 50 executes the computer program 52, the functions of the modules/units in each of the foregoing apparatus embodiments, such as the functions of the modules 401 to 404 shown in FIG. 4, are implemented.
示例性的,所述计算机程序52可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器51中,并由所述处理器50执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序52在所述机械臂5中的执行过程。Exemplarily, the computer program 52 can be divided into one or more modules/units, and the one or more modules/units are stored in the memory 51 and executed by the processor 50 to complete the this application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the robotic arm 5 .
本领域技术人员可以理解,图5仅仅是机械臂5的示例,并不构成对机械臂5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述机械臂5还可以包括输入输出设备、网络接入设备、总线等。Those skilled in the art can understand that FIG. 5 is only an example of the robot arm 5, and does not constitute a limitation to the robot arm 5. It may include more or less components than the one shown, or combine some components, or different components For example, the robotic arm 5 may further include an input and output device, a network access device, a bus, and the like.
所述处理器50可以是中央处理单元(Central Processing Unit,CPU),还可以是其它通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列 (Field-Programmable Gate Array,FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 50 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
所述存储器51可以是所述机械臂5的内部存储单元,例如机械臂5的硬盘或内存。所述存储器51也可以是所述机械臂5的外部存储设备,例如所述机械臂5上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器51还可以既包括所述机械臂5的内部存储单元也包括外部存储设备。所述存储器51用于存储所述计算机程序以及所述机械臂5所需的其它程序和数据。所述存储器51还可以用于暂时地存储已经输出或者将要输出的数据。The memory 51 may be an internal storage unit of the robotic arm 5 , such as a hard disk or a memory of the robotic arm 5 . The memory 51 may also be an external storage device of the robotic arm 5, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the robotic arm 5 card, Flash Card, etc. Further, the memory 51 may also include both an internal storage unit of the robotic arm 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the robotic arm 5 . The memory 51 can also be used to temporarily store data that has been output or will be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述***中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion, that is, dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/机械臂和方法,可以通过其它的方式实现。例如,以上所描述的装置/机械臂实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/robot and method may be implemented in other ways. For example, the device/manipulator embodiments described above are only 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, such as multiple units. Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的 部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读存储介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读存储介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读存储介质不包括电载波信号和电信信号。The integrated modules/units, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) ), random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable storage medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer-readable Storage media exclude electrical carrier signals and telecommunications signals.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that: it can still be used for the above-mentioned implementations. The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the application, and should be included in the within the scope of protection of this application.

Claims (10)

  1. 一种机械臂运动规划方法,其特征在于,包括:A method for motion planning of a robotic arm, comprising:
    确定机械臂从预设的初始位姿运动至预设的目标位姿的虚拟最优运动规划路径;Determine the virtual optimal motion planning path for the robotic arm to move from the preset initial pose to the preset target pose;
    在所述机械臂的自由空间中进行随机采样,得到所述机械臂的第一随机位姿;Perform random sampling in the free space of the robotic arm to obtain the first random pose of the robotic arm;
    根据所述虚拟最优运动规划路径对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿;Iteratively optimizes the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose;
    将所述第二随机位姿作为预设的机械臂运动规划算法中的随机采样结果对所述机械臂进行运动规划。The second random pose is used as a random sampling result in a preset robotic arm motion planning algorithm to perform motion planning for the robotic arm.
  2. 根据权利要求1所述的机械臂运动规划方法,其特征在于,所述根据所述虚拟最优运动规划路径对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿,包括:The robotic arm motion planning method according to claim 1, wherein the first random pose is iteratively optimized according to the virtual optimal motion planning path to obtain an optimized second random pose, include:
    将所述第一随机位姿映射至所述虚拟最优运动规划路径上,得到与所述第一随机位姿对应的虚拟最优位姿;mapping the first random pose to the virtual optimal motion planning path to obtain a virtual optimal pose corresponding to the first random pose;
    建立与所述虚拟最优位姿对应的引力场函数;establishing a gravitational field function corresponding to the virtual optimal pose;
    根据所述引力场函数对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿。The first random pose is iteratively optimized according to the gravitational field function to obtain an optimized second random pose.
  3. 根据权利要求2所述的机械臂运动规划方法,其特征在于,所述根据所述引力场函数对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿,包括:The robotic arm motion planning method according to claim 2, wherein the iterative optimization of the first random pose according to the gravitational field function to obtain an optimized second random pose, comprising:
    将所述第一随机位姿作为当前随机位姿;taking the first random pose as the current random pose;
    根据所述引力场函数计算所述当前随机位姿的梯度;Calculate the gradient of the current random pose according to the gravitational field function;
    根据当前随机位姿的梯度对所述当前随机位姿进行更新计算,得到更新随机位姿;The current random pose is updated and calculated according to the gradient of the current random pose to obtain an updated random pose;
    若所述当前随机位姿的梯度不满足预设的迭代终止条件,则将所述更新随机位姿作为新的当前随机位姿,并返回执行所述根据所述引力场函数计算所述当前随机位姿的梯度的步骤及其后续步骤;If the gradient of the current random pose does not meet the preset iteration termination condition, the updated random pose is taken as the new current random pose, and the execution of the calculation of the current random pose according to the gravitational field function is returned to. The steps of the gradient of the pose and its subsequent steps;
    若所述当前随机位姿的梯度满足所述迭代终止条件,则将所述更新随机位姿确定为优化后的第二随机位姿。If the gradient of the current random pose satisfies the iteration termination condition, the updated random pose is determined as the optimized second random pose.
  4. 根据权利要求3所述的机械臂运动规划方法,其特征在于,所述建立与所述虚拟最优位姿对应的引力场函数,包括:The robotic arm motion planning method according to claim 3, wherein the establishing a gravitational field function corresponding to the virtual optimal pose comprises:
    根据下式建立所述引力场函数:The gravitational field function is established according to the following formula:
    Figure PCTCN2021124620-appb-100001
    Figure PCTCN2021124620-appb-100001
    其中,q goal为所述虚拟最优位姿,q为所述当前随机位姿,
    Figure PCTCN2021124620-appb-100002
    为预设的尺度因子, d(q,q goal)为q与q goal之间的距离,
    Figure PCTCN2021124620-appb-100003
    为预设的距离阈值,U att(q)为所述引力场函数。
    Wherein, q goal is the virtual optimal pose, q is the current random pose,
    Figure PCTCN2021124620-appb-100002
    is the preset scale factor, d(q,q goal ) is the distance between q and q goal ,
    Figure PCTCN2021124620-appb-100003
    is the preset distance threshold, and U att (q) is the gravitational field function.
  5. 根据权利要求4所述的机械臂运动规划方法,其特征在于,所述根据所述引力场函数计算所述当前随机位姿的梯度,包括:The robotic arm motion planning method according to claim 4, wherein the calculating the gradient of the current random pose according to the gravitational field function comprises:
    根据下式计算所述当前随机位姿的梯度:The gradient of the current random pose is calculated according to the following formula:
    Figure PCTCN2021124620-appb-100004
    Figure PCTCN2021124620-appb-100004
    其中,
    Figure PCTCN2021124620-appb-100005
    为所述当前随机位姿的梯度。
    in,
    Figure PCTCN2021124620-appb-100005
    is the gradient of the current random pose.
  6. 根据权利要求3所述的机械臂运动规划方法,其特征在于,所述根据当前随机位姿的梯度对所述当前随机位姿进行更新计算,得到更新随机位姿,包括:The robotic arm motion planning method according to claim 3, wherein the updating and calculating the current random pose according to the gradient of the current random pose to obtain an updated random pose, comprising:
    根据下式对所述当前随机位姿进行更新计算:The current random pose is updated and calculated according to the following formula:
    Figure PCTCN2021124620-appb-100006
    Figure PCTCN2021124620-appb-100006
    其中,q为所述当前随机位姿,
    Figure PCTCN2021124620-appb-100007
    为所述当前随机位姿的梯度,η为预设的更新步长,q′为所述更新随机位姿。
    Among them, q is the current random pose,
    Figure PCTCN2021124620-appb-100007
    is the gradient of the current random pose, η is the preset update step size, and q′ is the updated random pose.
  7. 根据权利要求1至6中任一项所述的机械臂运动规划方法,其特征在于,所述确定机械臂从预设的初始位姿运动至预设的目标位姿的虚拟最优运动规划路径,包括:The motion planning method for a robotic arm according to any one of claims 1 to 6, wherein the determining a virtual optimal motion planning path for the robotic arm to move from a preset initial pose to a preset target pose ,include:
    将连接所述初始位姿和所述目标位姿的直线路径确定为所述虚拟最优运动规划路径。A straight path connecting the initial pose and the target pose is determined as the virtual optimal motion planning path.
  8. 一种机械臂运动规划装置,其特征在于,包括:A robotic arm motion planning device, characterized in that it includes:
    虚拟路径确定模块,用于确定机械臂从预设的初始位姿运动至预设的目标位姿的虚拟最优运动规划路径;The virtual path determination module is used to determine the virtual optimal motion planning path of the robot arm moving from the preset initial pose to the preset target pose;
    随机采样模块,用于在所述机械臂的自由空间中进行随机采样,得到所述机械臂的第一随机位姿;a random sampling module for performing random sampling in the free space of the robotic arm to obtain the first random pose of the robotic arm;
    迭代优化模块,用于根据所述虚拟最优运动规划路径对所述第一随机位姿进行迭代优化,得到优化后的第二随机位姿;an iterative optimization module, configured to iteratively optimize the first random pose according to the virtual optimal motion planning path to obtain an optimized second random pose;
    运动规划模块,用于将所述第二随机位姿作为预设的机械臂运动规划算法中的随机采样结果对所述机械臂进行运动规划。A motion planning module, configured to use the second random pose as a random sampling result in a preset motion planning algorithm of the manipulator to perform motion planning for the manipulator.
  9. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的机械臂运动规划方法的步骤。A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the robotic arm motion according to any one of claims 1 to 7 is realized Steps in the planning method.
  10. 一种机械臂,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至 7中任一项所述的机械臂运动规划方法的步骤。A robotic arm, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, when the processor executes the computer program, the process according to claim 1 to Steps of the robotic arm motion planning method described in any one of 7.
PCT/CN2021/124620 2021-03-22 2021-10-19 Robot arm motion planning method and apparatus, and readable storage medium and robot arm WO2022198994A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110301669.4A CN113119116B (en) 2021-03-22 2021-03-22 Mechanical arm motion planning method and device, readable storage medium and mechanical arm
CN202110301669.4 2021-03-22

Publications (1)

Publication Number Publication Date
WO2022198994A1 true WO2022198994A1 (en) 2022-09-29

Family

ID=76773591

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/124620 WO2022198994A1 (en) 2021-03-22 2021-10-19 Robot arm motion planning method and apparatus, and readable storage medium and robot arm

Country Status (2)

Country Link
CN (1) CN113119116B (en)
WO (1) WO2022198994A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116690585A (en) * 2023-07-25 2023-09-05 上海汇丰医疗器械股份有限公司 Shadowless lamp path planning method and device based on automatic mechanical arm
CN117950323A (en) * 2024-03-27 2024-04-30 苏州巴奈特机械设备有限公司 Self-adaptive adjusting method and system based on mechanical arm processing control

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113119116B (en) * 2021-03-22 2023-01-31 深圳市优必选科技股份有限公司 Mechanical arm motion planning method and device, readable storage medium and mechanical arm
CN113442144B (en) * 2021-09-01 2021-11-19 北京柏惠维康科技有限公司 Optimal pose determining method and device under constraint, storage medium and mechanical arm
CN113681565A (en) * 2021-09-08 2021-11-23 浙江大学 Man-machine cooperation method and device for realizing article transfer between robots
CN114237233B (en) * 2021-11-30 2024-02-23 深圳市优必选科技股份有限公司 Robot chess playing method and device, computer readable storage medium and robot
CN114310941B (en) * 2021-12-21 2023-10-20 长三角哈特机器人产业技术研究院 Robot path generation method for hub wheel hole deburring
CN116476041B (en) * 2022-12-28 2024-01-30 深圳市人工智能与机器人研究院 Force-position hybrid control method of nucleic acid sampling robot and robot

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110106307A1 (en) * 2009-10-30 2011-05-05 Samsung Electronics Co., Ltd. Path planning apparatus of robot and method and computer-readable medium thereof
US20170057087A1 (en) * 2014-05-02 2017-03-02 Hanwha Techwin Co., Ltd. Device for planning path of mobile robot and method for planning path of mobile robot
CN106695802A (en) * 2017-03-19 2017-05-24 北京工业大学 Improved RRT<*> obstacle avoidance motion planning method based on multi-degree-of-freedom mechanical arm
CN106990777A (en) * 2017-03-10 2017-07-28 江苏物联网研究发展中心 Robot local paths planning method
CN109571466A (en) * 2018-11-22 2019-04-05 浙江大学 A kind of seven freedom redundant mechanical arm dynamic obstacle avoidance paths planning method based on quick random search tree
CN109877836A (en) * 2019-03-13 2019-06-14 浙江大华技术股份有限公司 Paths planning method, device, mechanical arm controller and readable storage medium storing program for executing
CN111168675A (en) * 2020-01-08 2020-05-19 北京航空航天大学 Dynamic obstacle avoidance motion planning method for mechanical arm of household service robot
CN113119116A (en) * 2021-03-22 2021-07-16 深圳市优必选科技股份有限公司 Mechanical arm motion planning method and device, readable storage medium and mechanical arm

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101554515B1 (en) * 2009-01-07 2015-09-21 삼성전자 주식회사 path planning apparatus of robot and method thereof
US10878706B2 (en) * 2018-10-12 2020-12-29 Aurora Flight Sciences Corporation Trajectory planner for a vehicle
CN110744543B (en) * 2019-10-25 2021-02-19 华南理工大学 Improved PRM obstacle avoidance motion planning method based on UR3 mechanical arm
CN111251306B (en) * 2020-03-18 2022-11-29 广东省智能机器人研究院 Mechanical arm path planning method with chassis error
CN111638725B (en) * 2020-05-14 2021-08-10 西安电子科技大学 Unmanned aerial vehicle formation reconstruction system and method based on ant colony algorithm and artificial potential field method
CN111506083A (en) * 2020-05-19 2020-08-07 上海应用技术大学 Industrial robot safety obstacle avoidance method based on artificial potential field method
CN111781948A (en) * 2020-06-18 2020-10-16 南京非空航空科技有限公司 Unmanned aerial vehicle formation shape transformation and online dynamic obstacle avoidance method
CN112327831A (en) * 2020-10-20 2021-02-05 大连理工大学 Factory AGV track planning method based on improved artificial potential field method
CN112379672B (en) * 2020-11-24 2022-05-10 浙大宁波理工学院 Intelligent unmanned ship path planning method based on improved artificial potential field

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110106307A1 (en) * 2009-10-30 2011-05-05 Samsung Electronics Co., Ltd. Path planning apparatus of robot and method and computer-readable medium thereof
US20170057087A1 (en) * 2014-05-02 2017-03-02 Hanwha Techwin Co., Ltd. Device for planning path of mobile robot and method for planning path of mobile robot
CN106990777A (en) * 2017-03-10 2017-07-28 江苏物联网研究发展中心 Robot local paths planning method
CN106695802A (en) * 2017-03-19 2017-05-24 北京工业大学 Improved RRT<*> obstacle avoidance motion planning method based on multi-degree-of-freedom mechanical arm
CN109571466A (en) * 2018-11-22 2019-04-05 浙江大学 A kind of seven freedom redundant mechanical arm dynamic obstacle avoidance paths planning method based on quick random search tree
CN109877836A (en) * 2019-03-13 2019-06-14 浙江大华技术股份有限公司 Paths planning method, device, mechanical arm controller and readable storage medium storing program for executing
CN111168675A (en) * 2020-01-08 2020-05-19 北京航空航天大学 Dynamic obstacle avoidance motion planning method for mechanical arm of household service robot
CN113119116A (en) * 2021-03-22 2021-07-16 深圳市优必选科技股份有限公司 Mechanical arm motion planning method and device, readable storage medium and mechanical arm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Dissertation for the Degree of Master in Engineering Harbin Institute of Technology", 1 June 2017, HARBIN INSTITUTE OF TECHNOLOGY, CN, article GUO XIAOPENG: "Research on Improved Artificial Potential Field Path Planning Algorithm", pages: 1 - 69, XP055970205 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116690585A (en) * 2023-07-25 2023-09-05 上海汇丰医疗器械股份有限公司 Shadowless lamp path planning method and device based on automatic mechanical arm
CN116690585B (en) * 2023-07-25 2024-01-12 上海汇丰医疗器械股份有限公司 Shadowless lamp path planning method and device based on automatic mechanical arm
CN117950323A (en) * 2024-03-27 2024-04-30 苏州巴奈特机械设备有限公司 Self-adaptive adjusting method and system based on mechanical arm processing control
CN117950323B (en) * 2024-03-27 2024-05-31 苏州巴奈特机械设备有限公司 Self-adaptive adjusting method and system based on mechanical arm processing control

Also Published As

Publication number Publication date
CN113119116A (en) 2021-07-16
CN113119116B (en) 2023-01-31

Similar Documents

Publication Publication Date Title
WO2022198994A1 (en) Robot arm motion planning method and apparatus, and readable storage medium and robot arm
WO2022193639A1 (en) Mechanical arm, and trajectory planning method and apparatus therefor
WO2022198993A1 (en) Method and apparatus for manipulator motion planning, readable storage medium, and manipulator
US10821605B2 (en) Robot motion path planning method, apparatus and terminal device
WO2022007350A1 (en) Global path planning method and apparatus, terminal, and readable storage medium
WO2021115331A1 (en) Triangulation-based coordinate positioning method, apparatus, and device and storage medium
TWI673660B (en) Automatic charging system and method for robot
WO2022160787A1 (en) Robot hand-eye calibration method and apparatus, readable storage medium, and robot
CN109108974B (en) Robot avoidance method and device, background server and storage medium
WO2018098811A1 (en) Localization method and device
EP3822857A1 (en) Target tracking method, device, electronic apparatus and storage medium
WO2022198995A1 (en) Gait trajectory planning method and apparatus, computer readable storage medium, and robot
JP7012689B2 (en) Command execution method and device
WO2021082229A1 (en) Data processing method and related device
WO2022121003A1 (en) Robot control method and device, computer-readable storage medium, and robot
WO2022227429A1 (en) Gait trajectory planning method and device, readable storage medium, and robot
WO2023173677A1 (en) Trajectory fusion method and apparatus, and device and storage medium
WO2022205844A1 (en) Robot forward kinematics solution method and apparatus, readable storage medium, and robot
CN112622933B (en) Method and device for determining vehicle stop point
WO2024066943A1 (en) Intelligent-parking vehicle positioning method applied to vehicle
WO2023151548A1 (en) Navigation method and apparatus, and program and computer-readable storage medium
CN109002044B (en) Robot queuing method and device, background server and storage medium
WO2022198992A1 (en) Method and apparatus for planning robot arm motion, and readable storage medium and robot arm
WO2024041646A1 (en) Trajectory planning method and apparatus for joint space of multi-shaft device
WO2023197668A1 (en) Obstacle avoidance control method and apparatus for robot

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21932603

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21932603

Country of ref document: EP

Kind code of ref document: A1