Mechanical arm attitude control method and electronic equipment

By determining the reference point and approximate reachable attitude range in the accessible working space of the robot arm, the problem of inaccurate attitude control in the prior art is solved, and smooth continuous control at any position is achieved, and mechanical failure is avoided.

CN120552023AActive Publication Date: 2025-08-29IMABOT SHENZHEN MEDICAL CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410211934.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-27
Publication Date
2025-08-29
Estimated Expiration
2044-02-27

AI Technical Summary

Technical Problem

The prior art cannot accurately control the posture of the robotic arm, resulting in problems such as motion errors, stuck or fast motion, and the calculation volume is large and the processor performance requirements are high.

Method used

By determining multiple reference points in the reachable workspace of the robot arm, obtaining the approximate reachable attitude range of each reference point, selecting the nearest neighbor reference point corresponding to the target position value, determining the target reachable attitude range based on the distance and the approximate reachable attitude range, and updating the attitude value when it is unreachable.

Benefits of technology

Accurate attitude control at any position in the reachable workspace is realized, reducing calculation difficulty, avoiding mechanical failures, and improving control accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120552023A_ABST
    Figure CN120552023A_ABST
Patent Text Reader

Abstract

The invention relates to the field of remote machine control, and provides a mechanical arm attitude control method and electronic equipment, and the method comprises the steps: determining a plurality of reference points in a reachable working space of a mechanical arm; acquiring an approximate reachable attitude range of the mechanical arm at each reference point; a target position value and a target posture value in a control instruction of a user to the mechanical arm are obtained; selecting a plurality of nearest neighbor reference points corresponding to the target position value from the plurality of reference points; determining a target reachable attitude range corresponding to the target position value according to the distance between the target position value and each nearest neighbor reference point in the plurality of nearest neighbor reference points and the approximate reachable attitude ranges of all the nearest neighbor reference points; and determining whether to update the target attitude value or not according to a comparison result of the target attitude value and the target reachable attitude range. By means of the method, the precision of attitude control over the mechanical arm can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of remote machine control, and in particular to a robot arm posture control method and electronic equipment. Background Art

