Mechanical arm operation method, system and equipment based on photographing point and storage medium
By calculating the path cost and constructing the graph structure between the robotic arm's photographing points, the order of photographing points is optimized, which solves the problems of unreasonable running time and insufficient flexibility of the robotic arm in the existing technology, and achieves a more efficient and flexible detection process.
Patent Information
- Application Number
- CN202411000817.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-24
AI Technical Summary
In the existing robotic arm photography and maintenance technology, the fixed trajectory scheme lacks flexibility, and the initial photographing point sequence of the real-time planning trajectory scheme is fixed, resulting in unreasonable robotic arm running time, and low detection efficiency due to vehicle and robotic arm parking errors.
By calculating the path cost between each photographing point, a graph structure is constructed to obtain the sequence of photographing points with the smallest weighted cost value. The robotic arm performs photographing operations in this order, using the RRT-Connect algorithm and the hyperbolic tangent function to calculate the weight, and the dynamic programming algorithm Optimize the order of photo points.
It effectively reduces the running time of the robotic arm, improves detection efficiency, enhances adaptability and reliability to different environments, and avoids detection failures caused by parking errors.
Smart Images

Figure CN118721206A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of rail transit technology, and in particular, to a robotic arm operation method, system, device and storage medium based on a photo point. Background Art
[0002] As the train maintenance industry gradually transforms towards automation and intelligence, the proportion of robots used is also increasing year by year. In production scenarios, adding a camera at the end of the mobile robot arm can take pictures of the inspection points (photo points) near the parking point of the mobile robot, thereby achieving efficient inspection of train bogie parts.
[0003] At present, the technical solutions for robotic arm photo inspection mainly include fixed robotic arm trajectory solutions and real-time planning robotic arm trajectory solutions. Among them, although the fixed robotic arm trajectory solution is relatively efficient, it lacks flexibility, and the parking error of the vehicle and the parking error of the robotic arm will cause the robotic arm to fail to accurately reach the photo point or collide with the vehicle body. Therefore, the real-time planning robotic arm trajectory solution is more often used. The robotic arm generates the trajectory according to the predetermined photo point sequence. If the photo point sequence set before the inspection is different, the generated robotic arm motion trajectory is also different, and the detection time used is also different.
[0004] However, in the real-time planning of the robot arm trajectory, the order of the initially recorded photo points is fixed. The running time of the robot arm with different photo order varies greatly, and an unreasonable photo point order will greatly increase the running time of the robot arm. Summary of the invention
[0005] In order to solve one of the above-mentioned technical defects, an embodiment of the present application provides a robotic arm operation method, system, device and storage medium based on photo points.
[0006] According to a first aspect of an embodiment of the present application, a robotic arm operation method based on a photographing point is provided, the method comprising:
[0007] Calculate the path cost of the path for every two photo points in the photo point set under the robot arm parking point;
[0008] A graph structure is constructed with each photo point as a node and the path cost as an edge. The optimal sorting of photo points with the smallest sum of weighted cost values is obtained based on the graph structure.
[0009] The robotic arm is arranged in the best order according to the photo taking points, and passes through each photo taking point in turn to take photos.
[0010] In an optional embodiment of the present application, the step of calculating the path cost of the path for every two photo points in the photo point set under the robot arm parking point further includes:
[0011] The cost values recorded between every two photo points of the robot arm at a parking point are stored as a cost vector, each cost value in the cost vector is weighted to obtain a weighted cost value, and each weighted cost value is summed to obtain the path cost of every two photo points.
[0012] In an optional embodiment of the present application, the step of calculating the path cost of the path for every two photo points in the photo point set under the robot arm parking point further includes:
[0013] The weight of each cost value is positively correlated with the recording time of the cost value.
[0014] In an optional embodiment of the present application, the step of calculating the path cost of the path for every two photo points in the photo point set under the robot arm parking point further includes:
[0015] The cost vector has a maximum length threshold. When the length of the cost vector reaches the maximum length threshold and a cost value needs to be stored, the cost value with the smallest weight is removed to maintain the maximum length of the cost vector unchanged.
[0016] In an optional embodiment of the present application, the step of calculating the path cost of the path for every two photo points in the photo point set under the robot arm parking point further includes:
[0017] If the cost value is not recorded most recently, the weight is calculated using the hyperbolic tangent function, using the formula:
[0018]
[0019] In the formula, w i is the weight, K t is the shape coefficient, L is the length of the cost vector, and i is the order in which the cost values are recorded.
[0020] In an optional embodiment of the present application, the cost value is an average trajectory time obtained after performing at least two motion plans between every two photo points through a random sampling algorithm.
[0021] In an optional embodiment of the present application, the random sampling algorithm is the RRT-Connect algorithm.
[0022] According to a second aspect of an embodiment of the present application, a robotic arm operation system based on a photographing point is provided, the system comprising a path cost calculation module, a photographing point sorting module and a photographing operation module; wherein:
[0023] A path cost calculation module is used to calculate the path cost of the path for every two photo points in the photo point set under the robot arm parking point;
[0024] The photo point sorting module is used to construct a graph structure with each photo point as a node and the path cost as an edge, and obtain the optimal sorting of photo points with the smallest sum of weighted cost values according to the graph structure;
[0025] The photo operation module is used to enable the robot arm to optimally sort the photo points and pass through each photo point in turn to perform photo operations.
[0026] According to the third aspect of an embodiment of the present application, a computer device is provided, comprising: a memory; a processor; and a computer program; wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the steps of any method as in the first aspect of an embodiment of the present application.
[0027] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored; the computer program is executed by a processor to implement the steps of any method of the first aspect of the embodiment of the present application.
[0028] The use of the robotic arm operation method based on the photographing point provided in the embodiment of the present application has the following beneficial effects:
[0029] This application pre-calculates the trajectory between each photo point and counts the running time as the cost between two photo points, and solves the photo point sequence with the shortest cost through graph search, which effectively reduces the actual running time of the robot arm. Compared with the existing real-time planning of robot arm trajectory scheme with a fixed photo point sequence, the robot arm operation efficiency is higher. During the inspection process, the running time of the robot arm is an important part of the total inspection time. Reducing the running time of the robot arm can greatly improve the inspection efficiency of the entire vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0031] Figure 1 A flowchart of a robotic arm operation method based on a photographing point provided in an embodiment of the present application;
[0032] Figure 2 A schematic diagram of a cost matrix provided in an embodiment of the present application;
[0033] Figure 3 A structural diagram of a robotic arm operation system based on a photographing point provided in an embodiment of the present application;
[0034] Figure 4 A schematic diagram of the computer device structure provided for one embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0036] As the train maintenance industry gradually transforms towards automation and intelligence, the proportion of robots used is also increasing year by year. In production scenarios, adding a camera at the end of the mobile robot arm can take pictures of the inspection points (photo points) near the parking point of the mobile robot, thereby achieving efficient inspection of train bogie parts.
[0037] At present, the technical solutions for robotic arm photo maintenance mainly include a fixed robotic arm trajectory solution and a real-time planning robotic arm trajectory solution.
[0038] Among them, the fixed robot arm trajectory solution is mainly that after the inspected train stops at the designated position, the robot moves along a predetermined path and reaches a fixed parking point. After the mobile robot stops, the robot arm collects images according to a fixed sequence of photo points, and the robot arm motion trajectory between photo points is also fixed. The robot arm motion trajectory of this solution only needs to be generated once, and the trajectory can be reused afterwards, and the robot arm running time is fixed.
[0039] However, this solution requires setting up inspection sites separately for different types of trains. When changing the train model, the site needs to be reset and the robot's running trajectory needs to be re-recorded. This lacks flexibility and is not suitable for inspection tasks of multiple types of trains at the same site. In addition, the parking error of the vehicle and the parking error of the mobile robot will cause the actual photo point coordinates to not correspond to the initially set photo point coordinates. Directly running the pre-set robot arm motion trajectory will cause the robot arm to fail to accurately reach the photo point or collide with the vehicle body.
[0040] When the train being inspected cannot stop at the designated location, or the mobile robot cannot stop accurately at a fixed stop point every time, the motion trajectory of the robot arm cannot be reused. Therefore, the robot arm needs to generate a motion trajectory in real time for the on-site inspection location. Under this real-time planning of the robot arm trajectory solution, the robot arm generates the trajectory according to the predetermined sequence of photo points. If the sequence of photo points set before the inspection is different, the generated motion trajectory of the robot arm will also be different, and the inspection time will also be different.
[0041] Although the real-time planning of the robot arm trajectory can flexibly generate the robot arm trajectory according to different parking positions, the order of the initial recorded photo points is fixed. The robot arm running time varies greatly with different photo order, and an unreasonable photo point order will greatly increase the robot arm running time.
[0042] In order to make the robot arm maintenance operation have both the relatively high efficiency of the fixed robot arm trajectory plan and the flexibility and accuracy of the real-time planning of the robot arm trajectory plan, the present application pre-calculates the trajectory running time between each photo point, obtains the initial cost matrix, and uses the optimal sorting algorithm to calculate the sequence of photo points with the shortest robot arm running time, and updates the cost matrix during the actual inspection process.
[0043] Please see Figure 1 Steps shown:
[0044] S1: Calculate the path cost of the path for every two photo points in the photo point set under the robot arm parking point.
[0045] In some embodiments of the present application, at least two motion plans are performed between every two photo points through a random sampling algorithm, and the average trajectory time is obtained, and the average trajectory time is used as the cost value, and the cost value is directly used as the path cost. Optionally, the random sampling algorithm is the RRT-Connect algorithm. The RRT-Connect algorithm is an algorithm derived from the Rapidly-exploring Random Tree (RRT) algorithm. On the basis of RRT, a dual-tree expansion link is introduced, and two trees are generated with the starting point and the target point as the root nodes for bidirectional expansion. When the two trees are connected, the path planning is considered successful. A sampling point is obtained by sampling once, and then the two search trees are expanded in the direction of the sampling point at the same time, which speeds up the speed of establishing a connection between the two trees. Compared with the RRT algorithm with single tree expansion, RRT-Connect adds a heuristic step to speed up the search speed, and also has a good effect on narrow channels.
[0046] In the specific implementation, after obtaining a set of photo points under a parking spot, the RRT-Connect algorithm is used to generate a path for any two photo points, and the running time is counted. Since the RRT-Connect algorithm is a random sampling algorithm, the generated path is random, so it is necessary to perform multiple motion planning on the path between the two photo points, and take the average of the trajectory time as the cost value v between photo point a and photo point b. a,b The cost matrix is composed of N photo points. Figure 2 shown.
[0047] The inventors of this application discovered that since there will be errors in the parking position or ground height of the robotic arm in different environments, the joint angles of the robotic arm when the end of the robotic arm reaches the photo point will also be different, so the cost value of each motion planning is different. Integrating the cost values between the actual photo points into the previously calculated cost matrix can improve the adaptability of this method.
[0048] Based on this, in some other embodiments of the present application, the cost values recorded between every two photo points of the robot arm at a parking point are stored as a cost vector, each cost value in the cost vector is weighted to obtain a weighted cost value, and each weighted cost value is summed to obtain the path cost of every two photo points. Optionally, in order to improve the referenceability of the weight, the weight of each cost value is positively correlated with the recording time of the cost value.
[0049] In this embodiment, if the recording time of the cost value is not the most recent one, the weight is calculated by a hyperbolic tangent function, and the formula is:
[0050]
[0051] In the formula, w i is the weight, K t is the shape coefficient, L is the length of the cost vector, and i is the order in which the cost values are recorded.
[0052] In this embodiment, the cost vector has a maximum length threshold. When the length of the cost vector reaches the maximum length threshold and a cost value needs to be stored, the cost value with the smallest weight is removed to maintain the maximum length of the cost vector unchanged. Based on this, the cost vector maintains the maximum length unchanged, which can avoid the infinite expansion of the cost vector, and increase the calculation content after reaching a certain threshold, which reduces efficiency.
[0053] In the specific implementation, for each pair of photo points under a parking spot, a cost vector {v 1 ,v 2 ,…,v i ,…,v L}, where v i It represents the cost value recorded at the i-th time. The cost vector is continuously updated with each planning, and the length of the vector remains unchanged. Different weights are assigned to the cost values recorded at different times. The earlier the time, the lower the weight.
[0054] In a specific implementation, the weight calculation formula is:
[0055]
[0056] In the formula, w i is the weight, K t is the shape coefficient, L is the length of the cost vector, and i is the order in which the cost value is recorded. Specifically, K t is the shape coefficient of the hyperbolic tangent function, which can be set according to actual needs. By assigning different values to the shape coefficient, the weight forgetting time can be controlled. When the shape coefficient is smaller, the overall calculation value (ie, weight) is smaller.
[0057] In a specific implementation, the cost value obtained by the actual inspection is recorded, and the cost value is updated by the following formula, and the updated cost value is used as the path cost, so as to further obtain a cost matrix that is closer to the actual situation.
[0058]
[0059] Where V is the path cost.
[0060] Please continue to see Figure 1 :
[0061] S2: Build a graph structure with each photo point as a node and the path cost as an edge, and obtain the optimal sorting of the photo points with the smallest sum of weighted cost values according to the graph structure.
[0062] In the specific implementation, after obtaining the path cost between the photo points, it is necessary to use the optimal sorting algorithm to obtain the photo order with the minimum cost. Specifically, the photo points are converted into nodes of the graph structure, and the path cost between two photo points is used as the edge between the nodes, so that the photo point sorting problem is converted into a graph search problem with the minimum cost after traversing all nodes, and the optimal photo point arrangement order is found through the dynamic programming algorithm.
[0063] S3: The robot arm optimally arranges the photo points and passes through each photo point in turn to perform photo operations.
[0064] In a specific implementation, the robot arm uses the optimal arrangement sequence of photo points for motion planning and execution of the trajectory.
[0065] In summary, this application can calculate the trajectory running time between each photo point in advance, obtain the initial cost matrix, and then calculate the sequence of photo points with the shortest running time of the time robot arm through graph search, which effectively reduces the actual running time of the robot arm. Furthermore, this application can also update the cost matrix during the actual inspection process, and incorporate the cost value between the actual photo points into the previously calculated cost matrix to improve the adaptability of this method.
[0066] Compared with the fixed robot arm trajectory solution, this application has significantly improved the environmental adaptability and reliability of high-speed rail detection. Based on the embodiment of this application, after obtaining the location of the photo point, there is no need to pre-set the robot arm trajectory, but to generate the trajectory in real time according to the environmental information, which is robust to parking errors and mobile robot parking errors, has stronger environmental adaptability, avoids the problem of detection failure caused by parking errors, and has higher reliability.
[0067] Compared with the real-time planning of robot arm trajectory solution, this application has significantly improved the efficiency of robot arm operation. Based on the pre-evaluation of the cost between the photo points, the embodiment of this application uses a dynamic programming algorithm to find the optimal photo point sequence, which is more efficient than the existing real-time planning of robot arm trajectory solution with a fixed photo point sequence. In addition, this application updates the cost matrix between the photo points according to the actual operation results of the robot arm, thereby adjusting the optimal photo point sequence according to different actual environments to optimize the operation time of the robot arm.
[0068] It should be understood that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0069] See also Figure 3 An embodiment of the present application provides a robotic arm operation system based on a photo point, including a path cost calculation module 10, a photo point sorting module 20 and a photo operation module 30; wherein,
[0070] A path cost calculation module 10, used to calculate the path cost of the path for every two photo points in the photo point set under the robot arm parking point;
[0071] The photo point sorting module 20 is used to construct a graph structure with each photo point as a node and a path cost as an edge, and obtain an optimal sorting of the photo points with the smallest sum of weighted cost values according to the graph structure;
[0072] The photographing operation module 30 is used to enable the robot arm to optimally sort the photographing points and pass through each photographing point in turn to perform photographing operations.
[0073] For the specific definition of the above-mentioned robotic arm operation system based on the photo point, please refer to the definition of the robotic arm operation method based on the photo point above, which will not be repeated here. Each module in the above-mentioned robotic arm operation system based on the photo point can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0074] In one embodiment, a computer device is provided, the internal structure diagram of which can be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a robotic arm operation method based on a photo point as described above is implemented. It includes: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, any step in the robotic arm operation method based on a photo point as described above is implemented.
[0075] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any step in the above-mentioned robotic arm operation method based on the photographing point can be implemented.
[0076] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, C language, VHDL language, Verilog language, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0077] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0078] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0079] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0080] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0081] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A robotic arm operation method based on a photographing point, characterized in that: include: Calculate the path cost of the path for every two photo points in the photo point set under the robot arm parking point; A graph structure is constructed with each of the photographing points as a node and the path cost as an edge, and an optimal sorting of the photographing points with the smallest sum of the weighted cost values is obtained according to the graph structure; The robotic arm is arranged in the best order according to the photographing points, and passes through each of the photographing points in turn to perform photographing operations.
2. The robotic arm operation method based on the photographing point according to claim 1 is characterized in that: The step of calculating the path cost of the path for every two photo points in the photo point set under the robot arm parking point also includes: The cost values recorded between every two photo points at a parking point of the robot arm are stored as a cost vector, each cost value in the cost vector is weighted to obtain a weighted cost value, and each weighted cost value is summed to obtain the path cost of every two photo points.
3. The robotic arm operation method based on the photographing point according to claim 2 is characterized in that: The step of calculating the path cost of the path for every two photo points in the photo point set under the robot arm parking point also includes: The weight of each cost value is positively correlated with the recording time of the cost value.
4. The robotic arm operation method based on the photographing point according to claim 3 is characterized in that: The step of calculating the path cost of the path for every two photo points in the photo point set under the robot arm parking point also includes: The cost vector has a maximum length threshold. When the length of the cost vector reaches the maximum length threshold and the cost value needs to be stored, the cost value with the smallest weight is removed to maintain the maximum length of the cost vector unchanged.
5. The robotic arm operation method based on the photographing point according to claim 4 is characterized in that: The step of calculating the path cost of the path for every two photo points in the photo point set under the robot arm parking point also includes: If the recording time of the cost value is not the most recent one, the weight is calculated by the hyperbolic tangent function, and the formula is: In the formula, w i is the weight, K t is the shape coefficient, L is the length of the cost vector, and i is the order in which the cost values are recorded.
6. The robotic arm operation method based on the photographing point according to any one of claims 2 to 5, characterized in that: The cost value is the average trajectory time obtained after performing at least two motion plannings between each two photographing points through a random sampling algorithm.
7. The robotic arm operation method based on the photographing point according to claim 6 is characterized in that: The random sampling algorithm is the RRT-Connect algorithm.
8. A robotic arm operation system based on a photographing point, characterized in that: It includes a path cost calculation module, a photo point sorting module and a photo operation module; among which, A path cost calculation module is used to calculate the path cost of the path for every two photo points in the photo point set under the robot arm parking point; A photo point sorting module, used to construct a graph structure with each photo point as a node and the path cost as an edge, and obtain an optimal sorting of the photo points with the smallest sum of the weighted cost values according to the graph structure; The photographing operation module is used to enable the robot arm to optimally sort the photographing points and pass through each of the photographing points in turn to perform photographing operations.
9. A computer device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon; the computer program is executed by a processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Mechanical arm, motion path planning method thereof, control system, medium and robot
CN114700937A
Train bottom inspection robot bottom inspection control method and device, robot and storage medium
CN116079722A
Indoor environment model autonomous construction and maintenance method and system
CN116358555A
Path planning method and device for intelligent unmanned parking lot AGV, and storage medium
CN116399352A
Path planning method for six-degree-of-freedom mechanical arm to grab complex parts
CN117047776A
