Mechanical arm posture control method and electronic device

By determining reference points and approximate reachable posture ranges within the reachable workspace of the robotic arm, and optimizing posture control through curve fitting, the problem of inaccurate posture control in existing technologies is solved, achieving smooth and continuous posture control and avoiding mechanical failures.

CN120552023BActive Publication Date: 2026-07-21IMABOT SHENZHEN MEDICAL CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
IMABOT SHENZHEN MEDICAL CO LTD
Filing Date
2024-02-27
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies cannot provide specific values ​​for the achievable attitude range of a robotic arm at each position, resulting in the inability to achieve precise attitude control, and also involve a large amount of computation, affecting processor performance.

Method used

By determining multiple reference points in the reachable workspace of the robotic arm, the approximate reachable posture range of each reference point is obtained. The initial reachable posture range is optimized using a curve fitting algorithm. The nearest neighbor reference point corresponding to the target position value is selected, and the reachable posture range of the target is determined based on distance and weight. The range is updated when the target posture value is unreachable.

Benefits of technology

It reduces computational complexity, enables smooth and continuous reachable posture control at any position within the reachable workspace, avoids robotic arm malfunctions, and ensures the accuracy of posture control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120552023B_ABST
    Figure CN120552023B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of remote machine control, and provides a mechanical arm posture control method and an electronic device. The method determines a plurality of reference points in a reachable workspace of a mechanical arm; obtains an approximate reachable posture range of the mechanical arm at each reference point; obtains a target position value and a target posture value in a control instruction of the mechanical arm by a user; selects a plurality of nearest neighbor reference points corresponding to the target position value from the plurality of reference points; determines a target reachable posture range corresponding to the target position value according to a distance between the target position value and each nearest neighbor reference point in the plurality of nearest neighbor reference points and the approximate reachable posture range of all nearest neighbor reference points; and determines whether to update the target posture value according to a comparison result of the target posture value and the target reachable posture range. The above method can improve the accuracy of posture control of the mechanical arm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of remote machine control technology, specifically to a robotic arm posture control method and electronic device. Background Technology

[0002] In remote ultrasound examinations, doctors can use posture and position sensors to control the posture and position of a robotic arm to control the movement of its end effector (e.g., an end effector). The reachable posture range of the end effector is limited by the mechanical structure and changes with the position of the end effector. The reachable posture range refers to the maximum range of posture rotation that the end effector can perform around a fixed center point.

[0003] Since doctors can move freely without any restrictions when holding the posture sensor, if the doctor manipulates the posture sensor to move too much, the resulting target posture value may exceed the reachable posture range of the end effector at the current position, making it impossible for the end effector to reach the target posture, and may cause problems such as motion errors, jamming, or extremely rapid movement.

[0004] In related technologies, the attitude control of the robotic arm is usually based on the angular velocity maneuverability ellipsoid. However, the periodic calculation method used in this method has a large computational load, high requirements for processor performance, and cannot give the specific value of the achievable attitude range of the robotic arm at each position, which makes it impossible to achieve precise attitude control of the robotic arm. Summary of the Invention

[0005] In view of the above, it is necessary to propose a robotic arm posture control method and electronic device that can solve the problem of not being able to achieve precise posture control of the robotic arm because the relevant technology cannot provide specific values ​​of the achievable posture range of the robotic arm at each position.

[0006] Embodiments of this disclosure provide a robotic arm posture control method, the method comprising: determining a plurality of reference points in the reachable workspace of the robotic arm; obtaining an approximate reachable posture range of the robotic arm at each reference point; obtaining a target position value and a target posture value in a user control command to the robotic arm; selecting a plurality of nearest neighbor reference points corresponding to the target position value from the plurality of reference points; determining a target reachable posture range corresponding to the target position value based on the distance between the target position value and each of the plurality of nearest neighbor reference points and the approximate reachable posture range of all nearest neighbor reference points; and determining whether to update the target posture value based on a comparison result between the target posture value and the target reachable posture range.

[0007] In one embodiment, determining multiple reference points in the reachable workspace of the robotic arm's end effector includes dividing the reachable workspace into multiple subspaces, wherein each subspace includes multiple vertices, and using each vertex as a reference point.

[0008] In one embodiment, obtaining the approximate reachable posture range of the robotic arm at each reference point includes: determining the initial reachable posture range of the robotic arm at each reference point; optimizing the initial reachable posture range based on a curve fitting algorithm to obtain a closed approximate elliptical curve composed of multiple target elliptical curves corresponding to each reference point; taking the range within the approximate elliptical curve as the approximate reachable posture range, and determining multiple elliptical parameters corresponding to the approximate elliptical curve.

[0009] In one embodiment, determining the initial reachable attitude range of the robotic arm at each reference point includes: fixing the position of the end-effector center point of the robotic arm at any reference point; determining a projection point of the endpoint of a preset unit vector corresponding to the end-effector in any of multiple directions, wherein the starting point of the unit vector is located at the end-effector center point of the robotic arm, and the direction of the unit vector represents the direction from the end-effector center point to the end-effector corresponding to the end-effector; and determining the initial reachable attitude range based on the multiple projection points of the unit vector in the multiple directions.

[0010] In one embodiment, determining a projection point corresponding to the endpoint of the preset unit vector at the end of the robotic arm in any of multiple directions includes: determining the reachable attitude angle of the unit vector in any direction, the reachable attitude angle including the maximum angle between the unit vector and the vertical direction; and determining multiple projection points in multiple directions corresponding to the unit vector in the horizontal plane corresponding to any reference point based on the reachable attitude angle, including: determining the length of the projection vector of the unit vector in any direction based on the sine value of the reachable attitude angle in any direction, using the length of the projection vector as the projection distance corresponding to the unit vector, and determining the projection point corresponding to any direction at the projection distance from the reference point in any direction.

[0011] In one embodiment, optimizing the initial reachable attitude range based on the curve fitting algorithm includes: performing elliptical curve fitting based on multiple projection points in the initial reachable attitude range to obtain multiple initial elliptical curve segments; and smoothing the multiple initial elliptical curve segments to obtain a closed approximate elliptical curve composed of multiple target elliptical curve segments corresponding to each reference point.

[0012] In one embodiment, the step of fitting an elliptic curve based on multiple projection points within the initial reachable attitude range to obtain multiple initial elliptic curve segments includes: establishing a rectangular coordinate system with the reference point as the origin in the horizontal plane corresponding to any reference point; dividing the multiple projection points corresponding to the reference point into multiple sets in the rectangular coordinate system, wherein each set corresponds to a quadrant of the rectangular coordinate system; and performing elliptic curve fitting on the projection points in each set to obtain an initial elliptic curve segment corresponding to each quadrant.

[0013] In one embodiment, the smoothing process of the multiple initial elliptic curves to obtain a closed approximate elliptic curve composed of multiple target elliptic curves corresponding to each reference point includes: updating the axis length of the initial elliptic curve with the larger axis length in a preset direction among every two adjacent initial elliptic curves according to the axis length of each initial elliptic curve in the direction corresponding to each coordinate axis in the rectangular coordinate system, until every two adjacent initial elliptic curves have the same axis length in the preset direction, thereby obtaining the multiple target elliptic curves and the closed approximate elliptic curve composed of the multiple target elliptic curves.