[0002] During remote ultrasound examinations, doctors can use posture sensors and position sensors to control the posture and position of the robotic arm to control the movement of the end-effector (e.g., the 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 of the end-effector around a fixed center point.

[0003] Since the doctor's handheld posture sensor can move freely within an unlimited range, if the doctor manipulates the posture sensor's movement amplitude or range too large, the generated target posture value may exceed the reachable posture range of the end robot arm at its current position, making it impossible for the end robot arm to reach the target posture, and may cause problems such as motion errors, freezing, or extremely fast movement.

[0004] Related technologies usually control the posture of the robotic arm based on the angular velocity maneuverability ellipsoid. However, the periodic calculation method used in this method has a large amount of computation, requires high processor performance, and cannot give the specific value of the reachable posture range of the robotic arm at each position, resulting in the inability to achieve precise posture control of the robotic arm. Summary of the Invention

[0005] In view of the above, it is necessary to propose a robot arm posture control method and electronic equipment that can solve the problem of being unable to achieve precise posture control of the robot arm due to the inability of related technologies to give the specific value of the reachable posture range of the robot arm at each position.

[0006] An embodiment of the present disclosure provides a method for controlling the posture of a robotic arm, the method comprising: determining a plurality of reference points in a 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's control instruction for 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 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 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 a plurality of reference points in a reachable workspace of the end effector of the robotic arm comprises dividing the reachable workspace into a plurality of subspaces, wherein each subspace comprises a plurality of vertices, and each vertex is used 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 segments of target elliptical curves corresponding to each reference point; using 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 posture range of the robotic arm at each reference point includes: fixing the position of the end center point of the robotic arm end of the robotic arm at any reference point, and determining a projection point corresponding to the end point of a preset unit vector corresponding to the robotic arm end in any of multiple directions, wherein the starting point of the unit vector is located at the end center point of the robotic arm end, and the direction of the unit vector represents the direction of the end robotic arm corresponding to the robotic arm end pointed from the end center point; determining the initial reachable posture range based on multiple projection points corresponding to the unit vector in the multiple directions.

[0010] In one embodiment, determining a projection point corresponding to the end point of a preset unit vector corresponding to the end of the robotic arm in any of multiple directions includes: determining a reachable posture angle corresponding to the unit vector in any direction, the reachable posture angle including the maximum angle between the unit vector and the vertical direction; according to the reachable posture angle, determining multiple projection points in multiple directions corresponding to the unit vector in the horizontal plane corresponding to any reference point, including: determining the length of the projection vector of the unit vector in any direction according to the sine value of the reachable posture angle corresponding to any direction, taking 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 corresponding to any reference point in any direction.

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

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

[0013] In one embodiment, the smoothing of the multiple segments of the initial elliptic curves to obtain a closed approximate elliptic curve composed of multiple segments of the 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 between each two adjacent segments of the initial elliptic curves according to the axis length of each segment of the initial elliptic curve in the direction corresponding to each coordinate axis of the rectangular coordinate system, until each two adjacent segments of the initial elliptic curves have the same axis length in the preset direction, thereby obtaining the multiple segments of the target elliptic curves and the closed approximate elliptic curve composed of the multiple segments of the target elliptic curves.

[0014] In one embodiment, the updating of the axis length of the initial elliptic curve with the larger axis length in a preset direction between two adjacent initial elliptic curves according to the axis length of each initial elliptic curve in each direction includes: using the axis length in the direction of the horizontal axis of the rectangular coordinate system corresponding to each initial elliptic curve as the first axis length, and using the axis length in the direction of the vertical axis of the rectangular coordinate system corresponding to each initial elliptic curve as the second axis length; if the 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 unequal, updating the larger of the two first axis lengths to the smaller of the two first axis lengths; and\or, if the 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 unequal, updating the larger of the two second axis lengths to the smaller of the two second axis lengths.

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

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

[0017] In one embodiment, the approximate reachable posture range includes multiple ellipse parameters corresponding to the approximate elliptic curve, and determining the target reachable posture range corresponding to the target position value based on the distance between the target position value and each nearest neighbor reference point in the multiple nearest neighbor reference points and the approximate reachable posture 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; and determining the target reachable posture range corresponding to the target position value based on the weighted sum of the weights corresponding to all nearest neighbor reference points and the ellipse parameters.

[0018] In one embodiment, the method also includes determining a comparison result between the target posture value and the target reachable posture 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 a target direction and a target posture angle corresponding to the target posture value, wherein the target direction includes the direction of a target projection vector of a unit vector corresponding to the target posture value in the target rectangular coordinate system, and the target posture angle includes the angle between the unit vector corresponding to the target posture 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 of the robotic arm to the end robotic arm corresponding to the robotic arm end; according to the sine value of the target direction and the target posture angle, determining the projection point of the end point of the unit vector corresponding to the target posture value in the target horizontal plane as the target projection point; if the target projection point is within the target reachable posture range, determining that the target posture value does not exceed the target reachable posture range; or, if the target projection point is outside the target reachable posture range, determining that the target posture value exceeds the target reachable posture 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 posture value according to the target reachable posture range includes: determining the intersection of the target projection vector and the target approximate elliptical curve corresponding to the target reachable posture range as the target intersection, and determining the distance between the target intersection and the origin as the target distance; determining an updated posture angle according to the arcsine value of the target distance, and updating the target posture value according to the updated posture angle.

[0021] An embodiment of the present disclosure provides a robotic arm posture control device, which includes: a determination module for determining multiple reference points in a reachable workspace of the robotic arm; an acquisition module for acquiring an approximate reachable posture range of the robotic arm at each reference point; the acquisition module is also used to acquire a target position value and a target posture value in a user's control instruction for the robotic arm; a selection module for selecting multiple nearest neighbor reference points corresponding to the target position value from the multiple reference points; the determination module is also used to determine a target reachable posture range corresponding to the target position value based on the distance between the target position value and each nearest neighbor reference point in the multiple nearest neighbor reference points and the approximate reachable posture range of all nearest neighbor reference points; an update module is used to determine whether to update the target posture value based on a comparison result between the target posture value and the target reachable posture range.

[0022] An embodiment of the present disclosure provides an electronic device, comprising a processor and a memory, wherein the processor is configured to implement the robotic arm posture control method when executing a computer program stored in the memory.

[0023] An embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the robot arm posture control method is implemented.

[0024] In summary, the robot arm posture control method disclosed in the present invention and the robot arm posture control method provided in the embodiment of the present invention can achieve smoothing of the reachable posture range at each reference point by determining multiple reference points in the reachable workspace of the robot arm and then determining the approximate reachable posture range represented by the approximate elliptic curve at each reference point; by determining multiple nearest neighbor reference points corresponding to the target position value in the control instruction of the robot arm, based on the distance of each nearest neighbor reference point in the nearest neighbor reference points and the approximate reachable posture range of all nearest neighbor reference points, determine the target reachable posture range at the target position value of any non-reference point; through the comparison result of the target reachable posture range with the target posture value in the control instruction, the target posture value can be updated when the target posture value is an unreachable posture. It can reduce the computational difficulty of determining the reachable posture range of any position in the reachable workspace, determine a smooth and continuous reachable posture range for any position in the reachable workspace, achieve precise control of the posture of the robot arm at any position in the reachable workspace, and avoid mechanical failure of the robot arm. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 This is an example diagram of a robotic arm provided by an embodiment of the present disclosure.

[0026] Figure 2 is an example diagram of a reachable posture range provided by an embodiment of the present disclosure.

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

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

[0029] Figure 5 This is an example diagram of a reachable workspace provided by another embodiment of the present disclosure.

[0030] Figure 6 It is a flowchart of a detailed process of S202 provided in another embodiment of the present disclosure.

[0031] Figure 7 is an example diagram of a unit vector and a projection point corresponding to the end point of the unit vector provided by an embodiment of the present disclosure.

[0032] Figure 8 is an example diagram of the initial reachable posture range provided by an embodiment of the present disclosure.

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

[0034] Figure 10This is an example diagram of multiple target elliptic curves and approximate reachable posture ranges provided by an embodiment of the present disclosure.

[0035] Figure 11 is an example diagram of a target subspace and nearest neighbor reference points provided by an embodiment of the present disclosure.

[0036] Figure 12 This is an example diagram of a target projection point within a target reachable posture range provided by an embodiment of the present disclosure.

[0037] Figure 13 This is an example diagram of a target projection point exceeding the target reachable posture range provided by an embodiment of the present disclosure.

[0038] Figure 14 This is an example diagram of updating the target posture value provided by an embodiment of the present disclosure.

[0039] Figure 15 It is a structural diagram of a robotic arm posture control device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0040] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the present disclosure is described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other without conflict.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present disclosure. The terms used herein in the specification of the present disclosure are only for the purpose of describing the embodiments in one embodiment and are not intended to limit the present disclosure.

[0042] It should be noted that in the present disclosure, "at least one" refers to one or more, and "more than one" refers to two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of the present disclosure are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0043] In the embodiments of the present disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present disclosure should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner. The following embodiments and features in the embodiments may be combined with each other unless there is a conflict.

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

