A method, apparatus, and device for generating the task motion trajectory of a robotic arm.
By constructing a virtual model of the robotic arm and calculating the target angles of the joints in a simulation environment, the task motion trajectory of the robotic arm is generated, which solves the problems of high cost and cumbersome process in the existing technology, and realizes the efficient generation of robotic arm motion trajectories adapted to different scenarios and tasks in a simulation environment.
Patent Information
- Application Number
- CN202511484623.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-10-17
AI Technical Summary
Existing technologies require the acquisition of robotic arm motion data in a real environment, resulting in high costs and cumbersome processes, and cannot directly generate the robotic arm's task motion trajectory in a simulation environment.
By acquiring the kinematic parameters of the target robotic arm, the environmental parameters of the target simulation environment, and the task parameters of the target simulation task, a virtual model of the robotic arm is constructed, a task path containing multiple task nodes is generated, and the target angles of the joints at each task node are calculated. Finally, the joint motion trajectory and the overall task motion trajectory are generated.
The robot autonomously generates virtual motion trajectories in the simulation environment, avoiding the costs of purchasing and acquiring real robotic arms, reducing operational complexity, and ensuring that the path conforms to the constraints of the simulation environment and the requirements of the task, thus enabling the robotic arm to be effectively driven in the target simulation task.
Smart Images