[0014] In one embodiment, updating the axis length of the initial elliptic curve with the larger axis length in a preset direction among two adjacent initial elliptic curves based on the axis length of each initial elliptic curve in each direction includes: taking the axis length in the direction of the horizontal axis of the Cartesian coordinate system corresponding to each initial elliptic curve as the first axis length, and taking the axis length in the direction of the vertical axis of the Cartesian coordinate system corresponding to each initial elliptic curve as the second axis length; if two adjacent initial elliptic curves are two initial elliptic curves separated by the horizontal axis, and the two first axis lengths corresponding to the two adjacent initial elliptic curves are not equal, updating the larger of the two first axis lengths to the smaller of the two first axis lengths; and / or, if two adjacent initial elliptic curves are two initial elliptic curves separated by the vertical axis, and the two second axis lengths corresponding to the two adjacent initial elliptic curves are not equal, updating the larger of the two second axis lengths to the smaller of the two second axis lengths.

[0015] In one embodiment, determining the plurality of elliptic parameters corresponding to the approximate elliptic curve includes: establishing a rectangular coordinate system in the horizontal plane corresponding to any reference point, with the reference point as the origin, and using the origin as the center of the approximate elliptic curve; determining the coordinates of any intersection point between the approximate elliptic curve and any coordinate axis of the rectangular coordinate system; determining the distance between the intersection point and the center of the circle based on the coordinates; using the distance between the intersection point and the center of the circle as an elliptic parameter; and obtaining the plurality of elliptic parameters corresponding to all intersection points.

[0016] In one embodiment, selecting the nearest neighbor reference points corresponding to the target position value from the plurality of reference points includes: determining the subspace corresponding to the target position value from the plurality of subspaces as the target subspace; and taking each vertex of the plurality of vertices of the target subspace as a nearest neighbor reference point to obtain the plurality of nearest neighbor reference points.

[0017] In one embodiment, the approximate reachable attitude range includes multiple elliptic parameters corresponding to an approximate elliptic curve. Determining the target reachable attitude range corresponding to the target position value based on the distance between the target position value and each of the multiple nearest neighbor reference points, and the approximate reachable attitude ranges of all nearest neighbor reference points, includes: determining the weight corresponding to each nearest neighbor reference point based on the distance between the target position value and each nearest neighbor reference point; and determining the target reachable attitude range corresponding to the target position value based on the weight of all nearest neighbor reference points and the weighted sum of the elliptic parameters.

[0018] In one embodiment, the method further includes determining a comparison result between the target attitude value and the target reachable attitude range, including: establishing a target rectangular coordinate system with the target position as the origin in the target horizontal plane where the target position corresponding to the target position value is located; determining the target direction and target attitude angle corresponding to the target attitude value, wherein the target direction includes the direction of the target projection vector of the unit vector corresponding to the target attitude value in the target rectangular coordinate system, and the target attitude angle includes the angle between the unit vector corresponding to the target attitude value and the vertical direction, and the direction of the unit vector represents the direction from the end-point center point of the robotic arm's end-point to the end-point robotic arm corresponding to the end-point robotic arm; determining the projection point of the endpoint of the unit vector corresponding to the target attitude value in the target horizontal plane as the target projection point based on the sine value of the target direction and the target attitude angle; if the target projection point is within the target reachable attitude range, determining that the target attitude value does not exceed the target reachable attitude range; or, if the target projection point is outside the target reachable attitude range, determining that the target attitude value exceeds the target reachable attitude range.

[0019] In one embodiment, the method further includes: if the target posture value does not exceed the target reachable posture range, controlling the robotic arm to move according to the target posture value; or, if the target posture value exceeds the target reachable posture range, updating the target posture value according to the target reachable posture range, and controlling the robotic arm to move according to the updated target posture value.

[0020] In one embodiment, updating the target attitude value based on the target reachable attitude range includes: determining the intersection point of the target projection vector and the target approximate elliptic curve corresponding to the target reachable attitude range as the target intersection point, and determining the distance between the target intersection point and the origin as the target distance; determining an updated attitude angle based on the arcsine value of the target distance, and updating the target attitude value based on the updated attitude angle.

[0021] This disclosure provides a robotic arm posture control device, comprising: a determining module for determining multiple reference points in the reachable workspace of the robotic arm; an acquiring module for acquiring the approximate reachable posture range of the robotic arm at each reference point; the acquiring module further for acquiring a target position value and a target posture value in a user control command to the robotic arm; a selecting module for selecting multiple nearest neighbor reference points corresponding to the target position value from the multiple reference points; the determining module further for determining a target reachable posture range corresponding to the target position value based on the distance between the target position value and each of the multiple nearest neighbor reference points and the approximate reachable posture range of all nearest neighbor reference points; and an updating module for determining whether to update the target posture value based on a comparison result between the target posture value and the target reachable posture range.

[0022] Embodiments of this disclosure provide an electronic device including a processor and a memory, wherein the processor is used to implement the robotic arm posture control method when executing a computer program stored in the memory.

[0023] Embodiments of this disclosure provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the robotic arm posture control method.

[0024] In summary, the robotic arm posture control method described in this disclosure, and the robotic arm posture control method provided in the embodiments of this disclosure, can achieve smoothing of the reachable posture range at each reference point by determining multiple reference points in the reachable workspace of the robotic arm, and then determining the approximate reachable posture range represented by an approximate elliptic curve at each reference point; by determining multiple nearest neighbor reference points corresponding to the target position value in the control command of the robotic arm, and based on the distance of each nearest neighbor reference point and the approximate reachable posture range of all nearest neighbor reference points, the target reachable posture range at any non-reference point target position value is determined; by comparing the target reachable posture range with the target posture value in the control command, the target posture value can be updated when the target posture value is an unreachable posture. This reduces the computational difficulty of determining the reachable posture range at any position in the reachable workspace, determines a smooth and continuous reachable posture range at any position in the reachable workspace, and achieves precise control of the robotic arm posture at any position in the reachable workspace, avoiding mechanical failures of the robotic arm. Attached Figure Description

[0025] Figure 1 This is an example diagram of a robotic arm provided in one embodiment of this disclosure.

[0026] Figure 2 This is an example diagram illustrating the reachable attitude range provided in one embodiment of this disclosure.

[0027] Figure 3 This is a structural diagram of an electronic device provided in an embodiment of the present disclosure.

[0028] Figure 4 This is a flowchart of a robotic arm posture control method provided in one embodiment of the present disclosure.

[0029] Figure 5 This is an example diagram of an accessible workspace provided in another embodiment of this disclosure.

[0030] Figure 6 This is a flowchart of a detailed process for S202 provided in another embodiment of this disclosure.

[0031] Figure 7 This is an example diagram of the projection points corresponding to the endpoints of the unit vectors provided in the embodiments of this disclosure.

[0032] Figure 8 This is an example diagram of the initial reachable attitude range provided in one embodiment of this disclosure.

[0033] Figure 9 This is an example diagram of a multi-segment initial elliptic curve provided in an embodiment of this disclosure.

[0034] Figure 10This is an example diagram of a multi-segment target elliptic curve and an approximate reachable attitude range provided in an embodiment of this disclosure.

[0035] Figure 11 This is an example diagram of the target subspace and nearest neighbor reference point provided in an embodiment of this disclosure.

[0036] Figure 12 This is an example diagram showing the target projection point within the reachable attitude range of the target, provided in an embodiment of this disclosure.

[0037] Figure 13 This is an example diagram showing that the target projection point exceeds the reachable attitude range of the target, according to an embodiment of this disclosure.

[0038] Figure 14 This is an example diagram illustrating the updating of target attitude values ​​according to an embodiment of this disclosure.

[0039] Figure 15 This is a structural diagram of a robotic arm posture control device provided in one embodiment of the present disclosure. Detailed Implementation