[0045] For example Figure 1 As shown, it is an example diagram of a robotic arm provided by an embodiment of the present disclosure. The robotic arm may include multiple axial joints and multiple sections of robotic arms, and the present disclosure does not impose any specific restrictions on this. In this embodiment, the end of each section of the robotic arm is referred to as the robotic arm end. For example, the following embodiments will take the robotic arm end as the end of the last section of the robotic arm, that is, the end effector, as an example. In this embodiment, a section of the robotic arm corresponding to the end of the robotic arm is referred to as the end robotic arm. For example, the following embodiments will take the end robotic arm as an example of a robotic arm that is connected or installed with an end effector. The end effector can be an ultrasonic probe used in the field of remote ultrasonic inspection, or a corresponding execution device in other application fields. The present disclosure does not impose any specific restrictions on this. For example, it can also be a gripper used in the field of industrial installation.

[0046] In one embodiment of the present disclosure, a user can implement motion control of a robotic arm through a position controller and a posture controller. For example, the position controller may include an absolute position encoder and an incremental encoder, and the position sensor can feed back the actual position of the robotic arm (e.g., the 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 can reach the expected position. The posture sensor may include an accelerometer and a gyroscope, and the posture sensor can feed back the actual posture of the robotic arm (e.g., the rotation angle and direction) to the control system for comparison with the expected posture, thereby adjusting the movement of the robotic arm so that the robotic arm can reach the expected posture. The posture may include a rotation angle and a direction, wherein the rotation angle may be the angle between the robotic arm and the vertical direction, and the direction may be the angle of the projection of the robotic arm in the horizontal plane relative to a certain coordinate axis of a certain coordinate system in the horizontal plane.

[0047] For example Figure 2 As shown, it is an example diagram of the reachable posture range provided by an embodiment of the present disclosure. If the end manipulator is in an ideal state without any dead angle of motion, when the center point of the end effector is used as the origin and the vertical direction is used as the center axis to perform the posture rotation around the origin at the maximum angle, the reachable posture range of the end manipulator should be a standard hemisphere or a standard circle corresponding to the largest cross-section in a standard sphere. However, due to the mechanical structure limitation of the manipulator, the end manipulator has an unreachable posture. Therefore, in actual situations, when the center point of the end effector is used as the origin and the vertical direction is used as the center axis to perform the posture rotation around the origin at the maximum angle, the reachable posture space of the end manipulator can be regarded as an approximate cone, and the horizontal projection range of the horizontal cross section at the unit length of the generatrix of the approximate cone can be used as the reachable posture range of the end manipulator.

[0048] Since the doctor's handheld posture sensor can move freely within an unlimited range, if the doctor manipulates the posture sensor's movement amplitude or range too large, the generated target posture value may exceed the reachable posture range of the end robot arm at its current position, making it impossible for the end robot arm to reach the target posture, and may cause problems such as motion errors, freezing, or extremely fast movement.

[0049] Related technologies usually control the posture of the robotic arm based on the angular velocity maneuverability ellipsoid. However, the periodic calculation method used in this method has a large amount of computation, requires high processor performance, and cannot give the specific value of the reachable posture range of the robotic arm at each position, resulting in the inability to achieve precise posture control of the robotic arm.

[0050] For example, the reachable posture range of the robotic arm is not a round, regular shape. When the end effector is in certain positions, there is a long strip-shaped gap at the edge of the reachable posture range of the end robotic arm. If the doctor accidentally controls the robotic arm to this position, the robotic arm will be stuck and unable to move in other directions.

[0051] To solve the above problems, the embodiments of the present disclosure provide a method for controlling the posture of a robotic arm. The method 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 the approximate elliptic curve at each reference point. The method can also determine the target reachable posture range at the target position value of any non-reference point based on the distance between each nearest neighbor reference point and the approximate reachable posture range of all nearest neighbor reference points by determining multiple nearest neighbor reference points corresponding to the target position value in the control instruction of the robotic arm. The method can also update the target posture value when the target posture value is an unreachable posture by comparing the target reachable posture range with the target posture value in the control instruction. The method can reduce the computational difficulty of determining the reachable posture range of any position in the reachable workspace, determine a smooth and continuous reachable posture range for any position in the reachable workspace, achieve precise control of the posture of the robotic arm at any position in the reachable workspace, and avoid mechanical failure of the robotic arm.

[0052] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. The electronic device 10 can be a computer, mobile phone, tablet computer, laptop computer, or other electronic device, or a control system integrated into a robotic arm. The present disclosure does not impose any restrictions on 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 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] The 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 bus (CAN). The wireless communication module may provide one or more wireless communication solutions such as wireless fidelity (Wi-Fi), Bluetooth (BT), mobile communication network, frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.

[0055] Memory 102 may include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). 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. 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] The non-volatile memory can also store executable programs and user and application data, etc., and can be pre-loaded into the random access memory for direct reading and writing by the processor 103. The 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. When the multiple instructions are executed by the processor 103, the robot arm posture control method executed on the electronic device 10 can be implemented.

[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] The processor 103 may include one or more processing units. For example, the processor 103 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The 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 a computer program stored in the memory 102 to implement the above-mentioned robotic arm posture control method.

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

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

[0063] It should be understood that the structures illustrated in the embodiments of the present disclosure do not constitute a specific limitation on the electronic device 10. In other embodiments of the present disclosure, the electronic device 10 may include more or fewer components than illustrated, or may combine or separate certain components, or may 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 flow chart of a method for controlling the posture of a robotic arm provided by an embodiment of the present disclosure. The method for controlling the posture of a robotic arm is applied to electronic devices, such as Figure 3 The electronic device 10 specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

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

[0066] In one embodiment of the present disclosure, a reachable workspace refers to the space corresponding to the set of all positions that the end of a robotic arm (e.g., an end effector) can reach in more than one direction, such as the maximum space within which the end effector is restricted to perform work. Robotic arms with different mechanical structures may have reachable workspaces of different shapes and volumes, and the present disclosure does not impose any specific restrictions on the shape and volume of the reachable workspace. For example Figure 5 , which is an example diagram of a reachable workspace provided by an embodiment of the present disclosure.

