A method and device for generating a motion path of a robot arm, and an electronic device
Patent Information
- Application Number
- CN202611275893.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]有鉴于此,本发明的实施例提供一种机械臂的运动路径生成方法、装置及电子设备,用于解决现有的机械臂运动路径生成方式中,机械臂移动时,其承载的托举平台等会产生明显的横向位移、姿态变化或急剧晃动的问题
[0023]通过采用上述方法,将多个目标位姿作为节点构建节点拓扑图,通过第一空间距离、第二空间距离分别得到表征机械臂运动幅度的第一指标信息以及表征碰撞风险的第二指标信息,综合两项指标确定节点连接关系,再基于拓扑图连接边拼接得到运动路径;将复杂的连续空间规划转化为图搜索问题,离线状态下即可完成拓扑校验,同时兼顾关节运动幅度和碰撞风险,既能够在障碍物密集的放疗机房内保障路径避障安全,又可减少机械臂的大幅运动,缓解机械臂所托举平台的晃动。
Smart Images

Figure CN122807943A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motion control technology, and in particular to a method, apparatus and electronic device for generating motion paths for a robotic arm. Background Technology
[0002] During patient diagnosis and treatment, multi-degree-of-freedom robotic arms or similar motion platforms are typically used to adjust the position and posture of the treatment bed supporting the patient, ensuring the patient reaches the target pose required by the treatment plan. When controlling the motion path of the robotic arm, sufficient clearance must be maintained between each link and the equipment in the machine room during movement; otherwise, external collisions or self-collisions can easily occur.
[0003] However, in the process of controlling and planning the motion path of the robotic arm, in order to avoid collisions when the robotic arm moves, the robotic arm needs to frequently adjust the torsion of the joints. This causes the lifting platform such as the treatment bed it carries to have obvious lateral displacement, posture changes or sudden shaking when the robotic arm moves. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method, apparatus, and electronic device for generating motion paths for a robotic arm, which solves the problem that in existing methods of generating motion paths for robotic arms, the lifting platform or other components carried by the robotic arm will experience significant lateral displacement, posture changes, or sudden shaking when the robotic arm moves.
[0005] A first aspect of the present invention provides a method for generating motion paths of a robotic arm, the method comprising: acquiring multiple target poses of the robotic arm, wherein the robotic arm is composed of multiple links connected by motion joints; for any pose group composed of two target poses, acquiring a first spatial distance between the two target poses and a second spatial distance between the robotic arm and spatial obstacles during motion; determining first index information and second index information of the pose group based on the first spatial distance and the second spatial distance; wherein the first index information characterizes the motion amplitude of the robotic arm, and the second index information characterizes the collision risk level of the robotic arm during motion; and determining the node connection relationship of a node topology graph of the multiple target poses based on the first index information and the second index information; wherein each target pose is a node in the node topology graph, and the distance between the connecting edges between nodes is determined by the first spatial distance.
[0006] Based on the starting and ending poses of the robotic arm, at least one target connection edge is determined in the node topology graph, and the motion path of the robotic arm is generated based on the pose group corresponding to the target connection edge.
[0007] According to an embodiment of the present invention, the robotic arm includes at least a first motion joint and a second motion joint, wherein the first motion joint is closer to the base of the robotic arm than the second motion joint; and the first index information of the pose group is determined based on a first spatial distance, including: obtaining the coordinate change of the motion joint between any two target poses; and determining the first spatial distance based on the coordinate change and joint weight of each motion joint; wherein the joint weight of the first motion joint is higher than that of the second motion joint.
[0008] Based on the first spatial distance, the first index information of the pose group is determined; wherein, the larger the first spatial distance, the larger the first index information.
[0009] According to an embodiment of the present invention, determining the second index information of a pose group based on a second spatial distance includes: determining at least one sampled pose between any two target poses; obtaining the relative distance between the sampled pose and a spatial obstacle; determining the second spatial distance based on the relative distance between each sampled pose and the spatial obstacle; and determining the second index information of the pose group based on the second spatial distance; wherein, the smaller the second spatial distance, the larger the second index information.
[0010] According to an embodiment of the present invention, obtaining multiple target poses of a robotic arm includes: determining multiple candidate poses and the distribution density of the candidate poses in space based on historical pose data of the robotic arm; determining the sampling density of the robotic arm in different regions of space based on the distribution density; determining the sampling poses among the multiple candidate poses based on the sampling density; wherein, the greater the distribution density of the candidate poses in the region, the greater the sampling density; and obtaining multiple target poses of the robotic arm based on the sampling poses.
[0011] According to an embodiment of the present invention, determining the node connection relationship of the node topology graph of the plurality of target poses further includes: determining the motion sub-path of the robotic arm moving from a first target pose to a second target pose; the first target pose and the second target pose are any two poses of the plurality of target poses; determining the acceleration segment path, the constant speed segment path, and the deceleration segment path in the motion sub-path; determining the dynamic safety distance corresponding to the constant speed segment path based on a preset safety gap and a first speed compensation amount; determining the dynamic safety distances corresponding to the acceleration segment path and the deceleration segment path based on the preset safety gap and the second speed compensation amount respectively; determining the node connection relationship of the node topology graph of the plurality of target poses based on the dynamic safety distances corresponding to each path; wherein, the first speed compensation amount is used to compensate for the position deviation of the robotic arm caused by servo control error during constant speed movement, and the second speed compensation amount is used to compensate for the position deviation of the robotic arm caused by servo control error during variable speed movement.
[0012] According to an embodiment of the present invention, determining the dynamic safety distance corresponding to the uniform speed segment path based on a preset safety clearance and a first speed compensation amount includes: determining the first speed compensation amount based on the joint movement speed of the robotic arm on the uniform speed segment path; determining the dynamic safety distance corresponding to the uniform speed segment path based on the preset safety clearance and the first speed compensation amount; wherein, the greater the joint movement speed, the greater the first speed compensation amount.
[0013] According to an embodiment of the present invention, the dynamic safety distances corresponding to the acceleration segment path and the deceleration segment path are determined based on a preset safety gap and a second speed compensation amount, respectively, including: for the acceleration segment path, obtaining a first speed extreme value and a first acceleration extreme value of the robotic arm on the acceleration segment path; determining a second speed compensation amount of the acceleration segment path based on the first speed extreme value and the first acceleration extreme value; for the deceleration segment path, obtaining a second speed extreme value and a second acceleration extreme value of the robotic arm on the deceleration segment path; determining a second speed compensation amount of the deceleration segment path based on the second speed extreme value and the second acceleration extreme value; wherein, the larger the speed extreme value and the acceleration extreme value, the larger the second speed compensation amount.
[0014] A second aspect of the present invention provides a motion path generation device for a robotic arm, the device comprising:
[0015] The pose acquisition module is used to acquire multiple target poses of the robotic arm, which is composed of multiple links connected by motion joints.
[0016] The distance acquisition module is used to acquire the first spatial distance between two target poses and the second spatial distance between the robotic arm and spatial obstacles during the movement of any two target poses.
[0017] The indicator determination module is used to determine the first indicator information and the second indicator information of the pose group based on the first spatial distance and the second spatial distance, respectively; wherein, the first indicator information represents the motion range of the robotic arm, and the second indicator information represents the collision risk level of the robotic arm during motion;
[0018] The topology construction module is used to determine the node connection relationship of the node topology graph of multiple target poses based on the first index information and the second index information; wherein, each target pose is a node in the node topology graph, and the distance between the connecting edges between nodes is determined by the first spatial distance.
[0019] The path generation module is used to determine at least one target connection edge in the node topology graph based on the starting pose and ending pose of the robotic arm, and to generate the motion path of the robotic arm based on the pose group corresponding to the target connection edge.
[0020] A third aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of any of the methods described above.
[0021] A fourth aspect of the present invention is a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of any of the methods described above.
[0022] The embodiments of the present invention provide a method, apparatus, and electronic device for generating motion paths for a robotic arm, which can achieve at least the following technical effects:
[0023] By employing the above method, multiple target poses are used as nodes to construct a node topology graph. The first spatial distance and the second spatial distance are used to obtain the first index information representing the range of motion of the robotic arm and the second index information representing the collision risk, respectively. The node connection relationship is determined by combining the two indices, and the motion path is obtained by splicing the connecting edges based on the topology graph. The complex continuous spatial planning is transformed into a graph search problem, and the topology verification can be completed offline. At the same time, it takes into account the range of joint motion and the collision risk. It can not only ensure the safety of path obstacle avoidance in the radiotherapy room with dense obstacles, but also reduce the large-scale movement of the robotic arm and alleviate the swaying of the platform supported by the robotic arm. Attached Figure Description
[0024] The above and other objects, features and advantages of the present invention will become more apparent from the following description of embodiments of the invention with reference to the accompanying drawings, in which:
[0025] Figure 1 This illustration schematically shows one of the flowcharts for a motion path generation method for a robotic arm according to an embodiment of this application;
[0026] Figure 2 This schematically illustrates a second flowchart of a motion path generation method for a robotic arm according to an embodiment of this application;
[0027] Figure 3 A flowchart illustrating a motion path generation method for a robotic arm according to an embodiment of this application is shown in part three.
[0028] Figure 4 This schematic diagram illustrates a structural block diagram of a motion path generation device for a robotic arm according to an embodiment of this application.
[0029] Figure 5 A block diagram schematically illustrates an electronic device suitable for implementing a motion path generation method for a robotic arm according to an embodiment of this application. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0031] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0032] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0033] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0034] A first aspect of the present invention provides a method for generating a motion path for a robotic arm. The method includes: acquiring multiple target poses of the robotic arm, wherein the robotic arm is composed of multiple links connected by motion joints; for any pose group composed of two target poses, acquiring a first spatial distance between the two target poses and a second spatial distance between the robotic arm and spatial obstacles during motion; determining first index information and second index information of the pose group based on the first spatial distance and the second spatial distance; wherein the first index information characterizes the motion amplitude of the robotic arm, and the second index information characterizes the collision risk level of the robotic arm during motion; determining the node connection relationship of a node topology graph of the multiple target poses based on the first index information and the second index information; wherein each target pose is a node in the node topology graph, and the distance between the connecting edges between nodes is determined by the first spatial distance; determining at least one target connecting edge in the node topology graph based on the starting pose and ending pose of the robotic arm, and generating a motion path for the robotic arm based on the pose group corresponding to the target connecting edge.
[0035] By employing the above method, multiple target poses are used as nodes to construct a node topology graph. The first spatial distance and the second spatial distance are used to obtain the first indicator information representing the range of motion of the robotic arm and the second indicator information representing the collision risk, respectively. The node connection relationship is determined by combining the two indicators, and the motion path is obtained by splicing the connecting edges based on the topology graph. The complex continuous spatial planning is transformed into a graph search problem, and the topology can be verified offline. At the same time, it takes into account the range of joint motion and the collision risk. It can not only ensure the safety of path obstacle avoidance in the radiotherapy room with dense obstacles, but also reduce the large-scale movement of the robotic arm and alleviate the swaying of the platform supported by the robotic arm.
[0036] Figure 1 The illustration shows one of the flowcharts of a motion path generation method for a robotic arm according to an embodiment of the present invention.
[0037] like Figure 1 As shown, the motion path generation method for the robotic arm includes operations S110 to S150.
[0038] Operate S110 to obtain multiple target poses of the robotic arm, which is composed of multiple links connected by motion joints;
[0039] Operation S120: For any two target poses forming a pose group, obtain the first spatial distance between the two target poses and the second spatial distance between the robotic arm and spatial obstacles during the movement.
[0040] Operation S130: Based on the first spatial distance and the second spatial distance, determine the first index information and the second index information of the pose group respectively; wherein, the first index information represents the range of motion of the robotic arm, and the second index information represents the degree of collision risk of the robotic arm during motion.
[0041] Operation S140: Based on the first indicator information and the second indicator information, determine the node connection relationship of the node topology graph of multiple target poses; wherein, each target pose is a node in the node topology graph, and the distance between the connecting edges between nodes is determined by the first spatial distance.
[0042] Operation S150: Based on the starting pose and ending pose of the robotic arm, at least one target connection edge is determined in the node topology graph, and the motion path of the robotic arm is generated based on the pose group corresponding to the target connection edge.
[0043] In an embodiment of the present invention, the robotic arm is a six-degree-of-freedom radiotherapy positioning robotic arm composed of multiple links connected in series through motion joints. It is used to carry the radiotherapy treatment bed and drive the patient to complete the position adjustment of the radiotherapy positioning. It can realize three-dimensional translation as well as pitch, roll and yaw attitude changes.
[0044] In an embodiment of the present invention, the link is a rigid connecting component between the joints of the robotic arm. When the robotic arm moves, the link moves within the machine room space, and the outer contour of the link forms a collision box for collision detection.
[0045] In an embodiment of the present invention, a motion joint is a robotic arm joint unit that drives the corresponding link to achieve rotation or displacement. The six-degree-of-freedom swing robotic arm includes six motion joints, each of which has rotation / displacement parameters, joint limits, and velocity and acceleration constraints.
[0046] In an embodiment of the present invention, the target pose is a robotic arm joint vector pose that has been validated and can be used as a node in the node topology graph. It is derived from teaching acquisition, spatial sampling, and high-frequency poses in clinical history, and is used to construct the graph node of the topology graph.
[0047] In embodiments of the present invention, a pose group is a pose pair composed of any two target poses paired together, corresponding to a pair of candidate nodes in the topology graph to be determined whether to establish a connection edge, used to calculate a first spatial distance, a second spatial distance, a first index information, and a second index information. In embodiments of the present invention, the first spatial distance is a distance metric between two target poses calculated in joint space by comprehensively considering the changes in coordinates of each moving joint and the joint weights, characterizing the degree of overall motion change of the robotic arm joints between the two poses. In embodiments of the present invention, spatial obstacles are objects in the radiotherapy room environment that may collide with the robotic arm linkage and the treatment bed, including the treatment gantry, image acquisition device, collimator, auxiliary support, and predefined restricted areas.
[0048] In an embodiment of the present invention, the second spatial distance is the minimum value among the set of actual distances between all sampled poses and the nearest spatial obstacle on the transition trajectory between two target poses, reflecting the relationship between the robotic arm's motion path and environmental obstacles.
[0049] In an embodiment of the present invention, the first indicator information It is an index obtained by mapping the first spatial distance, which represents the range of motion of the robotic arm between the pose groups; the larger the first spatial distance, the greater the overall joint movement, and the greater the first index information.
[0050] In an embodiment of the present invention, the second indicator information It is an index obtained by mapping the second spatial distance, which characterizes the collision risk level when the robotic arm moves along the trajectory corresponding to the pose group; the smaller the second spatial distance, the closer it is to the obstacle, the higher the collision risk, and the greater the information of the second index.
[0051] In an embodiment of the present invention, the node topology graph is a joint space topology graph in which each target pose is used as a graph node, and whether to establish a connection edge between nodes is determined based on a first index information and a second index information. In embodiments of the present invention, the node connection relationship is the determination result of whether a passable connection edge is established between different nodes in the node topology graph; a node connection relationship is established between nodes a and b only if the pose group satisfies obstacle avoidance, motion constraints, and cost requirements. In embodiments of the present invention, the connecting edge is a traversable edge between two nodes in the node topology graph, representing that the robotic arm can safely move between two corresponding target poses; the distance of the edge is determined by a first spatial distance, and the edge carries first index and second index cost information.
[0052] In embodiments of the present invention, the target connecting edge is one or more connecting edges retrieved from the node topology graph during online planning and used to stitch together the complete motion path of the robotic arm. In embodiments of the present invention, the motion path is a sequence of joint movements obtained by stitching together the pose transition trajectories corresponding to one or more target connecting edges, which can be sent to the robotic arm controller for execution and satisfies obstacle avoidance, joint limit, and velocity / acceleration constraints.
[0053] In an embodiment of the present invention, the initial pose is the actual joint pose of the robotic arm at the moment the radiotherapy positioning begins, which is the starting point for path planning.
[0054] In an embodiment of the present invention, the endpoint pose is the target joint pose that the robotic arm needs to reach according to the radiotherapy treatment plan, which is the motion endpoint of the path planning.
[0055] Specifically, firstly, a batch of valid target poses are acquired as candidate nodes for the topology graph. The robotic arm body consists of multiple links and drive links connected in series, such as a six-DOF positioning robotic arm. Any two target poses are paired to form pose groups. For each pose group, two types of distances are calculated: the first spatial distance is a weighted distance within the joint space, reflecting the overall change in the joints between the two poses; the second spatial distance characterizes the actual physical gap between the robotic arm links and obstacles in the machine room space along the motion trajectory between the two poses, such as racks, imaging equipment, and restricted areas. The first spatial distance is mapped to obtain a first index, which characterizes the overall motion amplitude of the robotic arm from one target pose to another; the second spatial distance is mapped to obtain a second index, which characterizes the risk of collision along the motion path. The first and second indexes are combined to determine whether a passable node connection is established between two nodes, thus constructing a node topology graph. The topology graph uses target poses as graph nodes, and the distance between connecting edges between nodes is measured using the first spatial distance. Pose groups with excessively high indicator values indicate excessive motion amplitude or high collision risk, and node connections are not established. When the starting and ending poses of the robotic arm in actual operation are received, one or more target connection edges are retrieved and selected in the already constructed node topology graph. The trajectory information of the pose groups corresponding to the target connection edges is called and spliced to generate a complete and executable robotic arm motion path.
[0056] For example, a six-DOF positioning robotic arm, after screening, obtains eight target poses {P0-P7} as candidate nodes for the topology graph. The pose group (P0, P1) is selected, and the first spatial distance in the joint space is calculated to be 0.35cm. Sampling along the interpolated trajectory from P0 to P1, the minimum physical gap between the link and the obstacle on the trajectory, i.e., the second spatial distance, is 120mm. The first spatial distance of 0.35 maps to a first indicator of 0.35, representing a moderate range of motion in that joint segment; the second spatial distance of 120mm maps to a second indicator of 0.008, representing a low collision risk. Since neither the first nor the second indicator exceeds a preset threshold, a connection edge is established between P0 and P1 in the topology graph, with the distance of this edge set to the first spatial distance of 0.35cm. Similarly, the determination of all node pairs is completed, generating a complete node topology graph. In clinical positioning operations, the robotic arm's current actual starting pose S, and the treatment plan requires an ending pose T. Mapping S and T into the topology graph, the path S-P0-P1-P4-T is obtained, with corresponding target connecting edges (S, P0), (P0, P1), (P1, P4), and (P4, T). The interpolated trajectories of the pose groups corresponding to each target connecting edge are sequentially called, and the complete motion path is obtained and sent to the robotic arm controller for positioning.
[0057] According to an embodiment of the present invention, the robotic arm includes at least a first motion joint and a second motion joint, with the first motion joint being closer to the base of the robotic arm than the second motion joint; in operation S130, first index information of the pose group is determined based on a first spatial distance, including operations S1310 to S1330.
[0058] Operate S1310 to obtain the coordinate changes of the moving joints between any two target poses;
[0059] Operation S1320 determines the first spatial distance based on the coordinate changes and joint weights of each motion joint; wherein the joint weight of the first motion joint is higher than that of the second motion joint.
[0060] Operation S1330: Based on the first spatial distance, determine the first index information of the pose group; wherein, the larger the first spatial distance, the larger the first index information.
[0061] In an embodiment of the present invention, the first motion joint is a motion joint that is relatively closer to the base of the robotic arm, for example, a large joint on the side of the base. Even a small movement of this joint will cause a large displacement and shaking at the end of the treatment bed, so a higher joint weight needs to be set.
[0062] In an embodiment of the present invention, the second motion joint is a motion joint that is farther from the base than the first motion joint. It belongs to the joint on the end side of the robotic arm, and has less disturbance to the patient end under the same rotation angle. Its joint weight is lower than that of the first motion joint.
[0063] In an embodiment of the present invention, the base is the fixed mounting base of the robotic arm, and the various motion joints of the robotic arm are arranged sequentially from the base outwards.
[0064] In an embodiment of the present invention, the coordinate change amount It is the difference in the angle or equivalent displacement of the same moving joint between two target poses.
[0065] In embodiments of the present invention, the coordinate change is the rate of change of the joint's angle / displacement during the trajectory motion.
[0066] In an embodiment of the present invention, joint weights It is the penalty coefficient assigned to each moving joint; joints closer to the base are assigned a higher weight, and the same amount of joint change will result in a greater cost.
[0067] Specifically, joints of the robotic arm closer to the base are defined as the first motion joints, and joints farther from the base and closer to the end treatment bed are defined as the second motion joints. Even slight rotation of the base-side joints can cause significant displacement and swaying of the end treatment bed, having a greater impact on patient comfort; therefore, higher joint weights are assigned. The coordinate change of each motion joint within two target poses in the pose group is calculated, i.e., the joint angle / displacement difference. The first spatial distance in joint space is obtained by combining the coordinate change of each joint with the pre-configured joint weights. The weight of the first motion joint on the base side is greater than that of the second motion joint on the end side; for the same amount of joint rotation, the base joint contributes a larger first spatial distance. The first index information directly follows the change in the first spatial distance; the larger the first spatial distance, the greater the overall range of motion of the joint, and the larger the first index information. When building edges in the topology graph, node pairs with larger first index information are more likely to be judged as unsuitable for connection establishment, thereby suppressing large-amplitude movements of the large joints on the base side, reducing end-effector swaying, and improving the comfort of radiotherapy patients.
[0068] By adopting the above method, a higher joint weight is set for the first motion joint near the base. The first spatial distance is calculated by combining the coordinate changes of each motion joint with the joint weight, and the first index information is obtained. Under the same rotation amplitude, the base side joint will generate a greater index cost. The large amplitude and frequent rotation of the large joints on the base side can be suppressed in the topology graph edge building stage. The feasible path with small base joint movement is selected first, thereby reducing the lateral displacement and sharp shaking of the lifting platform caused by the base joint movement.
[0069] According to an embodiment of the present invention, in operation S130, the second index information of the pose group is determined based on the second spatial distance, including operations S1340 to S1370.
[0070] Operation S1340 determines at least one sampled pose between any two target poses;
[0071] Operate S1350 to obtain the relative distance between the sampled pose and spatial obstacles;
[0072] Operation S1360 determines the second spatial distance based on the relative distance between each sampled pose and the spatial obstacle;
[0073] Operation S1370 determines the second index information of the pose group based on the second spatial distance; wherein, the smaller the second spatial distance, the larger the second index information.
[0074] In an embodiment of the present invention, the sampling pose is a series of intermediate joint poses obtained by uniformly / segmentally sampling on the transition motion sub-path between two target poses, which are used for point-to-point collision and safety distance verification.
[0075] In an embodiment of the present invention, the relative distance is the actual physical gap distance between the robotic arm link collision box corresponding to the sampling pose and the spatial obstacle.
[0076] Specifically, an interpolated transition trajectory is generated between two target poses. Several sampled poses are discretized and extracted along the trajectory, representing intermediate configurations during the robotic arm's movement. For each sampled pose, the relative physical clearance distance between the robotic arm's link collision box and obstacles in the machine room is calculated. The second spatial distance is determined by comprehensively considering the relative distances corresponding to all sampled poses, generally taking the minimum relative distance among the sampled points of the entire trajectory, representing the degree of danger of the path being closest to the obstacle. The second index information characterizes the collision risk; the smaller the second spatial distance, the closer the path is to the obstacle, the higher the collision risk, and the larger the second index information. During edge construction, if the second index information exceeds the risk threshold, no connection edge is established between the two target poses to avoid high-risk paths.
[0077] For example, a transition trajectory is generated between target poses P2 and P3, and eight sampled poses are uniformly extracted along the trajectory. The relative distance between the link and the obstacle on the frame is calculated for each sampled pose, resulting in gaps of 135mm, 110mm, 85mm, 92mm, 122mm, 140mm, 133mm, and 126mm. The minimum relative distance of 85mm is taken as the second spatial distance of this pose group. The second index information is calculated using a reciprocal mapping, with a larger index for smaller gaps; an 85mm gap corresponds to a second index information of 0.0118. If the minimum gap is further reduced to 40mm, the second spatial distance = 40mm, and the second index information increases to 0.025, significantly increasing the collision risk. When this index exceeds the risk threshold of 0.02, no topological connection edge is established between P2 and P3.
[0078] By employing the above method, sampled poses on the trajectory between two poses are extracted. The second spatial distance is obtained based on the relative distance between the sampled poses and obstacles and mapped to the second index information. The closer the path is to the obstacle, the higher the second index information. The collision risk is assessed by the actual gap between the sampling points in the middle of the entire trajectory, rather than relying solely on the poses at both ends. This method can identify hidden collision hazards in the middle section of the trajectory and exclude pose groups with high collision risk from the topological connection, effectively improving the motion safety of passable edges in the topological graph and adapting to the confined working environment of the radiotherapy room.
[0079] According to an embodiment of the present invention, in operation S110, multiple target poses of the robotic arm are acquired, including operations S210 to S240.
[0080] Operation S210 determines multiple candidate poses and their spatial distribution density based on the robot arm's historical pose data.
[0081] Operate S220 to determine the sampling density of the robotic arm in different regions of space based on the distribution density;
[0082] Operation S230 determines the sampling poses among multiple candidate poses based on the sampling density; wherein, the greater the distribution density of the candidate poses in the region, the greater the sampling density.
[0083] Operate S240 to obtain multiple target poses of the robotic arm based on the sampled poses.
[0084] In an embodiment of the present invention, historical pose data is a collection of the actual operating poses of the robotic arm recorded during the clinical operation and debugging teaching process of the device, which is used to extract frequently used poses to generate candidate poses.
[0085] In an embodiment of the present invention, the candidate pose is a preliminary pose to be screened obtained from historical pose data or spatial sampling, and collision, singularity and joint limit verification have not yet been completed.
[0086] In embodiments of the present invention, the distribution density is the density of points in different areas of the workspace accessible to the robotic arm for candidate poses.
[0087] In embodiments of the present invention, sampling density refers to the density of sampling poses generated in different areas of the robotic arm's workspace; the higher the density of candidate pose distribution in an area, the higher the sampling density is set.
[0088] Specifically, historical pose data of the robotic arm is collected, including clinical positioning logs and teaching and debugging records, from which a large number of candidate poses are extracted. The distribution density of candidate poses in different regions of the robotic arm's joint space / workspace is statistically analyzed, with the distribution density representing the number of poses that have historically appeared in that region. The sampling density is adaptively configured based on the distribution density of candidate poses in a region: a higher sampling density is set for high-frequency usage areas with many historical poses and a high distribution density of candidate poses, and more sampled poses are deployed; the sampling density is correspondingly reduced for edge areas with few historical poses. According to the configured sampling density, sampled poses are generated between candidate poses. The candidate poses and the supplemented sampled poses are then subjected to validity checks such as collision detection, joint constraints, and singularity filtering to remove invalid points, ultimately obtaining the multiple target poses used in this method. This method achieves adaptive non-uniform sampling, ensuring sufficient points in high-frequency working areas to guarantee path selection, reducing points in low-frequency areas, controlling the overall size of the topology graph, and balancing path completeness and online search computation.
[0089] For example, the robotic arm's historical clinical log yielded 320 candidate poses. Statistical space region A represents the routine patient positioning area, with a large number of candidate poses and a high distribution density; region B represents the robotic arm's edge-reachable area, with fewer candidate poses and a low distribution density. A higher sampling density was set for region A, supplementing the existing candidate poses with 60 additional sampled poses; a lower sampling density was set for region B, supplementing only 8 sampled poses.
[0090] In some application scenarios, all candidate poses and supplementary sampled poses are uniformly validated to eliminate points that have collided, are at joint limit boundaries, or are close to singular poses. After filtering, 275 valid points are retained as the target pose.
[0091] By adopting the above method, candidate poses and their spatial distribution density are obtained based on historical pose data. The sampling density of each region is adaptively adjusted according to the distribution density. The sampling density is increased in high-frequency operation areas and decreased in low-frequency edge areas to generate sampling poses and obtain target poses. This ensures sufficient points in commonly used clinical areas and improves the completeness of the topology map path, while avoiding excessive points in edge areas that would cause the topology map to expand in size and the search computation to be too large.
[0092] According to an embodiment of the present invention, in operation S140, the node connection relationship of the node topology graph of multiple target poses is determined, including operations S310 to S350.
[0093] Operation S310 determines the motion sub-path of the robotic arm from the first target pose to the second target pose; the first target pose and the second target pose are any two poses of multiple target poses;
[0094] Operate S320 to determine the acceleration segment, constant speed segment, and deceleration segment in the motion sub-path;
[0095] Operate S330 to determine the dynamic safety distance corresponding to the constant speed segment path based on the preset safety gap and the first speed compensation amount;
[0096] Operate S340 to determine the dynamic safety distances corresponding to the acceleration and deceleration paths based on the preset safety gap and the second speed compensation amount.
[0097] Operation S350 determines the node connection relationship of the node topology graph of the multiple target poses based on the dynamic safety distance corresponding to each path;
[0098] The first speed compensation amount is used to compensate for the position deviation caused by servo control error during the uniform motion of the robotic arm, and the second speed compensation amount is used to compensate for the position deviation caused by servo control error during the variable speed motion of the robotic arm.
[0099] In an embodiment of the present invention, the motion sub-path is a local transition trajectory of the robotic arm moving from the first target pose to the second target pose between any two target poses.
[0100] In an embodiment of the present invention, the acceleration segment path It is the initial part of the motion sub-path, the trajectory segment where the robot arm joint speed increases from 0 to the working speed.
[0101] In an embodiment of the present invention, a uniform speed segment path It is the middle part of the motion sub-path, where the robotic arm joints maintain a constant cruising speed in the trajectory segment.
[0102] In an embodiment of the present invention, the deceleration section path It is the trajectory segment at the end of the motion sub-path where the robot arm joint speed decreases from the working speed to 0.
[0103] In an embodiment of the present invention, a preset safety gap is provided. It is the basic static safety distance, which does not consider servo error compensation caused by speed and acceleration, and is determined by the minimum net distance between the equipment in the computer room.
[0104] In an embodiment of the present invention, the first speed compensation amount is a compensation value obtained based on the joint motion speed of the uniform speed segment path, which is used to compensate for the position deviation caused by the servo control error under uniform motion.
[0105] In the embodiments of the present invention, the dynamic safety distance is a safety distance threshold for each motion stage, which is equal to the preset safety gap superimposed speed and acceleration compensation amount; during verification, the actual distance between the robotic arm link and the obstacle must be greater than or equal to this value, and different dynamic safety distances are used for the uniform speed and acceleration / deceleration stages respectively.
[0106] In an embodiment of the present invention, the second speed compensation amount is a compensation value obtained by combining the extreme values of the trajectory speed and acceleration of the acceleration segment path and the deceleration segment path, and is used to compensate for the position deviation caused by the servo response and braking during the variable speed motion process.
[0107] Specifically, during the transformation from one target pose to another, segmented dynamic safety distance checks are performed on the motion sub-paths between target poses, serving as one of the criteria for determining whether a target pose is valid. Any two target poses are selected as the start and end points, respectively, generating motion sub-paths between them. The robotic arm's servo motion cannot accelerate or stop instantaneously; the entire motion sub-path is divided into acceleration, constant speed, and deceleration segments. The constant speed segment exhibits stable motion with relatively small servo tracking errors; the dynamic safety distance for this segment is obtained by superimposing a basic preset safety gap with a first speed compensation amount, specifically used to compensate for servo position deviations during constant speed motion. The acceleration and deceleration segments involve variable speed motion, exhibiting inertia and servo lag, resulting in larger position deviations; therefore, a preset safety gap is superimposed with a second speed compensation amount to obtain the dynamic safety distance for these two segments, with the second speed compensation amount adapting to servo control errors under variable speed conditions. The actual obstacle gaps at all sampling points along the motion sub-path must be greater than or equal to the corresponding segment's dynamic safety distance for the first and second target poses to have corresponding connecting edges in the node topology graph.
[0108] By adopting the above method, when determining the connection relationship between nodes in the topology graph, the motion sub-path between two target poses is divided into acceleration segment, constant speed segment, and deceleration segment. The corresponding dynamic safety distance is calculated for each different motion stage. The constant speed segment uses a first speed compensation amount to compensate for the constant speed servo deviation, and the acceleration and deceleration segment uses a second speed compensation amount to compensate for the servo control deviation under variable speed conditions and the position drift caused by inertia. The node connection relationship is determined by combining the segmented dynamic safety distance, which fully matches the error characteristics of different motion stages of the robotic arm, avoids potential collision risks under different motion stages, and improves the actual motion safety margin of the passable edges of the topology graph.
[0109] According to an embodiment of the present invention, in operation S330, the dynamic safety distance corresponding to the uniform speed segment path is determined based on the preset safety gap and the first speed compensation amount, including operations S3310 to S3320.
[0110] Operate S3310 to determine the first speed compensation amount based on the joint motion speed of the robotic arm in the constant speed segment of the path;
[0111] Operate S3320 to determine the dynamic safety distance corresponding to the uniform speed segment path based on the preset safety clearance and the first speed compensation amount; wherein, the greater the joint movement speed, the greater the first speed compensation amount.
[0112] In an embodiment of the present invention, the joint motion speed is the stable speed at which a single joint of the robotic arm rotates or moves along a uniform speed path.
[0113] Specifically, the first speed compensation amount for the constant speed segment is related to the joint movement speed during constant speed operation. At higher joint movement speeds, the positional deviation caused by tracking lag increases in the servo system; therefore, the higher the joint movement speed, the larger the configured first speed compensation amount should be. Adding the fixed preset safety gap to the first speed compensation amount obtained based on the speed yields the dynamic safety distance corresponding to each sampling point on the constant speed segment path. During safety verification, the actual gap between the robotic arm link and the obstacle must not be less than this dynamic safety distance.
[0114] By adopting the above method, the first speed compensation amount of the uniform speed segment is correlated with the joint movement speed. The greater the joint movement speed, the larger the value of the first speed compensation amount. In this way, the dynamic safety distance corresponding to the uniform speed segment can be obtained. The avoidance margin can be dynamically adjusted according to the actual speed of the uniform movement. When the uniform speed movement is high, a larger safety gap is reserved to offset the increased servo tracking error. When the uniform speed movement is low, there is no need to excessively increase the safety margin. This avoids the problem of path generation being difficult and path detour redundancy being too large due to the safety gap setting being too conservative. It takes into account both the safety of radiotherapy positioning and the usability of the movement path.
[0115] According to an embodiment of the present invention, in operation S340, dynamic safety distances corresponding to the acceleration segment path and the deceleration segment path are determined based on a preset safety gap and a second speed compensation amount, including operations S3410 to S3420.
[0116] Operation S3410: For the acceleration segment path, obtain the first extreme value of velocity and the first extreme value of acceleration of the robotic arm on the acceleration segment path; Based on the first extreme value of velocity and the first extreme value of acceleration, determine the second speed compensation amount of the acceleration segment path;
[0117] Operate S3420 to obtain the second extreme value of the robot arm's velocity and the second extreme value of its acceleration on the deceleration section path; based on the second extreme value of the velocity and the second extreme value of the acceleration, determine the second velocity compensation amount for the deceleration section path;
[0118] The larger the extreme values of velocity and acceleration, the greater the amount of second velocity compensation.
[0119] In an embodiment of the present invention, the first speed extreme value is the maximum speed that the robotic arm joint can reach within the acceleration segment path.
[0120] In an embodiment of the present invention, the first acceleration extreme value is the maximum acceleration that the robotic arm joint can achieve within the acceleration segment path.
[0121] In an embodiment of the present invention, the second speed extreme value is the maximum speed that the robotic arm joint can reach within the deceleration section path.
[0122] In an embodiment of the present invention, the second acceleration extreme value is the maximum acceleration that the robotic arm joint can achieve within the deceleration segment path.
[0123] Specifically, the input source for the second velocity compensation is no longer a globally fixed compensation value. Instead, the peak velocity and acceleration of each segment of the trajectory are extracted for both acceleration and deceleration, and the second velocity compensation is calculated independently for each segment. In the actual motion control of a six-DOF robotic arm, the motion sub-path is generally generated using fifth-order polynomial or S-shaped velocity curve interpolation. The acceleration segment corresponds to the range from 0 to cruising speed. Within this range, the joint velocity continuously increases and the acceleration is not zero. This segment of the trajectory will have a maximum speed that a joint can reach, i.e., the first velocity extreme value, and simultaneously, a maximum absolute value of acceleration for this segment of the trajectory, i.e., the first acceleration extreme value. These two parameters can be directly obtained from the velocity planning results without actually driving the robotic arm.
[0124] The deceleration segment corresponds to the end of the trajectory, where the cruising speed decreases to 0. The deceleration process is a braking process, and there will be a peak speed in this segment, i.e., the second extreme speed, which is the maximum joint speed at the moment deceleration begins. Simultaneously, there is the maximum absolute value of the braking process, i.e., the second extreme acceleration. It should be noted that the acceleration in the deceleration segment is negative; when calculating the compensation, the absolute value of the acceleration is used in the calculation to characterize the severity of the braking impact.
[0125] The further secondary velocity compensation is a comprehensive compensation parameter that simultaneously couples the extreme values of velocity and acceleration. A larger extreme velocity value results in a greater tracking lag error for the servo system; a larger extreme acceleration / deceleration value results in greater inertial forces generated by the robotic arm links, the supporting treatment bed, and the patient, leading to a more pronounced lag in the servo motor torque response and a significant deviation of the actual robotic arm configuration from the planned theoretical trajectory. Therefore, increasing either the extreme velocity or the extreme acceleration value will result in a larger actual position drift, and the corresponding secondary velocity compensation will also increase. The extreme values of velocity and acceleration in the acceleration and deceleration phases are usually not equal; therefore, within the same motion sub-path, the secondary velocity compensation for the acceleration phase and the secondary velocity compensation for the deceleration phase can be different.
[0126] Finally, after obtaining the second velocity compensation amounts for the acceleration and deceleration segments, the preset safety gaps are superimposed to obtain the dynamic safety distances for the corresponding segments. During the sampling pose validity verification and topology graph edge construction verification processes, the actual physical gaps between the robotic arm links and obstacles at all sampling points in the acceleration segment must be greater than or equal to the dynamic safety distance of the acceleration segment; similarly, the actual physical gaps at all sampling points in the deceleration segment must be greater than or equal to the dynamic safety distance of the deceleration segment. If any sampling point does not meet this condition, the sampling pose corresponding to that motion sub-path will be deemed invalid and cannot be included in the node topology graph as a target pose.
[0127] By adopting the above method, the problem of fixed compensation amounts being limited to safety margins based on the maximum operating conditions of the entire machine, which would result in overly conservative paths that cannot be used in the confined space of a radiotherapy room, is avoided. Simultaneously, the extreme speed and acceleration values are extracted for the acceleration and deceleration phases respectively, and the second speed compensation amount is calculated independently for each phase. The larger the extreme speed and acceleration values, the larger the second speed compensation amount, which can adapt to varying degrees of speed change. During rapid acceleration and deceleration, the safety compensation amount is automatically amplified to offset position drift caused by inertia and servo lag, while a smaller compensation is used for smooth speed changes.
[0128] In an embodiment of the present invention, the second speed compensation amount is determined by the following formula:
[0129]
[0130] In the formula, This represents the extreme speed of this segment. This represents the absolute value of the extreme acceleration values in this segment. , These are coefficients obtained in advance through whole-machine servo tracking error calibration.
[0131] For example, this embodiment uses a six-DOF radiotherapy positioning robotic arm with a preset safety gap. The coefficients of the weighting formula are obtained through servo prototype calibration. , .
[0132] For the acceleration segment of the motion sub-path, velocity planning analysis yields the first velocity extremum. First acceleration extreme value Substitute into the calculation, the second speed compensation amount in the acceleration phase. Acceleration phase dynamic safety distance .
[0133] For the deceleration segment of the motion sub-path, the second velocity extreme value The second acceleration extreme value is Second speed compensation amount during deceleration phase Dynamic safety distance during deceleration phase When verifying the motion sub-path, the gap between all sampled pose links and obstacles in the acceleration phase must be ≥62.2mm; the gap between all sampled poses in the deceleration phase must be ≥63.45mm, only then can the sampled poses be retained as the target poses.
[0134] Figure 4 The diagram schematically illustrates a structural block diagram of a motion path generation device for a robotic arm according to an embodiment of this application.
[0135] A second aspect of the present invention provides a motion path generation device for a robotic arm, such as... Figure 4 As shown, the motion path generation device 400 includes:
[0136] The pose acquisition module 410 is used to acquire multiple target poses of the robotic arm, which is composed of multiple links connected by motion joints.
[0137] The distance acquisition module 420 is used to acquire, for any two target poses forming a pose group, a first spatial distance between the two target poses and a second spatial distance between the robotic arm and spatial obstacles during the movement.
[0138] The indicator determination module 430 is used to determine the first indicator information and the second indicator information of the pose group based on the first spatial distance and the second spatial distance, respectively; wherein, the first indicator information represents the range of motion of the robotic arm, and the second indicator information represents the degree of collision risk of the robotic arm during motion;
[0139] The topology construction module 440 is used to determine the node connection relationship of the node topology graph of the multiple target poses based on the first indicator information and the second indicator information; wherein, each target pose is a node of the node topology graph, and the distance between the connecting edges between nodes is determined by the first spatial distance.
[0140] The path generation module 450 is used to determine at least one target connection edge in the node topology graph based on the starting pose and ending pose of the robotic arm, and to generate the motion path of the robotic arm based on the pose group corresponding to the target connection edge.
[0141] According to an embodiment of the present invention, the robotic arm includes at least a first motion joint and a second motion joint, wherein the first motion joint is closer to the base of the robotic arm than the second motion joint; the index determination module 430 is further configured to: acquire the coordinate change of the motion joints between any two target poses; determine a first spatial distance based on the coordinate change and joint weight of each motion joint; wherein the joint weight of the first motion joint is higher than that of the second motion joint; and determine first index information of the pose group based on the first spatial distance; wherein the larger the first spatial distance, the larger the first index information.
[0142] According to an embodiment of the present invention, the index determination module 430 is further configured to determine at least one sampled pose between any two target poses; obtain the relative distance between the sampled pose and a spatial obstacle; determine a second spatial distance based on the relative distance between each sampled pose and a spatial obstacle; and determine second index information of the pose group based on the second spatial distance; wherein, the smaller the second spatial distance, the larger the second index information.
[0143] According to an embodiment of the present invention, the pose acquisition module 410 is further configured to determine multiple candidate poses and the distribution density of the candidate poses in space based on the historical pose data of the robotic arm; determine the sampling density of the robotic arm in different regions of space based on the distribution density; determine the sampling pose among the multiple candidate poses based on the sampling density; wherein, the greater the distribution density of the candidate pose in the region, the greater the sampling density; and acquire multiple target poses of the robotic arm based on the sampling pose.
[0144] According to an embodiment of the present invention, the topology construction module 440 is further configured to determine the motion sub-path of the robotic arm from the first sampled pose to the second sampled pose; the first sampled pose and the second sampled pose are any two sampled poses from a plurality of candidate poses; determine the acceleration segment path, the constant speed segment path, and the deceleration segment path in the motion sub-path; determine the dynamic safety distance corresponding to the constant speed segment path based on a preset safety gap and a first speed compensation amount; determine the dynamic safety distances corresponding to the acceleration segment path and the deceleration segment path based on the preset safety gap and the second speed compensation amount, respectively; and obtain multiple target poses of the robotic arm from the sampled poses based on the dynamic safety distances corresponding to each path; wherein, the first speed compensation amount is used to compensate for the position deviation of the robotic arm caused by servo control error during the constant speed motion, and the second speed compensation amount is used to compensate for the position deviation of the robotic arm caused by servo control error during the variable speed motion.
[0145] According to an embodiment of the present invention, the topology construction module 440 is further configured to determine a first speed compensation amount based on the joint movement speed of the robotic arm on the uniform speed segment path; and to determine a dynamic safety distance corresponding to the uniform speed segment path based on a preset safety clearance and the first speed compensation amount; wherein, the greater the joint movement speed, the greater the first speed compensation amount.
[0146] According to an embodiment of the present invention, the topology construction module 440 is further configured to, for the acceleration segment path, obtain a first speed extreme value and a first acceleration extreme value of the robotic arm on the acceleration segment path; determine a second speed compensation amount for the acceleration segment path based on the first speed extreme value and the first acceleration extreme value; for the deceleration segment path, obtain a second speed extreme value and a second acceleration extreme value of the robotic arm on the deceleration segment path; determine a second speed compensation amount for the deceleration segment path based on the second speed extreme value and the second acceleration extreme value; wherein, the larger the speed extreme value and the acceleration extreme value, the larger the second speed compensation amount.
[0147] Figure 5 A block diagram schematically illustrates an electronic device suitable for implementing a motion path generation method for a robotic arm according to an embodiment of this application.
[0148] like Figure 5 As shown, an electronic device 500 according to an embodiment of this application includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory 502 or a program loaded from a storage portion 508 into a random access memory 503. The processor 501 may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a dedicated microprocessor. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for executing different steps of the method flow according to an embodiment of this application.
[0149] Random access memory 503 stores various programs and data required for the operation of electronic device 500. Processor 501, read-only memory 502, and random access memory 503 are interconnected via bus 504. Processor 501 executes various steps of the method flow according to embodiments of this application by executing programs in read-only memory 502 and / or random access memory 503. It should be noted that the programs may also be stored in one or more memories other than read-only memory 502 and random access memory 503. Processor 501 may also execute various steps of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0150] According to embodiments of this application, the electronic device 500 may further include an input / output interface 505, which is also connected to a bus 504. The electronic device 500 may also include one or more of the following components connected to the input / output interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube, liquid crystal display, etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card, such as a local area network card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.
[0151] Embodiments of this application also provide a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0152] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof. In embodiments of this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include the read-only memory 502, and / or random access memory 503, and / or one or more memories other than read-only memory 502 and random access memory 503 described above.
[0153] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this application.
[0154] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0155] In embodiments of this application, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of this application embodiment. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0156] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0157] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0158] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A method for generating the motion path of a robotic arm, characterized in that, The method includes: The robot arm acquires multiple target poses, wherein the robot arm is composed of multiple links connected by motion joints; For any two target poses, obtain the first spatial distance between the two target poses and the second spatial distance between the robotic arm and spatial obstacles during the movement. Based on the first spatial distance and the second spatial distance, the first index information and the second index information of the pose group are determined respectively; wherein, the first index information represents the range of motion of the robotic arm, and the second index information represents the degree of collision risk of the robotic arm during motion; Based on the first indicator information and the second indicator information, the node connection relationship of the node topology graph of the multiple target poses is determined; wherein, each target pose is a node of the node topology graph, and the distance between the connecting edges between nodes is determined by the first spatial distance. Based on the starting and ending poses of the robotic arm, at least one target connection edge is determined in the node topology graph, and the motion path of the robotic arm is generated based on the pose group corresponding to the target connection edge.
2. The method according to claim 1, characterized in that, The robotic arm includes at least a first motion joint and a second motion joint, wherein the first motion joint is closer to the base of the robotic arm than the second motion joint; Based on the first spatial distance, the first index information of the pose group is determined, including: Obtain the coordinate changes of the moving joints between any two target poses; The first spatial distance is determined based on the coordinate changes and joint weights of each motion joint; wherein the joint weight of the first motion joint is higher than that of the second motion joint. Based on the first spatial distance, the first index information of the pose group is determined; wherein, the larger the first spatial distance, the larger the first index information.
3. The method according to claim 1, characterized in that, Based on the second spatial distance, the second index information of the pose group is determined, including: Determine at least one sampled pose between any two target poses; Obtain the relative distance between the sampled pose and the spatial obstacle; The second spatial distance is determined based on the relative distance between each of the sampling poses and the spatial obstacles; Based on the second spatial distance, the second index information of the pose group is determined; wherein, the smaller the second spatial distance, the larger the second index information.
4. The method according to claim 1, characterized in that, The acquisition of multiple target poses of the robotic arm includes: Based on the historical pose data of the robotic arm, multiple candidate poses are determined, as well as the spatial distribution density of the candidate poses. Based on the distribution density, the sampling density of the robotic arm in different regions of space is determined; Based on the sampling density, the sampling poses among the multiple candidate poses are determined; wherein, the greater the distribution density of the candidate poses in the region, the greater the sampling density. Based on the sampled poses, multiple target poses of the robotic arm are obtained.
5. The method according to claim 1, characterized in that, Determining the node connection relationships of the node topology graph of the multiple target poses further includes: Determine the motion sub-path of the robotic arm from the first target pose to the second target pose; the first target pose and the second target pose are any two of the plurality of target poses; Determine the acceleration segment, constant speed segment, and deceleration segment of the motion sub-path; Based on the preset safety gap and the first speed compensation amount, the dynamic safety distance corresponding to the constant speed segment path is determined; Based on the preset safety gap and the second speed compensation, the dynamic safety distances corresponding to the acceleration segment path and the deceleration segment path are determined respectively. Based on the dynamic safety distance corresponding to each path, the node connection relationship of the node topology graph of the multiple target poses is determined; The first speed compensation amount is used to compensate for the position deviation caused by servo control error during the uniform motion of the robotic arm, and the second speed compensation amount is used to compensate for the position deviation caused by servo control error during the variable speed motion of the robotic arm.
6. The method according to claim 5, characterized in that, The determination of the dynamic safety distance corresponding to the uniform speed segment path based on the preset safety gap and the first speed compensation amount includes: The first speed compensation amount is determined based on the joint movement speed of the robotic arm on the constant speed segment path. Based on the preset safety gap and the first speed compensation amount, the dynamic safety distance corresponding to the constant speed segment path is determined; The greater the joint movement speed, the greater the first speed compensation amount.
7. The method according to claim 5, characterized in that, Based on the preset safety gap and the second speed compensation amount, the dynamic safety distances corresponding to the acceleration segment path and the deceleration segment path are determined respectively, including: For the acceleration segment path, obtain the first extreme value of velocity and the first extreme value of acceleration of the robotic arm on the acceleration segment path; based on the first extreme value of velocity and the first extreme value of acceleration, determine the second speed compensation amount of the acceleration segment path; For the deceleration section path, obtain the second extreme value of velocity and the second extreme value of acceleration of the robotic arm on the deceleration section path; based on the second extreme value of velocity and the second extreme value of acceleration, determine the second velocity compensation amount of the deceleration section path; The larger the extreme values of velocity and acceleration, the greater the amount of second velocity compensation.
8. A motion path generation device for a robotic arm, characterized in that, The device includes: The pose acquisition module is used to acquire multiple target poses of the robotic arm, which is composed of multiple links connected by motion joints; The distance acquisition module is used to acquire the first spatial distance between two target poses and the second spatial distance between the robotic arm and spatial obstacles during the movement of any two target poses. The indicator determination module is used to determine the first indicator information and the second indicator information of the pose group based on the first spatial distance and the second spatial distance, respectively; wherein, the first indicator information represents the range of motion of the robotic arm, and the second indicator information represents the degree of collision risk of the robotic arm during motion; A topology construction module is used to determine the node connection relationship of the node topology graph of the multiple target poses based on the first indicator information and the second indicator information; wherein, each target pose is a node of the node topology graph, and the distance between the connecting edges between nodes is determined by a first spatial distance. The path generation module is used to determine at least one target connection edge in the node topology graph based on the starting pose and ending pose of the robotic arm, and to generate the motion path of the robotic arm based on the pose group corresponding to the target connection edge.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.