[0040] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the disclosure will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein in the description of this disclosure is for the purpose of describing an embodiment in one instance and is not intended to be limiting of this disclosure.

[0042] It should be noted that in this disclosure, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this disclosure are used to distinguish similar objects, not to describe a specific order or sequence.

[0043] In this disclosure, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in this disclosure should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. Without conflict, the following embodiments and features can be combined with each other.

[0044] In one embodiment, during a remote ultrasound examination, a physician can use attitude sensors and position sensors to control the attitude and position of a robotic arm to control the movement of its end effector (e.g., an end effector). The reachable attitude range of the end effector is limited by the mechanical structure and changes with the position of the end effector. The reachable attitude range refers to the maximum range of attitude rotation that the end effector can perform around a fixed center point.

[0045] For example Figure 1 The diagram shown is an example of a robotic arm provided according to an embodiment of this disclosure. The robotic arm may include multiple joints and multiple segments, which are not specifically limited in this disclosure. In this embodiment, the end of each segment of the robotic arm is referred to as the end effector. For example, in the following embodiments, the end effector will be exemplified as the end effector of the last segment of the robotic arm. In this embodiment, the segment corresponding to the end effector is referred to as the end effector robotic arm. For example, in the following embodiments, the end effector robotic arm will be exemplified as the robotic arm that connects to or mounts the end effector. The end effector may be an ultrasonic probe used in the field of remote ultrasonic inspection, or it may be an actuator corresponding to other application fields. This disclosure does not impose specific limitations; for example, it may also be a gripper used in the field of industrial installation.

[0046] In one embodiment of this disclosure, a user can control the motion of a robotic arm using a position controller and an attitude controller. For example, the position controller may include an absolute position encoder and an incremental encoder. A position sensor can feed back the actual position of the robotic arm (e.g., an end effector) to the control system for comparison with the expected position, thereby adjusting the movement of the robotic arm so that the end effector reaches the expected position. An attitude sensor may include an accelerometer and a gyroscope. The attitude sensor can feed back the actual attitude (e.g., rotation angle and direction) of the robotic arm to the control system for comparison with the expected attitude, thereby adjusting the movement of the robotic arm so that the robotic arm reaches the expected attitude. The attitude may include a rotation angle and an orientation, where the rotation angle can be the angle between the robotic arm and the vertical direction, and the orientation can be the angle between the projection of the robotic arm onto the horizontal plane and a coordinate axis of a coordinate system in the horizontal plane.

[0047] For example Figure 2 The diagram shown is an example of the reachable attitude range provided in an embodiment of this disclosure. If the end effector is ideally in a state without any dead angles, when rotating around the origin with the center point of the end effector as the origin and the vertical direction as the central axis, the reachable attitude range of the end effector should be a standard hemisphere or a standard circle corresponding to the largest cross-section of a standard sphere. However, due to the mechanical structure limitations of the end effector, it has unreachable attitudes. Therefore, in practice, when rotating around the origin with the center point of the end effector as the origin and the vertical direction as the central axis, the reachable attitude space of the end effector can be considered as an approximate cone. The horizontal projection range of the horizontal cross-section per unit length of the generatrix of this approximate cone can be taken as the reachable attitude range of the end effector.

[0048] Since doctors can move freely without any restrictions when holding the posture sensor, if the doctor manipulates the posture sensor to move too much, the resulting target posture value may exceed the reachable posture range of the end effector at the current position, making it impossible for the end effector to reach the target posture, and may cause problems such as motion errors, jamming, or extremely rapid movement.

[0049] In related technologies, the attitude control of the robotic arm is usually based on the angular velocity maneuverability ellipsoid. However, the periodic calculation method used in this method has a large computational load, high requirements for processor performance, and cannot give the specific value of the achievable attitude range of the robotic arm at each position, which makes it impossible to achieve precise attitude control of the robotic arm.

[0050] For example, the reachable range of a robotic arm is not a perfectly round, regular shape. When the end effector is in certain positions, there are long, narrow gaps at the edges of the reachable range of the robotic arm. If a doctor accidentally controls the robotic arm to this position, it will cause the robotic arm to jam and be unable to move in other directions.

[0051] To address the aforementioned issues, this disclosure provides a robotic arm posture control method. This method involves determining multiple reference points within the robotic arm's reachable workspace, then determining the approximate reachable posture range represented by an approximate elliptic curve at each reference point, thus achieving smoothing of the reachable posture range at each reference point. Furthermore, by determining multiple nearest-neighbor reference points corresponding to the target position value in the robotic arm's control command, and based on the distance between each nearest-neighbor reference point and the approximate reachable posture range of all nearest-neighbor reference points, the target reachable posture range at any non-reference point's target position value is determined. By comparing the target reachable posture range with the target posture value in the control command, the target posture value can be updated when it becomes unreachable. This method reduces the computational difficulty of determining the reachable posture range at any position within the reachable workspace, establishes a smooth and continuous reachable posture range at any position within the reachable workspace, and achieves precise posture control of the robotic arm at any position within the reachable workspace, preventing mechanical failures of the robotic arm.

[0052] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device 10 can be a computer, mobile phone, tablet computer, laptop computer, or other electronic device, or it can be a control system integrated into a robotic arm. This disclosure does not limit the specific type of electronic device.

[0053] like Figure 3 As shown, the electronic device 10 may include a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104 and a bus 105, a camera device 106, and a display screen 107. The processor 103 is coupled to the communication module 101, the memory 102, and the I / O interface 104 via the bus 105.

[0054] Communication module 101 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as Universal Serial Bus (USB) and Controller Area Network (CAN). The wireless communication module may provide one or more wireless communication solutions such as Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication networks, Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR).

[0055] Memory 102 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 103, and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The RAM may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), etc.

[0056] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 103. Non-volatile memory can include disk storage devices and flash memory.

[0057] The memory 102 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 103. The one or more computer programs include multiple instructions that, when executed by the processor 103, enable a robotic arm posture control method to be executed on the electronic device 10.

[0058] In other embodiments, the electronic device 10 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 10.

[0059] Processor 103 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0060] The processor 103 provides computing and control capabilities. For example, the processor 103 is used to execute computer programs stored in the memory 102 to implement the above-described robotic arm posture control method.

[0061] I / O interface 104 is used to provide a channel for user input or output. For example, I / O interface 104 can be used to connect various input / output devices, such as a mouse, keyboard, touch device, display screen, etc., allowing users to input information or visualize information. I / O interface 104 can also be used to provide a connection with a robotic arm (e.g., Figure 3 The data transmission channel of the control system of the robotic arm 70 shown.

[0062] Bus 105 is used to provide at least the communication module 101, memory 102, processor 103, and I / O interface 104 in electronic device 10.

[0063] It is understood that the structures illustrated in the embodiments of this disclosure do not constitute a specific limitation on the electronic device 10. In other embodiments of this disclosure, the electronic device 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0064] Figure 4 This is a flowchart of a robotic arm posture control method provided in one embodiment of the present disclosure. The robotic arm posture control method is applied in electronic devices, for example... Figure 3 The electronic device 10 in the process includes the following steps. Depending on different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0065] S201, determine multiple reference points in the reachable workspace of the robotic arm.

[0066] In one embodiment of this disclosure, the reachable workspace represents the space corresponding to the set of all locations that a robotic arm's end effector (e.g., an end effector) can reach in more than one direction, such as the maximum space within which the end effector is confined to perform its work. Robotic arms with different mechanical structures may have reachable workspaces of different shapes and volumes; this disclosure does not impose specific limitations on the shape and volume of the reachable workspace. For example... Figure 5 The diagram shown is an example of an accessible workspace provided in an embodiment of this disclosure.

