Mechanical arm collision detection method based on low-difference sequence uniform sampling
By using a uniform sampling method based on low-difference sequences in robotic arm collision detection, the van der Copitt sequence is used to uniformly sample the motion path, which solves the problems of low detection accuracy and slow efficiency in the prior art, and achieves more efficient and more Accurate collision detection.
Patent Information
- Application Number
- CN202411778734.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, the accuracy of robotic arm collision detection is low, the efficiency is slow, and the sampling points are unevenly distributed, resulting in high calculation costs.
The uniform sampling method based on low-difference sequence is adopted to uniformly sample the motion path of the robotic arm through the van der Copitt sequence to generate enough uniform sampling points to improve the accuracy and efficiency of detection.
Through the use of uniform sampling points, the work space can be covered more comprehensively, the accuracy and reliability of collision detection can be improved, calculation costs can be reduced, and detection efficiency can be improved.
Smart Images

Figure CN119458346A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot arm collision detection, and in particular to a robot arm collision detection method, device and medium thereof based on low-discrepancy sequence uniform sampling. Background Art
[0002] Collision detection is an important part of the research process of robot obstacle avoidance path planning. Its main purpose is to determine whether a collision has occurred between objects, while also taking into account the safety of the robot when interacting with the environment. Therefore, a fast and safe collision detection algorithm is of great significance to path planning.
[0003] Since the robot needs to calculate in real time whether the robot state collides with the main body and environmental obstacles when the robot moves, in order to facilitate detection, in the actual collision detection process, the path needs to be discretized, that is, the path is divided into a series of small segments, such as discretizing the joint space path of the robot into multiple joint angle combinations according to a certain step length. In this way, at each discrete point, it is easier to evaluate the state and position of the robot, as well as the relationship with the surrounding objects. Then, at each discrete path point, collision detection calculation is performed according to the selected collision detection method. When the robot performs collision detection in the expected planned path, it is required that there are no obstacles on the entire path. If the inspection is performed point by point, the collision detection algorithm will be called infinitely, which is impractical. Therefore, the most common method is to sample discrete points on the path, perform collision inspection on the sampled points, and ensure that there are no obstacles on the planned path by setting an appropriate step length.
[0004] However, in the discrete point sampling process, the traditional sampling method is to sample in order, or to randomly obtain the sampling points in the sampling space using a random number generation algorithm, which may lead to uneven distribution of sampling points. Some areas may be oversampled, while some areas are undersampled, which affects the accuracy and efficiency of collision detection. Moreover, in order to obtain sufficiently accurate results, a large number of sampling points are often required, and a large number of sampling points require more computing resources and time for processing and analysis, thereby increasing the computing cost. Summary of the invention
[0005] The technical problem to be solved by the present invention is: in order to solve the technical problems of low accuracy and slow efficiency of robot arm collision detection in the prior art, the present invention provides a robot arm collision detection method based on uniform sampling of low-difference sequences, which can uniformly sample paths that require collision detection, thereby improving the detection accuracy and efficiency and reducing the computational cost.
[0006] The technical solution adopted by the present invention to solve the technical problem is: a robot arm collision detection method based on uniform sampling of low-discrepancy sequences, the method comprising the following steps:
[0007] S1, planning the motion path of the robot arm;
[0008] S2, uniformly sample the planned mechanical avoidance motion path based on the van der Koppiet sequence to obtain the uniform state points of the path;
[0009] S3, constructing a robot arm geometric model and an environmental obstacle model, and saving the constructed robot arm geometric model and the environmental obstacle model to a configuration file;
[0010] S4, inputting the configuration file into a collision detection library, using the collision detection library to process the path uniform state points to implement collision detection.
[0011] Further, specifically, the step S1 specifically includes:
[0012] S11, obtaining the current joint position of the robotic arm, and generating a motion path from the current joint position to the target joint position through a robotic arm path planning algorithm. When the time is t, the vector representation of the motion path is:
[0013] q(t)=[q1(t),q2(t),q3(t),…,q n (t)],
[0014] Among them, q i (t) is the joint position of the i-th joint of the robot at time t;
[0015] The joint angle values of the current positions of the six axes of the robot are expressed as:
[0016] current_joints=[α1,α2,α3,α4,α5,α6];
[0017] The joint angle value of the target position is expressed as:
[0018] goal_joint=[β1,β2,β3,β4,β5,β6];
[0019] S12, based on the joint angle values of the current positions of the six axes of the robot arm and the joint angle values of the target positions, checking the validity of the motion path from the current position to the target joint position, and calculating the final joint angle values of the current position and the joint angle values of the target position based on the validity result;
[0020] S13, obtaining the final joint angle value of the current position and the joint angle value of the target position, and calculating the joint tangent vector from the current joint position to the target joint position, the calculation formula is:
[0021] joint_tangent=goal_joint-current_joints;
[0022] S14, setting the minimum distance of path node detection to S, calculating the cardinality b of the van der Kopit sequence and the number of key points K on the path based on the joint tangent vector, and the distance between the key points K is not less than S.
[0023] Further, specifically, the step 2 specifically includes the following steps:
[0024] S21, obtaining the cardinality b of the Van der Kopitt sequence and the number of key points K on the path, obtaining the sequence length n based on the number of key points K on the path, n=K, using the cardinality b of the Van der Kopitt sequence and the sequence length n as parameters of the Van der Kopitt sequence generation algorithm to generate the Van der Kopitt sequence;
[0025] S22, use the van der Koppiet sequence to sample the joint path and obtain the uniform sampling sequence V i =(v i1 ,v i2 ,…,v in ), v i1 ,v i2 ,…,v in It is represented by uniform sampling points, n is the number of uniform sampling points, i is the number of joints of each axis of the robot, and each sampling point element corresponds to a uniformly distributed random number;
[0026] S23, using the random number as a linear interpolation parameter, using a linear interpolation method to solve the path uniform state point intermediate_state between the initial position and the target position, the calculation formula is:
[0027] intermediate_state=current_joints+joint_tangent*V i . Further, specifically, the step S3 specifically includes the following steps:
[0028] A geometric model of the robotic arm is established according to the three-dimensional features of the robotic arm, and the position and posture of each link of the robotic arm relative to the base coordinate system in the initial state are obtained;
[0029] According to the kinematic model of the robot arm, calculate the position of each link in space at each uniform state point intermediate_state posture;
[0030] An environmental obstacle model is established based on the three-dimensional features of the obstacle and the surrounding environment. Each obstacle in the environmental obstacle model is used as a static constraint. Each obstacle is described as a position (x, y, z) and posture (roll, pitch, yaw) relative to the world coordinate system.
[0031] The geometric model of the robotic arm, the position and posture of each link of the robotic arm relative to the base coordinate system in the initial state, the position of each link in space at each uniform state point intermediate_state posture, and the obstacle model are saved to the configuration file.
[0032] Further, specifically, in step S4, using the collision detection library to process the path uniform state point, the collision detection specifically includes the following steps:
[0033] Obtain a path uniform state point intermediate_state, and obtain a posture corresponding to the path uniform state point intermediate_state by inversely solving the path uniform state point intermediate_state;
[0034] The collision detection library analyzes the posture corresponding to the intermediate_state point of the path uniform state according to the set collision detection rules to determine whether the robot arm collides with the robot arm body or an obstacle;
[0035] Further, specifically, the step S12 specifically includes:
[0036] Set the upper and lower limits of the joint position.
[0037] Compare the joint angle value of each axis of the robot arm at the current position and the joint angle value of the target position with the allowable upper limit value and the allowable lower limit value respectively,
[0038] If the joint angle value of the current position or the joint angle value of the target position of any axis is greater than the allowable upper limit value, the joint angle value of the current position or the joint angle value of the target position is subtracted by 2*M_PI until the final joint angle value of the current position or the joint angle value of the target position of each axis is less than the allowable upper limit value;
[0039] If the joint angle value of the current position or the joint angle value of the target position of any axis is less than the allowable lower limit value, then the joint angle value of the current position or the joint angle value of the target position is added with 2*M_PI until the final joint angle value of the current position or the joint angle value of the target position of each axis is greater than or equal to the allowable lower limit value;
[0040] Wherein, M_PI is a preset angle value.
[0041] Further, specifically, the step S14 specifically includes:
[0042] S141, let the joint tangent vector J = {j1, j2, j3, ..., j n} represents joint_tangent, where j i is the i-th element of vector J;
[0043] S142, calculate the absolute value of each element in the joint tangent vector J to obtain a new vector:
[0044] J′={|j1|,|j2|,|j3|,…,|j n |};
[0045] S143, find the maximum element value in the new vector J′, which is M=max(|j1|,|j2|,|j3|,…,|j n |);
[0046] S144, yes Round up to get the base number
[0047] S145, calculating the number of key points K on the path based on the base number, K=2 b .
[0048] Further, specifically, the robot arm path planning algorithm includes a Cartesian space planning algorithm or a joint space planning algorithm.
[0049] A computer device comprising:
[0050] processor;
[0051] A memory for storing executable instructions;
[0052] The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the robot arm collision detection method based on low-discrepancy sequence uniform sampling as described above.
[0053] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor implements the robot arm collision detection method based on uniform sampling of low-discrepancy sequences as described above.
[0054] The beneficial effect of the present invention is that the robot arm collision detection method based on low-discrepancy sequence uniform sampling of the present invention uniformly samples the planned mechanical avoidance motion path through the Van der Kopit sequence, and the obtained sampling points can cover the workspace more comprehensively and without omission, thereby improving the accuracy and reliability of collision detection. In addition, the Van der Kopit sequence can generate enough sampling points in a relatively short time, does not require a powerful processor to process, has low requirements for hardware equipment, reduces the amount of calculation while ensuring the accuracy and reliability of the detection results, and improves the detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0056] Figure 1 It is a structural diagram of embodiment 1 of the present invention.
[0057] Figure 2 It is a schematic diagram of the computer device structure of the second embodiment of the present invention.
[0058] In the figure, 10 is a computer device; 1002 is a processor; 1004 is a memory; and 1006 is a transmission device. DETAILED DESCRIPTION
[0059] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0060] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0061] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0062] Example 1
[0063] The present application embodiment provides a robot arm collision detection method based on uniform sampling of low-discrepancy sequences, such as Figure 1 As shown, the method comprises the following steps:
[0064] S1, planning the motion path of the robot arm.
[0065] S2, based on the van der Koppiet sequence, uniformly sample the planned mechanical avoidance motion path to obtain the uniform state points of the path.
[0066] S3, constructing a robot arm geometric model and an environmental obstacle model, and saving the constructed robot arm geometric model and the environmental obstacle model to a configuration file.
[0067] S4, input the configuration file into the collision detection library, use the collision detection library to process the path uniform state points, and realize collision detection.
[0068] In this embodiment, step S1 specifically includes:
[0069] S11, obtaining the current joint position of the robot arm, and generating a motion path from the current joint position to the target joint position through a robot arm path planning algorithm, wherein the robot arm path planning algorithm includes a Cartesian space planning algorithm or a joint space planning algorithm; when the time is t, the vector representation of the motion path is:
[0070] q(t)=[q1(t),q2(t),q3(t),…,q n (t)],
[0071] Among them, q i (t) is the joint position of the i-th joint of the robot at time t;
[0072] The joint angle values of the current positions of the six axes of the robot are expressed as:
[0073] current_joints=[α1,α2,α3,α4,α5,α6];
[0074] The joint angle value of the target position is expressed as:
[0075] goal_joint=[β1,β2,β3,β4,β5,β6].
[0076] S12, based on the joint angle values of the current positions of the six axes of the robot and the joint angle values of the target positions, check the validity of the motion path from the current position to the target joint position, and calculate the final joint angle values of the current position and the joint angle values of the target position based on the validity result; through the validity detection, ensure that the joint angle values of the current position and the joint angle values of the target position are within the specified unit. Specifically, step S12 specifically includes:
[0077] Set the upper and lower limits of the joint position.
[0078] Compare the joint angle value of each axis of the robot arm at the current position and the joint angle value of the target position with the allowable upper limit and allowable lower limit respectively.
[0079] If the joint angle value of the current position or the joint angle value of the target position of any axis is greater than the allowable upper limit, then the joint angle value of the current position or the joint angle value of the target position is subtracted from 2*M_PI until the final joint angle value of the current position or the joint angle value of the target position of each axis is less than the allowable upper limit;
[0080] If the joint angle value of the current position or the joint angle value of the target position of any axis is less than the allowable lower limit, then add 2*M_PI to the joint angle value of the current position or the joint angle value of the target position until the final joint angle value of the current position or the joint angle value of the target position of each axis is greater than or equal to the allowable lower limit;
[0081] Wherein, M_PI is a preset angle value, such as M_PI=π.
[0082] S13, obtaining the final joint angle value of the current position and the joint angle value of the target position, and calculating the joint tangent vector from the current joint position to the target joint position, the calculation formula is:
[0083] joint_tangent=goal_joint-current_joints.
[0084] S14, setting the minimum distance for path node detection to S, calculating the cardinality b of the van der Koppiet sequence and the number of key points K on the path based on the joint tangent vector, and the distance between the key points K is not less than S. Specifically, step S14 specifically includes:
[0085] S141, let the joint tangent vector J = {j1, j2, j3, ..., j n} represents joint_tangent, where j i is the i-th element of vector J;
[0086] S142, calculate the absolute value of each element in the joint tangent vector J to obtain a new vector:
[0087] J′={|j1|,|j2|,|j3|,…,|j n |};
[0088] S143, find the maximum element value in the new vector J′, which is M=max(|j1|,|j2|,|j3|,…,|j n |);
[0089] S144, yes Round up to get the base number
[0090] S145, calculating the number of key points K on the path based on the base number, K=2 b .
[0091] In this embodiment, step 2 specifically includes the following steps:
[0092] S21, obtaining the cardinality b of the Van der Kopitt sequence and the number of key points K on the path, obtaining the sequence length n based on the number of key points K on the path, n=K, using the cardinality b of the Van der Kopitt sequence and the sequence length n as parameters of the Van der Kopitt sequence generation algorithm to generate the Van der Kopitt sequence;
[0093] S22, use the van der Koppiet sequence to sample the joint path and obtain the uniform sampling sequence V i =(v i1 ,v i2 ,…,v in ), v i1 ,v i2 ,…,v in It is represented by uniform sampling points, n is the number of uniform sampling points, i is the number of joints of each axis of the robot, and each sampling point element corresponds to a uniformly distributed random number;
[0094] S23, using the random number as a linear interpolation parameter, using a linear interpolation method to solve the path uniform state point intermediate_state between the initial position and the target position, the calculation formula is:
[0095] intermediate_state=current_joints+joint_tangent*V i .
[0096] It should be noted that the van der Kopit sequence can achieve a relatively uniform distribution within the unit interval. This uniform distribution feature is very important in the sampling process of robot arm collision detection. Generally, methods based on random sampling may have clustered or sparse areas, resulting in some potential collision areas not being fully detected. The van der Kopit sequence can avoid the situation where potential collision areas are not fully detected. It can place sampling points in the workspace (or path) in a relatively regular manner to detect possible collision points. The uniformly distributed sampling points can cover the workspace (or path) more comprehensively and without omission, thereby improving the accuracy and reliability of collision detection.
[0097] The van der Koppiet sequence is defined as follows:
[0098] The positive integer k can be expressed in base b as:
[0099]
[0100] Where b is the cardinality; i = 0, 1, ..., m-1; 0 i (k) <b,a i (k) is the i-th digit in the b-ary expansion of k.
[0101] The kth number in the van der Koppiet sequence can be expressed as:
[0102]
[0103] When b = 2, we have
[0104]
[0105] When a one-dimensional sequence of n is required, the order of detection points is calculated as follows:
[0106]
[0107]
[0108] Obtaining n uniform sampling points of the robot arm through the Van der Kopit sequence can maximize the coverage of the undetected area by each sampling point. Even if the obstacle is far away, it can be detected in a short time, which improves the accuracy and detection efficiency.
[0109] In this embodiment, step S3 specifically includes the following steps:
[0110] A geometric model of the robotic arm is established according to the three-dimensional features of the robotic arm, and the position and posture of each link of the robotic arm relative to the base coordinate system in the initial state are obtained.
[0111] According to the kinematic model of the robot arm, the position of each link in space at each uniform state point intermediate_state posture is calculated.
[0112] An environmental obstacle model is established based on the three-dimensional features of the obstacles and the surrounding environment. Each obstacle in the environmental obstacle model is used as a static constraint, and each obstacle is described as a position (x, y, z) and posture (roll, pitch, yaw) relative to the world coordinate system.
[0113] The geometric model of the robot arm, the position and posture of each link of the robot arm relative to the base coordinate system in the initial state, the position of each link in space at each uniform state point intermediate_state posture, and the obstacle model are saved to the configuration file. The formed configuration file is convenient for subsequent scene detection.
[0114] In this embodiment, in step S4, the collision detection library is used to process the path uniform state point intermediate_state, and the collision detection is implemented by specifically including the following steps:
[0115] Get the path uniform state point intermediate_state, and obtain the posture corresponding to the path uniform state point intermediate_staet by inversely solving the path uniform state point intermediate_staet.
[0116] The collision detection library analyzes the posture corresponding to the path uniform state point intermediate_state according to the set collision detection rules to determine whether the robot arm collides with the robot body or obstacles.
[0117] For example, MoveIt can implement collision detection by calling the FCL library. The targets of collision detection are the robot body model and objects in the environment, which have been added to the configuration file through the above 3D modeling steps. The FCL library uses the position, angle, bounding box and surface mesh of the object to determine whether there is a collision between multiple models, whether the components of the model itself collide, and whether there is a collision between models during movement by detecting whether the distance between the geometric shapes of the target structure surface is less than a certain threshold.
[0118] In this implementation, the collision risk of the robot arm at different positions in the workspace is also evaluated based on the collision detection results. If collisions frequently occur in the collision detection results of sampling points in a certain area, the area is determined to be a high-collision risk area, providing a reference for the path planning of the robot arm.
[0119] In summary, the robot arm collision detection method based on uniform sampling of low-discrepancy sequences of the present invention uniformly samples the planned mechanical avoidance motion path through the Van der Kopit sequence, and the obtained sampling points can cover the workspace more comprehensively and without omission, thereby improving the accuracy and reliability of collision detection. In addition, the Van der Kopit sequence can generate enough sampling points in a relatively short time, does not require a powerful processor to process, has low requirements for hardware equipment, reduces the amount of calculation while ensuring the accuracy and reliability of the detection results, and improves the detection efficiency.
[0120] Example 2
[0121] An embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a robot arm collision detection method based on uniform sampling of low-discrepancy sequences as provided in the above method embodiment.
[0122] Figure 2 The hardware structure diagram of a device for implementing a mechanical arm collision detection method based on uniform sampling of low-discrepancy sequences provided in an embodiment of the present application is shown. The device may participate in constituting or include the apparatus or system provided in an embodiment of the present application. Figure 2 As shown, the computer device 10 may include one or more processors 1002 (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1004 for storing data, and a transmission device 1006 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 2 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 2 More or fewer components as shown, or with Figure 2 Different configurations are shown.
[0123] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer device 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0124] The memory 1004 can be used to store software programs and modules of application software, such as a program instruction / data storage device corresponding to a mechanical arm collision detection method based on uniform sampling of low-difference sequences in an embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 1004, that is, implementing the above-mentioned method. The memory 1004 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1004 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0125] The transmission device 1006 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer device 10. In one example, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 1006 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0126] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer device 10 (or mobile device).
[0127] Example 3
[0128] An embodiment of the present application also provides a computer-readable storage medium, which can be set in a server to store at least one instruction or at least one program related to a robot arm collision detection method based on uniform sampling of low-discrepancy sequences in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement a robot arm collision detection method based on uniform sampling of low-discrepancy sequences provided in the above method embodiment.
[0129] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0130] Example 4
[0131] The embodiment of the present invention also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes a robot arm collision detection method based on uniform sampling of a low-discrepancy sequence provided in the above various optional embodiments.
[0132] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of the present application are described. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0133] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0134] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0135] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A robot arm collision detection method based on uniform sampling of low-discrepancy sequences, characterized in that: The method comprises the following steps: S1, planning the motion path of the robot arm; S2, uniformly sample the planned mechanical avoidance motion path based on the van der Koppiet sequence to obtain the uniform state points of the path; S3, constructing a robot arm geometric model and an environmental obstacle model, and saving the constructed robot arm geometric model and the environmental obstacle model to a configuration file; S4, inputting the configuration file into a collision detection library, using the collision detection library to process the path uniform state points to implement collision detection.
2. The robot arm collision detection method based on low-discrepancy sequence uniform sampling according to claim 1, characterized in that: The step S1 specifically includes: S11, obtaining the current joint position of the robotic arm, and generating a motion path from the current joint position to the target joint position through a robotic arm path planning algorithm. When the time is t, the vector representation of the motion path is: q(t)=[q1(t),q2(t),q3(t),…,q n (t)], Among them, q i (t) is the joint position of the i-th joint of the robot at time t; The joint angle values of the current positions of the six axes of the robot are expressed as: current_joints=[α1,α2,α3,α4,α5,α6]; The joint angle value of the target position is expressed as: goal_joint=[β1,β2,β3,β4,β5,β6]; S12, based on the joint angle values of the current positions of the six axes of the robot arm and the joint angle values of the target positions, checking the validity of the motion path from the current position to the target joint position, and calculating the final joint angle values of the current position and the joint angle values of the target position based on the validity result; S13, obtaining the final joint angle value of the current position and the joint angle value of the target position, and calculating the joint tangent vector from the current joint position to the target joint position, the calculation formula is: joint_tangent=goal_joint-current_joints; S14, setting the minimum distance of path node detection to S, calculating the cardinality b of the van der Kopit sequence and the number of key points K on the path based on the joint tangent vector, and the distance between the key points K is not less than S.
3. The robot arm collision detection method based on low-discrepancy sequence uniform sampling as claimed in claim 2, characterized in that: The step 2 specifically includes the following steps: S21, obtaining the cardinality b of the Van der Kopitt sequence and the number of key points K on the path, obtaining the sequence length n based on the number of key points K on the path, n=K, using the cardinality b of the Van der Kopitt sequence and the sequence length n as parameters of the Van der Kopitt sequence generation algorithm to generate the Van der Kopitt sequence; S22, use the van der Koppiet sequence to sample the joint path and obtain the uniform sampling sequence V i =(v i1 ,v i2 ,…,v in ), v i1 ,v i2 ,…,v in It is represented by uniform sampling points, n is the number of uniform sampling points, i is the number of joints of each axis of the robot, and each sampling point element corresponds to a uniformly distributed random number; S23, using the random number as a linear interpolation parameter, using a linear interpolation method to solve the path uniform state point intermediate_state between the initial position and the target position, the calculation formula is: intermediate_state=current_joints+joint_tangent*V i 。 4. The robot arm collision detection method based on low-discrepancy sequence uniform sampling as claimed in claim 3, characterized in that: The step S3 specifically comprises the following steps: A geometric model of the robotic arm is established according to the three-dimensional features of the robotic arm, and the position and posture of each link of the robotic arm relative to the base coordinate system in the initial state are obtained; According to the kinematic model of the robot arm, calculate the position of each link in space at each uniform state point intermediate_state posture; An environmental obstacle model is established based on the three-dimensional features of the obstacle and the surrounding environment. Each obstacle in the environmental obstacle model is used as a static constraint. Each obstacle is described as a position (x, y, z) and posture (roll, pitch, yaw) relative to the world coordinate system. The geometric model of the robotic arm, the position and posture of each link of the robotic arm relative to the base coordinate system in the initial state, the position of each link in space at each uniform state point intermediate_state posture, and the obstacle model are saved to the configuration file.
5. The robot arm collision detection method based on low-discrepancy sequence uniform sampling as claimed in claim 1, characterized in that: In step S4, the collision detection library is used to process the path uniform state point, and the collision detection is implemented by specifically comprising the following steps: Obtain the path uniform state point intrmediate_state, and obtain the posture corresponding to the path uniform state point intermediate_state by inversely solving the path uniform state point intermediate_state; The collision detection library analyzes the posture corresponding to the path uniform state point intermediate_state according to the set collision detection rules to determine whether the robot arm collides with the robot arm body or an obstacle.
6. The robot arm collision detection method based on low-discrepancy sequence uniform sampling as claimed in claim 2, characterized in that: The step S12 specifically includes: Set the upper and lower limits of the joint position. Compare the joint angle value of each axis of the robot arm at the current position and the joint angle value of the target position with the allowable upper limit value and the allowable lower limit value respectively, If the joint angle value of the current position or the joint angle value of the target position of any axis is greater than the allowable upper limit value, the joint angle value of the current position or the joint angle value of the target position is subtracted by 2*M_PI until the final joint angle value of the current position or the joint angle value of the target position of each axis is less than the allowable upper limit value; If the joint angle value of the current position or the joint angle value of the target position of any axis is less than the allowable lower limit value, then the joint angle value of the current position or the joint angle value of the target position is added with 2*M_PI until the final joint angle value of the current position or the joint angle value of the target position of each axis is greater than or equal to the allowable lower limit value; Wherein, M_PI is a preset angle value.
7. The robot arm collision detection method based on low-discrepancy sequence uniform sampling as claimed in claim 2, characterized in that: The step S14 specifically includes: S141, let the joint tangent vector J = {j1, j2, j3, ..., j n } represents joint_tangent, where j i is the i-th element of vector J; S142, calculate the absolute value of each element in the joint tangent vector J to obtain a new vector: J′={|j1|,|j2|,|j3|,…,|j n |}; S143, find the maximum element value in the new vector J′, which is M=max(|j1|,|j2|,|j3|,…,|j n |); S144, yes Round up to get the base number S145, calculating the number of key points K on the path based on the base number, K=2 b .
8. The robot arm collision detection method based on low-discrepancy sequence uniform sampling as claimed in claim 2, characterized in that: The robot arm path planning algorithm includes a Cartesian space planning algorithm or a joint space planning algorithm.
9. A computer device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the robot arm collision detection method based on low-discrepancy sequence uniform sampling as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the robot arm collision detection method based on low-discrepancy sequence uniform sampling as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Mechanical arm path planning method integrating low-difference sequence and RRT algorithm
CN112356033A
Light ray tracing method based on diversified low-difference sequence
CN115439591A
Robot obstacle avoidance path planning method and system and medium
CN115793647A
Mobile robot path planning method based on improved A-star algorithm
CN118550299A