Figure CN120985673B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotic arm simulation technology, and more specifically, to a method, apparatus, and device for generating the task motion trajectory of a robotic arm. Background Technology
[0002] Traditional simulation methods for simulating expert trajectory motion require collecting motion data of the robotic arm in a real environment and then controlling the robotic arm to move according to the collected data in the simulation environment. This enables the robotic arm to complete a certain task in the simulation environment. However, this approach requires a real robotic arm that is exactly the same as the one being simulated and uses a professional data acquisition device to collect the real trajectory. This is not only costly but also cumbersome. Summary of the Invention
[0003] The purpose of this application is to provide a method, apparatus, and device for generating the task motion trajectory of a robotic arm, so as to solve the above-mentioned problems existing in the prior art. It can generate the virtual motion trajectory of the robotic arm directly in the simulation environment without obtaining the real trajectory of the robotic arm in the real environment.
[0004] Firstly, a method for generating the task motion trajectory of a robotic arm is provided, which may include:
[0005] The kinematic parameters of the target robotic arm, the environmental parameters of the target simulation environment, and the task parameters of the target simulation task are obtained; wherein, the task parameters include the target position; the target robotic arm includes multiple joints;
[0006] Based on the kinematic parameters, a virtual model of the target robotic arm is constructed.
[0007] Based on the virtual pose of the configured robotic arm virtual model in the target simulation environment and the target position, a task path containing multiple task nodes is generated;
[0008] For any joint of the robotic arm virtual model, the target angle of the joint at each task node is calculated based on the task parameters, the virtual pose, and the kinematic parameters.
[0009] Based on the target angles of the joint at each task node, the joint motion trajectory of the joint is generated;
[0010] Based on the joint motion trajectories of each joint, the task motion trajectory of the target robotic arm is obtained.
[0011] In an optional implementation, the target robotic arm further includes grippers;
[0012] The kinematic parameters include: the structural parameters of the target robotic arm, the forward kinematics model, the joint names, joint types, joint motion types, range of motion and joint constraints of the multiple joints that make up the robotic arm, and the connection relationships between different joints;
[0013] The joint types include kinetic joints and fixed joints;
[0014] The virtual pose includes the virtual position of the target robotic arm, the virtual position of the gripper of the target robotic arm, and the virtual positions and virtual angles of the joints of different motion joints of the target robotic arm.
[0015] In an optional implementation, based on the virtual pose of the configured robotic arm virtual model in the target simulation environment and the target position, a task path containing multiple task nodes is generated, including:
[0016] Based on the environmental parameters of the target simulation environment, the feasible domain in the target simulation environment is determined;
[0017] A path planning algorithm is used to plan a path for the virtual model of the robotic arm in the feasible region based on the virtual position of the robotic arm and the target position, so as to obtain an initial task path;
[0018] If the initial task path satisfies the configured kinematic conditions, then the initial task path is used as the task path.
[0019] In an optional implementation, the method further includes:
[0020] The motion space of the target robotic arm is determined based on the joint motion type, range of motion, and joint constraint conditions of each joint of the target robotic arm.
[0021] By using forward kinematics calculations, it is verified whether any path point on the initial task path is within the motion space of the target robotic arm.
[0022] If any path point on the initial task path is within the motion space, then the initial task path satisfies the configured kinematic conditions.
[0023] In an optional implementation, the target location includes: a first target location and a second target location; the first target location is the position of the object to be grasped by the configured target robotic arm in the target simulation environment; the second target location is the position to be placed of the object to be grasped in the target simulation environment.
[0024] The first target location and the second target location are each a task node on the task path;
[0025] The task parameters also include: a first target attitude angle and a second target attitude angle; the first target attitude angle is the attitude angle of the gripper when it grasps the object to be grasped at the first target position; the second target attitude angle is the attitude angle of the gripper when it places the object to be grasped at the second target position; the first target attitude angle and the second target attitude angle are determined based on the configured size parameters of the object to be grasped.
[0026] In an optional implementation, for any joint of the robotic arm virtual model, the target angle of the joint at each task node is calculated based on the task parameters, the virtual pose, and the kinematic parameters, including:
[0027] For any target joint of any task node, obtain the initial virtual angle of the target joint in the previous task node adjacent to the task node, as well as the initial gripper position and initial gripper attitude angle of the robotic arm gripper in the previous task node.
[0028] The difference between the initial gripper position and the target position corresponding to the task node is taken as the position deviation corresponding to the task node; the difference between the initial gripper attitude angle and the target attitude angle corresponding to the task node is taken as the attitude deviation corresponding to the task node.
[0029] The target rotation direction of the target joint is determined based on the position deviation and the attitude deviation.
[0030] The line connecting the virtual joint position of the target joint and the virtual gripper position is taken as the first line segment; the line connecting the virtual joint position of the target joint and the target position corresponding to the task node is taken as the second line segment.
[0031] The angle between the first line segment and the second line segment is input into the forward kinematics model of the target robotic arm to obtain the initial angle change.
[0032] Calculate the attitude compensation angle based on the attitude deviation corresponding to the task node;
[0033] The initial angle change and the attitude compensation angle are weighted and fused to obtain the target angle change.
[0034] Based on the target rotation direction, the target angle change, and the initial virtual angle, determine the target angle of the target joint corresponding to the task node;
[0035] Remove the target joint from the sorted target joint set and return to the execution steps: take the first target joint in the sorted target joint set as the target joint, and repeat until the target angles of all joints in the sorted target joint set at this task node are obtained.
[0036] In an optional implementation, the joint motion trajectory of the joint is generated based on the target angle corresponding to each task node, including:
[0037] An interpolation algorithm is used to generate the joint motion trajectory of the joint based on the target angle of the joint in the adjacent task node.
[0038] Secondly, a device for generating the task motion trajectory of a robotic arm is provided, the device may include:
[0039] The acquisition unit is used to acquire the kinematic parameters of the target robotic arm, as well as the environmental parameters of the target simulation environment and the task parameters of the target simulation task; wherein, the task parameters include the target position; the target robotic arm includes multiple joints;
[0040] A construction unit is used to construct a virtual model of the target robotic arm based on the kinematic parameters;
[0041] The generation unit is used to generate a task path containing multiple task nodes based on the virtual pose of the configured robotic arm virtual model in the target simulation environment and the target position.
[0042] The calculation unit is used to calculate the target angle of any joint in the virtual model of the robotic arm at each task node, based on the task parameters, the virtual pose, and the kinematic parameters.
[0043] The determining unit is used to generate the joint motion trajectory of the joint based on the target angle corresponding to each task node; and to obtain the task motion trajectory of the target robotic arm based on the joint motion trajectory of each joint.
[0044] Thirdly, an electronic device is provided, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0045] Memory, used to store computer programs;
[0046] When a processor executes a program stored in memory, it implements any of the steps described in the first aspect above.
[0047] Fourthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of any of the methods described in the first aspect above.
[0048] This application enables the generation of virtual motion trajectories in a simulation environment without the need to collect the actual motion trajectory of the robotic arm, and controls the virtual model of the robotic arm in the simulation environment to complete the target task. This application directly obtains the kinematic parameters of the target robotic arm, the environmental parameters of the target simulation environment, and the task parameters of the target simulation task. Based on the kinematic parameters, a virtual model of the robotic arm is constructed. It does not rely on a real robotic arm identical to the target robotic arm, nor does it require specialized data acquisition devices to collect actual motion trajectory data. This fundamentally avoids the high costs of "purchasing a real robotic arm + trajectory acquisition" in traditional solutions, while also eliminating the cumbersome processes of real trajectory acquisition, data transmission, and adaptation, significantly reducing the cost and operational complexity of generating simulated robotic arm trajectories.
[0049] This application generates a task path containing multiple task nodes based on the virtual pose and task target position of the robotic arm virtual model. Then, it calculates the target angle of each task node for any joint. Finally, it generates the joint motion trajectory and the overall task motion trajectory based on the joint target angle, forming a complete technical link of "parameter input → model construction → path planning → angle calculation → trajectory generation". It can independently complete the entire process from parameter configuration to trajectory output in the simulation environment without external data support, realizing the autonomous generation of the robotic arm virtual task motion trajectory.
[0050] When generating the task path, this application combines the virtual pose and target position of the robotic arm virtual model in the target simulation environment to ensure that the path conforms to the scene constraints of the simulation environment. When calculating the joint target angle, task parameters and kinematic parameters are incorporated to ensure that the joint angle is accurately matched with the task requirements (such as the target position) and the physical characteristics of the robotic arm (such as kinematic laws). This ensures that the generated joint motion trajectory and the overall task motion trajectory can effectively drive the robotic arm virtual model to complete the target simulation task in the target simulation environment, avoiding motion failure caused by the trajectory being out of sync with the scene and task.
[0051] This application only requires adjustments based on the kinematic parameters of different target robotic arms, the environmental parameters of different simulation environments, and the task parameters of different tasks to generate robotic arm motion trajectories adapted to different scenarios and tasks. It does not require significant modifications to the core technology framework, has strong flexibility and scalability, and can be widely applied to the simulation trajectory generation needs of various robotic arms, such as different task scenarios like industrial grasping and assembly, as well as simulation models of robotic arms with different structures and parameters. Attached Figure Description
[0052] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 A schematic diagram of the system architecture for a method of generating the task motion trajectory of a robotic arm provided in an embodiment of this application;
[0054] Figure 2 A flowchart illustrating a method for generating the task motion trajectory of a robotic arm, provided in an embodiment of this application;
[0055] Figure 3 A schematic diagram of the structure of a device for generating the task motion trajectory of a robotic arm, provided in an embodiment of this application;
[0056] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0057] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by those skilled in the art. The words "first," "second," and similar terms used in this application do not indicate any order, quantity, or importance, but are only used to distinguish different components. The words "comprising" or "including," etc., mean that the element or object preceding the word covers the element or object listed after the word and its equivalents, but do not exclude other elements or objects. The words "connected," "coupled," or "connected," etc., are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up," "down," "left," "right," etc., are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0058] The method for generating the task motion trajectory of the robotic arm provided in this application embodiment can be applied to... Figure 1 In the system architecture shown, such as Figure 1As shown, the system may include: a server and a terminal; the server may be a physical server, a server cluster composed of multiple physical servers, or a distributed system, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal may be a user equipment (UE) such as a mobile phone, smartphone, laptop, digital radio receiver, personal digital assistant (PDA), tablet computer (PAD), handheld device, in-vehicle device, wearable device, computing device or other processing device connected to a wireless modem, mobile station (MS), mobile terminal, etc. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, which is not limited herein.
[0059] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0060] Figure 2 This is a flowchart illustrating a method for generating the task motion trajectory of a robotic arm, as provided in an embodiment of this application. Figure 2 As shown, the method may include:
[0061] Step S210: Obtain the kinematic parameters of the target robotic arm, as well as the environmental parameters of the target simulation environment and the task parameters of the target simulation task.
[0062] The target robotic arm consists of multiple structures, including joints, links, grippers, actuators, and controllers. The grippers can be replaced with other end effectors. Joints are categorized into kinematic and fixed joints. For example, the UR16 robotic arm contains 22 joints from its root to the gripper, of which 6 are kinematic and the rest are fixed. Kinematic parameters include: structural parameters of the target robotic arm, forward kinematics model, joint names, joint types, joint motion types, range of motion, joint constraints, and the connection relationships between different joints. The environment... Parameters include the target simulation environment coordinate system definition (such as the world coordinate system origin position and axis direction), physics engine parameters (such as gravitational acceleration and collision detection threshold), virtual scene boundaries (workspace range), and whether virtual obstacles exist (if so, the 3D coordinates and dimensions of the obstacles must be included); task parameters are user-defined configurations; task parameters include target position, target attitude angle, task objective, and task type; task types include grasping and placing tasks, grasping tasks, and placing tasks; the task objective is the size parameters of the object to be grasped; the size parameters of the object to be grasped include: the length, width, and height of the object to be grasped;
[0063] When the task type is a grasping and placing task, the target position includes: a first target position and a second target position; the first target position is the position of the object to be grasped by the configured target robotic arm in the target simulation environment; the second target position is the position to be placed of the object to be grasped in the target simulation environment; the target attitude angle includes: a first target attitude angle and a second target attitude angle; the first target attitude angle is the attitude angle of the gripper when grasping the object to be grasped at the first target position; the second target attitude angle is the attitude angle of the gripper when placing the object to be grasped at the second target position; the first target attitude angle and the second target attitude angle are determined based on the size parameters of the object to be grasped; when the task type is a grasping task or a placing task, only one of the target position and target attitude angle is included.
[0064] In one embodiment of this application, the method further includes: calculating the target safety opening and target posture of the gripper based on the size parameters of the object to be gripped; the target safety opening = the maximum cross-sectional size of the object to be gripped + virtual redundancy; wherein, the virtual redundancy is pre-configured by the user and can be 5-10mm.
[0065] In one embodiment of this application, the forward kinematics model is obtained by inputting the structural parameters of the target robotic arm, the names, types, motion types, ranges of motion, and constraints of the multiple joints that make up the robotic arm, as well as the connection relationships between different joints, into the robotic arm simulation software.
[0066] In practical applications, a robotic arm can be viewed as a series structure of "base → joint 1 → link 1 → joint 2 → link 2 → ... → end effector gripper," where each joint and its adjacent link constitute a joint-link unit. Four parameters are defined for each joint-link unit (link length, link torsion angle, joint offset, and joint angle), and a homogeneous transformation matrix is established based on these four parameters. This homogeneous transformation matrix is the local forward kinematics expression for the motion of a single joint driving its corresponding link, describing the position and orientation changes of the link coordinate system relative to the coordinate system of the previous unit when the joint rotates by a specific angle. Multiplying the homogeneous transformation matrices of all joint-link units in a concatenated order yields the total transformation matrix from the base coordinate system to the end effector gripper coordinate system, i.e., the forward kinematics model.
[0067] Step S220: Based on kinematic parameters, construct a virtual model of the target robotic arm.
[0068] Specifically, a virtual entity is generated for each structure of the target robotic arm; based on the kinematic parameters, the attributes of each virtual entity are determined to obtain the virtual model of the target robotic arm.
[0069] Step S230: Generate a task path containing multiple task nodes based on the virtual pose and target position of the configured robotic arm virtual model in the target simulation environment.
[0070] The virtual pose includes the virtual position of the target robotic arm, the virtual position of the gripper of the target robotic arm, and the virtual positions and virtual angles of the joints of different motion joints of the target robotic arm.
[0071] Specifically, based on the environmental parameters and target safety clearance of the target simulation environment, the feasible region in the target simulation environment is determined. A path planning algorithm is used to plan a path for the robotic arm virtual model within the feasible region based on the virtual position of the robotic arm and the target position, resulting in an initial task path. The initial task path is then verified to ensure it meets the configured kinematic conditions. This includes: determining the robotic arm's motion space based on the joint motion type, range of motion, and joint constraints of each joint; verifying whether any path point on the initial task path is within the robotic arm's motion space through forward kinematics calculations; if all path points on the initial task path are within the motion space, then the initial task path meets the configured kinematic conditions; if the initial task path meets the configured kinematic conditions, then the initial task path is adopted as the task path. The task path uses the target position as the task node. When the task type is a grasping and placing task, the task path contains two task nodes; when the task type is either a grasping or placing task, the task path contains only one task node.
[0072] Step S240: For any joint of the robotic arm virtual model, calculate the target angle of the joint at each task node based on the task parameters, virtual pose, and kinematic parameters.
[0073] Specifically, starting from the base of the target robotic arm, the motion joints are sequentially ordered along the connecting rods of the target robotic arm toward the gripper, resulting in a set of ordered motion joints.
[0074] For any task node, the first ranked joint among the sorted motion joints is taken as the target joint; the first ranked motion joint is the joint closest to the base of the target robotic arm.
[0075] The initial virtual angle of the target joint at the previous task node adjacent to the current task node, as well as the initial gripper position and initial gripper attitude angle of the gripper at that previous task node are obtained. Specifically, when the task node is the first target position, the previous task node adjacent to it is the initial position of the target robot arm, i.e., the configured virtual position; when the task node is the second target position, the previous task node adjacent to it is the first target position of the target robot arm. The gripper position and gripper attitude angle at any task node are obtained by inputting the virtual angles of different joints into the forward kinematics model of the target robot arm.
[0076] The difference between the initial gripper position and the target position corresponding to the task node is taken as the position deviation of the task node; the difference between the initial gripper attitude angle and the target attitude angle corresponding to the task node is taken as the attitude deviation of the task node.
[0077] Based on the position deviation and attitude deviation, the target rotation direction of the target joint is determined. Specifically, based on the configured position weights and attitude weights corresponding to the motion joint, the position deviation and attitude deviation are weighted and summed to obtain the initial comprehensive deviation of the motion joint. The sum of the initial virtual angle of the target joint in the previous task node and the configured angle value is taken as the positive virtual angle value of the target joint; where the angle value can be 1 degree. Keeping the initial virtual angles of all other joints except the target joint unchanged, the positive virtual angle value of the target joint is input into the forward kinematics model of the target robotic arm to obtain the first position and first attitude angle after forward calculation. Based on the first position, the first attitude angle, the target position, and the target attitude angle, the positive position deviation, the positive attitude deviation, and the positive comprehensive deviation are calculated. The difference between the initial virtual angle of the target joint in the previous task node and the configured angle value is taken as the value of the target joint. A reverse virtual angle value is generated; the angle value can be 1 degree. Keeping the initial virtual angles of all joints except the target joint unchanged, the reverse virtual angle value of the target joint is input into the forward kinematics model of the target robotic arm to obtain the second position and second attitude angles after reverse calculation. Based on the second position, second attitude angles, target position, and target attitude angles, the reverse position deviation, reverse attitude deviation, and reverse overall deviation are calculated. The initial overall deviation, forward overall deviation, and reverse overall deviation are compared to determine the target movement direction of the target joint. When the initial overall deviation is less than the forward overall deviation and less than the reverse overall deviation, the target joint does not need to rotate. When the forward overall deviation is not greater than the initial overall deviation, the target rotation direction of the target joint is forward, i.e., the direction of angle increase. When the reverse overall deviation is not greater than the initial overall deviation, the target rotation direction of the target joint is reverse, i.e., the direction of angle decrease.
[0078] The line connecting the virtual joint position of the target joint and the virtual gripper position is taken as the first line segment; the line connecting the virtual joint position of the target joint and the target position corresponding to the task node is taken as the second line segment.
[0079] The angle between the first and second line segments is input into the forward kinematics model of the target robotic arm to obtain the initial angle change. The attitude compensation angle is calculated based on the attitude deviation corresponding to the task node. The initial angle change and the attitude compensation angle are weighted and fused to obtain the target angle change. Based on the target rotation direction, the target angle change, and the initial virtual angle, the target angle of the joint at the task node is determined. When the target position corresponding to the task node is the first target position, the initial virtual angle is the joint virtual angle. When the target position corresponding to the task node is the second target position, the initial virtual angle is the target angle of the joint at the first target position.
[0080] Specifically, methods for determining the target angle include:
[0081] If the target rotation direction is positive, then the sum of the initial virtual angle of the target joint and the initial angle change is taken as the first angle;
[0082] If the target rotation direction is reversed, the difference between the initial virtual angle of the target joint and the change in the initial angle is taken as the first angle.
[0083] Input the first angle into the forward kinematics model to calculate the third position and third attitude angles; based on the third position and third attitude angles, calculate the first comprehensive deviation;
[0084] If the first comprehensive deviation is less than the initial comprehensive deviation, then the first angle is taken as the initial target angle of the target joint at this task node;
[0085] If the first comprehensive deviation is not less than the initial comprehensive deviation, the target angle change is halved to obtain a new target angle change. The execution steps are then returned to determine the target angle of the motion joint at the task node based on the target rotation direction, the target angle change, and the initial virtual angle, until the initial target angle of the target joint at the task node is obtained.
[0086] Remove the target joint from the sorted set of motion joints and return to the execution steps: take the first-ranked motion joint in the sorted set of motion joints as the target joint, until the initial target angles of all joints in the sorted set of motion joints are obtained at this task node.
[0087] By inputting the target angles of each joint at the task node into the forward kinematics model, the real-time attitude angles and real-time gripper positions of the gripper at that task node are obtained.
[0088] If the difference between the real-time attitude angle of the gripper at this task node and the first target attitude angle is not greater than the configured angle threshold and the real-time gripper position is not greater than the configured position threshold, then the initial target angle of each joint will be output as the target angle; where the angle threshold can be 2 degrees and the position threshold can be 0.05m.
[0089] If the real-time gripper position is greater than the configured position threshold, the initial target angle of each joint at this task node will be used as the initial virtual angle of each joint, and the execution steps will be returned: determine the target rotation direction of the target joint based on the position deviation and attitude deviation, until the target angle of each joint is obtained.
[0090] If the real-time gripper position is not greater than the configured position threshold and the difference between the real-time attitude angle of the gripper at this task node and the first target attitude angle is greater than the configured angle threshold, then the motion joint closest to the gripper is taken as the new target joint, the attitude weight of the new target joint is adjusted to be greater than the position weight, the initial target angle of the new target joint is taken as the new initial virtual angle, and the execution steps are returned: the difference between the initial gripper position and the target position corresponding to the task node is taken as the position deviation corresponding to the task node, until the target angle of each joint is obtained.
[0091] In another embodiment of this application, the method further includes:
[0092] If adjusting the angle of the motion joint closest to the gripper still fails to obtain the target angles of each joint that satisfy both the distance and angle thresholds, then the second closest motion joint to the gripper is taken as the new target joint, and the corresponding steps are repeated until the target angles of each joint that simultaneously satisfy both the position and angle thresholds are obtained.
[0093] Step S250: Generate the joint motion trajectory of the joint based on the target angle corresponding to each task node; obtain the task motion trajectory of the target robotic arm based on the joint motion trajectory of each joint.
[0094] Specifically, an interpolation algorithm is used to generate the joint motion trajectory based on the target angle of the joint in adjacent task nodes, including the following steps:
[0095] For any task node and any motion joint, the angle difference between the target angle of the motion joint at the task node and the initial virtual angle at the previous task node adjacent to the task node is used as the target increment.
[0096] The quotient of the target increment and the configured total number of virtual motion steps is used as the angle increment for any virtual motion step;
[0097] For any virtual movement step, calculate the current angle of the joint in that virtual movement step; input the current angle of the joint in that virtual movement step into the forward kinematics model to calculate the gripper position and attitude angle corresponding to that virtual movement step;
[0098] Based on the current angles of different joints in each virtual motion step, and the gripper position and attitude angle corresponding to each virtual motion step, a continuous sequence of virtual expert trajectory data is obtained, which is the task motion trajectory of the target robotic arm.
[0099] Corresponding to the above method, embodiments of this application also provide a device for generating the task motion trajectory of a robotic arm, such as... Figure 3 As shown, the device includes:
[0100] The acquisition unit 310 is used to acquire the kinematic parameters of the target robotic arm, as well as the environmental parameters of the target simulation environment and the task parameters of the target simulation task; wherein, the task parameters include the target position; the target robotic arm includes multiple joints;
[0101] Construction unit 320 is used to construct a virtual model of the target robotic arm based on kinematic parameters;
[0102] The generation unit 330 is used to generate a task path containing multiple task nodes based on the virtual pose and target position of the configured robotic arm virtual model in the target simulation environment.
[0103] The computing unit 340 is used to calculate the target angle of any joint in the virtual model of the robotic arm at each task node, based on task parameters, virtual pose and kinematic parameters.
[0104] The determining unit 350 is used to generate the joint motion trajectory of the joint based on the target angle corresponding to each task node; and to obtain the task motion trajectory of the target robotic arm based on the joint motion trajectory of each joint.
[0105] The functions of each functional unit of the robotic arm task motion trajectory generation device provided in the above embodiments of this application can be implemented through the above method steps. Therefore, the specific working process and beneficial effects of each unit in the robotic arm task motion trajectory generation device provided in the embodiments of this application will not be repeated here.
[0106] This application also provides an electronic device, such as... Figure 4 As shown, it includes a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440.
[0107] Memory 430 is used to store computer programs;
[0108] When the processor 410 executes the program stored in the memory 430, it performs the following steps:
[0109] Obtain the kinematic parameters of the target robotic arm, as well as the environmental parameters of the target simulation environment and the task parameters of the target simulation task; among which, the task parameters include the target position; the target robotic arm contains multiple joints;
[0110] Based on kinematic parameters, a virtual model of the target robotic arm is constructed.
[0111] Based on the virtual pose and target position of the configured robotic arm virtual model in the target simulation environment, a task path containing multiple task nodes is generated.
[0112] For any joint in the virtual model of the robotic arm, calculate the target angle of the joint at each task node based on task parameters, virtual pose, and kinematic parameters.
[0113] Based on the target angles of the joints at each task node, the joint motion trajectory is generated.
[0114] Based on the joint motion trajectories of each joint, the task motion trajectory of the target robotic arm is obtained.
[0115] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0116] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0117] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0118] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0119] The implementation methods and beneficial effects of the various components of the electronic device in the above embodiments for solving the problem can be found in [reference needed]. Figure 2 The steps in the illustrated embodiments are used to implement the electronic device. Therefore, the specific working process and beneficial effects of the electronic device provided in this application will not be repeated here.
[0120] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform the method for generating the task motion trajectory of the robotic arm as described in any of the above embodiments.
[0121] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the method for generating the task motion trajectory of the robotic arm as described in any of the above embodiments.
[0122] Those skilled in the art will understand that the embodiments in this application can be provided as methods, systems, or computer program products. Therefore, the embodiments in this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments in this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0123] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0124] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0125] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0126] Although preferred embodiments have been described in this application, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of this application.
[0127] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of this application and its equivalents, then these modifications and variations are also intended to be included in the embodiments of this application.
Claims
1. A method of generating a task motion trajectory of a robot arm, characterized by, The method comprises: obtaining kinematics parameters of a target robot arm, and environment parameters of a target simulation environment and task parameters of a target simulation task; wherein the task parameters include a target position; the target robot arm includes multiple joints and a gripper; the kinematics parameters include a forward kinematics model of the target robot arm, and joint types of the multiple joints constituting the robot arm; the joint types include a motion joint; constructing a robot arm virtual model of the target robot arm based on the kinematics parameters; generating a task path including multiple task nodes according to a virtual pose of the robot arm virtual model configured in the target simulation environment and the target position; the virtual pose includes a gripper virtual position of the gripper of the target robot arm and joint virtual positions of different motion joints of the target robot arm; sequencing the motion joints in order from a base of the target robot arm to the gripper along links of the target robot arm to obtain a sequenced motion joint set; for any task node, sequencing a motion joint first in the sequenced motion joint set as a target joint; obtaining an initial virtual angle of the target joint at a previous task node adjacent to the task node, and an initial gripper position and an initial gripper attitude angle of the gripper at the previous task node; taking a difference between the initial gripper position and a target position corresponding to the task node as a position deviation corresponding to the task node; taking a difference between the initial gripper attitude angle and a target attitude angle corresponding to the task node as an attitude deviation corresponding to the task node; determining a target rotation direction of the target joint according to the position deviation and the attitude deviation; taking a line connecting the joint virtual position of the target joint and the gripper virtual position of the gripper as a first line segment; taking a line connecting the joint virtual position of the target joint and the target position corresponding to the task node as a second line segment; inputting an included angle between the first line segment and the second line segment into the forward kinematics model of the target robot arm to obtain an initial angle change amount; calculating an attitude compensation angle according to the attitude deviation corresponding to the task node; performing weighted fusion on the initial angle change amount and the attitude compensation angle to obtain a target angle change amount; determining a target angle of the target joint corresponding to the task node based on the target rotation direction, the target angle change amount, and the initial virtual angle; deleting the target joint from the sequenced target joint set and returning to the step of sequencing a target joint first in the sequenced target joint set as the target joint until target angles of all joints in the sequenced target joint set at the task node are obtained; generating joint motion trajectories of any joint of the robot arm virtual model based on target angles of the joint at the task nodes; obtaining a task motion trajectory of the target robot arm based on the joint motion trajectories of the joints.
2. The method of claim 1, wherein, The kinematics parameters further include structure parameters of the target robot arm, joint names, joint motion types, motion ranges, joint constraint conditions, and connection relationships between different joints; the joint types further include a fixed joint; The virtual pose further includes a virtual position of a robot arm of the target robot arm and a virtual angle of a joint.
3. The method of claim 2, wherein, According to the virtual pose of the configured robot arm virtual model in the target simulation environment and the target position, a task path including a plurality of task nodes is generated. According to environmental parameters of the target simulation environment, a feasible region in the target simulation environment is determined. According to the virtual position of the robot arm and the target position, a path planning algorithm is used to perform path planning for the robot arm virtual model in the feasible region, to obtain an initial task path. If the initial task path meets the configured kinematic condition, the initial task path is taken as the task path.
4. The method of claim 3, wherein, The method further includes: According to the joint motion type, the motion range, and the joint constraint condition of each motion joint of the target robot arm, a motion space of the target robot arm is determined. Through forward kinematics calculation, it is checked whether any path point on the initial task path is in the motion space of the target robot arm. If any path point on the initial task path is in the motion space, the initial task path meets the configured kinematic condition.
5. The method of claim 2, wherein, The target position includes a first target position and a second target position; the first target position is a position of a configured target robot arm to be grasped object in the target simulation environment; and the second target position is a position of a configured to-be-grasped object in the target simulation environment. The first target position and the second target position are respectively one task node on the task path.
6. The method of claim 1, wherein, Based on the target angle of the joint at each task node, a joint motion trajectory of the joint is generated, including: An interpolation algorithm is used to generate a joint motion trajectory of the joint according to the target angle of the joint at adjacent task nodes.
7. An apparatus for generating a task motion trajectory of a robot arm, characterized by, The device includes: An acquisition unit is configured to acquire kinematic parameters of a target robot arm, and environmental parameters and task parameters of a target simulation task of a target simulation environment; the task parameters include a target position; the target robot arm includes a plurality of joints and a gripper; the kinematic parameters include a forward kinematics model of the target robot arm, and joint types of the plurality of joints constituting the robot arm; and the joint types include motion joints. A construction unit is configured to construct a robot arm virtual model of the target robot arm based on the kinematic parameters. A generation unit is configured to generate a task path including a plurality of task nodes according to a virtual pose of the configured robot arm virtual model in the target simulation environment and the target position; the virtual pose includes a virtual position of a gripper of the target robot arm and a virtual position of a different motion joint of the target robot arm. The computing unit is configured to sequentially arrange each motion joint in a direction from a base of the target robot arm to a gripper along a connecting rod of the target robot arm to obtain a set of sorted motion joints; for any task node, a motion joint arranged first in the set of sorted motion joints is taken as a target joint; an initial virtual angle of the target joint at a previous task node adjacent to the task node is obtained, as well as an initial gripper position and an initial gripper attitude angle of the gripper at the previous task node; a difference between the initial gripper position and a target position corresponding to the task node is taken as a position deviation corresponding to the task node; a difference between the initial gripper attitude angle and a target attitude angle corresponding to the task node is taken as an attitude deviation corresponding to the task node; a target rotation direction of the target joint is determined according to the position deviation and the attitude deviation; a line segment connecting a joint virtual position of the target joint and a gripper virtual position of the gripper is taken as a first line segment; a line segment connecting the joint virtual position of the target joint and the target position corresponding to the task node is taken as a second line segment; an included angle between the first line segment and the second line segment is input into a forward kinematics model of the target robot arm to obtain an initial angle change amount; an attitude compensation angle is calculated according to the attitude deviation corresponding to the task node; the initial angle change amount and the attitude compensation angle are weighted and fused to obtain a target angle change amount; a target angle of the target joint corresponding to the task node is determined based on the target rotation direction, the target angle change amount and the initial virtual angle; the target joint is deleted from the set of sorted target joints, and the step of taking a target joint arranged first in the set of sorted target joints as the target joint is returned until target angles of all joints in the set of sorted target joints at the task node are obtained. The determining unit is configured to generate a joint motion trajectory of any joint of the robot arm virtual model based on a target angle of the joint at each task node; and obtain a task motion trajectory of the target robot arm based on the joint motion trajectories of all joints.
8. An electronic device, comprising: The electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The memory is configured to store a computer program. The processor is configured to execute the program stored on the memory to implement the method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method of any one of claims 1-6.
Citation Information
Patent Citations
Mechanical arm track planning method and device and mechanical arm
CN120439277A