[0067] In one embodiment of this disclosure, determining multiple reference points in the reachable workspace of the end effector of the robotic arm includes: dividing the reachable workspace into multiple subspaces, wherein each subspace includes multiple vertices, and using each vertex as a reference point.

[0068] Because the reachable workspace is large and its positions in three-dimensional space are continuous, it is difficult to determine the reachable pose range of a robotic arm (e.g., an end effector) at each position by traversing it. A better approach is to divide the reachable workspace into multiple subspaces. This breaks down the problem of calculating the reachable pose range at each position within the relatively large reachable workspace into calculating the reachable pose range at each position within each relatively smaller subspace, thus reducing the algorithm's complexity.

[0069] Furthermore, the mechanical structure of the robotic arm determines that its reachable attitude range within a smaller subspace will not suddenly change drastically. Therefore, a preset number of reference points can be determined in each subspace. By calculating the reachable attitude range at each reference point, the weight of each reference point relative to that location can be determined based on the distance between any location in any subspace and all reference points. Thus, the reachable attitude range at any location can be obtained based on the weighted calculation result of the reachable attitude range at all reference points in any subspace and the weights.

[0070] Based on the above, to facilitate determining the reachable pose range at each location within the reachable workspace, the reachable workspace can be divided into multiple subspaces. For example... Figure 5 As shown, the reachable workspace is divided into multiple cubes of uniform size, with each cube serving as a subspace. Since each subspace contains multiple (e.g., 8) vertices, each vertex can be used as a reference point. By determining the reachable pose range at each reference point, the reachable pose range at each location within each subspace is determined.

[0071] In one embodiment of this disclosure, the smaller the volume of each subspace, the higher the calculation accuracy of the reachable attitude range at each location in the reachable workspace. The volume of each subspace can be selected according to actual needs, thereby determining the number of subspaces based on the ratio of the volume of the reachable workspace to the volume of each subspace. In another embodiment, the shape of the subspace can be selected according to actual needs; for example, the subspace can also be a cuboid, etc.

[0072] In one embodiment of this disclosure, in order to determine the position of each subspace and each reference point (e.g., each vertex of the subspace) in the reachable workspace, a reference coordinate system can be set with a fixed position (e.g., the center point of the bottom of the entire robotic arm device) as the origin, thereby determining the coordinates of each reference point in the reference coordinate system.

[0073] In other embodiments, other methods may be used to determine multiple reference points in the reachable workspace. This disclosure does not impose specific limitations on this. For example, a predetermined number (e.g., 10,000) of location points in the reachable workspace may be determined as multiple reference points using a random selection method.

[0074] It is understandable that the aforementioned subspaces, vertices, etc., are not obtained by dividing and setting in the actual reachable workspace. It is only necessary to set the corresponding parameters in the electronic device (such as the shape and volume parameters of the reachable workspace, the shape and volume parameters of the subspace, etc.) so that the electronic device can understand and execute the above process.

[0075] S202, obtain the approximate reachable posture range of the robotic arm at each reference point.

[0076] In one embodiment of this disclosure, reference is made to Figure 6 As shown, the detailed process of S202 may include the following steps:

[0077] S301, determine the initial reachable attitude range of the robotic arm at each reference point.

[0078] In one embodiment of this disclosure, the position of the end effector center point of the robotic arm's end effector (e.g., an end effector actuator) can be fixed at any vertex, and a projection point corresponding to the endpoint of a preset unit vector corresponding to the end effector in any of multiple directions can be determined. The starting point of the unit vector is located at the end effector center point, and the direction of the unit vector represents the direction from the end effector center point to the corresponding end effector of the robotic arm. The initial reachable posture range is determined based on the multiple projection points corresponding to the unit vector in the multiple directions.

[0079] Specifically, for example Figure 7The diagram shown is an example of a unit vector and the projection point corresponding to the endpoint of the unit vector provided in this embodiment of the disclosure. A starting point can be defined with the center point of the robotic arm's end effector (e.g., the center point of the end effector's end effector) as the starting point, and the direction being the axis of the robotic arm tool pointing towards the central axis of the robotic arm (e.g., from the center point of the end effector's end effector to the central axis of the end robotic arm, for example...). Figure 7 A vector of unit length (e.g., a unit vector) along the z-axis, which moves synchronously with the movement of the end effector.

[0080] By controlling the robotic arm to move the end effector's center point to each reference point (e.g., a vertex of a subspace), the starting point of the unit vector is moved to any of those reference points, and the unit vector is made vertically upward. Then, the end effector's center point is kept stationary while its orientation moves in any direction to its maximum angle. This maximum angle is the achievable orientation angle corresponding to the achievable orientation range of the robotic arm in that direction (e.g., ...). Figure 7 As shown in θ), the projection point of the endpoint of the unit vector onto the horizontal plane can be recorded (e.g., θ). Figure 7 (As shown); Repeat the above process, keeping the end effector's center point stationary and moving its attitude to the maximum angle in each of the 360° horizontal directions (which can be understood as azimuth angles), and record the projection point of the endpoint of the unit vector in each direction onto the horizontal plane; Plot all projection points on the horizontal plane, and connect every two adjacent projection points to obtain the initial reachable attitude range of the robotic arm at any reference point. For example Figure 8 The diagram shown is an example of the initial reachable attitude range provided in an embodiment of this disclosure.

[0081] In one embodiment of this disclosure, the more or denser the number of projection points obtained by the above process, the more accurate the initial reachable attitude range will be.

[0082] In one embodiment of this disclosure, determining a projection point of the endpoint of a preset unit vector at the end of the robotic arm in any of multiple directions may include: determining the reachable attitude angle of the unit vector in any direction, the reachable attitude angle including the maximum angle between the unit vector and the vertical direction; and determining multiple projection points in multiple directions of the unit vector in a horizontal plane corresponding to any reference point (e.g., any vertex) based on the reachable attitude angle, including: determining the length of the projection vector of the unit vector in any direction based on the sine value of the reachable attitude angle in any direction, using the length of the projection vector as the projection distance of the unit vector, and determining the projection point corresponding to the any direction at the projection distance from the reference point in any direction.