[0067] In one embodiment of the present disclosure, determining multiple reference points in a 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 taking each vertex as a reference point.

[0068] Because the reachable workspace is large and its positions are continuous in three-dimensional space, it is difficult to determine the reachable pose range of a robot arm (e.g., an end-manipulator) at each position within it through traversal. The reachable workspace can be divided into multiple subspaces. This reduces the algorithmic complexity by splitting the problem of calculating the reachable pose range at each position within the relatively large reachable workspace into the problem of calculating the reachable pose range at each position in each relatively small subspace.

[0069] Furthermore, the mechanical structure of the robotic arm determines that its reachable posture range in 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 posture range at each reference point, the weight of each reference point relative to any position in any subspace can be determined based on the distance between the position and all reference points. The reachable posture range of any position can then be obtained based on the weighted calculation result of the reachable posture range and weight at all reference points in the subspace.

[0070] According to the above content, in order to facilitate the determination of the reachable posture range at each position in the reachable workspace, the reachable workspace can be divided into multiple subspaces. Figure 5 As shown, the reachable workspace is evenly divided into multiple cubes of uniform size, and each cube is used as a subspace. Since each subspace includes 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 of each position in each subspace is determined.

[0071] In one embodiment of the present disclosure, the smaller the volume of each subspace, the higher the accuracy of calculating the reachable posture range at each position in the reachable workspace. The volume of each subspace can be selected based on 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 based on actual needs; for example, the subspace can be a rectangular parallelepiped.

[0072] In one embodiment of the present disclosure, in order to determine the position of each subspace and each reference point (for example, each vertex of the subspace) in the reachable workspace, a reference coordinate system can be set with a fixed position (for example, the bottom center point of the entire robotic arm device) as the origin to determine 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, and the present disclosure does not impose any specific restrictions on this. For example, a random selection method may be used to determine a preset number (e.g., 10,000) of location points in the reachable workspace as multiple reference points.

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

[0075] S202: Obtain an approximate reachable posture range of the robotic arm at each reference point.

[0076] In one embodiment of the present disclosure, referring to Figure 6 As shown, the detailed process of S202 may include the following processes:

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

