Excavator control method, device, equipment and storage medium
By using preset imitation models in the excavator to control the coordinated action of the robot arm and the bucket, the problems of low efficiency and large mechanical damage in the excavator in the prior art are solved, and a more efficient excavation process and lower mechanical losses are achieved.
Patent Information
- Application Number
- CN202211426548.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-14
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2042-11-14
AI Technical Summary
In the prior art, excavators are inefficient and have large mechanical damage during excavation.
By controlling the excavator's bucket to move to the excavator's bucket according to the coordinates of the target position point, and obtaining the status data when the bucket is moved, the control command is obtained using a preset imitation model to control each preset robotic arm and bucket to perform coordinated excavation actions.
Improves excavation efficiency and reduces mechanical damage during excavation operations.
Smart Images

Figure CN115674262B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an excavator control method, device, equipment and storage medium. Background Art
[0002] The scene of the fixed-point excavation and unloading task includes the earth to be excavated, the excavator and the loader. When the excavator tracks do not move (i.e. the excavator position remains unchanged), the arm, forearm and bucket are controlled to rotate in a distributed manner to dig up the earth, rotate the cabin to the top of the loader, and rotate the bucket to dump the earth into the loader. This task is a very frequent task in the actual excavator usage scenario, and generally requires a long period of mechanical operation by the excavator master to complete.
[0003] An automated control program is provided in the prior art, in which the excavation action of the excavator is implemented by preset rules. The specific logic is: move the bucket to the received excavation point coordinates, rotate the bucket inward to complete the excavation, then lift the arm and rotate the cabin to the loading truck position, and rotate the bucket outward to dump the soil.
[0004] However, in such an excavation process, the excavation action is completed by rotating only one joint of the bucket, which has problems such as low efficiency and large mechanical loss due to energy consumption. Summary of the invention
[0005] The purpose of the present application is to provide an excavator control method, device, equipment and storage medium to address the deficiencies in the above-mentioned prior art, so as to solve the problems in the prior art of low excavation efficiency and greater mechanical damage during excavation.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides an excavator control method, the method comprising:
[0008] According to the coordinates of the target location point, control the bucket of the excavator to move to the excavation area corresponding to the target location point;
[0009] Acquire state data when the bucket moves to the excavation area, the state data including: coordinates of the target position point, an angle value of the bucket, and angle values of each preset mechanical arm; the preset mechanical arm is a mechanical arm associated with the bucket;
[0010] According to the state data, a preset imitation model is used to obtain a control instruction;
[0011] Control each of the preset mechanical arms and the bucket to perform excavation according to the control instructions;
[0012] If the excavation action is completed and the bucket is horizontal, the cabin of the excavator is controlled to rotate toward a preset unloading position, and the bucket is controlled to perform an unloading action at the preset unloading position.
[0013] Optionally, controlling the bucket of the excavator to move to the excavation area corresponding to the target location point according to the coordinates of the target location point includes:
[0014] Calculating the angle value of each of the preset mechanical arms when the bucket moves to the excavation area according to the coordinates of the target position point;
[0015] According to the angle value of each preset mechanical arm, the angle of each preset mechanical arm is controlled to reach the angle value of each preset mechanical arm.
[0016] Optionally, obtaining a control instruction according to the state data by using a preset imitation model includes:
[0017] Adopting the preset simulation model, according to the coordinates of the current target position point and the current position information of each preset mechanical arm, determining the next frame control instruction of the excavator; the next frame control instruction is used to indicate the target angle value of each preset mechanical arm and the bucket of the excavator at the next moment;
[0018] Controlling each of the preset mechanical arms and the bucket to perform excavation actions according to the control instruction includes:
[0019] According to the next frame control instruction, control each of the preset mechanical arms and the bucket to move to a target angle value corresponding to the next frame control instruction;
[0020] According to the position information of each preset mechanical arm after the movement and the coordinates of the target position point, the next frame control instruction is determined until the excavator completes the excavation action.
[0021] Optionally, before obtaining the control instruction according to the state data by using a preset imitation model, the method further includes:
[0022] Obtain sample mining data of each mining round in the sample mining task set;
[0023] Using the initial state data of the excavator in each of the excavation rounds as input data, using the imitation model to be trained, and outputting target control instruction data for each of the excavation rounds;
[0024] Determine whether the loss function of the to-be-trained imitation model is less than a preset threshold value according to the sample control instruction data in each mining round and the target control instruction data corresponding to each mining round;
[0025] If it is less than, it is determined that the training of the imitation model to be trained is completed.
[0026] Optionally, the sample mining data of each mining round includes multiple frames of data, and each frame of data includes sample state data of the excavator and sample control instruction data of the excavator;
[0027] The method uses the initial state data of the excavator in each excavation round as input data, adopts the imitation model to be trained, and outputs the target control instruction data for each excavation round, including:
[0028] Taking the sample state data in each frame of data as input data, using the imitation model to be trained, and outputting the target control instruction data corresponding to each frame of data;
[0029] The determining whether the loss function of the to-be-trained imitation model is less than a preset threshold value according to the sample control instruction data in each mining round and the target control instruction data corresponding to each mining round includes:
[0030] According to the sample control instruction data corresponding to each frame of data and the target control instruction data corresponding to each frame of data, it is determined whether the loss function of the imitation model to be trained is less than a preset threshold.
[0031] Optionally, the control instruction data includes: preset mechanical arm control instruction data and bucket control instruction data, and the determining whether the loss function of the to-be-trained imitation model is less than a preset threshold value according to the sample control instruction data corresponding to each frame of data and the target control instruction data corresponding to each frame of data includes:
[0032] Respectively determine the data difference between each of the sample preset mechanical arm control instruction data and the sample bucket control instruction data corresponding to each frame of data and each of the target preset mechanical arm control instruction data and the target bucket control instruction data corresponding to each frame of data;
[0033] If each data difference is smaller than a preset difference, it is determined that the loss function of the imitation model to be trained is smaller than a preset threshold.
[0034] Optionally, before taking the sample state data in each frame of data as input data and adopting the imitation model to be trained to output the target control instruction data corresponding to each frame of data, the method further comprises:
[0035] Determine a data difference between a first control instruction corresponding to a current frame of data and a second control instruction corresponding to a next frame of data of the current frame;
[0036] If, in each preset robot arm control instruction or bucket position control instruction in the first control instruction, the position differences between all the first control instructions and the second control instructions are less than a second preset threshold value;
[0037] then obtaining a third control instruction corresponding to the next frame of data of the current frame, and determining a position difference between the first control instruction and the third control instruction;
[0038] Until there is at least one position difference between the Nth control instruction and the first control instruction in each preset robot arm control instruction or bucket position control instruction in the first control instruction that is greater than or equal to a second preset threshold, then it is determined that the Nth control instruction is the target control instruction data corresponding to the sample state data of the current frame.
[0039] Optionally, before controlling the bucket of the excavator to move to the excavation area corresponding to the target location point according to the coordinates of the target location point, the method further includes:
[0040] In response to a selection operation of the target location point in the image of a preset mining operation scene, the two-dimensional coordinates of the selection operation in the image are converted into three-dimensional coordinates as the coordinates of the target location point.
[0041] In a second aspect, another embodiment of the present application provides an excavator control device, the device comprising: a control module, an acquisition module and a determination module, wherein:
[0042] The control module is used to control the bucket of the excavator to move to the excavation area corresponding to the target location point according to the coordinates of the target location point;
[0043] The acquisition module is used to acquire the state data of the bucket when it moves to the excavation area, the state data including: the coordinates of the target position point, the angle value of the bucket, and the angle value of each preset mechanical arm; the preset mechanical arm is the mechanical arm associated with the bucket;
[0044] The determination module is used to obtain control instructions according to the state data using a preset imitation model;
[0045] The control module is specifically used to control each of the preset mechanical arms and the bucket to perform excavation according to the control instructions; if the excavation action is completed and the bucket is horizontal, the cabin of the excavator is controlled to rotate toward a preset unloading position, and the bucket is controlled to perform an unloading action at the preset unloading position.
[0046] Optionally, the device further comprises: a calculation module, for calculating the angle value of each of the preset mechanical arms when the bucket moves to the excavation area according to the coordinates of the target position point;
[0047] The control module is specifically used to control the angle of each preset mechanical arm to reach the angle value of each preset mechanical arm according to the angle value of each preset mechanical arm.
[0048] Optionally, the determination module is specifically used to adopt the preset simulation model to determine the next frame control instruction of the excavator according to the coordinates of the current target position point and the current position information of each preset mechanical arm; the next frame control instruction is used to indicate the target angle value of each preset mechanical arm and the bucket of the excavator at the next moment;
[0049] The control module is specifically used to control each of the preset mechanical arms and the bucket to move to a target angle value corresponding to the next frame control instruction according to the next frame control instruction;
[0050] The determination module is specifically used to determine the next frame control instruction according to the position information of each preset mechanical arm after movement and the coordinates of the target position point until the excavator completes the excavation action.
[0051] Optionally, the device further comprises: an output module, wherein:
[0052] The acquisition module is specifically used to acquire sample mining data of each mining round in the sample mining task set;
[0053] The output module is used to take the initial state data of the excavator in each excavation round as input data, adopt the imitation model to be trained, and output the target control instruction data for each excavation round;
[0054] The determination module is specifically used to determine whether the loss function of the imitation model to be trained is less than a preset threshold based on the sample control instruction data in each mining round and the target control instruction data corresponding to each mining round; if it is less than, it is determined that the training of the imitation model to be trained is completed.
[0055] Optionally, the sample mining data of each mining round includes multiple frames of data, and each frame of data includes sample state data of the excavator and sample control instruction data of the excavator;
[0056] The output module is specifically used to take the sample state data in each frame of data as input data, adopt the imitation model to be trained, and output the target control instruction data corresponding to each frame of data;
[0057] The determination module is specifically used to determine whether the loss function of the imitation model to be trained is less than a preset threshold based on the sample control instruction data corresponding to each frame of data and the target control instruction data corresponding to each frame of data.
[0058] Optionally, the control instruction data includes: preset mechanical arm control instruction data and bucket control instruction data;
[0059] The determination module is specifically used to respectively determine the data differences between the sample preset robotic arm control instruction data and the sample bucket control instruction data corresponding to each frame of data, and the target preset robotic arm control instruction data and the target bucket control instruction data corresponding to each frame of data; if each data difference is less than the preset difference, it is determined that the loss function of the imitation model to be trained is less than a preset threshold.
[0060] Optionally, the determination module is specifically used to determine a data difference between a first control instruction corresponding to a current frame of data and a second control instruction corresponding to a next frame of data of the current frame;
[0061] If, in each preset robot arm control instruction or bucket position control instruction in the first control instruction, the position differences between all the first control instructions and the second control instructions are less than a second preset threshold value;
[0062] then obtaining a third control instruction corresponding to the next frame of data of the current frame, and determining a position difference between the first control instruction and the third control instruction;
[0063] Until there is at least one position difference between the Nth control instruction and the first control instruction in each preset robot arm control instruction or bucket position control instruction in the first control instruction that is greater than or equal to a second preset threshold, then it is determined that the Nth control instruction is the target control instruction data corresponding to the sample state data of the current frame.
[0064] Optionally, the device further includes: a conversion module for responding to a selection operation of the target location point in the image of a preset mining operation scene, converting the two-dimensional coordinates of the selection operation in the image into three-dimensional coordinates as the coordinates of the target location point.
[0065] In the third aspect, another embodiment of the present application provides an excavator control device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the excavator control device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of any method described in the first aspect above.
[0066] In a fourth aspect, another embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any method described in the first aspect are executed.
[0067] The beneficial effect of the present application is: using the excavator control method provided by the present application, after determining the state data of the bucket when it moves to the excavation area according to the coordinates of the target point, a preset imitation model is used to obtain a control instruction according to the state data, and then each preset mechanical arm and bucket are controlled to perform the excavation action according to the control instruction. If the excavation action is completed and the bucket is horizontal, the excavator cabin is controlled to rotate to the preset unloading position, and the bucket is controlled to perform the unloading action at the unloading position. This excavation method can not only improve the excavation efficiency, but also reduce the mechanical damage caused by the excavation action because the excavation action is completed by the cooperation between the preset mechanical arms and the bucket. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0069] Figure 1 A schematic flow chart of an excavator control method provided in one embodiment of the present application;
[0070] Figure 2 A schematic flow chart of an excavator control method provided by another embodiment of the present application;
[0071] Figure 3 A schematic flow chart of an excavator control method provided by another embodiment of the present application;
[0072] Figure 4 A schematic diagram of the structure of an excavator control device provided in one embodiment of the present application;
[0073] Figure 5 A schematic structural diagram of an excavator control device provided by another embodiment of the present application;
[0074] Figure 6 A schematic diagram of the structure of an excavator control device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0075] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0076] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0077] In addition, the flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of order, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of this application, and can also remove one or more operations from the flowchart.
[0078] The following is an explanation of an excavator control method provided in an embodiment of the present application in combination with a number of specific application examples. Figure 1 A flow chart of an excavator control method provided in one embodiment of the present application is shown as follows: Figure 1 As shown, the method includes:
[0079] S101: According to the coordinates of the target position point, the bucket of the excavator is controlled to move to the excavation area corresponding to the target position point.
[0080] The excavator control method provided in the present application is applied to the fixed-point excavation scenario. In the fixed-point excavation scenario, the excavator and the preset unloading position remain unchanged, and the excavation action is achieved by controlling the excavator's bucket and each preset mechanical arm.
[0081] By way of example, in an embodiment of the present application, the coordinates of the target location point may be determined by direct user input, or, in response to a selection operation of the target location point in an image of a preset mining operation scene, the two-dimensional coordinates of the selection operation in the image are converted into three-dimensional coordinates as the coordinates of the target location point.
[0082] In one embodiment of the present application, the specific steps for determining the coordinates of the target location point may be, for example, as follows: a visualization terminal device is provided in the cockpit of the excavator, and the visualization terminal device is used to display a visualization interface picture within a preset range around the excavator, wherein the preset range may be, for example, an operable range around the excavator, or a range within a preset distance around the excavator; after the user selects the desired target location point on the visualization interface in the excavator, the processor converts the coordinates of the selected target location point on the picture from 2D to 3D to obtain the coordinates of the target location point in the excavator coordinate system.
[0083] Subsequently, after determining the coordinates of the target position point, the angle value of each preset mechanical arm when the bucket moves to the excavation area is calculated according to the coordinates of the target position point; and according to the angle value of each preset mechanical arm, the angle of each preset mechanical arm is controlled to reach the angle value of each preset mechanical arm.
[0084] S102: Acquire status data when the bucket moves to the excavation area.
[0085] In an embodiment of the present application, the excavation area may be, for example, an area when the front edge of the bucket is perpendicular to the target position point, or an area when the front edge of the bucket is perpendicular to the ground and within a preset range from the target position point. It should be understood that the above embodiments are only exemplary descriptions, and the method for determining the specific excavation area can be flexibly adjusted according to user needs and is not limited to the above embodiments.
[0086] Among them, the status data includes: the coordinates of the target position point, the angle value of the bucket, and the angle value of each preset mechanical arm; the preset mechanical arm is the mechanical arm associated with the bucket; in one embodiment of the present application, the mechanical arm associated with the bucket can be, for example: the upper arm and the lower arm on the excavator.
[0087] The state data may be obtained, for example, by calculating the angle positions of each mechanical arm and bucket when the excavator reaches the excavation area through a rectangular angle rule.
[0088] S103: According to the state data, a preset imitation model is used to obtain a control instruction.
[0089] Among them, the preset simulation model obtains multiple control instructions for each robotic arm and bucket according to the state data, so as to control each preset robotic arm and bucket to perform excavation actions respectively. This setting method makes it possible for each preset robotic arm and bucket to cooperate with each other in the subsequent excavation actions, thereby improving the excavation efficiency and reducing mechanical damage through the synergy between each preset robotic arm and bucket.
[0090] S104: Controlling each preset mechanical arm and bucket to perform excavation according to the control instruction.
[0091] Each preset robotic arm and bucket cooperates to perform excavation actions at the same time according to the control instructions. Since the preset simulation model is trained based on real sample excavation actions, when the preset robotic arms and buckets are controlled to perform excavation actions according to the control instructions obtained from the preset simulation model, the coordination between each preset robotic arm and bucket is closer to the real excavation action. The mutual coordination between each preset robotic arm and bucket makes the excavation action performed by the control instructions closer to the real excavation action, which not only improves the simulation of the excavation action, but also reduces the mechanical damage caused by the lack of coordination between the preset robotic arms and buckets.
[0092] S105: If the excavation action is completed and the bucket is horizontal, the cabin of the excavator is controlled to rotate toward a preset unloading position, and the bucket is controlled to perform an unloading action at the preset unloading position.
[0093] In an embodiment of the present application, the excavator controls the bucket to flip at a preset unloading position to complete the unloading action, thereby completing the entire fixed-point excavation round.
[0094] By adopting the excavator control method provided in the present application, after determining the state data of the bucket when it moves to the excavation area according to the coordinates of the target point, a preset imitation model is used to obtain a control instruction according to the state data, and then each preset mechanical arm and bucket are controlled to perform the excavation action according to the control instruction. If the excavation action is completed and the bucket is horizontal, the excavator cabin is controlled to rotate to the preset unloading position, and the bucket is controlled to perform the unloading action at the unloading position. This excavation method can not only improve the excavation efficiency, but also reduce the mechanical damage caused by the excavation action because the excavation action is completed by the cooperation between the preset mechanical arms and the bucket.
[0095] Optionally, based on the above embodiment, the embodiment of the present application may also provide an excavator control method. The implementation process of obtaining the control instruction in the above method is illustrated below in combination with the accompanying drawings. Figure 2 A flow chart of an excavator control method provided by another embodiment of the present application is as follows: Figure 2 As shown, S103 may include:
[0096] S111: Using a preset simulation model, according to the coordinates of the current target position point and the current position information of each preset mechanical arm, determine the next frame control instruction of the excavator.
[0097] The next frame control instruction is used to indicate the target angle values of each preset mechanical arm and bucket of the excavator at the next moment.
[0098] In an embodiment of the present application, the control instruction may be, for example, issued according to a preset issuance frequency to achieve frame-by-frame control. The preset issuance frequency may be, for example, 100 Hz. It should be understood that the above embodiment is only an exemplary description, and the specific preset issuance frequency may be flexibly adjusted according to user needs and is not limited to that given in the above embodiment.
[0099] Among them, the control instructions of each frame may correspond to different preset robotic arms or buckets. For example, the control instructions of a certain frame may only control the bucket, the control instructions of a certain frame may only control the upper arm, the control instructions of a certain frame may only control the upper arm and the bucket, and the control instructions of a certain frame may be for controlling the upper arm, the lower arm and the bucket at the same time. It should be understood that the above embodiments are only exemplary descriptions, and the specific control instructions control those preset robotic arms or buckets, which can be flexibly adjusted according to user needs, and are not limited to the above embodiments.
[0100] Correspondingly, S104 may include:
[0101] S112: According to the next frame control instruction, each preset robot arm and bucket are controlled to move to a target angle value corresponding to the next frame control instruction.
[0102] S113: Determine the next frame control instruction according to the position information of each preset mechanical arm after the movement and the coordinates of the target position point until the excavator completes the excavation action.
[0103] Optionally, based on the above embodiment, the embodiment of the present application may further provide an excavator control method, and the implementation process of the above method is illustrated below in conjunction with the accompanying drawings. Figure 3 A flow chart of an excavator control method provided by another embodiment of the present application is as follows: Figure 3 As shown, before S103, the method may further include:
[0104] S121: Obtain sample mining data of each mining round in the sample mining task set.
[0105] Among them, each sample mining data in the sample task set is real sample mining data collected in advance. The collection method can be, for example: after installing sensors and deploying control codes on a real excavator, it is upgraded to an excavator that can move each joint through a game controller or by sending control commands remotely through a computer; then a professional excavator master is asked to complete multiple rounds of fixed-point digging and unloading tasks by operating the game controller, and at the same time, the excavator initial state data and the excavator master's sample control command data in each round of the excavation task are collected. The excavator initial state data and the excavator master's sample control command data in each round constitute a sample mining data.
[0106] S122: using the initial state data of the excavator in each excavation round as input data, using the imitation model to be trained, and outputting target control instruction data for each excavation round.
[0107] Among them, the target control instruction data is determined by the imitation model to be trained according to the initial state data of the excavator, and it may have a certain gap with the sample control instruction data in the sample mining data.
[0108] S123: Determine whether the loss function of the imitation model to be trained is less than a preset threshold value based on the sample control instruction data in each mining round and the target control instruction data corresponding to each mining round.
[0109] Among them, the smaller the difference between the sample control instruction data and the target control instruction data, the smaller the error of the current simulation model to be trained, and the larger the difference between the sample control instruction data and the target control instruction data, the larger the error of the current simulation model to be trained; the preset threshold is the maximum acceptable error designed according to user needs. The smaller the preset threshold is set, the slower the simulation model to be trained will converge, but the higher its simulation will be; the larger the preset threshold is set, the faster the simulation model to be trained will converge, but the lower its simulation will be; the specific preset threshold setting can be flexibly adjusted according to user needs, and this application does not impose any restrictions here.
[0110] If it is less than, it means that the current model to be trained has been simulated to the preset requirements, and S124 is executed at this time.
[0111] S124: Determine whether the training of the imitation model to be trained is completed.
[0112] The model obtained after the training of the simulation model is completed is the preset imitation model.
[0113] In some possible embodiments, the sample mining data of each mining round includes multiple frames of data, and each frame of data includes sample state data of the excavator and sample control instruction data of the excavator. The sample state data and sample control instruction data of the excavator corresponding to all frames in the round of each mining task constitute the sample mining data of one mining round.
[0114] Since the simulation model to be trained needs to be iterated multiple times before the final preset imitation model is determined, each iteration requires a set of sample state data and sample control instruction data as the input and output of the simulation model to be trained, and the collected data is processed into this form of training data. The details are as follows: the sample state data is used as the input of the simulation model to be trained. Since some positions in the collected sample data may have pauses, if the timing information is not added, the action at the start of the movement cannot be perceived. In the embodiment of the present application, the sample state data is the splicing of n consecutive frames of sample state data. In addition, each frame of sample state data needs to describe the angle value of each joint of the excavator and the expected target position point. Therefore, each frame of state data is finally defined as 5-dimensional data [angle value of the upper arm, angle value of the lower arm, angle value of the bucket, digging point distance, digging point height], wherein the digging point distance is the horizontal coordinate in the coordinates of the target position point, and the digging point height is the vertical coordinate in the coordinates of the target position point. After splicing the sample state data of n consecutive frames, there are 5*n-dimensional sample state data in total. The above 5*n-dimensional sample state data is normalized and used as the input of the simulation model to be trained; the control instruction data is the output of the simulation model to be trained. It is necessary to control the joints of the excavator according to the sample control instruction data. Therefore, the output of the simulation model to be trained is 3-dimensional control instruction data, which are respectively used as the control instruction data of the angle values of the upper arm, the lower arm and the bucket.
[0115] In one embodiment of the present application, the sample state data can be normalized and used as the input of the simulation model to be trained, and then the output of the simulation model to be trained can be restored from the normalized data to normal control instruction data; whether the sample state data needs to be normalized can be flexibly adjusted according to user needs and is not limited to the above embodiments.
[0116] At this time, the implementation method of S122 may be, for example, to use the sample state data in each frame of data as input data, adopt the imitation model to be trained, and output the target control instruction data corresponding to each frame of data.
[0117] In an embodiment of the present application, before outputting the target control instruction data corresponding to each frame of data, it is also necessary to determine the data difference between the first control instruction corresponding to the current frame data and the second control instruction corresponding to the next frame of data of the current frame; if in each preset robot arm control instruction or bucket position control instruction in the first control instruction, the position difference between all the first control instructions and the second control instructions is less than the second preset threshold value; then obtain the third control instruction corresponding to the next frame of data of the current frame, and determine the position difference between the first control instruction and the third control instruction; until there is at least one position difference between the Nth control instruction and the first control instruction in each preset robot arm control instruction or bucket position control instruction in the first control instruction that is greater than or equal to the second preset threshold value, then determine that the Nth control instruction is the target control instruction data corresponding to the sample state data of the current frame.
[0118] In the embodiment provided in the present application, the joints of the excavator are collectively referred to as: various preset mechanical arms and buckets; the control instructions are issued at a high frequency, so there may be a small change between the angle value of each joint corresponding to the next frame control instruction and the angle value of each joint corresponding to the current control instruction. Considering that due to the actual mechanical power of the excavator and other reasons, the angle value of each joint in the next frame is very different from the angle value of each joint currently, such control instructions cannot be executed by the excavator. Therefore, the difference between the angle value of each joint corresponding to the next frame control instruction issued and the angle value of each joint currently needs to be at least above the threshold that can be executed by the actual excavator.
[0119] In one embodiment of the present application, if there is no joint in the angle values of the joints corresponding to the next frame control instruction whose difference with the current angle value of the joint is greater than the executable threshold, the angle values of the joints corresponding to the next frame control instruction are obtained until it is determined that there is at least one joint angle value among the angle values of the joints in a target frame control instruction, and the difference with the current angle value of the joint is greater than the executable threshold. At this time, the control instruction corresponding to the target frame is determined to be the control instruction to be issued next.
[0120] Correspondingly, the implementation method of S123 may be, for example, to determine whether the loss function of the imitation model to be trained is less than a preset threshold based on the sample control instruction data corresponding to each frame of data and the target control instruction data corresponding to each frame of data.
[0121] Among them, the control instruction data includes: preset robot arm control instruction data and bucket control instruction data, and the method for determining whether the loss function is less than the preset threshold value can be, for example: respectively determine the data difference between each sample preset robot arm control instruction data and sample bucket control instruction data corresponding to each frame of data and each target preset robot arm control instruction data and target bucket control instruction data corresponding to each frame of data; if each data difference is less than the preset difference, it is determined that the loss function of the imitation model to be trained is less than the preset threshold value.
[0122] If the data difference between the sample control instruction data and the target control instruction data of each joint is less than the preset difference, it means that the control instructions for each joint are trained to be closer to the real control instructions. At this time, it is determined that the loss function of the imitation model to be trained is less than the preset threshold, which means that the training of the imitation model to be trained is completed.
[0123] By adopting the excavator control method provided by the present application, since the preset imitation model is obtained by training based on a large amount of sample mining data, the control instructions obtained according to the preset imitation model are closer to the actual operation control instructions of the excavator, so that when the joints of the excavator are controlled according to the control instructions obtained by the preset imitation model, multiple joints can work together to complete the excavation operation, and the mutual coordination of the joints is more in line with the operation of professional excavator masters, and the wear and tear of the joints of the excavator is smaller.
[0124] The following is an explanation of the excavator control device provided by the present application in conjunction with the accompanying drawings. The excavator control device can execute the above Figure 1-Figure 3 The specific implementation and beneficial effects of any excavator control method are as mentioned above and will not be repeated below.
[0125] Figure 4 A schematic diagram of the structure of an excavator control device provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the device includes: a control module 201, an acquisition module 202 and a determination module 203, wherein:
[0126] The control module 201 is used to control the bucket of the excavator to move to the excavation area corresponding to the target location point according to the coordinates of the target location point;
[0127] The acquisition module 202 is used to acquire the state data when the bucket moves to the excavation area, and the state data includes: the coordinates of the target position point, the angle value of the bucket, and the angle value of each preset mechanical arm; the preset mechanical arm is the mechanical arm associated with the bucket;
[0128] The determination module 203 is used to obtain a control instruction according to the state data by using a preset simulation model;
[0129] The control module 201 is specifically used to control each preset mechanical arm and bucket to perform excavation according to the control instruction; if the excavation action is completed and the bucket is horizontal, the cabin of the excavator is controlled to rotate toward the preset unloading position, and the bucket is controlled to perform unloading at the preset unloading position.
[0130] Optionally, based on the above embodiment, the present application embodiment may also provide an excavator control device, as follows in conjunction with the accompanying drawings: Figure 4 The implementation process of the given device is described by way of example. Figure 5 A schematic diagram of the structure of an excavator control device provided in another embodiment of the present application is shown in FIG. Figure 5 As shown, the device further includes: a calculation module 204, for calculating the angle value of each preset mechanical arm when the bucket moves to the excavation area according to the coordinates of the target position point;
[0131] The control module 201 is specifically used to control the angle of each preset robotic arm to reach the angle value of each preset robotic arm according to the angle value of each preset robotic arm.
[0132] Optionally, the determination module 203 is specifically used to use a preset simulation model to determine the next frame control instruction of the excavator according to the coordinates of the current target position point and the current position information of each preset mechanical arm; the next frame control instruction is used to indicate the target angle value of each preset mechanical arm and bucket of the excavator at the next moment;
[0133] The control module 201 is specifically used to control each preset mechanical arm and bucket to move to a target angle value corresponding to the next frame control instruction according to the next frame control instruction;
[0134] The determination module 203 is specifically used to determine the next frame control instruction according to the position information of each preset mechanical arm after movement and the coordinates of the target position point until the excavator completes the excavation action.
[0135] like Figure 5 As shown, the device further includes: an output module 205, wherein:
[0136] An acquisition module 202 is specifically used to acquire sample mining data of each mining round in a sample mining task set;
[0137] The output module 205 is used to use the initial state data of the excavator in each excavation round as input data, adopt the imitation model to be trained, and output the target control instruction data for each excavation round;
[0138] The determination module 203 is specifically used to determine whether the loss function of the to-be-trained imitation model is less than a preset threshold value based on the sample control instruction data in each mining round and the target control instruction data corresponding to each mining round; if so, it is determined that the training of the to-be-trained imitation model is completed.
[0139] Optionally, the sample mining data of each mining round includes multiple frames of data, and each frame of data includes sample state data of the excavator and sample control instruction data of the excavator;
[0140] The output module 205 is specifically used to take the sample state data in each frame of data as input data, adopt the imitation model to be trained, and output the target control instruction data corresponding to each frame of data;
[0141] The determination module 203 is specifically used to determine whether the loss function of the imitation model to be trained is less than a preset threshold value based on the sample control instruction data corresponding to each frame of data and the target control instruction data corresponding to each frame of data.
[0142] Optionally, the control instruction data includes: preset mechanical arm control instruction data and bucket control instruction data;
[0143] Determination module 203 is specifically used to respectively determine the data differences between each sample preset robot arm control instruction data and sample bucket control instruction data corresponding to each frame of data, and each target preset robot arm control instruction data and target bucket control instruction data corresponding to each frame of data; if each data difference is less than the preset difference, it is determined that the loss function of the imitation model to be trained is less than the preset threshold.
[0144] Optionally, the determination module 203 is specifically used to determine the data difference between the first control instruction corresponding to the current frame data and the second control instruction corresponding to the next frame data of the current frame;
[0145] If in each preset robot arm control instruction or bucket position control instruction in the first control instruction, the position differences between all the first control instructions and the second control instructions are less than a second preset threshold value;
[0146] Then obtaining a third control instruction corresponding to the next frame of data of the current frame, and determining a position difference between the first control instruction and the third control instruction;
[0147] Until there is at least one position difference between the Nth control instruction and the first control instruction in each preset robot arm control instruction or bucket position control instruction in the first control instruction that is greater than or equal to the second preset threshold, then the Nth control instruction is determined to be the target control instruction data corresponding to the sample state data of the current frame.
[0148] like Figure 5 As shown, the device also includes: a conversion module 206, which is used to respond to the selection operation of the target position point in the image of the preset mining operation scene, and convert the two-dimensional coordinates of the selection operation in the image into three-dimensional coordinates as the coordinates of the target position point.
[0149] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0150] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0151] Figure 6 This is a schematic diagram of the structure of an excavator control device provided in one embodiment of the present application. The excavator control device can be integrated into a terminal device or a chip of the terminal device.
[0152] like Figure 6 As shown, the excavator control device includes: a processor 501 , a bus 502 and a storage medium 503 .
[0153] The processor 501 is used to store programs. The processor 501 calls the program stored in the storage medium 503 to execute the above Figure 1-Figure 4 The corresponding method embodiment has similar specific implementation methods and technical effects, which will not be described here.
[0154] Optionally, the present application also provides a program product, such as a storage medium, on which a computer program is stored, including a program that, when executed by a processor, executes an embodiment corresponding to the above method.
[0155] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, 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.
[0156] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0157] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0158] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
Claims
1. A method for controlling an excavator, characterized in that: The method comprises: According to the coordinates of the target location point, control the bucket of the excavator to move to the excavation area corresponding to the target location point; Acquire state data when the bucket moves to the excavation area, the state data including: coordinates of the target position point, an angle value of the bucket, and angle values of each preset mechanical arm; the preset mechanical arm is a mechanical arm associated with the bucket; According to the state data, a preset imitation model is used to obtain a control instruction; Control each of the preset mechanical arms and the bucket to perform excavation according to the control instructions; If the excavation action is completed and the bucket is horizontal, the cabin of the excavator is controlled to rotate toward a preset unloading position, and the bucket is controlled to perform an unloading action at the preset unloading position; Before obtaining the control instruction according to the state data by using a preset imitation model, the method further comprises: Obtain sample mining data of each mining round in the sample mining task set; Using the initial state data of the excavator in each of the excavation rounds as input data, using the imitation model to be trained, and outputting target control instruction data for each of the excavation rounds; Determine whether the loss function of the to-be-trained imitation model is less than a preset threshold value according to the sample control instruction data in each mining round and the target control instruction data corresponding to each mining round; If it is less than, it is determined that the training of the imitation model to be trained is completed.
2. The method according to claim 1, characterized in that According to the coordinates of the target position point, controlling the bucket of the excavator to move to the excavation area corresponding to the target position point includes: Calculating the angle value of each of the preset mechanical arms when the bucket moves to the excavation area according to the coordinates of the target position point; According to the angle value of each preset mechanical arm, the angle of each preset mechanical arm is controlled to reach the angle value of each preset mechanical arm.
3. The method according to claim 1, characterized in that The step of obtaining a control instruction based on the state data and using a preset imitation model comprises: Adopting the preset simulation model, according to the coordinates of the current target position point and the current position information of each preset mechanical arm, determining the next frame control instruction of the excavator; the next frame control instruction is used to indicate the target angle value of each preset mechanical arm and the bucket of the excavator at the next moment; Controlling each of the preset mechanical arms and the bucket to perform excavation actions according to the control instruction includes: According to the next frame control instruction, control each of the preset mechanical arms and the bucket to move to a target angle value corresponding to the next frame control instruction; According to the position information of each preset mechanical arm after the movement and the coordinates of the target position point, the next frame control instruction is determined until the excavator completes the excavation action.
4. The method according to claim 1, characterized in that The sample mining data of each mining round includes multiple frames of data, and each frame of data includes sample state data of the excavator and sample control instruction data of the excavator; The method uses the initial state data of the excavator in each excavation round as input data, adopts the imitation model to be trained, and outputs the target control instruction data for each excavation round, including: Taking the sample state data in each frame of data as input data, using the imitation model to be trained, and outputting the target control instruction data corresponding to each frame of data; The determining whether the loss function of the to-be-trained imitation model is less than a preset threshold value according to the sample control instruction data in each mining round and the target control instruction data corresponding to each mining round includes: According to the sample control instruction data corresponding to each frame of data and the target control instruction data corresponding to each frame of data, it is determined whether the loss function of the imitation model to be trained is less than a preset threshold.
5. The method according to claim 4, characterized in that The control instruction data includes: preset mechanical arm control instruction data and bucket control instruction data, and the determination of whether the loss function of the to-be-trained imitation model is less than a preset threshold value based on the sample control instruction data corresponding to each frame of data and the target control instruction data corresponding to each frame of data includes: Respectively determine the data difference between each of the sample preset mechanical arm control instruction data and the sample bucket control instruction data corresponding to each frame of data and each of the target preset mechanical arm control instruction data and the target bucket control instruction data corresponding to each frame of data; If each data difference is smaller than a preset difference, it is determined that the loss function of the imitation model to be trained is smaller than a preset threshold.
6. The method according to claim 4, characterized in that Before taking the sample state data in each frame of data as input data and using the imitation model to be trained to output the target control instruction data corresponding to each frame of data, the method further includes: Determine a data difference between a first control instruction corresponding to a current frame of data and a second control instruction corresponding to a next frame of data of the current frame; If, in each preset robot arm control instruction or bucket position control instruction in the first control instruction, the position differences between all the first control instructions and the second control instructions are less than a second preset threshold value; then obtaining a third control instruction corresponding to the next frame of data of the current frame, and determining a position difference between the first control instruction and the third control instruction; Until there is at least one position difference between the Nth control instruction and the first control instruction in each preset robot arm control instruction or bucket position control instruction in the first control instruction that is greater than or equal to a second preset threshold, then it is determined that the Nth control instruction is the target control instruction data corresponding to the sample state data of the current frame.
7. The method according to claim 1, characterized in that Before controlling the excavator bucket to move to the excavation area corresponding to the target location point according to the coordinates of the target location point, the method further includes: In response to a selection operation of the target location point in the image of a preset mining operation scene, the two-dimensional coordinates of the selection operation in the image are converted into three-dimensional coordinates as the coordinates of the target location point.
8. An excavator control device, characterized in that: The device comprises: a control module, an acquisition module and a determination module, wherein: The control module is used to control the bucket of the excavator to move to the excavation area corresponding to the target location point according to the coordinates of the target location point; The acquisition module is used to acquire the state data of the bucket when it moves to the excavation area, the state data including: the coordinates of the target position point, the angle value of the bucket, and the angle value of each preset mechanical arm; the preset mechanical arm is the mechanical arm associated with the bucket; The determination module is used to obtain control instructions according to the state data using a preset imitation model; The control module is specifically used to control each of the preset mechanical arms and the bucket to perform an excavation action according to the control instruction; if the excavation action is completed and the bucket is horizontal, control the cabin of the excavator to rotate toward a preset unloading position, and control the bucket to perform an unloading action at the preset unloading position; The device further comprises: an output module, wherein: The acquisition module is specifically used to acquire sample mining data of each mining round in the sample mining task set; The output module is used to take the initial state data of the excavator in each excavation round as input data, adopt the imitation model to be trained, and output the target control instruction data for each excavation round; The determination module is specifically used to determine whether the loss function of the imitation model to be trained is less than a preset threshold based on the sample control instruction data in each mining round and the target control instruction data corresponding to each mining round; if it is less than, it is determined that the training of the imitation model to be trained is completed.
9. An excavator control device, characterized in that: The device includes: a processor, a storage medium and a bus, the storage medium stores machine-readable instructions executable by the processor, when the excavator control device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the method described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Excavator arm movement control method, system and device
CN109296019A
Material pile three-dimensional reconstruction method and device, electronic device and computer readable medium
CN109816778A
Shovel
CN114174596A
Method for controlling excavation position of excavator
KR1020100025604A