[0083] The method described above for determining the projection point of the endpoint of the unit vector in any direction is a numerical analytical method based on the principle of projection. In other embodiments, other methods can also be used to determine the projection point of the endpoint of the unit vector in any direction. This disclosure does not impose specific limitations. For example... Figure 7 As shown, a geometric projection method can also be used directly to draw a straight line segment perpendicular to the horizontal plane through the endpoint of the unit vector (e.g., Figure 7 The dashed line segment in the diagram is used as the point where the line segment intersects the horizontal plane, and the point where the line segment intersects the horizontal plane is used as the corresponding projection point.

[0084] In one embodiment of this disclosure, for example Figure 8 As shown, connecting any two adjacent projection points among all projection points yields the initial reachable attitude range of any reference point. The initial reachable attitude range may be an irregular shape. To obtain a more describable, smooth-edged, and regular shape-like outline of the reachable attitude range, the initial reachable attitude range can be optimized.

[0085] S302 optimizes the initial reachable attitude range based on the curve fitting algorithm to obtain a closed approximate elliptic curve composed of multiple target elliptic curves corresponding to each vertex.

[0086] In one embodiment of this disclosure, optimizing the initial reachable attitude range based on a curve fitting algorithm may include the following steps:

[0087] (1) Based on multiple projection points in the initial reachable attitude range, perform elliptic curve fitting to obtain multiple initial elliptic curve segments.

[0088] In one embodiment of this disclosure, elliptic curve fitting based on multiple projection points within the initial reachable attitude range to obtain multiple initial elliptic curve segments includes: establishing a Cartesian coordinate system with the reference point as the origin in the horizontal plane corresponding to any reference point (e.g., any vertex); dividing the multiple projection points corresponding to the reference point into multiple sets in the Cartesian coordinate system, wherein each set corresponds to a quadrant of the Cartesian coordinate system; and performing elliptic curve fitting on the projection points in each set to obtain an initial elliptic curve segment corresponding to each quadrant. Each initial elliptic curve segment can be considered as 1 / 4 of an ellipse, and the two endpoints of each initial elliptic curve segment can be considered as two adjacent vertices in the entire ellipse.

[0089] For example Figure 9The diagram shown is an example of a multi-segment initial elliptic curve provided in an embodiment of this disclosure. A rectangular coordinate system xoy can be established in the horizontal plane corresponding to any vertex, with the vertex as the origin o. Elliptic curve fitting is then performed on the points in the set formed by the projection points corresponding to each quadrant of the coordinate system xoy to obtain an initial elliptic curve segment corresponding to each quadrant. The algorithm used for elliptic curve fitting can include, but is not limited to, a combination of one or more of the following methods: least squares method, parameter optimization method, genetic algorithm, and random search method.

[0090] In other embodiments of this disclosure, the orientation of the Cartesian coordinate axes can be rotated and updated based on the results of elliptic curve fitting, so that the distance between each initial elliptic curve obtained in each quadrant and the set of projection points in each quadrant is as small as possible, thereby improving the accuracy of elliptic curve fitting and facilitating the acquisition of an approximate reachable attitude range that is closer to the initial reachable attitude range in subsequent processes.

[0091] In other embodiments of this disclosure, the directions of all x-axis of all Cartesian coordinate systems corresponding to all vertices of all subspaces can be parallel to each other, thereby making the ellipse parameters corresponding to different vertices directly comparable in subsequent processes, which facilitates the calculation of the target reachable attitude range corresponding to the target position value.

[0092] In other embodiments of this disclosure, if the directions of all x-axis of all Cartesian coordinate systems corresponding to all vertices of all subspaces are not parallel to each other, the rotation matrix between multiple coordinate systems corresponding to multiple vertices in each subspace can be determined. Thus, the rotation matrix can be used to transform the elliptical parameters corresponding to different vertices to the same coordinate system space, so that the elliptical parameters corresponding to different vertices in the subsequent process have indirect comparability, which facilitates the calculation of the target reachable posture range corresponding to the target position value.

[0093] (2) Smooth the multiple initial elliptic curves to obtain a closed approximate elliptic curve composed of multiple target elliptic curves corresponding to each reference point.

[0094] In one embodiment of this disclosure, the smoothing process of the multiple initial elliptic curves to obtain a closed approximate elliptic curve composed of multiple target elliptic curves corresponding to each vertex includes: updating the axis length of the initial elliptic curve with the larger axis length in a preset direction among every two adjacent initial elliptic curves according to the axis length of each initial elliptic curve in each coordinate axis of the Cartesian coordinate system (e.g., the horizontal axis direction and the vertical axis direction), until every two adjacent initial elliptic curves have the same axis length in the preset direction, thereby obtaining the multiple target elliptic curves and the closed approximate elliptic curve composed of the multiple target elliptic curves.

[0095] In one embodiment of this disclosure, updating the axis length of the initial elliptic curve with the larger axis length in a preset direction among two adjacent initial elliptic curve segments based on the axis length of each initial elliptic curve segment in each direction includes: updating the horizontal axis of the Cartesian coordinate system corresponding to each initial elliptic curve segment (e.g., ... Figure 9 The first axis length is taken as the x-axis in the direction of the rectangular coordinate system corresponding to each initial elliptic curve. Figure 9 The axis length in the direction of the y-axis is taken as the second axis length; if two adjacent initial elliptic curves are two initial elliptic curves separated by the horizontal axis, and the two first axis lengths corresponding to the two adjacent initial elliptic curves are not equal, the larger of the two first axis lengths is updated to the smaller of the two first axis lengths; and / or, if two adjacent initial elliptic curves are two initial elliptic curves separated by the vertical axis, and the two second axis lengths corresponding to the two adjacent initial elliptic curves are not equal, the larger of the two second axis lengths is updated to the smaller of the two second axis lengths.

[0096] For easier understanding, please refer to Figure 9 and Figure 10 ,For example Figure 10 The figure shown is an example diagram of a multi-segment target elliptic curve and an approximate reachable attitude range provided in an embodiment of this disclosure. Figure 9 The initial elliptic curve 1 in the first quadrant and the initial elliptic curve 4 in the fourth quadrant are two initial elliptic curves separated by the horizontal x-axis. The first axis length of initial elliptic curve 4 in the x-axis direction is longer than that of initial elliptic curve 1 in the x-axis direction. For example... Figure 10 As shown, the first axis length of the initial elliptic curve four in the x-axis direction can be updated to be equal to the first axis length of the initial elliptic curve one in the x-axis direction, so that the two initial elliptic curves in the first quadrant and the fourth quadrant have the same axis length in the x-axis direction and can intersect the x-axis at the same point.

[0097] Through the above embodiments, the axial length of each pair of adjacent initial elliptic curve segments can be reduced to a smaller value, thereby obtaining a multi-segment target elliptic curve with smooth edges, and an approximate elliptic curve with smoother edges composed of multiple target elliptic curve segments (e.g., ...). Figure 10 (As shown).

[0098] S303, the range within the approximate elliptic curve is taken as the approximate reachable attitude range, and the plurality of elliptic parameters corresponding to the approximate elliptic curve are determined.

[0099] In one embodiment of this disclosure, determining the plurality of elliptic parameters corresponding to the approximate elliptic curve includes: establishing a rectangular coordinate system in the horizontal plane corresponding to any reference point, with the reference point as the origin, and using the origin as the center of the approximate elliptic curve; determining the coordinates of any intersection point between the approximate elliptic curve and any coordinate axis of the rectangular coordinate system; determining the distance between the intersection point and the center of the circle based on the coordinates; using the distance between the intersection point and the center of the circle as an elliptic parameter; and obtaining the plurality of elliptic parameters corresponding to all intersection points.

[0100] Through the above embodiments, the range enclosed by a continuous approximate elliptic curve can be used as the approximate reachable attitude range (e.g., Figure 10 (As shown). Furthermore, by recording only four parameters within the approximate reachable posture range—such as the maximum and minimum values ​​of the approximate reachable posture range in the x-axis and y-axis directions—the posture range of the robotic arm at the current reference point can be approximately described, reducing the computational load in subsequent processes. Each ellipse parameter can be considered as the length of the semi-axis of an approximate elliptic curve in each direction; therefore, the multiple ellipse parameters can be considered as multiple directions (e.g., ...). Figure 10 The ellipse parameters corresponding to each direction (positive x-axis, negative x-axis, positive y-axis, and negative y-axis) are shown.

[0101] In one embodiment of this disclosure, since the multiple elliptical parameters corresponding to any reference point are determined in a coordinate system with the reference point as the origin, the coordinates of any elliptical parameter corresponding to any reference point can be transformed to the reachable workspace based on the coordinates of any reference point in the reachable workspace, thereby obtaining the coordinates of any elliptical parameter corresponding to any reference point in the reachable workspace.

[0102] In one embodiment of this disclosure, multiple elliptical parameters corresponding to each reference point can be recorded in a preset parameter table. For example, the preset parameter table can record the coordinates of any reference point in the reachable workspace, the coordinates of each elliptical parameter corresponding to any reference point in the coordinate system corresponding to the reference point, and / or the coordinates of each elliptical parameter corresponding to any reference point in the reachable workspace.

[0103] Through the above embodiments, the posture of the robotic arm can be controlled based on a smooth and continuous approximate elliptic curve, enabling the robotic arm to generate a smooth trajectory even when moving at edge positions, thus improving the smoothness of the robotic arm's movement. An elliptic curve parameter table can be pre-calculated offline, facilitating the subsequent determination of multiple elliptic parameters corresponding to each reference point through table lookup, thereby improving the efficiency of determining the approximate achievable posture range of the robotic arm at each position.

[0104] S203, obtain the target position value and target attitude value in the user's control command for the robotic arm.

[0105] In one embodiment of this disclosure, the electronic device can obtain the target position value and target attitude value in the user's control command to the robotic arm by receiving user input. The target position value can be a position coordinate in the reachable workspace, and the target attitude value can be a parameter value including rotation angle and direction. For example, the target attitude value can include target attitude angle and target direction.

[0106] In another embodiment, during the process of the doctor operating the position controller and the attitude controller to manipulate the robotic arm, the position controller and the attitude controller can also send target position values ​​and target attitude values ​​to the control system of the robotic arm at certain time intervals, so that the control system of the robotic arm (e.g., electronic equipment) can obtain the target position values ​​and target attitude values.

[0107] In other embodiments, after obtaining the target position value in the user's control command to the robotic arm, the method may further include: determining whether the target position value belongs to the range of the reachable workspace; if the target position value does not belong to the range of the reachable workspace, issuing a warning to the user to remind the user that the position corresponding to the target position value is an unreachable position, and determining and displaying the position closest to the target position value in the reachable workspace to the user.

[0108] The above embodiments can avoid malfunctions caused by incorrect target position values ​​in the robotic arm and improve the user's work efficiency.

[0109] S204: Select multiple nearest neighbor reference points corresponding to the target location value from multiple reference points.

[0110] In one embodiment of this disclosure, selecting the nearest neighbor reference points corresponding to the target position value from the plurality of reference points includes: determining the subspace corresponding to the target position value from the plurality of subspaces as the target subspace; and taking each vertex of the plurality of vertices of the target subspace as a nearest neighbor reference point to obtain the plurality of nearest neighbor reference points.

[0111] In one embodiment of this disclosure, since the coordinates of each vertex of each subspace in the reachable workspace are known, the range enclosed by all vertices of each subspace can be determined as the range of the corresponding subspace. By comparing the target position value with the range of each subspace, the subspace corresponding to the range to which the target position value belongs can be determined as the target subspace. For example... Figure 11The diagram shown is an example of a target subspace and nearest neighbor reference points provided in an embodiment of this disclosure. The range of each cube is the range corresponding to each subspace. If the target position corresponding to the target position value is located within a certain cube, the cube can be determined as the target subspace, and each vertex of the target subspace is taken as a nearest neighbor reference point.

[0112] In one embodiment of this disclosure, after determining the target subspace, the coordinates of each vertex of the target subspace in the reachable workspace can be determined. Then, multiple ellipse parameters corresponding to each vertex of the target subspace can be determined in the parameter table by looking up a table.

[0113] In one embodiment of this disclosure, after determining the target subspace, the coordinates of each vertex (e.g., each nearest neighbor reference point) in the reachable workspace can be determined. Then, multiple ellipse parameters corresponding to each vertex of the target subspace can be determined in the parameter table by looking up a table.

[0114] In other embodiments, other methods may be used to determine the multiple nearest neighbor reference points corresponding to the target location value. This disclosure does not impose specific limitations on this method. For example, the nearest neighbor algorithm may be used to determine the multiple nearest neighbor reference points corresponding to the target location value.

[0115] S205, determine the reachable attitude range corresponding to the target position value based on the distance between the target position value and each of the multiple nearest neighbor reference points and the approximate reachable attitude range of all nearest neighbor reference points.

[0116] In one embodiment of this disclosure, determining the target reachable pose range corresponding to the target position value based on the distance between the target position value and each of the plurality of nearest neighbor reference points and the approximate reachable pose range of all nearest neighbor reference points includes: determining the weight corresponding to each nearest neighbor reference point based on the distance between the target position value and each nearest neighbor reference point (e.g., each vertex in the target subspace); and determining the target reachable pose range corresponding to the target position value based on the weight of all nearest neighbor reference points (e.g., all vertices in the target subspace) and the weighted sum of the ellipse parameters.

[0117] In one embodiment of this disclosure, the Euclidean distance between the coordinates of the target position value in the reachable workspace and the coordinates of each vertex in the target subspace can be determined. Then, the reciprocal of each distance is used as the weight of the corresponding vertex, so that closer vertices receive higher weights, indicating a greater contribution to determining the target position value. Next, all weights corresponding to all vertices in the target subspace are normalized so that the sum of all weights equals 1. For example, this normalization can be achieved by dividing each weight by the sum of all weights. When calculating the ellipse parameters corresponding to the target position value using a weighted average, the ellipse parameter of each vertex in any direction (e.g., the positive x-axis direction) can be multiplied by the corresponding vertex weight, and the results of multiplying all the ellipse parameters in any direction (e.g., the 8 ellipse parameters in the 8 positive x-axis directions of 8 vertices) by the corresponding normalized weights are summed to obtain the ellipse parameters corresponding to the target position value in any direction (e.g., the positive x-axis direction). This yields multiple ellipse parameters corresponding to the target position value in multiple directions (e.g., the positive x-axis direction, the negative x-axis direction, the positive y-axis direction, and the negative y-axis direction).

[0118] Using the above method, the weight of each nearest neighbor reference point can be determined based on the distance between the target position value and each nearest neighbor reference point, giving greater weight to the nearest neighbor reference points that are closer. Then, the elliptical parameters for each direction corresponding to the target position value are determined by the weighted sum of the elliptical parameters for each of all nearest neighbor reference points. This allows the determination of the elliptical parameters for any non-reference point position within the reachable workspace. During robotic arm movement, the elliptical curve of the current position point can be obtained through table lookup and parameter fitting, reducing the computational load.

[0119] In one embodiment of this disclosure, the closed approximate elliptic curve corresponding to the target position value can be determined based on multiple elliptic parameters corresponding to the target position value, thereby obtaining the target reachable attitude range enclosed by the approximate elliptic curve.

[0120] S206, Based on the comparison between the target attitude value and the target reachable attitude range, determine whether to update the target attitude value.

[0121] In one embodiment of this disclosure, the method further includes determining a comparison result between the target attitude value and the target reachable attitude range, including: establishing a target Cartesian coordinate system (e.g., with the target position as the origin) on the target horizontal plane where the target position corresponding to the target position value is located. Figure 12(As shown); determine the target direction and target attitude angle corresponding to the target attitude value, wherein the target direction includes the direction of the target projection vector of the unit vector corresponding to the target attitude value in the target rectangular coordinate system (for example, the target direction can be determined by determining the angle between the target projection vector and the horizontal axis of the target rectangular coordinate system), and the target attitude angle includes the angle between the unit vector corresponding to the target attitude value and the vertical direction, wherein the direction of the unit vector represents the direction from the end center point of the end of the robotic arm to the end arm corresponding to the end of the robotic arm; based on the sine value of the target direction and the target attitude angle, determine the projection point of the endpoint of the unit vector corresponding to the target attitude value in the target horizontal plane as the target projection point; if the target projection point is within the target reachable attitude range, determine that the target attitude value does not exceed the target reachable attitude range; or, if the target projection point is outside the target reachable attitude range, determine that the target attitude value exceeds the target reachable attitude range.

[0122] In one embodiment of this disclosure, the method for determining the projection point of the endpoint of the unit vector corresponding to the target attitude value in the horizontal plane can be referred to the description in S301. Specifically, the starting point of the unit vector corresponding to the target attitude value can be translated to the origin using the target position as the origin, and the projection of the endpoint of the unit vector corresponding to the target attitude value in the horizontal plane can be determined. This disclosure does not impose specific limitations on the method for determining the projection point.

[0123] For example Figure 12 As shown, if the target projection point (or the target coordinates corresponding to the target projection point) is within the range of the target's approximate elliptical curve corresponding to the target's reachable attitude range, it can be determined that the target attitude value has not exceeded the target's reachable attitude range. For example... Figure 13 As shown, if the target projection point A (or the target coordinates corresponding to the target projection point A) exceeds the range of the closed approximate elliptical curve formed by the multiple target elliptical curves, it can be considered that the target attitude angle in the target direction corresponding to the target attitude value exceeds the reachable attitude angle of the robotic arm in the target direction. Therefore, it is determined that the target attitude value exceeds the reachable attitude range of the target.

[0124] In one embodiment of this disclosure, the method further includes: if the target posture value does not exceed the target reachable posture range, controlling the robotic arm to move according to the target posture value; or, if the target posture value exceeds the target reachable posture range, updating the target posture value according to the target reachable posture range, and controlling the robotic arm to move according to the updated target posture value.

[0125] In one embodiment of this disclosure, if the target attitude value exceeds the target approximate reachable attitude range, the target attitude value can be updated in the target direction corresponding to the target attitude value according to the target reachable attitude range, including: determining the intersection point of the target projection vector and the target approximate elliptic curve corresponding to the target reachable attitude range as the target intersection point, and determining the distance between the target intersection point and the origin as the target distance (e.g., d); determining the updated attitude angle according to the arcsine value (arcsin(d)) of the target distance, and updating the target attitude value according to the updated attitude angle.

[0126] In one embodiment of this disclosure, in addition to the method of replacing the target attitude angle in the target attitude value with the updated attitude angle described above, other methods can also be used to update the target attitude value. This disclosure does not impose specific limitations on the method of updating the target attitude value.

[0127] In another example, for example Figure 14 The figure shown is an example diagram of updating the target attitude value according to an embodiment of the present disclosure. In the target horizontal plane corresponding to the target position value, a target rectangular coordinate system xOy is established with the target position as the origin O. A straight line is drawn through the target projection point A and the origin O of the coordinate system containing the target position value. This straight line is the line containing the target projection vector. The intersection of this straight line and the target approximate elliptic curve is taken as the target intersection point B, and the coordinates of the target intersection point B are determined. A straight line l perpendicular to the horizontal plane is drawn through the target intersection point B. The line segment OB and the straight line l are taken as the two legs of a right triangle. The length of the leg OB and the angle opposite to the leg OB in the right triangle are known parameters. For example, the angle opposite to the leg BC can be determined according to π / 2 - the target attitude angle. Therefore, the hypotenuse OC with a length of 1 can be obtained according to the trigonometric functions in the right triangle. The vector OC is the corresponding unit vector obtained after limiting the target attitude value. The vector OC is used as the command value of the unit vector corresponding to the robotic arm to realize the update of the target attitude value, which can satisfy the target reachable attitude range of the robotic arm at the target position.

[0128] Through the above embodiments, the reduction in the range of the elliptical curve at the target position can be detected in advance, and the robotic arm can be decelerated. Therefore, it is applicable to scenarios where the position and posture of the robotic arm change rapidly at the same time, and can achieve precise control of the posture of the robotic arm, avoiding mechanical failure of the robotic arm.

[0129] The robotic arm posture control method provided in this disclosure can achieve smoothing of the reachable posture range at each reference point by determining multiple reference points in the reachable workspace of the robotic arm, and then determining the approximate reachable posture range represented by an approximate elliptic curve at each reference point. By determining multiple nearest neighbor reference points corresponding to the target position value in the control command of the robotic arm, and based on the distance of each nearest neighbor reference point and the approximate reachable posture range of all nearest neighbor reference points, the target reachable posture range at any non-reference point target position value is determined. By comparing the target reachable posture range with the target posture value in the control command, the target posture value can be updated when the target posture value is unreachable. This reduces the computational difficulty of determining the reachable posture range at any position in the reachable workspace, determines a smooth and continuous reachable posture range at any position in the reachable workspace, and achieves precise control of the robotic arm's posture at any position in the reachable workspace, avoiding mechanical failures of the robotic arm.

[0130] Figure 15 This is a structural diagram of a robotic arm posture control device provided in one embodiment of the present disclosure.

[0131] In some embodiments, the robotic arm posture control device 40 may include multiple functional modules composed of computer program segments. The computer programs for each program segment in the robotic arm posture control device 40 may be stored in the memory of an electronic device and executed by at least one processor to perform (see details). Figure 4 (Description) Functions of robotic arm posture control.

[0132] In this embodiment, the robotic arm posture control device 40 can be divided into multiple functional modules according to the functions it performs. These functional modules may include: a determination module 401, an acquisition module 402, a selection module 403, and an update module 404. As used in this disclosure, a module refers to a series of computer program segments that can be executed by at least one processor and perform a fixed function, stored in memory. In this embodiment, the functional implementation of each module in the robotic arm posture control device 40 can be found in the above description of the robotic arm posture control method, and will not be repeated here.

[0133] The determining module 401 is used to determine multiple reference points in the reachable workspace of the robotic arm.

[0134] The acquisition module 402 is used to acquire the approximate reachable posture range of the robotic arm at each reference point.

[0135] The acquisition module 402 is also used to acquire the target position value and target posture value in the user's control command to the robotic arm.

[0136] The selection module 403 is used to select from the plurality of reference points the nearest neighbor reference points corresponding to the target location value.

[0137] The determining module 401 is further configured to determine the target reachable attitude range corresponding to the target position value based on the distance between the target position value and each of the plurality of nearest neighbor reference points and the approximate reachable attitude range of all nearest neighbor reference points.

[0138] The update module 404 is used to determine whether to update the target attitude value based on the comparison result between the target attitude value and the target reachable attitude range.

[0139] This disclosure also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, and the method implemented when the program instructions are executed can refer to the methods in the above embodiments of this disclosure.

[0140] The computer-readable storage medium can be the internal memory of the electronic device described in the above embodiments, such as the hard disk or memory of the electronic device. Alternatively, the computer-readable storage medium can be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device.

[0141] In some embodiments, the computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, etc.; and the data storage area may store data created based on the use of the electronic device, etc.

[0142] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0143] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0144] In the embodiments provided in this disclosure, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0145] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0146] The above-described embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit it. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be included within the protection scope of this disclosure.

