Trolley linear driving control method and system
The perceived image of the car's forward direction is obtained through bilateral visual methods, and pixel-level deviation is calculated and corrected, which solves the yaw problem of traditional car's linear control in complex environments, and achieves high-precision and low-cost linear driving control.
Patent Information
- Application Number
- CN202411128863.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-16
AI Technical Summary
Traditional linear control methods for trolleys are difficult to maintain linear operation in complex environments, especially on uneven or sloped roads. The encoder measurement error causes yaw, the RTK signal is easily disturbed, and the SLAM algorithm is complex in calculations and high in cost, making it difficult to apply to low-cost Cost unmanned small car.
The bilateral visual method is used to obtain the perceived images of the left and right ends of the car's forward direction, calculate the coordinates of the left and right straight lines, and through pixel-level deviation calculation and pixel position ring PID control, real-time correction of the small car's displacement deviation, reducing dependence on external equipment and high-precision positioning Signal.
It improves the navigation accuracy and robustness of the car in complex environments, reduces yaw phenomenon, reduces overall cost and computing power requirements, and realizes linear driving control with pixel-level positioning accuracy.
Smart Images

Figure CN119065368A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of trolley linear motion control, and in particular to a trolley linear motion control method and system. Background Art
[0002] In order to meet the needs of autonomous operations, autonomous unmanned vehicles have strict driving requirements during the driving process. In indoor environments with grid lines and slope scenes, unmanned vehicles are easily disturbed by environmental factors and may have yaw problems.
[0003] During the working process, in order to strictly control the car to move forward in a straight line, the traditional technical means are to use encoder linear control, high-precision RTK for linear control or SLAM technology for linear control; use encoder to measure the wheel speed of the car, and compare the speed feedback signal with the expected speed through the controller, and control the wheel speed of the car to tend to the expected speed, so that the car can move forward in a straight line; use high-precision RTK receiver to receive satellite signals from multiple base stations, and then the receiver eliminates the error of the satellite signal through differential positioning technology to obtain high-precision position information, so that the car can travel along the predetermined route; use SLAM technology to obtain information about the surrounding environment; then the algorithm processes the sensor data and extracts environmental features; secondly, the algorithm estimates the current position and posture of the car based on environmental features; finally, the algorithm combines the position and posture information of the car with environmental features to construct a surrounding environment map to control the car to move forward in a straight line. However, when using the encoder for linear control, there is a deviation between the speed measured by the encoder and the actual speed, which will cause the control system to issue an erroneous command and cause the car to deviate from the straight line. On the other hand, it is difficult to cope with complex road conditions: on uneven or sloping roads, it is difficult for the encoder to accurately measure the wheel speed, resulting in a decrease in control accuracy; the cost of using RTK receivers and base stations is high, which increases the overall cost of the unmanned vehicle and is easily affected by the environment: in a strong interference environment, the RTK signal is easily interfered with, resulting in a decrease in positioning accuracy; the use of SLAM algorithms involves a lot of calculations and requires high computing power, making it difficult to apply to low-cost unmanned vehicles, and it is dependent on the environment: in environments with insufficient light or many obstructions, the positioning accuracy and robustness of SLAM technology will be affected; therefore, traditional technical means are difficult to overcome the problem of yaw in complex operating scenarios. Summary of the invention
[0004] In order to solve the above problems, the present invention proposes a method and system for controlling the straight-line travel of a trolley, which can realize real-time correction of the displacement deviation of the trolley in a complex environment, so as to keep the trolley running in a straight line and reduce the yaw phenomenon.
[0005] To achieve the above object, an embodiment of the present invention provides a method for controlling a vehicle to travel in a straight line, comprising:
[0006] Get the perception images of the left and right ends of the car's forward direction;
[0007] Based on the images sensed at the left and right ends of the car's forward direction, the coordinates of the left and right straight line endpoints are obtained;
[0008] Calculate the deviation pixel value based on the left straight line endpoint coordinates and the right straight line endpoint coordinates;
[0009] When the displacement deviation value does not meet the preset deviation requirement, the deviation pixel value is corrected by a preset pixel control algorithm to obtain deviation correction data;
[0010] Based on the deviation correction data, the driving posture of the car is controlled in real time.
[0011] The embodiment of the present invention proposes a method for controlling the straight-line driving of a trolley. By acquiring the perception images at the left and right ends of the trolley's forward direction, the environmental information at the left and right ends of the trolley can be acquired without relying on external devices, thereby reducing the error rate of data processing and improving the accuracy of subsequent deviation correction. Then, by acquiring the straight-line coordinates at the left and right ends of the trolley's forward direction for subsequent deviation calculation, the intervention of additional sensors or positioning devices is reduced, and the hidden danger of errors in data calculation caused by multiple external devices collecting multiple data is prevented, thereby improving the accuracy of the data that ultimately controls the straight-line driving of the trolley and reducing the yaw phenomenon. At the same time, by calculating the displacement deviation through the left and right straight-line coordinates, the environmental information can be completely acquired by itself for calculation without relying on external positioning information, further reducing data redundancy and data blockage that cause inaccurate data processing and the problem of affecting navigation accuracy. By acquiring pixel deviation for deviation correction and trolley attitude control, the positioning accuracy reaches the pixel level, further improving the navigation correction accuracy and reducing the occurrence of yaw. Therefore, the method for navigating through left and right bilateral visual processing images completely acquires environmental information by itself, and greatly improves the navigation accuracy through pixel-level deviation processing, thereby reducing the occurrence of yaw.
[0012] Furthermore, based on the images sensed at the left and right ends of the vehicle's forward direction, the coordinates of the left and right straight line endpoints are obtained, specifically:
[0013] Based on the images sensed at the left and right ends of the vehicle's forward direction, obtain the left straight line and the right straight line that meet the preset requirements;
[0014] Based on the left straight line and the right straight line that meet the preset requirements, obtaining the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates;
[0015] Based on the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates, the left straight line endpoint coordinates and the right straight line endpoint coordinates are obtained in real time by updating the perception images at the left and right ends of the car's forward direction in real time.
[0016] A method for controlling the straight-line driving of a vehicle proposed in an embodiment of the present invention obtains environmental information on the left and right ends of the vehicle's forward direction, obtains a left straight line and a right straight line that meet preset requirements, and then obtains the left and right end points of the vehicle's forward direction. The endpoints can be obtained only by itself without relying on external equipment, thereby reducing the error rate of data processing and improving the accuracy of subsequent deviation correction.
[0017] Furthermore, based on the images sensed at the left and right ends of the vehicle's forward direction, the left straight line and the right straight line that meet the preset requirements are obtained, specifically:
[0018] A first image is obtained by extracting the region of interest from the images sensed at the left and right ends of the vehicle's forward direction;
[0019] Obtaining a second image by sequentially performing grayscale conversion and histogram equalization on the first image;
[0020] Based on a preset color range threshold, a third image is obtained by performing color extraction on the second image; wherein the extracted colors are white, silver and gray;
[0021] Obtaining a fourth image by performing edge detection and binarization processing on the third image;
[0022] A fifth image is obtained by performing a morphological dilation operation, a morphological erosion operation, and a morphological closing operation on the fourth image;
[0023] Based on a preset distance resolution, a preset angle resolution, a preset accumulator threshold, a preset minimum straight line length and a preset straight line slope, the fifth image is calculated by progressive probabilistic Hough transform to obtain a left straight line and a right straight line that meet preset requirements.
[0024] A method for controlling the straight-line driving of a vehicle proposed in an embodiment of the present invention further ensures that the environmental information obtained is closer to the real value and more accurate through multiple processing of images, so that the yaw correction effect is more ideal. At the same time, a simpler algorithm than the prior art is adopted to reduce the complexity of the overall calculation and the error rate, so that the accuracy of coordinate acquisition, deviation calculation and deviation correction is improved.
[0025] Furthermore, based on the left straight line endpoint coordinates and the right straight line endpoint coordinates, the deviation pixel value is calculated, specifically:
[0026] The left displacement deviation is obtained by subtracting the first endpoint coordinate of the left straight line endpoint coordinates from the fourth endpoint coordinate of the right straight line endpoint coordinates;
[0027] The right displacement deviation is obtained by subtracting the second endpoint coordinate of the left straight line endpoint coordinate from the third endpoint coordinate of the right straight line endpoint coordinate;
[0028] Based on the left displacement deviation and the right displacement deviation, a deviation pixel value is obtained.
[0029] A method for controlling the straight-line driving of a vehicle proposed in an embodiment of the present invention calculates deviation values by obtaining straight-line segment points. This method has low requirements on computing power and low computational complexity, so that the application scope of the method can be expanded to more complex environments for operation control, and can ensure better computing effects and better adaptability.
[0030] Further, based on the left displacement deviation and the right displacement deviation, a deviation pixel value is obtained, specifically:
[0031] The deviation sum is obtained by summing the absolute value of the left displacement deviation and the absolute value of the right displacement deviation;
[0032] By obtaining half the value of the deviation sum, the deviation pixel value is obtained.
[0033] Furthermore, when the displacement deviation value does not meet the preset deviation requirement, the deviation pixel value is corrected by a preset pixel control algorithm to obtain deviation correction data, specifically:
[0034] When the displacement deviation value does not meet the preset deviation requirement, obtaining the current offset state of the vehicle;
[0035] Based on the current offset state of the car, the expected thrust and steering amount of the car are calculated through the pixel position loop PID control algorithm to obtain the deviation correction data.
[0036] A method for controlling the straight-line driving of a small vehicle proposed in an embodiment of the present invention uses the deviation pixel value as input and performs calculation through a pixel position loop PID control algorithm, thereby realizing pixel-based position closed-loop PID control with an accuracy of up to pixel level, effectively reducing interference from complex environments and reducing the probability of yaw events.
[0037] Further, based on the deviation correction data, the deviation pixel value is corrected until the deviation pixel value meets the preset deviation requirement, thereby obtaining a corrected deviation pixel value;
[0038] Based on the corrected deviation pixel value, the car is controlled to travel in a straight line.
[0039] The embodiment of the present invention also provides a trolley straight-line driving control system, comprising: a coordinate acquisition module, a displacement deviation calculation module, a deviation pixel acquisition module, a displacement deviation correction module and a trolley control module;
[0040] The coordinate acquisition module is used to acquire the coordinates of the left straight line endpoint and the right straight line endpoint based on the images sensed at the left and right ends of the vehicle;
[0041] The displacement deviation calculation module is used to calculate and update the displacement deviation in real time based on the left straight line endpoint coordinates and the right straight line endpoint coordinates to obtain the displacement deviation value;
[0042] The deviation pixel acquisition module is used for updating the deviation pixel value to the displacement deviation value when the displacement deviation value does not meet the preset deviation requirement;
[0043] The displacement deviation correction module is used to correct the deviation pixel value based on the deviation pixel value by a preset pixel control algorithm to obtain deviation correction data;
[0044] The car control module is used to control the driving posture of the car in real time based on the deviation correction data.
[0045] The embodiment of the present invention proposes a control system for straight-line driving of a trolley, which adopts a coordinate acquisition module to acquire the coordinates of the left and right straight lines through the perception images at the two ends of the trolley for subsequent deviation calculation, thereby reducing the intervention of additional sensors or positioning devices, preventing multiple external devices from collecting multiple data and the risk of errors in data calculation, thereby improving the accuracy of the data that ultimately controls the straight-line driving of the trolley and reducing the yaw phenomenon; at the same time, a displacement deviation calculation module is adopted to calculate the displacement deviation through the left and right straight line coordinates, which can completely rely on itself to obtain environmental information for calculation without relying on external positioning information, further reducing data redundancy and data blockage that cause inaccurate data processing and the problem of affecting navigation accuracy; finally, a deviation pixel acquisition module, a displacement deviation correction module and a trolley control module are adopted to obtain pixel deviations for deviation correction and trolley attitude control, so that the positioning accuracy reaches the pixel level, further improving the navigation correction accuracy and reducing the occurrence of yaw; therefore, the method for navigating through left and right bilateral visual processing images completely obtains environmental information by itself, and greatly improves the navigation accuracy through pixel-level deviation processing, thereby reducing the occurrence of yaw.
[0046] Furthermore, the coordinate acquisition module is used to acquire the coordinates of the left straight line endpoint and the right straight line endpoint based on the images sensed at the left and right ends of the vehicle's forward direction, and also includes:
[0047] Straight line acquisition unit, endpoint coordinate acquisition unit and coordinate real-time update unit;
[0048] The straight line acquisition unit is used to acquire a left straight line and a right straight line that meet preset requirements based on the images sensed at the left and right ends of the vehicle's forward direction;
[0049] The endpoint coordinate acquisition unit is used to acquire the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates based on the left straight line and the right straight line that meet the preset requirements;
[0050] The coordinate real-time updating unit is used to obtain the left straight line endpoint coordinates and the right straight line endpoint coordinates in real time by updating the perception images at the left and right ends of the vehicle's forward direction based on the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates.
[0051] Furthermore, the deviation pixel calculation module is used to calculate the deviation pixel value based on the left straight line endpoint coordinates and the right straight line endpoint coordinates, and also includes:
[0052] A left displacement deviation calculation unit, a right displacement deviation calculation unit and a deviation pixel acquisition unit;
[0053] The left displacement deviation calculation unit is used to obtain the left displacement deviation by subtracting the first endpoint coordinate of the left straight line endpoint coordinates from the fourth endpoint coordinate of the right straight line endpoint coordinates;
[0054] The right displacement deviation calculation unit is used to obtain the right displacement deviation by subtracting the second endpoint coordinate of the left straight line endpoint coordinate from the third endpoint coordinate of the right straight line endpoint coordinate;
[0055] The deviation pixel acquisition unit is used to obtain a deviation pixel value based on the left displacement deviation and the right displacement deviation. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 A schematic flow chart of the steps of a method for controlling the straight-line travel of a vehicle provided by a certain embodiment of the present invention;
[0057] Figure 2 A schematic diagram of the initial position of a trolley in a method for controlling the straight-line travel of a trolley provided by a certain embodiment of the present invention;
[0058] Figure 3 A schematic diagram of a trolley left deviation in a trolley straight-line driving control method provided by a certain embodiment of the present invention;
[0059] Figure 4 A schematic diagram of a vehicle right deviation in a method for controlling a vehicle to travel in a straight line provided by a certain embodiment of the present invention;
[0060] Figure 5 A schematic diagram of an image processing flow of a method for controlling a vehicle to travel in a straight line provided by an embodiment of the present invention;
[0061] Figure 6 A schematic diagram of the module structure of a vehicle straight-line driving control system provided by a certain embodiment of the present invention;
[0062] Figure 7 A schematic diagram of the structure of a coordinate acquisition module of a vehicle straight-line driving control system provided by an embodiment of the present invention;
[0063] Figure 8A schematic diagram of the structure of a deviation pixel calculation module of a vehicle straight-line driving control system provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] Existing autonomous mobile unmanned vehicles usually have the following three methods to strictly control the vehicle to move forward in a straight line during operation to complete the task requirements of autonomous operation.
[0066] One is encoder-based linear control: This method uses an encoder to measure the wheel speed of the car, and compares the speed feedback signal with the desired speed through a controller. If there is a deviation between the actual speed and the desired speed, the controller will issue a command to adjust the motor power so that the wheel speed of the car tends to the desired speed, so that the car moves in a straight line. However, encoder-based control is sensitive to wheel slippage on the one hand: when the car wheel slips, there is a deviation between the speed measured by the encoder and the actual speed, which will cause the control system to issue an erroneous command and cause the car to deviate from the straight line. On the other hand, it is difficult to cope with complex road conditions: on uneven or sloping roads, it is difficult for the encoder to accurately measure the wheel speed, resulting in reduced control accuracy.
[0067] The second is to perform linear control based on high-precision RTK: that is, real-time dynamic carrier positioning, which is a high-precision positioning technology that can provide centimeter-level positioning accuracy. In the straight-forward control of unmanned vehicles, the RTK solution can be used to improve the positioning accuracy of the vehicle, thereby achieving more accurate straight-line driving. The principle is: install an RTK receiver on the vehicle to receive satellite signals from multiple base stations; then the receiver eliminates the error of the satellite signal through differential positioning technology to obtain high-precision position information; finally, the control system calculates the driving direction and deviation of the vehicle based on the position information, and issues instructions to adjust the motor power so that the vehicle can travel along the predetermined route. However, the RTK solution is based on the high cost: the cost of RTK receivers and base stations is high, which increases the overall cost of the unmanned vehicle; second, it is affected by the environment: in a strong interference environment, the RTK signal is easily interfered with, resulting in a decrease in positioning accuracy.
[0068] The third is the linear control of SLAM technology: SLAM (Simultaneous Localization and Mapping), that is, simultaneous positioning and map construction, is a technology that can simultaneously estimate the position of the unmanned vehicle and build a map of the surrounding environment. In the straight-line control of the unmanned vehicle, SLAM technology can be used to improve the positioning accuracy and robustness of the vehicle, thereby achieving more reliable straight-line driving. The principle of the technology is: first, sensors such as cameras and laser radars are installed on the vehicle to obtain information about the surrounding environment; then the algorithm processes the sensor data and extracts environmental features; secondly, the algorithm estimates the current position and posture of the vehicle based on environmental features; finally, the algorithm combines the position and posture information of the vehicle with environmental features to build a map of the surrounding environment to control the vehicle to move in a straight line. However, based on SLAM technology, one is the high algorithm complexity: the SLAM algorithm involves a lot of calculations, which requires high computing power and is difficult to apply to low-cost unmanned vehicles; second, it is environmentally dependent: in environments with insufficient light and many obstructions, the positioning accuracy and robustness of SLAM technology will be affected.
[0069] Therefore, in order to solve the drawbacks of traditional means, an embodiment of the present invention proposes a method for controlling the straight-line driving of a vehicle. In this embodiment, a method for controlling the straight-line driving of a vehicle based on bilateral vision is explained, wherein the bilateral vision is respectively placed on the left and right sides of the forward direction of the autonomous mobile unmanned vehicle, and is used to perceive the left first near straight line and the right first near straight line in the environmental information on the left and right sides of the forward direction of the autonomous mobile unmanned vehicle. The left and right ends described in this embodiment are both the left and right ends of the forward direction of the vehicle. In addition, the left first near straight line and the right first near straight line are both represented as the left straight line and the right straight line that meet the preset requirements. The preset requirements include: preset distance resolution, preset angle resolution, preset accumulator threshold, preset straight line minimum length, and preset straight line slope, which will not be repeated below.
[0070] Example 1
[0071] See also Figure 1 , Figure 1 The following is a schematic flow chart of a method for controlling a vehicle to travel in a straight line according to an embodiment of the present invention. Figure 1 As shown, the embodiment of the present invention provides a method for controlling a vehicle to travel in a straight line, including steps 101 to 105, each of which is specifically as follows:
[0072] Step 101, obtaining the perception images of the left and right ends of the vehicle's forward direction;
[0073] As an implementation method of this embodiment, Figure 2As shown, images can be collected by setting perception cameras or visual sensors on the left and right sides of the forward direction of the autonomous mobile unmanned vehicle. Many existing conventional settings and devices that can achieve image acquisition can be used as an example of an embodiment of the present invention.
[0074] Step 102, based on the images sensed at the left and right ends of the vehicle's forward direction, obtain the coordinates of the left straight line endpoint and the right straight line endpoint;
[0075] As an example of this embodiment, based on the images sensed at the left and right ends of the vehicle's forward direction, the left and right straight lines that meet the preset requirements are obtained; based on the left and right straight lines that meet the preset requirements, the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates are obtained; based on the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates, the left and right straight line endpoint coordinates are obtained in real time by updating the images sensed at the left and right ends of the vehicle's forward direction in real time. For a specific possible implementation method, see Figure 2 , Figure 2 A schematic diagram of the initial position of a vehicle in a method for controlling the straight-line driving of a vehicle provided by a certain embodiment of the present invention; when the autonomous unmanned vehicle starts, the left vision and the right vision begin to perceive the first left near straight line and the first right near straight line in the environmental information on both sides, so as to determine and record the initial position of the autonomous unmanned vehicle. The coordinates of the endpoint of the first left near straight line in the image are: the first endpoint (X 1 L(0) , Y 1 L(0) ) and the second endpoint (X 2 L(0) , Y 2 L(0) ); the coordinates of the endpoints of the first right approximate straight line in the image are: the third endpoint (X 1 R(0) , Y 1 R(0) ) and the fourth endpoint (X 2 R(0) , Y 2 R(0) ). According to actual operation experience, if the autonomous mobile unmanned vehicle keeps moving in a straight line, then at any time, the X-direction (indicating row) coordinates of the endpoint pixel coordinates of the left first proximal straight line and the right first proximal straight line in the image will remain within a certain pixel range, while the Y-direction (indicating column) coordinates will not change at any time. Therefore, in the embodiment of the present invention, only the deviation in the X-direction is considered.
[0076] As another example of this embodiment, a first image is obtained by extracting regions of interest from the images sensed at the left and right ends of the vehicle's forward direction; a second image is obtained by graying and histogram equalizing the first image in sequence; a third image is obtained by color extraction from the second image based on a preset color range threshold; wherein the extracted colors are white, silver and gray; a fourth image is obtained by edge detection and binarization of the third image; a fifth image is obtained by performing morphological dilation, morphological erosion and morphological closing operations on the fourth image; based on a preset distance resolution, a preset angle resolution, a preset accumulator threshold, a preset minimum straight line length and a preset straight line slope, the fifth image is calculated by a progressive probabilistic Hough transform to obtain a left straight line and a right straight line that meet preset requirements. For a specific possible implementation method, see. Figure 5 , Figure 5 A schematic diagram of an image processing flow of a method for controlling a vehicle to travel in a straight line provided by a certain embodiment of the present invention; Figure 5As shown in the figure, first, the region of interest is extracted from the original RGB images perceived by the left and right cameras to obtain roi_img (equivalent to the first image): the 1080p image is cropped into a pixel size of 640×480 to reduce the calculation amount of the subsequent algorithm and improve the algorithm processing speed and accuracy; the second step is to grayscale the roi_img image, convert it from the RGB color space to the grayscale space, and then perform histogram equalization to obtain the equalizeHist_img image (equivalent to the second image). By stretching the grayscale distribution of the image to the entire possible range, the contrast of the image is significantly enhanced, making the details of the dark and bright areas clearer and able to adapt to different lighting environments; the third step is to convert the color space of the equalizeHist_img image into the HSV color space and perform color extraction, select white, silver, and gray, and set a suitable threshold to select the color range of the left first near straight line and the right first near straight line. Then convert the image to grayscale color space to obtain gray_img (equivalent to the third image); in the fourth step, perform sobel edge detection on gray_img, and then use adaptive threshold to binarize the image to obtain binary_img (equivalent to the fourth image); in the fifth step, perform morphological dilation, morphological erosion and morphological closing operations on the binary_img image in sequence to enhance the features of the first left and right proximal straight lines in the image and suppress the interference of small spots, and then convert the processed image into an unsigned integer image to obtain edge_img (equivalent to the fifth image); in the sixth step, use progressive probabilistic Hough transform on the edge_img image to calculate the endpoint pixel coordinates of the first left proximal straight line and the endpoint pixel coordinates of the first right proximal straight line. Among them, when calculating the pixel coordinates of the endpoints, a suitable distance resolution is set, the unit is pixel; a suitable angle resolution is set, the unit is angle; a suitable accumulator threshold is set, that is, when the cumulative number of times each square is passed through after discretization in the parameter space is greater than the threshold, it is recognized as a straight line, otherwise it is not recognized as a straight line; the minimum length of the straight line is set; the maximum distance parameter between two adjacent points on the same straight line; the slope of the straight line are five parameters, which can ensure that the autonomous mobile car can stably detect the left first near straight line and the right first near straight line at any time during the straight line process. The seventh step is to compare the pixel coordinates of the left first near straight line and the right first near straight line detected at each moment with the initial position coordinates. When the pixel coordinate difference of the endpoint belongs to the θ field, the autonomous mobile unmanned car has not deviated, and the current state is maintained to continue to move forward; when the pixel coordinate difference of the endpoint does not belong to the θ field, the autonomous mobile unmanned car has deviated. According to the deviation of the pixel coordinates, the pixel position loop PID calculation output is used to adjust the driver to control the autonomous mobile unmanned car to quickly correct it so that the deviation is as close to zero as possible, and then keep moving in a straight line.
[0077] Step 103, calculating the deviation pixel value based on the left straight line endpoint coordinates and the right straight line endpoint coordinates;
[0078] As an example of this embodiment, the left displacement deviation is obtained by subtracting the first endpoint coordinate of the left straight line endpoint coordinates from the fourth endpoint coordinate of the right straight line endpoint coordinates; the right displacement deviation is obtained by subtracting the second endpoint coordinate of the left straight line endpoint coordinates from the third endpoint coordinate of the right straight line endpoint coordinates; and the deviation pixel value is obtained based on the left displacement deviation and the right displacement deviation. For a specific possible implementation method, see Figure 3 and Figure 4 , Figure 3 A schematic diagram of a trolley left deviation in a trolley straight-line driving control method provided by a certain embodiment of the present invention; Figure 4 A schematic diagram of a vehicle right deviation in a method for controlling vehicle straight-line driving provided by an embodiment of the present invention; when the autonomous unmanned vehicle is moving in a straight line at time t, the pixel endpoint coordinates of the left first near straight line in the image are (X 1 L(t) , Y 1 L(t) ) and (X 2 L(t) , Y 2 L(t) ); The pixel endpoint coordinates of the first right approximate straight line in the image are (X 1 R(t) , Y 1 R(t) ) and (X 2 R(t) , Y 2 R(t) ); the deviation value is calculated as follows:
[0079] Left displacement error: Lerror = X 1 L(0) -X 1 R(t)
[0080] Right displacement error: Rerror = X 2 L(0) -X 2 R(t)
[0081] As another example of this embodiment, the deviation sum is obtained by summing the absolute value of the left displacement deviation and the absolute value of the right displacement deviation; the deviation pixel value is obtained by obtaining the half value of the deviation sum. In a specific implementation method, when the deviation pixel value is (|Lerror|+|Rerror|) / 2∈θ, the autonomous mobile unmanned vehicle always keeps moving in a straight line: the left first near straight line and the right first near straight line perceived by the left vision and the right vision have the left and right end pixel coordinates in the two images maintained within a certain θ pixel range, where θ∈(-10, 10).
[0082] Step 104, when the displacement deviation value does not meet the preset deviation requirement, the deviation pixel value is corrected by a preset pixel control algorithm to obtain deviation correction data;
[0083] As an example of this embodiment, when the displacement deviation value does not meet the preset deviation requirement, the current car's offset state is obtained; based on the current car's offset state, the car's expected thrust and steering amount are calculated through the pixel position loop PID control algorithm to obtain deviation correction data. When Lerror<0, Rerror>0, the autonomous mobile unmanned vehicle deviates to the left, and the deviation value is: error=(|Lerror|+|Rerror|) / 2, the unit is pixel, such as Figure 3 As shown;
[0084] when When Lerror>0 and Rerror<0, the autonomous mobile unmanned vehicle deviates to the right, and the deviation value is: error=(|Lerror|+|Rerror|) / 2, the unit is pixel, such as Figure 4 As shown;
[0085] When the autonomous mobile unmanned vehicle deviates during the straight-line forward process, that is, when the error is not 0, the PID control algorithm of the pixel position loop is used to control the autonomous mobile unmanned vehicle to quickly correct and achieve straight-line forward control. That is, based on the deviation value obtained above, the pixel position loop PID control algorithm is used to calculate the desired thrust and steering amount of the vehicle to obtain the deviation correction data. The pixel position loop PID control algorithm is an existing mature technology and will not be explained in detail here.
[0086] Step 105: Based on the deviation correction data, the driving posture of the vehicle is controlled in real time.
[0087] As an example of this embodiment, based on the deviation correction data, the deviation pixel value is corrected until the deviation pixel value meets the preset deviation requirement to obtain a corrected deviation pixel value; based on the corrected deviation pixel value, the vehicle is controlled to move in a straight line. A specific explanation is that the environmental information perceived by the bilateral visual perception during the straight-line movement of the autonomous unmanned vehicle is processed and calculated to obtain the pixel-level lateral deviation of the autonomous unmanned vehicle in the straight-line movement, and then the lateral deviation is corrected to control the vehicle to move in a straight line.
[0088] The embodiment of the present invention proposes a method for controlling the straight-line driving of a vehicle. By acquiring the perception images at the left and right ends of the vehicle's forward direction, the environmental information at the left and right ends of the vehicle can be acquired without relying on external devices, thereby reducing the error rate of data processing and improving the accuracy of subsequent deviation correction. Then, by acquiring the straight-line coordinates at the left and right ends of the vehicle's forward direction for subsequent deviation calculation, the intervention of additional sensors or positioning devices is reduced, and the hidden danger of errors in data calculation caused by multiple external devices collecting multiple data is prevented, thereby improving the accuracy of the data that ultimately controls the straight-line driving of the vehicle and reducing the yaw phenomenon. At the same time, by calculating the displacement deviation through the left and right straight-line coordinates, the environmental information can be completely obtained by itself for calculation without relying on external positioning information, further reducing data redundancy and data blockage that cause inaccurate data processing and the problem of affecting navigation accuracy. By acquiring pixel deviation for deviation correction and vehicle posture control, the positioning accuracy reaches the pixel level, further improving the accuracy of navigation correction and reducing the occurrence of yaw. Therefore, the method for navigating through left and right bilateral visual processing images completely obtains environmental information by itself, and greatly improves navigation accuracy through pixel-level deviation processing. The accuracy is improved to reduce the occurrence of yaw. By obtaining the environmental information on the left and right ends of the car's forward direction, the left straight line and the right straight line that meet the preset requirements are obtained, and then the left and right end points of the car's forward direction are obtained. The end points can be obtained only by themselves, without relying on external equipment, reducing the error rate of data processing, and thus improving the accuracy of subsequent deviation correction. Through multiple processing of the image, it is further guaranteed that the environmental information obtained is closer to the real value and has higher accuracy, so that the effect of yaw correction is more ideal. At the same time, a simpler algorithm than the existing technology is adopted to reduce the complexity of the overall operation and the error rate, so that the accuracy of coordinate acquisition, deviation calculation and deviation correction is improved. By obtaining the straight line segment point to calculate the deviation value, the computing power requirement is not high and the computational complexity is low, so that the application scope of this method can be expanded to more complex environments for operation control, and better computing effects and better adaptability can be guaranteed. The deviation pixel value is used as input to calculate through the pixel position loop PID control algorithm, and the pixel-based position closed-loop PID control is realized, and the accuracy can reach the pixel level, which effectively reduces the interference of complex environments and reduces the probability of yaw events.
[0089] Example 2
[0090] See also Figure 6 , Figure 6 The following is a schematic diagram of the module structure of a vehicle straight-line driving control system provided by an embodiment of the present invention. Figure 6 As shown, the embodiment of the present invention provides a vehicle straight-line driving control system, comprising:
[0091] Image acquisition module 601, coordinate acquisition module 602, deviation pixel calculation module 603, displacement deviation correction module 604 and vehicle control module 605;
[0092] The image acquisition module 601 is used to acquire the perception images of the left and right ends of the vehicle's forward direction;
[0093] The coordinate acquisition module 602 is used to acquire the coordinates of the left straight line endpoint and the right straight line endpoint based on the images sensed at the left and right ends of the vehicle's forward direction;
[0094] As an example of this embodiment, see Figure 7 , Figure 7 A schematic diagram of the structure of a coordinate acquisition module of a vehicle straight-line driving control system provided by a certain embodiment of the present invention; Figure 7 As shown, the coordinate acquisition module 602 is used to acquire the coordinates of the left straight line endpoint and the right straight line endpoint based on the images sensed at the left and right ends of the vehicle's forward direction, and also includes:
[0095] A straight line acquisition unit 701, an endpoint coordinate acquisition unit 702 and a coordinate real-time updating unit 703;
[0096] The straight line acquisition unit 701 is used to acquire a left straight line and a right straight line that meet preset requirements based on the images sensed at the left and right ends of the vehicle's forward direction;
[0097] The endpoint coordinate acquisition unit 702 is used to acquire the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates based on the left straight line and the right straight line that meet the preset requirements;
[0098] The coordinate real-time updating unit 703 is used to obtain the left straight line endpoint coordinates and the right straight line endpoint coordinates in real time by updating the perception images at the left and right ends of the vehicle's forward direction based on the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates.
[0099] The deviation pixel calculation module 603 is used to calculate the deviation pixel value based on the left straight line endpoint coordinates and the right straight line endpoint coordinates;
[0100] As an example of this embodiment, see Figure 8 , Figure 8This is a schematic diagram of the structure of a deviation pixel calculation module of a vehicle straight-line driving control system provided by an embodiment of the present invention. Figure 8 As shown, the deviation pixel calculation module 603 is used to calculate the deviation pixel value based on the left straight line endpoint coordinates and the right straight line endpoint coordinates, and also includes:
[0101] A left displacement deviation calculation unit 801, a right displacement deviation calculation unit 802 and a deviation pixel acquisition unit 803;
[0102] The left displacement deviation calculation unit 801 is used to obtain the left displacement deviation by subtracting the first endpoint coordinate of the left straight line endpoint coordinates from the fourth endpoint coordinate of the right straight line endpoint coordinates;
[0103] The right displacement deviation calculation unit 802 is used to obtain the right displacement deviation by subtracting the second endpoint coordinate of the left straight line endpoint coordinate from the third endpoint coordinate of the right straight line endpoint coordinate;
[0104] The deviation pixel acquisition unit 803 is used to obtain a deviation pixel value based on the left displacement deviation and the right displacement deviation.
[0105] The displacement deviation correction module 604 is used to correct the deviation pixel value by a preset pixel control algorithm to obtain deviation correction data when the displacement deviation value does not meet the preset deviation requirement;
[0106] The car control module 605 is used to control the driving posture of the car in real time based on the deviation correction data.
[0107] The embodiment of the present invention proposes a control system for straight-line driving of a trolley, which adopts a coordinate acquisition module to acquire the coordinates of the left and right straight lines through the perception images at the two ends of the trolley for subsequent deviation calculation, thereby reducing the intervention of additional sensors or positioning devices, preventing multiple external devices from collecting multiple data and the risk of errors in data calculation, thereby improving the accuracy of the data that ultimately controls the straight-line driving of the trolley and reducing the yaw phenomenon; at the same time, a displacement deviation calculation module is adopted to calculate the displacement deviation through the left and right straight line coordinates, which can completely rely on itself to obtain environmental information for calculation without relying on external positioning information, further reducing data redundancy and data blockage that cause inaccurate data processing and the problem of affecting navigation accuracy; finally, a deviation pixel acquisition module, a displacement deviation correction module and a trolley control module are adopted to obtain pixel deviations for deviation correction and trolley attitude control, so that the positioning accuracy reaches the pixel level, further improving the navigation correction accuracy and reducing the occurrence of yaw; therefore, the method for navigating through left and right bilateral visual processing images completely obtains environmental information by itself, and greatly improves the navigation accuracy through pixel-level deviation processing, thereby reducing the occurrence of yaw.
[0108] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
[0109] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0110] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
Claims
1. A method for controlling a car to travel in a straight line. It is characterized in that include: Get the perception images of the left and right ends of the car's forward direction; Based on the images sensed at the left and right ends of the car's forward direction, the coordinates of the left and right straight line endpoints are obtained; Calculate the deviation pixel value based on the left straight line endpoint coordinates and the right straight line endpoint coordinates; When the displacement deviation value does not meet the preset deviation requirement, the deviation pixel value is corrected by a preset pixel control algorithm to obtain deviation correction data; Based on the deviation correction data, the driving posture of the car is controlled in real time.
2. A method for controlling a vehicle to travel in a straight line as claimed in claim 1, It is characterized in that The coordinates of the left and right straight line endpoints are obtained based on the images sensed at the left and right ends of the vehicle's forward direction, specifically: Based on the images sensed at the left and right ends of the vehicle's forward direction, obtain the left straight line and the right straight line that meet the preset requirements; Based on the left straight line and the right straight line that meet the preset requirements, obtaining the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates; Based on the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates, the left straight line endpoint coordinates and the right straight line endpoint coordinates are obtained in real time by updating the perception images at the left and right ends of the car's forward direction in real time.
3. A method for controlling a vehicle to travel in a straight line as claimed in claim 2, It is characterized in that The left straight line and the right straight line that meet the preset requirements are obtained based on the images sensed at the left and right ends of the vehicle's forward direction, specifically: A first image is obtained by extracting the region of interest from the images sensed at the left and right ends of the vehicle's forward direction; Obtaining a second image by sequentially performing grayscale conversion and histogram equalization on the first image; Based on a preset color range threshold, a third image is obtained by performing color extraction on the second image; wherein the extracted colors are white, silver and gray; Obtaining a fourth image by performing edge detection and binarization processing on the third image; A fifth image is obtained by performing a morphological dilation operation, a morphological erosion operation, and a morphological closing operation on the fourth image; Based on a preset distance resolution, a preset angle resolution, a preset accumulator threshold, a preset minimum straight line length and a preset straight line slope, the fifth image is calculated by progressive probabilistic Hough transform to obtain a left straight line and a right straight line that meet preset requirements.
4. A method for controlling a vehicle to travel in a straight line as claimed in claim 1, It is characterized in that Based on the left straight line endpoint coordinates and the right straight line endpoint coordinates, the deviation pixel value is calculated, specifically: The left displacement deviation is obtained by subtracting the first endpoint coordinate of the left straight line endpoint coordinates from the fourth endpoint coordinate of the right straight line endpoint coordinates; The right displacement deviation is obtained by subtracting the second endpoint coordinate of the left straight line endpoint coordinate from the third endpoint coordinate of the right straight line endpoint coordinate; Based on the left displacement deviation and the right displacement deviation, a deviation pixel value is obtained.
5. A method for controlling a vehicle to travel in a straight line as claimed in claim 4, It is characterized in that Based on the left displacement deviation and the right displacement deviation, a deviation pixel value is obtained, specifically: The deviation sum is obtained by summing the absolute value of the left displacement deviation and the absolute value of the right displacement deviation; By obtaining half the value of the deviation sum, the deviation pixel value is obtained.
6. A method for controlling a vehicle to travel in a straight line as claimed in claim 1, It is characterized in that When the displacement deviation value does not meet the preset deviation requirement, the deviation pixel value is corrected by a preset pixel control algorithm to obtain deviation correction data, specifically: When the displacement deviation value does not meet the preset deviation requirement, obtaining the current offset state of the vehicle; Based on the current offset state of the car, the expected thrust and steering amount of the car are calculated through the pixel position loop PID control algorithm to obtain the deviation correction data.
7. A method for controlling a vehicle to travel in a straight line as claimed in claim 1, 2, 4 or 6, It is characterized in that Based on the deviation correction data, the driving posture of the car is controlled in real time, specifically: Based on the deviation correction data, the deviation pixel value is corrected until the deviation pixel value meets the preset deviation requirement, thereby obtaining a corrected deviation pixel value; Based on the corrected deviation pixel value, the car is controlled to travel in a straight line.
8. A car straight line driving control system, It is characterized in that include: Image acquisition module, coordinate acquisition module, deviation pixel calculation module, displacement deviation correction module and car control module; The image acquisition module is used to acquire the perception images of the left and right ends of the vehicle's forward direction; The coordinate acquisition module is used to acquire the coordinates of the left straight line endpoint and the right straight line endpoint based on the images sensed at the left and right ends of the vehicle's forward direction; The deviation pixel calculation module is used to calculate the deviation pixel value based on the left straight line endpoint coordinates and the right straight line endpoint coordinates; The displacement deviation correction module is used to correct the deviation pixel value by a preset pixel control algorithm to obtain deviation correction data when the displacement deviation value does not meet the preset deviation requirement; The car control module is used to control the driving posture of the car in real time based on the deviation correction data.
9. A vehicle straight-line driving control system as claimed in claim 8, It is characterized in that The coordinate acquisition module is used to acquire the left straight line endpoint coordinates and the right straight line endpoint coordinates based on the images sensed at the left and right ends of the vehicle's forward direction, and also includes: Straight line acquisition unit, endpoint coordinate acquisition unit and coordinate real-time update unit; The straight line acquisition unit is used to acquire a left straight line and a right straight line that meet preset requirements based on the images sensed at the left and right ends of the vehicle's forward direction; The endpoint coordinate acquisition unit is used to acquire the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates based on the left straight line and the right straight line that meet the preset requirements; The coordinate real-time updating unit is used to obtain the left straight line endpoint coordinates and the right straight line endpoint coordinates in real time by updating the perception images at the left and right ends of the vehicle's forward direction based on the initial left straight line endpoint coordinates and the initial right straight line endpoint coordinates.
10. A vehicle straight-line driving control system as claimed in claim 8, It is characterized in that The deviation pixel calculation module is used to calculate the deviation pixel value based on the left straight line endpoint coordinates and the right straight line endpoint coordinates, and also includes: A left displacement deviation calculation unit, a right displacement deviation calculation unit and a deviation pixel acquisition unit; The left displacement deviation calculation unit is used to obtain the left displacement deviation by subtracting the first endpoint coordinate of the left straight line endpoint coordinates from the fourth endpoint coordinate of the right straight line endpoint coordinates; The right displacement deviation calculation unit is used to obtain the right displacement deviation by subtracting the second endpoint coordinate of the left straight line endpoint coordinate from the third endpoint coordinate of the right straight line endpoint coordinate; The deviation pixel acquisition unit is used to obtain a deviation pixel value based on the left displacement deviation and the right displacement deviation.
Citation Information
Patent Citations
Method and system for vehicle Anti-collision pre-warning based on binocular stereo vision
CN108243623A
Vehicle navigation method and related product
CN109612482A
Machine vision automatic deviation rectifying system of tire crane and deviation rectifying method
CN110054089A
Target component missing detection method based on orientation combination in image
CN113744211A
Agricultural machine real-time path correction method based on visual lane detection
CN114399748A