[0078] In one embodiment of the present disclosure, the position of the end center point of the end of the manipulator arm (e.g., the end effector) of the manipulator arm can be fixed at any vertex, and a projection point corresponding to the end point of a preset unit vector corresponding to the end of the manipulator arm in any of multiple directions is determined. The starting point of the unit vector is located at the end center point of the manipulator arm end, and the direction of the unit vector represents the direction from the end center point to the end manipulator corresponding to the manipulator arm end; 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 figure shows an example of the projection point of the unit vector and the end point of the unit vector provided by the embodiment of the present disclosure. A starting point can be defined with the center point of the end of the robot arm (for example, the center point of the end effector) as the starting point and the direction from the robot tool axis to the robot arm (for example, the center point of the end effector points to the center axis of the end robot arm, for example Figure 7 A vector of unit length (e.g., a unit vector) along the z-axis (as shown), which moves synchronously with the movement of the end robot arm.

[0080] The end center point of the end effector can be moved to each reference point (such as the vertex of the subspace) by controlling the manipulator, so that the starting point of the unit vector moves to any reference point, and the unit vector is vertically upward. Then, the end center point of the end effector is controlled to remain stationary and the posture moves to the maximum angle in any direction. The maximum angle at this time is the reachable posture angle corresponding to the reachable posture range of the end manipulator in any direction (for example Figure 7 As shown in θ), the projection point of the end point of the unit vector on the horizontal plane can be recorded (for example Figure 7 Repeat the above process, control the end effector's end center position to remain stationary, and move the posture to the maximum angle in each direction of 360° in the horizontal direction (which can be understood as the azimuth angle), and record the projection point of the end point of the unit vector in each direction on the horizontal plane; plot all the projection points on the horizontal plane, and connect every two adjacent projection points to obtain the initial reachable posture range of the robot arm at any reference point. For example Figure 8 , which is an example diagram of the initial reachable posture range provided by an embodiment of the present disclosure.

[0081] In one embodiment of the present disclosure, the more or denser the projection points obtained in the above process are, the more accurate the obtained initial reachable posture range is.

[0082] In one embodiment of the present disclosure, determining a projection point corresponding to the end point of a preset unit vector corresponding to the end of the robotic arm in any of multiple directions may include: determining a reachable posture angle corresponding to the unit vector in any direction, the reachable posture angle including the maximum angle between the unit vector and the vertical direction; based on the reachable posture angle, determining multiple projection points in multiple directions corresponding to the unit vector in a horizontal plane corresponding to any reference point (for example, any vertex), including: based on the sine value of the reachable posture angle corresponding to any direction, determining the length of the projection vector of the unit vector in any direction, taking 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 corresponding to any reference point in any direction.

[0083] The above method for determining the projection point corresponding to the end point of the unit vector in any direction is a numerical analysis method based on the projection principle. In other embodiments, other methods can also be used to determine the projection point corresponding to the end point of the unit vector in any direction. This disclosure does not impose any specific limitation. Figure 7 As shown, the geometric projection method can also be used directly to draw a straight line segment perpendicular to the horizontal plane through the end point of the unit vector (for example Figure 7 The dotted line segment in the figure) is used as the intersection of the straight line segment and the horizontal plane as the corresponding projection point.

[0084] In one embodiment of the present disclosure, for example Figure 8 As shown in the figure, the initial reachable posture range of any reference point can be obtained by connecting every two adjacent projection points among all the projection points. The initial reachable posture range may be an irregular shape. In order to obtain an outline of the reachable posture range that is easier to describe, has smooth edges, and is as close to a regular shape as possible, the initial reachable posture range can be optimized.

[0085] S302 , optimizing the initial reachable posture range based on a curve fitting algorithm to obtain a closed approximate elliptic curve consisting of multiple target elliptic curve segments corresponding to each vertex.

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

[0087] (1) Elliptic curve fitting is performed based on multiple projection points in the initial reachable posture range to obtain multiple segments of initial elliptic curves.

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

[0089] For example Figure 9The figure shows an example of multiple initial elliptic curves provided in an embodiment of the present 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 performed on the points in the set of projection points corresponding to each quadrant of the coordinate system xoy to obtain an initial elliptic curve corresponding to each quadrant. The algorithm used for elliptic curve fitting may 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 the present disclosure, the orientation of the rectangular coordinate axis can also be rotated and updated according to the results of the elliptic curve fitting, so that the distance between each initial elliptic curve fitted in each quadrant and the set of projection points in each quadrant is as small as possible, thereby improving the accuracy of the elliptic curve fitting and facilitating the subsequent process of obtaining an approximate reachable posture range that is closer to the initial reachable posture range.

[0091] In other embodiments of the present disclosure, the directions of all x-axes of all rectangular coordinate systems corresponding to all vertices of all subspaces can be parallel to each other, so that the ellipse parameters corresponding to different vertices in subsequent processes are directly comparable, which facilitates the calculation of the target reachable posture range corresponding to the target position value.

[0092] In other embodiments of the present disclosure, if the directions of all x-axes of all rectangular coordinate systems corresponding to all vertices of all subspaces are not parallel to each other, the rotation matrix between the multiple coordinate systems corresponding to multiple vertices in each subspace can be determined, so that the ellipse parameters corresponding to different vertices can be converted into the same coordinate system space using the rotation matrix, so that the ellipse parameters corresponding to different vertices in subsequent processes are indirectly comparable, which facilitates the calculation of the target reachable posture range corresponding to the target position value.

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

[0094] In one embodiment of the present disclosure, the smoothing of the multiple segments of the initial elliptic curves to obtain a closed approximate elliptic curve composed of multiple segments of the target elliptic curves corresponding to each vertex includes: updating the axis length of the initial elliptic curve with the larger axis length in the preset direction between each two adjacent segments of the initial elliptic curves according to the axis length of each segment of the initial elliptic curve in the direction corresponding to each coordinate axis of the rectangular coordinate system (for example, the horizontal axis direction and the vertical axis direction), until the multiple segments of the initial elliptic curves have the same axis length in the preset direction, thereby obtaining the multiple segments of the target elliptic curves and the closed approximate elliptic curve composed of the multiple segments of the target elliptic curves.

[0095] In one embodiment of the present disclosure, the updating of the axis length of the initial elliptic curve with the larger axis length in the preset direction in each of the two adjacent initial elliptic curves according to the axis length of each initial elliptic curve in each direction includes: updating the horizontal axis of the rectangular coordinate system corresponding to each initial elliptic curve (for example Figure 9 The axis length in the direction of the x-axis in the elliptic curve is taken as the first axis length, and the vertical axis of the rectangular coordinate system corresponding to each initial elliptic curve (for example Figure 9 the axis length in the direction of the y-axis in the figure is used 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 value of the two first axis lengths is updated to the smaller value 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 value of the two second axis lengths is updated to the smaller value of the two second axis lengths.

[0096] For easier understanding, please refer to Figure 9 and Figure 10 ,For example Figure 10 , which is an example diagram of a multi-segment target elliptic curve and an approximate reachable posture range provided by an embodiment of the present 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 axis x-axis, wherein the first axis length of the initial elliptic curve 4 in the x-axis direction is longer than the first axis length of the initial elliptic curve 1 in the x-axis direction, for example Figure 10 As shown, the first axis length of the initial elliptic curve 4 in the x-axis direction can be updated to be equal to the first axis length of the initial elliptic curve 1 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 with the x-axis at the same point.

[0097] Through the above embodiment, the axis length of each adjacent two initial elliptic curve segments can be set to a smaller value, thereby obtaining a multi-segment target elliptic curve with smooth edges, and an approximate elliptic curve that is easier to describe and has smooth edges composed of multiple target elliptic curve segments (for example Figure 10 shown).

[0098] S303: Taking the range within the approximate elliptic curve as the approximate reachable posture range, and determining the plurality of ellipse parameters corresponding to the approximate elliptic curve.

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

[0100] Through the above embodiment, the range surrounded by the continuous approximate elliptic curve can be used as the approximate reachable posture range (for example Figure 10 Moreover, only four parameters need to be recorded in 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, to approximately describe the posture range of the manipulator at the current reference point, thereby reducing the amount of calculation in the subsequent process. Among them, each ellipse parameter can be regarded as the value of the length of the semi-axis of the approximate ellipse curve in each direction. Therefore, the multiple ellipse parameters can be regarded as multiple directions (for example Figure 10 The ellipse parameters corresponding to each direction (positive x-axis direction, negative x-axis direction, positive y-axis direction and negative y-axis direction) are shown.

[0101] In one embodiment of the present disclosure, since the multiple ellipse parameters corresponding to any reference point are determined in a coordinate system with any of the above-mentioned reference points as the origin, the coordinates of any ellipse parameter corresponding to any reference point can also be converted into the reachable workspace based on the coordinates of any reference point in the reachable workspace to obtain the coordinates of any ellipse parameter corresponding to any reference point in the reachable workspace.

[0102] In one embodiment of the present disclosure, multiple ellipse 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, as well as the coordinates of each ellipse parameter corresponding to any reference point in the coordinate system corresponding to the any reference point, and\or, the coordinates of each ellipse parameter corresponding to any reference point in the reachable workspace.

[0103] Through the above-described embodiments, the robot arm's posture can be controlled based on a smooth and continuous approximate elliptic curve, resulting in a smooth trajectory even when the robot arm moves at edge locations, which facilitates smooth motion of the robot arm. The elliptic curve parameter table can be obtained in advance through offline calculation, facilitating subsequent table lookup to determine the multiple ellipse parameters corresponding to each reference point, thereby improving the efficiency of determining the approximate reachable posture range of the robot arm at each position.

[0104] S203, obtaining a target position value and a target posture value in the user's control instruction for the robotic arm.

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

[0106] In another embodiment, while the doctor is operating the position controller and the posture controller to manipulate the robotic arm, the position controller and the posture controller can also send target position values ​​and target posture values ​​to the control system of the robotic arm at certain time intervals, so that the control system of the robotic arm (such as an electronic device) obtains the target position value and target posture value.

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

[0108] Through the above embodiments, malfunctions of the robotic arm due to incorrect target position values ​​can be avoided, and the user's work efficiency can be improved.

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

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

[0111] In one embodiment of the present 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 figure below shows an example of a target subspace and nearest neighbor reference points provided by an embodiment of the present disclosure. The range of each cube corresponds to the range of each subspace. If the target position corresponding to the target position value is within a cube, the cube is determined to be the target subspace, and each vertex of the target subspace is used as a nearest neighbor reference point.

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

[0113] In one embodiment of the present disclosure, after determining the target subspace, the coordinates of each vertex of the target subspace (for example, each nearest neighbor reference point) in the reachable workspace can be determined, and then the multiple ellipse parameters corresponding to each vertex of the target subspace can be determined in the parameter table by a table lookup method.

[0114] In other embodiments, other methods may be used to determine multiple nearest neighbor reference points corresponding to the target position value. The embodiments of the present disclosure do not impose specific restrictions on this. For example, a nearest neighbor algorithm may be used to determine multiple nearest neighbor reference points corresponding to the target position value.

[0115] S205 , determining a reachable posture range corresponding to the target position value according to the distance between the target position value and each of the multiple nearest neighbor reference points and the approximate reachable posture ranges of all the nearest neighbor reference points.

[0116] In one embodiment of the present disclosure, the target reachable posture range corresponding to the target position value is determined based on the distance between the target position value and each nearest neighbor reference point in the multiple nearest neighbor reference points and the approximate reachable posture range of all nearest neighbor reference points, including: determining the weight corresponding to each nearest neighbor reference point (for example, each vertex in the target subspace) based on the distance between the target position value and each nearest neighbor reference point; and determining the target reachable posture range corresponding to the target position value based on the weighted sum of the weights corresponding to all nearest neighbor reference points (for example, all vertices in the target subspace) and the ellipse parameters.

[0117] In one embodiment of the present 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 will obtain higher weights, indicating that they contribute more to determining the target position value; then all weights corresponding to all vertices in the target subspace are normalized so that the sum of all weights is equal to 1. For example, the above normalization can be achieved by dividing each weight by the sum of all weights; when calculating the ellipse parameter corresponding to the target position value according to the weighted average method, the ellipse parameter of any direction (for example, the positive direction of the x-axis) of each vertex can be multiplied by the weight of the corresponding vertex, and all the ellipse parameters in any direction (for example, 8 ellipse parameters in the positive direction of the x-axis of 8 vertices) multiplied by the corresponding normalized weights are added to obtain the ellipse parameter corresponding to the target position value in any direction (for example, the positive direction of the x-axis), thereby obtaining multiple ellipse parameters in multiple directions (for example, the positive direction of the x-axis, the negative direction of the x-axis, the positive direction of the y-axis, and the negative direction of the y-axis) corresponding to the target position value.

[0118] This method determines the weight of each nearest neighbor reference point based on the distance between the target position and each nearest neighbor reference point, giving closer nearest neighbor reference points a greater weight. The ellipse parameters for each direction corresponding to the target position are then determined based on the weighted sum of the ellipse parameters for each nearest neighbor reference point. This allows the ellipse parameters for any non-reference point in the reachable workspace to be determined. While the robotic arm is in motion, the elliptical curve for the current position can be obtained through table lookup and parameter fitting, reducing the amount of computation required.

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

[0120] S206 : Determine whether to update the target posture value based on the comparison result between the target posture value and the target reachable posture range.

[0121] In one embodiment of the present disclosure, the method further includes determining a comparison result between the target posture value and the target reachable posture range, including: establishing a target rectangular coordinate system (e.g., Figure 12as shown); determining a target direction and a target attitude angle corresponding to the target attitude value, wherein the target direction includes the direction of a target projection vector of a unit vector corresponding to the target attitude value in the target rectangular coordinate system (for example, the angle between the target projection vector and the horizontal axis of the target rectangular coordinate system can be determined to determine the target direction), 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 manipulator end of the manipulator arm to the end manipulator end corresponding to the manipulator end; according to the sine value of the target direction and the target attitude angle, determining the projection point of the end point 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, 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.

[0122] In one embodiment of the present disclosure, the method for determining the projection point of the end point of the unit vector corresponding to the target posture value on the horizontal plane can refer to the description of S301. Specifically, the starting point of the unit vector corresponding to the target posture value can be translated to the origin with the target position as the origin, and the projection of the end point of the unit vector corresponding to the target posture value on the horizontal plane can be determined. The present disclosure does not impose any specific restrictions 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 approximate elliptic curve corresponding to the target reachable posture range, it can be determined that the target posture value does not exceed the target reachable posture range. 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 segments of the target elliptical curve, it can be considered that the target attitude angle of the target direction corresponding to the target attitude value exceeds the reachable attitude angle of the robot arm in the target direction, and therefore it is determined that the target attitude value exceeds the target reachable attitude range.

[0124] In one embodiment of the present 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 the present disclosure, if the target attitude value exceeds the target approximate reachable attitude range, the target attitude value can be updated according to the target reachable attitude range in the target direction corresponding to the target attitude value, including: determining the intersection of the target projection vector and the target approximate elliptic curve corresponding to the target reachable attitude range as the target intersection, and determining the distance between the target intersection and the origin as the target distance (for example, 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 the present disclosure, in addition to the above method of replacing the target attitude angle in the target attitude value with the updated attitude angle, other methods can also be used to update the target attitude value. The present disclosure does not specifically limit the method for updating the target attitude value.

[0127] In another example, for example Figure 14 , which is an example diagram of updating the target posture value provided by an embodiment of the present disclosure. In the target horizontal plane where the target position corresponding to the target position value is located, a target rectangular coordinate system xOy is established with the target position as the origin O, and a straight line is drawn through the target projection point A and the coordinate system origin O where the target position value is located. This straight line is the straight line where the target projection vector is located, and the intersection of this straight line and the target approximate elliptical 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, and the line segment OB and the straight line l are used as the two right-angled sides of the right triangle. The length of the right-angled side OB in the right triangle and the diagonal angle of the right-angled side OB are known parameters. For example, the diagonal angle of the right-angled side BC can be determined according to π / 2-target posture angle. Therefore, the hypotenuse OC with a length of 1 can be calculated according to the trigonometric function in the right triangle. The vector OC is the corresponding unit vector obtained after the target posture value is range-limited; the vector OC is used as the command value of the unit vector corresponding to the robotic arm to update the target posture value, which can meet the target reachable posture range of the robotic arm at the target position.

[0128] Through the above embodiment, the reduction in the range of the elliptical curve of the target position can be detected in advance and the robotic arm can be slowed down. Therefore, it can be applied 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 to avoid mechanical failure of the robotic arm.

[0129] The robot arm posture control method provided by the embodiment of the present disclosure can achieve smooth processing of the reachable posture range at each reference point by determining multiple reference points in the reachable workspace of the robot arm and then determining the approximate reachable posture range represented by the approximate elliptic curve at each reference point; by determining multiple nearest neighbor reference points corresponding to the target position value in the control instruction of the robot arm, based on the distance of each nearest neighbor reference point in the nearest neighbor reference points and the approximate reachable posture range of all nearest neighbor reference points, determine the target reachable posture range at the target position value of any non-reference point; through the comparison result of the target reachable posture range with the target posture value in the control instruction, the target posture value can be updated when the target posture value is an unreachable posture. It can reduce the computational difficulty of determining the reachable posture range of any position in the reachable workspace, determine a smooth and continuous reachable posture range for any position in the reachable workspace, achieve precise control of the posture of the robot arm at any position in the reachable workspace, and avoid mechanical failure of the robot arm.

[0130] Figure 15 It is a structural diagram of a robotic arm posture control device provided by an embodiment of the present disclosure.

[0131] In some embodiments, the robot arm posture control device 40 may include a plurality of functional modules composed of computer program segments. The computer program of each program segment in the robot arm posture control device 40 may be stored in a memory of an electronic device and executed by at least one processor to perform (see Figure 4 Description) Function of the 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. The functional modules may include: a determination module 401, an acquisition module 402, a selection module 403, and an update module 404. The module referred to in this disclosure refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functional implementation of each module in the robotic arm posture control device 40 can be found in the above definition of the robotic arm posture control method, and will not be repeated here.

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

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

[0135] The acquisition module 402 is further configured to acquire a target position value and a target posture value in a user's control instruction to the robotic arm.

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

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

[0138] The updating module 404 is configured to determine whether to update the target posture value according to a comparison result between the target posture value and the target reachable posture range.

[0139] An embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the methods in the above-mentioned embodiments of the present disclosure.

[0140] The computer-readable storage medium may be an internal memory of the electronic device described in the above embodiment, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash memory 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, applications required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc.

[0142] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0143] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians 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 the present disclosure, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0145] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0146] The embodiments described above are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present disclosure, and should all be included in the scope of protection of the present disclosure.

Claims

1. A method for controlling the posture of a robotic arm, characterized in that: The method comprises: Determine multiple reference points in the reachable workspace of the robot 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's control instruction for 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 attitude range corresponding to the target position value based on a distance between the target position value and each of the multiple nearest neighbor reference points and an approximate reachable attitude range of all nearest neighbor reference points; According to a comparison result between the target posture value and the target reachable posture range, it is determined whether to update the target posture value.

2. The robot arm posture control method according to claim 1, characterized in that: Determining a plurality of reference points in a reachable workspace of the end effector of the robotic arm comprises: The reachable workspace is divided into a plurality of subspaces, wherein each subspace includes a plurality of vertices, and each vertex is used as a reference point.

3. The method for controlling the posture of a robotic arm according to claim 1, wherein: The obtaining of the approximate reachable posture range of the manipulator at each reference point comprises: Determining an 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 elliptic curve consisting of multiple target elliptic curves corresponding to each reference point; The range within the approximate elliptic curve is used as the approximate reachable posture range, and a plurality of ellipse parameters corresponding to the approximate elliptic curve are determined.

4. The method for controlling the posture of a robotic arm according to claim 3, wherein: Determining an initial reachable posture range of the robotic arm at each reference point includes: Fixing the position of the end center point of the end of the manipulator arm at any reference point, and determining a projection point corresponding to the end point of a preset unit vector corresponding to the end of the manipulator arm in any of a plurality of directions, wherein the starting point of the unit vector is located at the end center point of the end of the manipulator arm, and the direction of the unit vector represents the direction from the end center point to the end manipulator arm corresponding to the end of the manipulator arm; The initial reachable posture range is determined according to a plurality of projection points corresponding to the unit vector in the plurality of directions.

5. The method for controlling the posture of a robotic arm according to claim 3, wherein: Optimizing the initial reachable posture range based on a curve fitting algorithm includes: Performing elliptic curve fitting based on multiple projection points in the initial reachable posture range to obtain multiple segments of initial elliptic curves; The multiple segments of the initial elliptic curves are smoothed to obtain a closed approximate elliptic curve consisting of multiple segments of the target elliptic curve corresponding to each reference point.

6. The method for controlling the posture of a robotic arm according to claim 5, wherein: The performing elliptic curve fitting based on multiple projection points in the initial reachable posture range to obtain multiple segments of initial elliptic curves includes: In the horizontal plane corresponding to any reference point, a rectangular coordinate system is established with the reference point as the origin; In the rectangular coordinate system, the plurality of projection points corresponding to the any reference point are divided into a plurality of sets, wherein each set corresponds to a quadrant of the rectangular coordinate system; Perform elliptic curve fitting on the projected points in each set to obtain an initial elliptic curve corresponding to each quadrant.

7. The method for controlling the posture of a robotic arm according to claim 6, wherein: The step of smoothing the multiple segments of the initial elliptic curve to obtain a closed approximate elliptic curve consisting of multiple segments of the target elliptic curve corresponding to each reference point includes: Based on the axis length of each initial elliptic curve in the direction corresponding to each coordinate axis of the rectangular coordinate system, the axis length of the initial elliptic curve with the larger axis length in the preset direction between each adjacent initial elliptic curve segment is updated until each adjacent initial elliptic curve segment has the same axis length in the preset direction, thereby obtaining the multiple target elliptic curve segments and a closed approximate elliptic curve formed by the multiple target elliptic curve segments.

8. The method for controlling the posture of a robotic arm according to claim 7, wherein: The updating of the axis length of the initial elliptic curve with the larger axis length in the preset direction in each of two adjacent initial elliptic curves according to the axis length of each initial elliptic curve in each direction includes: The length of the horizontal axis of the rectangular coordinate system corresponding to each initial elliptic curve is used as the first axis length, and the length of the vertical axis of the rectangular coordinate system corresponding to each initial elliptic curve is used as the second axis length; If two adjacent initial elliptic curve segments are separated by the horizontal axis, and the two first axis lengths corresponding to the two adjacent initial elliptic curve segments 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 separated by the longitudinal 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.

9. The method for controlling the posture of a robotic arm according to claim 3, wherein: Determining a plurality of elliptic parameters corresponding to the approximate elliptic curve comprises: In a 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 elliptical curve; Determine the coordinates of any intersection point of 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, take the distance between any intersection point and the center of the circle as an ellipse parameter, and obtain the multiple ellipse parameters corresponding to all intersection points.

10. The robot arm posture control method according to claim 1, characterized in that: The approximate reachable posture range includes a plurality of ellipse parameters corresponding to the approximate elliptic curve, and determining the target reachable posture range corresponding to the target position value according to the distance between the target position value and each of the plurality of nearest neighbor reference points and the approximate reachable posture ranges of all nearest neighbor reference points includes: Determine the weight corresponding to each nearest neighbor reference point based on the distance between the target position value and each nearest neighbor reference point; The target reachable posture range corresponding to the target position value is determined according to the weighted sum of the weights corresponding to all nearest neighbor reference points and the ellipse parameters.

11. The method for controlling the posture of a robotic arm according to claim 1, wherein: The method further includes determining a comparison result of the target posture value and the target reachable posture range, including: In a target horizontal plane where a target position corresponding to the target position value is located, establishing a target rectangular coordinate system with the target position as an origin; Determining a target direction and a target attitude angle corresponding to the target attitude value, wherein the target direction includes the direction of a target projection vector of a unit vector corresponding to the target attitude value in the target rectangular coordinate system, the target attitude angle includes the angle between the unit vector corresponding to the target attitude value and a vertical direction, and the direction of the unit vector represents the direction from the end center point of the end of the manipulator arm to the end manipulator arm corresponding to the end of the manipulator arm; Determine, according to the sine value of the target direction and the target attitude angle, a projection point of the end point of the unit vector corresponding to the target attitude value in the target horizontal plane as a target projection point; If the target projection point is within the target reachable posture range, determining that the target posture value does not exceed the target reachable posture range; or If the target projection point is outside the target reachable posture range, it is determined that the target posture value exceeds the target reachable posture range.

12. The method for controlling the posture of a robotic arm according to claim 11, wherein: The method further comprises: 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, 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 method for controlling the posture of a robotic arm according to claim 12, wherein: The updating of the target posture value according to the target reachable posture range includes: Determine an intersection point of the target projection vector and a target approximate elliptic curve corresponding to the target reachable posture range as a target intersection point, and determine a distance between the target intersection point and the origin as a target distance; An updated attitude angle is determined according to the arcsine value of the target distance, and the target attitude value is updated according to the updated attitude angle.

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

Citation Information

Patent Citations

  • Mechanical arm tail-end pose error correction method and system based on elliptic characteristics

    CN108453727A

  • Six-degree-of-freedom welding mechanical arm working subspace division method

    CN116214518A

  • Test system mechanical arm control method and device, test system and storage medium

    CN116728409A

  • Positioning adjusting method for robot-assisted surgery system

    CN117137625A

  • Method for automatic generation of control or regulation for robot, involves determining approximate function of reverse kinematics in neighborhood of primary start location

    DE102012022190A1