Claims

1. A method for controlling the posture of a robotic arm, characterized in that, The method includes: Determine multiple reference points within the reachable workspace of the robotic arm; Obtain the approximate reachable attitude range of the robotic arm at each reference point; Obtain the target position and target attitude values ​​from the user's control commands to the robotic arm; Select from the plurality of reference points the nearest neighbor reference points corresponding to the target location value; Based on the distance between the target position value and each of the plurality of nearest neighbor reference points, and the approximate reachable attitude range of all nearest neighbor reference points, the target reachable attitude range corresponding to the target position value is determined; Based on the comparison between the target attitude value and the target reachable attitude range, it is determined whether to update the target attitude value.

2. The robotic arm posture control method according to claim 1, characterized in that, The multiple reference points in the reachable workspace of the robotic arm's end effector include: The reachable workspace is divided into multiple subspaces, each of which includes multiple vertices, with each vertex serving as a reference point.

3. The robotic arm posture control method according to claim 1, characterized in that, The process of obtaining the approximate achievable pose range of the robotic arm at each reference point includes: Determine the initial reachable attitude range of the robotic arm at each reference point; The initial reachable attitude range is optimized based on the curve fitting algorithm to obtain a closed approximate elliptic curve composed of multiple target elliptic curves corresponding to each reference point. The range within the approximate elliptic curve is taken as the approximate reachable attitude range, and multiple elliptic parameters corresponding to the approximate elliptic curve are determined.

