Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for determining a driving deviation, which can calculate a current driving deviation of an AGV when the AGV misses a code, so that the AGV plans navigation based on the calculated driving, and can reduce deviation of the AGV from a predetermined track as much as possible.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of determining a running deviation, including:
step S1, when the transportation equipment runs to the current point after the set time length from the starting point, obtaining the coordinate deviant, the running direction deviant angle and the left wheel speed and the right wheel speed of the transportation equipment in the set time length, wherein the coordinate deviant is the deviant of the actual coordinate value of the transportation equipment relative to the preset coordinate value in the preset coordinate system, and the running direction deviant angle is the deviant angle of the actual running direction of the transportation equipment relative to the preset running direction in the preset coordinate system;
and step S2, determining the coordinate deviation value of the transportation equipment at the current point according to the coordinate deviation value of the transportation equipment at the starting point, the driving direction deviation angle, the left wheel speed and the right wheel speed within the set time length and the set time length.
Optionally, the step of determining the coordinate offset value of the transportation device at the current point includes:
determining a driving direction change angle of the transportation equipment in the set time length according to the set time length and the left wheel speed and the right wheel speed of the transportation equipment in the set time length, wherein the driving direction change angle in the set time length is a change angle of an actual driving direction of the transportation equipment at a current point relative to an actual driving direction at a starting point in the preset coordinate system;
determining the abscissa deviation value of the transport equipment at the current point according to the abscissa deviation value of the transport equipment at the starting point, the driving direction deviation angle, the driving direction change angle in the set time length and the set time length;
and determining the ordinate deviation value of the transportation equipment at the current point according to the ordinate deviation value of the transportation equipment at the starting point, the driving direction deviation angle, the left wheel speed and the right wheel speed within the set time length and the set time length.
Optionally, the step of determining the driving direction change angle of the transportation device within the set time period includes:
determining the angular speed of the transportation equipment in the set time length as the quotient of the difference between the right wheel speed and the left wheel speed of the transportation equipment and the wheel spacing;
and determining the driving direction change angle of the transportation equipment in the set time length as the product of the angular speed and the set time length.
Optionally, the abscissa offset value of the transportation device at the current point is determined according to the following expression:
determining an ordinate offset value for the transport device at the current point according to the following expression:
wherein xA and yA are respectively an abscissa offset value and an ordinate offset value of the transport equipment at a starting point, xB and yB are respectively an abscissa offset value and an ordinate offset value of the transport equipment at a current point, t is a set time length,θthe driving direction change angle of the transportation equipment in the set time length is shown as v, the driving speed of the transportation equipment is shown as v, and the driving direction deviation angle of the transportation equipment at the starting point is shown as theta.
Optionally, after the step S2 is executed, the step S1 is executed to determine a coordinate offset value of the current point each time the step S2 is executed, wherein when the step S1 is executed next time, if the starting point is not a transportation device code scanning point, the starting point is the current point at the last time the step S2 is executed.
Optionally, step S2 further includes:
and after the coordinate deviation value of the transport equipment at the current point is determined, correcting the current left wheel speed and the current right wheel speed of the transport equipment according to the coordinate deviation value.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is also provided a running deviation determination apparatus including:
an obtaining module, configured to perform step S1, when the transportation device travels to a current point after a set time period from a starting point, obtaining a coordinate offset value of the transportation device at the starting point, a travel direction offset angle, and a left wheel speed and a right wheel speed within the set time period, where the coordinate offset value is an offset of an actual coordinate value of the transportation device with respect to a predetermined coordinate value in a preset coordinate system, and the travel direction offset angle is an offset angle of the actual travel direction of the transportation device with respect to a predetermined travel direction in the preset coordinate system;
and a determining module for executing step S2 to determine the coordinate offset value of the transportation device at the current point according to the coordinate offset value of the transportation device at the starting point, the driving direction offset angle, the left and right wheel speeds within the set time period, and the set time period.
Optionally, the determining module is further configured to determine a driving direction change angle of the transportation device within the set time period according to the set time period and the left wheel speed and the right wheel speed of the transportation device within the set time period, where the driving direction change angle within the set time period is a change angle of an actual driving direction of the transportation device at a current point relative to an actual driving direction at a starting point in the preset coordinate system;
determining the abscissa deviation value of the transport equipment at the current point according to the abscissa deviation value of the transport equipment at the starting point, the driving direction deviation angle, the driving direction change angle in the set time length and the set time length;
and determining the ordinate deviation value of the transportation equipment at the current point according to the ordinate deviation value of the transportation equipment at the starting point, the driving direction deviation angle, the left wheel speed and the right wheel speed within the set time length and the set time length.
Optionally, the determining module is further configured to determine that the angular speed of the transportation device within the set time period is a quotient of a difference between a right wheel speed and a left wheel speed of the transportation device and a wheel spacing;
and determining the driving direction change angle of the transportation equipment in the set time length as the product of the angular speed and the set time length.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is also provided an electronic device for determining a driving deviation, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining a driving deviation provided by the present invention.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is also provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements the method for determining a running deviation provided by the present invention.
According to the method and the device for determining the running deviation, after the transportation equipment runs from the starting point to the current point, the coordinate deviation value of the transportation equipment at the current point is determined according to the coordinate deviation value of the transportation equipment at the starting point, the running direction deviation angle, the left wheel speed, the right wheel speed and the set time length, and the running deviation of the transportation equipment is calculated. By repeatedly executing the method, the current AGV running deviation can be calculated when the AGV misses the code, so that the AGV plans navigation according to the calculated running, and the deviation of the AGV from the preset track can be reduced as much as possible.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The embodiment of the invention provides a method for determining a driving deviation, which can be applied to an automatic warehouse of Automatic Guided Vehicle (AGV) and is used for determining the driving deviation of the AGV under two-dimensional code navigation.
In the invention, a coordinate system is preset for the transport equipment, and the invention determines the coordinate offset value of the transport equipment (such as AGV), wherein the coordinate offset value is the offset of the actual coordinate value of the transport equipment relative to the preset coordinate value in the preset coordinate system, and the preset coordinate value is the coordinate which is preset to be reached by the transport equipment under the condition of no deviation.
In the present invention, a driving direction offset angle of the transportation device is also defined, and the driving direction offset angle is an offset angle of an actual driving direction of the transportation device relative to a preset driving direction in the preset coordinate system. The predetermined direction of travel is the direction in which the transport apparatus is intended to travel in the absence of a deviation.
As shown in fig. 1, the determination method of the running deviation includes step S1 and step S2. In step S1, when the transportation device travels from the starting point to the current point after a set period of time, the coordinate offset value of the transportation device at the starting point, the travel direction offset angle, and the left and right wheel speeds within the set period of time are obtained. The left wheel speed and the right wheel speed of the transportation equipment can be obtained by acquiring the real-time speed of a left wheel train motor and the real-time speed of a right wheel train motor of the transportation equipment in real time, and the acquisition mode of the coordinate offset value of the transportation equipment at the starting point and the driving direction offset angle is explained in the subsequent embodiment section of the invention.
And step S2, determining the coordinate deviation value of the transportation equipment at the current point according to the coordinate deviation value of the transportation equipment at the starting point, the driving direction deviation angle, the left wheel speed and the right wheel speed within the set time length and the set time length.
After determining the coordinate offset value of the transportation device at the current point, the current left and right wheel speeds of the transportation device can be corrected according to the coordinate offset value, so that the transportation device is prevented from deviating from the preset track as much as possible. Or reporting an exception to the system if the coordinate deviation value of the current point is greater than a set threshold value.
In one embodiment of the present invention, as shown in fig. 2, after the step S2 is executed, step S1 is executed to determine the coordinate offset value of the current point each time step S2 is executed, wherein when the step S1 is executed the next time, if the starting point is not the transportation device code scanning point, the starting point is the current point at the last time step S2 is executed.
That is, in the present embodiment, when the AGV passes through the scanning point, the starting point in step S1 is the scanning point, the scanning point can be deployed with the navigation two-dimensional code, when the AGV passes through a certain code, the scanning camera reads the information of the code to know the position, and at the same time, the left-right (horizontal) and front-back (vertical) deviations between the camera and the code point can be determined, and the coordinate deviation value and the driving direction deviation angle of the AGV at the starting point can be determined.
Then, step S2 is executed to determine the AGV coordinate offset value of the corresponding current point when the scanning point is used as the starting point. Then, step S1 is executed again, this time step S1 is executed, the starting point of which is the current point of the last execution of step S2, i.e., step S1 is executed with the current point as the starting point.
In one embodiment of the present invention, the set time duration of each execution of step S1 may be unified into a set period, and the coordinate offset value of the current point of the period may be calculated for each period.
By the method, the abnormal deviation of the vehicle body can be effectively reduced under the condition that the AGV loses the scanning codes, and the code losing abnormity does not need to be reported. And calculating the traveling distance of the AGV according to the wheel train encoder value, when the distance is larger than the set code distance, considering that the AGV misses the scanning code, controlling the residual path of the AGV to reduce the corresponding path and start to decelerate, wherein the start of deceleration of the AGV is a safety problem when the AGV deviates from the preset path. And determining the coordinate offset value in real time according to the method of the invention to correct the running of the AGV after losing the code.
In an embodiment of the present invention, as shown in fig. 3, the step of determining the coordinate offset value of the transportation device at the current point in step S2 may specifically be:
firstly, determining a driving direction change angle of the transportation equipment in the set time length according to the set time length and the left wheel speed and the right wheel speed of the transportation equipment in the set time length, wherein the driving direction change angle in the set time length is a change angle of an actual driving direction of the transportation equipment at a current point relative to an actual driving direction at a starting point in the preset coordinate system.
As shown in fig. 4, in the preset coordinate system, during the traveling of the transportation device from the starting point a to the current point B, due to the navigation route setting or the existence of the route correction setting, the transportation device may travel in an angular velocity curve for a set time period t, that is, the left wheel speed Vl and the right wheel speed Vr of the transportation device are not consistent.
In one embodiment, the step of determining the driving direction change angle of the transportation device within the set time period is specifically: and determining the angular speed of the transportation equipment in the set time length as the quotient of the difference of the right wheel speed and the left wheel speed of the transportation equipment and the wheel spacing. And determining the driving direction change angle of the transportation equipment in the set time length as the product of the angular speed and the set time length.
Namely, the driving direction change angle of the transportation equipment in the set time length is determined by the following expressionθ:
θ=t*(Vr-Vl)/C;
Wherein Vr is the right wheel speed of the transportation equipment, Vl is the left wheel speed of the transportation equipment, C is the wheel spacing, namely the diameter distance between the left wheel and the right wheel of the transportation equipment, and t is the set duration.
And then determining the abscissa offset value of the transport equipment at the current point according to the abscissa offset value of the transport equipment at the starting point, the driving direction offset angle, the driving direction change angle in the set time length and the set time length.
And determining the ordinate deviation value of the transportation equipment at the current point according to the ordinate deviation value of the transportation equipment at the starting point, the driving direction deviation angle, the left wheel speed and the right wheel speed within the set time length and the set time length.
In one embodiment, the transport apparatus abscissa offset value at the current point is determined according to the following expression:
determining an ordinate offset value for the transport device at the current point according to the following expression:
the above expression is developed by using the approximate integral of the Runge Kutta method to calculate the coordinate offset value. Wherein xA and yA are respectively an abscissa offset value and an ordinate offset value of the transport equipment at a starting point, xB and yB are respectively an abscissa offset value and an ordinate offset value of the transport equipment at a current point, t is a set time length,θthe driving direction change angle of the transportation equipment in the set time length is shown as v, the driving speed of the transportation equipment is shown as v, and the driving direction deviation angle of the transportation equipment at the starting point is shown as theta.
An embodiment of the present invention further provides a device for determining a driving deviation, as shown in fig. 5, including: an acquisition module 501 and a determination module 502.
The obtaining module 501 is configured to execute step S1, where when the transportation device travels from the starting point to the current point after the set time period, a coordinate offset value of the transportation device at the starting point, a travel direction offset angle, and left and right wheel speeds within the set time period are obtained, where the coordinate offset value is an offset of an actual coordinate value of the transportation device with respect to a predetermined coordinate value in a preset coordinate system, and the travel direction offset angle is an offset of an actual travel direction of the transportation device with respect to a predetermined travel direction in the preset coordinate system.
The determining module 502 is configured to execute step S2, and determine the coordinate offset value of the transportation device at the current point according to the coordinate offset value of the transportation device at the starting point, the driving direction offset angle, the left and right wheel speeds within the set time period, and the set time period.
In the present invention, the determining module is further configured to determine a driving direction change angle of the transportation device within the set time period according to the set time period and the left wheel speed and the right wheel speed of the transportation device within the set time period, where the driving direction change angle within the set time period is a change angle of an actual driving direction of the transportation device at the current point relative to an actual driving direction at the starting point in the preset coordinate system.
And determining the abscissa deviation value of the transport equipment at the current point according to the abscissa deviation value of the transport equipment at the starting point, the driving direction deviation angle, the driving direction change angle in the set time length and the set time length.
And determining the ordinate deviation value of the transportation equipment at the current point according to the ordinate deviation value of the transportation equipment at the starting point, the driving direction deviation angle, the left wheel speed and the right wheel speed within the set time length and the set time length.
In the present invention, the determining module is further configured to determine the angular speed of the transportation device within the set time period as a quotient of a difference between a right wheel speed and a left wheel speed of the transportation device and a wheel spacing.
And determining the driving direction change angle of the transportation equipment in the set time length as the product of the angular speed and the set time length.
In the present invention, the determining module is further configured to determine an abscissa offset value of the transportation device at the current point according to the following expression:
determining an ordinate offset value for the transport device at the current point according to the following expression:
wherein xA and yA are respectively an abscissa offset value and an ordinate offset value of the transport equipment at a starting point, xB and yB are respectively an abscissa offset value and an ordinate offset value of the transport equipment at a current point, t is a set time length,θthe driving direction change angle of the transportation equipment in the set time length is shown as v, the driving speed of the transportation equipment is shown as v, and the driving direction deviation angle of the transportation equipment at the starting point is shown as theta.
In the present invention, after the determining module performs step S2, the obtaining module performs step S1 to determine the coordinate offset value of the current point each time the determining module performs step S2, wherein when the obtaining module performs step S1 the next time, if the starting point is not the transportation device code scanning point, the starting point is the current point when the determining module performs step S2 last time.
In the present invention, the determining module is further configured to, after determining the coordinate offset value of the transportation device at the current point, correct the current left and right wheel speeds of the transportation device according to the coordinate offset value.
According to the method and the device for determining the running deviation, after the transportation equipment runs from the starting point to the current point, the coordinate deviation value of the transportation equipment at the current point is determined according to the coordinate deviation value of the transportation equipment at the starting point, the running direction deviation angle, the left wheel speed, the right wheel speed and the set time length, and the running deviation of the transportation equipment is calculated. By repeatedly executing the method, the current AGV running deviation can be calculated when the AGV misses the code, so that the AGV plans navigation according to the calculated running, and the deviation of the AGV from the preset track can be reduced as much as possible.
Fig. 6 shows an exemplary system architecture 600 to which the method or device for determining a driving deviation according to an embodiment of the invention can be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various communication client applications can be installed on the terminal devices 601, 602, 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to AGVs, smartphones, tablets, laptop and desktop computers, and the like.
The server 605 may be a server that provides various services.
The method for determining the driving deviation according to the embodiment of the present invention may be executed by the server 605 or the AGV, and accordingly, the device for determining the driving deviation may be provided in the server 605 or the AGV.
It should be understood that the number of terminal devices, networks, and servers in fig. 60 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module and a determination module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
step S1, when the transportation equipment runs to the current point after the set time length from the starting point, obtaining the coordinate deviant, the running direction deviant angle and the left wheel speed and the right wheel speed of the transportation equipment in the set time length, wherein the coordinate deviant is the deviant of the actual coordinate value of the transportation equipment relative to the preset coordinate value in the preset coordinate system, and the running direction deviant angle is the deviant angle of the actual running direction of the transportation equipment relative to the preset running direction in the preset coordinate system;
and step S2, determining the coordinate deviation value of the transportation equipment at the current point according to the coordinate deviation value of the transportation equipment at the starting point, the driving direction deviation angle, the left wheel speed and the right wheel speed within the set time length and the set time length.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.