4. The robotic arm posture control method according to claim 3, characterized in that, Determining the initial reachable posture range of the robotic arm at each reference point includes: Fix the position of the end center point of the robotic arm at any reference point, and determine the projection point of the endpoint of the preset unit vector corresponding to the end of the robotic arm in any of multiple directions. The starting point of the unit vector is located at the end center point of the robotic arm, and the direction of the unit vector represents the direction from the end center point to the end robotic arm corresponding to the end of the robotic arm. The initial reachable attitude range is determined based on the multiple projection points corresponding to the unit vector in the multiple directions.

5. The robotic arm posture control method according to claim 3, characterized in that, The optimization of the initial reachable attitude range based on the curve fitting algorithm includes: Based on multiple projection points within the initial reachable attitude range, elliptic curve fitting is performed to obtain multiple initial elliptic curve segments. The initial elliptic curves are smoothed to obtain a closed approximate elliptic curve composed of multiple target elliptic curves corresponding to each reference point.

6. The robotic arm posture control method according to claim 5, characterized in that, The step of fitting an elliptic curve based on multiple projection points within the initial reachable attitude range to obtain multiple initial elliptic curve segments includes: In the horizontal plane corresponding to any reference point, establish a rectangular coordinate system with the reference point as the origin; In the rectangular coordinate system, the multiple projection points corresponding to any reference point are divided into multiple sets, wherein each set corresponds to a quadrant of the rectangular coordinate system; Elliptic curve fitting is performed on the projection points in each set to obtain an initial elliptic curve segment corresponding to each quadrant.

7. The robotic arm posture control method according to claim 6, characterized in that, The smoothing process of the multiple initial elliptic curves to obtain a closed approximate elliptic curve composed of multiple target elliptic curves corresponding to each reference point includes: Based on the axial length of each initial elliptic curve in the direction corresponding to each coordinate axis in the rectangular coordinate system, the axial length of the initial elliptic curve with the larger axial length in the preset direction among every two adjacent initial elliptic curves is updated until every two adjacent initial elliptic curves have the same axial length in the preset direction, thus obtaining the multiple target elliptic curves and the closed approximate elliptic curve formed by the multiple target elliptic curves.

8. The robotic arm posture control method according to claim 7, characterized in that, The step of updating the axis length of the initial elliptic curve with the larger axis length in a preset direction among two adjacent initial elliptic curve segments, based on the axis length of each initial elliptic curve segment in each direction, includes: The length of the horizontal axis of the rectangular coordinate system corresponding to each initial elliptic curve is taken as the first length, and the length of the vertical axis of the rectangular coordinate system corresponding to each initial elliptic curve is taken as the second length. If two adjacent initial elliptic curve segments are two initial elliptic curve segments separated by the horizontal axis, and the two first axis lengths corresponding to the two adjacent initial elliptic curve segments are not equal, then update the larger of the two first axis lengths to the smaller of the two first axis lengths; and / or, If two adjacent initial elliptic curve segments are two initial elliptic curve segments separated by the vertical axis, and the two second axis lengths corresponding to the two adjacent initial elliptic curve segments are not equal, the larger of the two second axis lengths is updated to the smaller of the two second axis lengths.

9. The robotic arm posture control method according to claim 3, characterized in that, The determination of the multiple elliptic parameters corresponding to the approximate elliptic curve includes: In the horizontal plane corresponding to any reference point, a rectangular coordinate system is established with the reference point as the origin, and the origin is used as the center of the approximate elliptic curve. Determine the coordinates of any intersection point between the approximate elliptic curve and any coordinate axis of the rectangular coordinate system. Determine the distance between any intersection point and the center of the circle based on the coordinates. Use the distance between any intersection point and the center of the circle as an ellipse parameter to obtain the plurality of ellipse parameters corresponding to all intersection points.

10. The robotic arm posture control method according to claim 1, characterized in that, The approximate reachable attitude range includes multiple elliptical parameters corresponding to the approximate elliptical curve. Determining the target reachable attitude range corresponding to the target position value based on the distance between the target position value and each of the multiple nearest neighbor reference points, and the approximate reachable attitude ranges of all nearest neighbor reference points, includes: The weight corresponding to each nearest neighbor reference point is determined based on the distance between the target location value and each nearest neighbor reference point; The target reachability range corresponding to the target position value is determined by the weighted sum of the weights corresponding to all nearest neighbor reference points and the ellipse parameters.

11. The robotic arm posture control method according to claim 1, characterized in that, The method further includes determining the comparison result between the target attitude value and the target reachable attitude range, including: In the target horizontal plane where the target position corresponding to the target position value is located, a target rectangular coordinate system is established with the target position as the origin; Determine the target direction and target attitude angle corresponding to the target attitude value, wherein the target direction includes the direction of the target projection vector of the unit vector corresponding to the target attitude value in the target rectangular coordinate system, and the target attitude angle includes the angle between the unit vector corresponding to the target attitude value and the vertical direction, and the direction of the unit vector represents the direction from the end center point of the end of the robotic arm to the end arm corresponding to the end of the robotic arm; Based on the sine value of the target direction and the target attitude angle, the projection point of the endpoint of the unit vector corresponding to the target attitude value in the target horizontal plane is determined as the target projection point; If the target projection point is within the target's reachable attitude range, then the target attitude value is determined not to exceed the target's reachable attitude range; or... If the target projection point is outside the target reachable attitude range, the target attitude value is determined to be outside the target reachable attitude range.

12. The robotic arm posture control method according to claim 11, characterized in that, The method further includes: If the target posture value does not exceed the target reachable posture range, control the robotic arm to move according to the target posture value; or... If the target posture value exceeds the target reachable posture range, the target posture value is updated according to the target reachable posture range, and the robotic arm is controlled to move according to the updated target posture value.

13. The robotic arm posture control method according to claim 12, characterized in that, The step of updating the target attitude value based on the target reachable attitude range includes: The intersection point of the target projection vector and the target approximate elliptic curve corresponding to the target reachable attitude range is determined as the target intersection point, and the distance between the target intersection point and the origin is determined as the target distance; The updated attitude angle is determined based on the arcsine of the target distance, and the target attitude value is updated based on the updated attitude angle.

14. An electronic device, characterized in that, The electronic device includes a processor and a memory, the processor being configured to implement the robotic arm posture control method as described in any one of claims 1 to 13 when executing a computer program stored in the memory.