A line patrol navigation robot and a navigation control method

By adopting the combined technology of two-color ground visual navigation and ring-shaped compensation light source in the indoor line patrol robot, the problem of poor navigation effect in complex indoor light source environments is solved, and higher adaptability and navigation stability are achieved, while reducing costs and installation and maintenance difficulties.

CN115328106BActive Publication Date: 2025-05-30CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110438258.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-22
Publication Date
2025-05-30
Estimated Expiration
2041-04-22

AI Technical Summary

Technical Problem

The existing indoor line patrol robots have poor navigation performance in complex indoor light sources and have poor adaptability in severely worn environments.

Method used

A visual navigation module based on contrasting straight lines formed by two-color ground is adopted, combined with an annular compensation light source to realize the line patrol navigation of the robot car. The system obtains the ground-facing straight lines through the camera acquisition module, and after processing the image processing module, the detection straight lines are obtained, and the main control module adjusts the movement of the robot car according to the motion control model, and adjusts the brightness of the light source in annular compensation light source to improve image quality.

Benefits of technology

Improves the navigation stability and adaptability of robot cars in complex indoor light sources environments, reduces costs, and simplifies the installation and maintenance process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115328106B_ABST
    Figure CN115328106B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of automated positioning and navigation, and provides a line-tracking navigation robot, which includes a visual navigation module for enabling the robot car to travel along a contrast line formed by a two-color ground and an annular compensation light source for illuminating the ground; the visual navigation module includes a straight-line detection module, and the straight-line detection module is used to obtain the offset S and deflection angle θ of the detected straight line in the world coordinate system of the robot car. The present invention conducts visual line-tracking based on the straight line formed by the two-color ground. Since the ground is more wear-resistant than the AGV magnetic strip, it has better adaptability in indoor environments with a large number of people and other moving vehicles; the camera lens is close to the ground and adopts a shooting method facing the ground, so that the ambient stray light in the collected image is relatively small, and the visual navigation is relatively less affected by stray light; a compensation light source with adjustable brightness is installed beside the camera lens, which can better maintain the brightness of the image and enhance the image quality, thereby enhancing the stability of visual line-tracking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of automated positioning and navigation, and particularly relates to a visual line-tracking navigation method based on a straight line formed by dual-color indoor ground and an automatically compensated light source. Background Art

[0002] With the development of automated positioning and navigation technology, compared with outdoor GPS (Global Positioning System) vehicle navigation technology, indoor mobile robot navigation technology has become increasingly mature, the market mechanism is tending to be good, and the application prospects are becoming more and more extensive. For example, in industrial environments such as automated production workshops, in commercial environments such as dining corridors, or in logistics transportation channels in medical institutions, etc., intelligent robots that can automatically travel back and forth along a planned fixed route are gradually needed to replace manual labor, save labor costs, and improve production or transportation efficiency. Therefore, it is very necessary to invent a line-tracking navigation method that is suitable for indoor applications, has a low cost, a simple method, and is easy to implement.

[0003] In response to the above needs, currently, there are also many relevant solutions at home and abroad.

[0004] Currently, there are mainly two types of mainstream line-tracking robots:

[0005] One is a navigation robot based on AGV magnetic strips, which has the advantages of flexible path planning and relatively accurate navigation positions. However, traditional AGV magnetic strip navigation robots need to lay magnetic strips on the navigation ground in advance and then paste protective tapes. The magnetic strips themselves have relatively poor wear resistance compared to the ground and are suitable for installation in dry and clean environments. Therefore, they are well applied in clean automated industrial production workshops. When there are many people or other moving vehicles in the application scenario and the environmental ground is easily worn, the magnetic strip navigation solution has poor adaptability.

[0006] The other is a line-tracking robot based on vision, and the navigation position is also relatively accurate. However, when the indoor environmental light source is relatively complex or the indoor light source is relatively dim, the quality of the visual image deteriorates, which will affect the navigation effect. Summary of the Invention

[0007] In order to solve the above defects, the present invention proposes a line-tracking navigation robot and a navigation control method. The robot has a relatively low cost, is less affected by environmental light, and has good adaptability to environments where the indoor ground is easily worn. To achieve the above object, the present invention adopts the following specific technical solutions:

[0008] A line-tracking navigation robot includes: a visual navigation module for making the robot car travel along a contrast straight line formed by a dual-color ground and an annular compensation light source for illuminating the ground;

[0009] The visual navigation module includes a straight line detection module, which is used to obtain the offset S and deflection angle θ of the detected straight line in the world coordinate system of the robot car.

[0010] Preferably, the visual navigation module includes a camera acquisition module for acquiring comparison straight lines, and an image processing module for processing the acquired comparison straight lines to obtain the detected straight line.

[0011] Preferably, it further includes a main control module and a driving module;

[0012] The main control module is used to send the linear velocity and angular velocity data of the robot car obtained to the driving module, and the driving module makes the robot car perform line tracking motion.

[0013] Preferably, the camera of the camera acquisition module is fixed in the middle of the front end of the robot car through a fixed bracket, above the center of the annular compensation light source, and the lens of the camera faces the ground vertically.

[0014] Preferably, the colors of the two-color ground are any two colors with high contrast;

[0015] The comparison straight line is a straight line formed by a two-color floor or a two-color wide tape.

[0016] A line tracking navigation robot control method includes the following steps:

[0017] S1. Process the comparison straight line formed by the two-color ground to obtain the detected straight line, and obtain the slope k and offset b of the detected straight line in the new pixel coordinate system;

[0018] S2. Establish the world coordinate system of the robot car, and use Equation (1) to calculate the offset S and deflection angle θ of the detected straight line in the world coordinate system of the robot car:

[0019]

[0020] where K is the actual distance represented by a unit pixel;

[0021] s is the intercept of the detected straight line in the y 1 axis direction in the new pixel coordinate system;

[0022] S3. Use the motion control model to calculate the angular velocity w 0 for adjusting yaw and the linear velocity v 0 , and realize the line tracking navigation control of the robot car.

[0023] Preferably, step S1 includes:

[0024] S101. Crop the comparison straight-line image in the traditional pixel coordinate system, convert the RGB image to an HSV image and perform masking processing, and optimize the edge straight lines in the masked image to obtain the detection straight lines.

[0025] S102. Screen out the detection straight lines with slopes exceeding the threshold, and obtain the set opti_Lines of the endpoints of the further optimized detection straight lines.

[0026] Among them, the number of detection straight lines is n, and the set of endpoint coordinates of the detection straight lines is Lines = (x i1 , y i1 , x i2 , y i2 ). i=1,2,...,n ;

[0027] S103. Use Equation (2) to obtain the coordinates of each point in opti_Lines in the new pixel coordinate system:

[0028]

[0029] Among them, x = (x i1 , x i2 ). i=1,2,...,n ,

[0030] y = (y i1 , y i2 ). i=1,2,...,n ,

[0031] width × height is the default resolution of the camera;

[0032] S104. Use the opti_Lines point set as the fitting data points of the detection straight lines, and call the straight line fitting function to obtain the slope k and offset b of the detection straight lines in the new pixel coordinate system.

[0033] Preferably, step S3 is divided into four cases:

[0034] S31. When θ > 0 and T < 0, the robot car goes straight and turns left. At this time, there is an angular velocity The rotation radius r is obtained through the following formula:

[0035]

[0036] Among them, T is the intercept of the detection straight line on the x-axis of the robot car world coordinate system;

[0037] L is the distance from the center o of the driving wheel of the robot car to the optical center a of the camera in the y-axis direction of the robot car world coordinate system;

[0038] v 0 is the known linear velocity of the robot car;

[0039] When θ < 0 and T > 0, the robotic cart goes straight and turns right, with an angular velocity w 0 The calculation method is the same as that in S31;

[0040] When θ > 0 and T > 0, the robotic cart needs to go straight and turn left first. Given the angular velocity w 1 , control the turning time t 1 , such that w 1 t 1 = π - 2|θ|. After turning left, it enters the situation of S32;

[0041] When θ < 0 and T < 0, the robotic cart needs to go straight and turn right first. Given the angular velocity w 2 , control the turning time t 2 , such that w 2 t 2 = π - 2|θ|. After turning right, it enters the situation of S31.

[0042] Preferably, after converting to the HSV image in step S101, it further includes step S11:

[0043] When the mean value of the lightness component of the target color in the HSV image is not within the set lightness threshold range, the annular compensation light source is adjusted with a brightness step of 10 until the mean value of the lightness component is within the set lightness threshold range.

[0044] Preferably, step S11 includes the following steps:

[0045] S111. Extract all pixel points in the HSV image obtained in real time whose hue component values conform to the interval [h1, h2], sort the saturation component values of these pixel points from large to small, and retain the middle 70% of the pixel points;

[0046] S112. Calculate the average value S' of the saturation component values of 70% of the pixel points average , and adjust the annular compensation light source with a brightness step of 10 to make S' average be located within the lightness threshold range.

[0047] The present invention can achieve the following technical effects:

[0048] 1. The present invention performs visual line following based on the contrast lines formed by the dual-color ground. Since the ground is more wear-resistant than the AGV magnetic strip, it has relatively better adaptability in indoor environments with a large number of people and other moving vehicles.

[0049] 2. The camera lens is close to the ground and adopts a shooting method facing the ground, so that the ambient stray light in the collected image is relatively small, and thus the visual navigation is relatively less affected by the stray light.

[0050] 3. A ring-shaped compensation light source with adaptively adjustable brightness is installed beside the camera lens, which can better maintain the brightness of the image, enhance the image quality, and further enhance the stability of visual line following.

[0051] 4. The present invention does not require expensive hardware or sensors such as lidar, making the cost of the robot car relatively low.

[0052] 5. The present invention does not require laying magnetic strips and pasting protective magnetic strip tapes, making the installation and maintenance costs relatively low. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a system framework diagram of a line following navigation robot and a navigation correction method according to an embodiment of the present invention;

[0054] Figure 2 It is a camera vision imaging model according to an embodiment of the present invention;

[0055] Figure 3 It is a process flow diagram of image processing according to an embodiment of the present invention;

[0056] Figure 4 It is a schematic diagram of detecting a straight line in the new pixel coordinate system according to an embodiment of the present invention;

[0057] Figure 5 It is a motion control model of the robot car in the world coordinate system when θ>0 and T<0 in straight line detection according to an embodiment of the present invention;

[0058] Figure 6 It is a motion control model of the robot car in the world coordinate system when θ<0 and T>0 in straight line detection according to an embodiment of the present invention;

[0059] Figure 7 It is a motion control model of the robot car in the world coordinate system when θ>0 and T>0 in straight line detection according to an embodiment of the present invention;

[0060] Figure 8 It is a motion control model of the robot car in the world coordinate system when θ<0 and T<0 in straight line detection according to an embodiment of the present invention;

[0061] Figure 9 It is a structural framework diagram of the ring-shaped compensation light source according to an embodiment of the present invention;

[0062] Figure 10 It is a cruise control flow chart according to an embodiment of the present invention.

[0063] REFERENCE MARKS:

[0064] Detecting straight line 1, camera 2, robot car 3, ring-shaped compensation light source 4. Detailed implementation manners

[0065] In order to make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and do not constitute a limitation to the present invention.

[0066] The objective of the present invention is to provide a line patrol navigation robot and a navigation correction method. Through the obtained detected straight line information, the movement control of the robot trolley is realized based on the constructed movement control model. At the same time, by using the processed HSV image data and based on the self-compensating brightness control model, the brightness of the annular compensation light source beside the camera is changed to improve the image quality. The following will describe in detail a line patrol navigation robot and a navigation correction method provided by the present invention through specific embodiments.

[0067] Referring to Figure 1 the shown system framework, the camera acquisition module acquires the contrast straight line formed by the two-color ground. After being processed by the image processing module, the detected straight line 1 is formed. The straight line detection module obtains the offset S and deflection angle θ of the detected straight line 1 in the world coordinate system of the robot trolley by identifying the detected straight line 1, and under the control of the main control module, controls the driving module to guide the robot trolley 3 to move forward. At the same time, the annular compensation light source 4 is used to adjust the brightness to improve the image quality and enhance the stability of visual line patrol.

[0068] In a preferred embodiment of the present invention, the camera 2 of the camera acquisition module is fixed in the middle of the front end of the robot trolley 3 through a fixed bracket, at the position above the center of the annular compensation light source 4; the lens of the camera 2 faces the ground vertically and can acquire the contrast straight line formed by the two-color ground.

[0069] In another embodiment of the present invention, the colors of the two-color ground are any two colors with high contrast, and can also be a two-color floor or a two-color wide tape.

[0070] As Figure 10 shown in the line patrol control flow chart, when the robot trolley 3 travels in a straight line and accumulates errors resulting in yaw, it enters the heading correction mode at this time. Through the image of the contrast straight line formed by the two-color ground obtained by the camera 2, the slope k and offset b of the detected straight line 1 are processed; and based on this, the offset S and deflection angle θ of the detected straight line 1 in the world coordinate system of the robot trolley are obtained; a movement control model for four situations is established, and the angular velocity w for adjusting yaw is calculated 0 and the known linear velocity v 0 , to realize the line patrol navigation control of the robot trolley 3.

[0071] In a preferred embodiment of the present invention, in step S1, the hardware of the image processing module uses a Raspberry Pi 4B, and processes images through the Python software platform on the hardware and the installed corresponding version of the OpenCV library package.

[0072] In step S101, the image captured by the camera 2 is a two-color ground and the contrast line formed thereby. Any two colors with relatively obvious contrast on the ground can be selected and denoted as color1 and color2. Based on the OpenCV library, the captured video image is processed, and referring to Figure 3 the flowchart of image processing shown in

[0073] First, the image is cropped: in the traditional pixel coordinate system, the image between the line y = height / 4 and the line y = 3height / 4 is intercepted, that is, the video image of width×height is cropped to width×height / 2. The image attention interval is obtained, so as to reduce the image processing burden and improve the camera frame rate without losing the clarity of the intercepted image.

[0074] Secondly, the RGB image is converted into an HSV image: using the function cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) in the OpenCV library, the intercepted image represented by the three-color channels of R (red), G (green), and B (blue) is converted into an image represented by the modes of H (hue), S (saturation), and V (brightness).

[0075] Thirdly, mask making is performed: the masked color selected during masking is color1. The HSV value range of color1 is H: h 1 -h 2 ; S: s 1 -s 2 ; V: v 1 -v 2 . Within the value range of color1, the upper and lower color thresholds are adjusted and set: lower = [h1′, s1′, v1′]; upper = [h2′, s2′, v2′], and further call the function cv2.inRange(hsv, lower, upper) in the library to mask out the color1 color region in the converted HSV image.

[0076] Finally, through steps such as morphological opening operation transformation, bilateral filtering to eliminate noise, and Canny operator to detect the image edge, the edge of the color1 color region after masking is obtained.

[0077] In another embodiment of the present invention, when performing morphological opening operation, the cv2.morphologyEx() function is called to first perform an erosion operation on the masked image and then a dilation operation to preliminarily remove the noise in the image and improve the image quality; the cv2.bilateralFilter() function is called to further filter the image after morphological transformation to achieve bilateral filtering to eliminate noise; the cv2.Canny() function is called to extract edges from the filtered image based on the Canny operator.

[0078] In step S102, first, based on the Hough line detection method, the cv2.HoughLinesP() function is called to obtain the detected line 1 in the image after Canny edge detection. When calling, important parameters of the function are set to make the detected line 1 meet the following three conditions:

[0079] a. The minimum number of intersection points in the Hough space required for the detected line is 100 intersection points of curve intersections;

[0080] b. The minimum number of points forming a line is 60, and lines with insufficient points will be discarded;

[0081] c. The maximum distance between points on a line is 10, and distances greater than this will be considered as two lines;

[0082] The function output result is a set of coordinates of both ends of multiple detected lines 1 within the line of sight.

[0083] Further optimize the detected lines to screen out lines with too large slopes:

[0084] Let the number of detected lines 1 be n, and the set of coordinates of both ends of the detected line 1 be Lines = (x i1 , y i1 , x i2 , y i2 ); i=1,2,...,n ;

[0085] When x i1 = x i2 , that is, when the detected multiple lines are not vertical lines, substitute Lines into equation (4) to obtain the set dev_Slope1 of the deviation of the slopes of each line,

[0086]

[0087] When x i1 = x i2 , that is, when the detected multiple lines are vertical lines, substitute Lines into equation (5) to obtain the set dev_Slope2 of the deviation of each line,

[0088]

[0089] Then, compare the deviation of each straight line with the set threshold dev_Treshold = 0.1, remove the straight lines exceeding the threshold, and obtain the set opti_Lines of the coordinates of the two endpoints of the optimized detected straight line 1.

[0090] In step S103, to facilitate representing the situation when the detected straight line 1 is perpendicular (to avoid the slope k being infinite), a new pixel coordinate system as shown in Figure 4 is established with respect to the traditional pixel coordinate system:

[0091] Take the center of the original image as the origin o of the new pixel coordinate system 1 , and take the straight line horizontally to the right passing through o 1 as the y 1 axis, with the y 1 axis direction to the right, and take the straight line vertically downward passing through o 1 as the x 1 axis, with the x 1 axis direction downward.

[0092] Transform the coordinates of each point in opti_Lines according to formula (2) to form the coordinates in the new pixel coordinate system:

[0093]

[0094] Use the new point set as the fitting data points of the target straight line, call the straight line fitting function optimize.curve.fit, and obtain the slope k and offset b of the detected straight line 1 in the new pixel coordinate system.

[0095] In another embodiment of the present invention, before the camera acquisition module acquires an image, it is also necessary to first calibrate the actual distance represented by a single pixel in the image, establish a visual imaging model of the camera 2 as shown in Figure 2 , use a high-definition distortion-free USB infrared camera (ignoring minor distortions), set the default resolution to width×height, the focal length of the camera 2 is f 1 , the height of the camera 2 from the ground is f 2 , the actual ground straight line length within the field of view is w 2 , the imaging straight line length is w 1 , and according to the pinhole imaging model, formula (6) can be obtained.

[0096]

[0097] Since the height f 2 of the camera 2 from the ground is a fixed value, the lens of the camera 2 faces the ground to photograph a known length of L 0The horizontal straight line, then obtain the pixel length PL of the straight line in the image through the screenshot software, and finally use the principle of formula (6) to calculate the actual distance K represented by a single pixel:

[0098]

[0099] In a preferred embodiment of the present invention, the vision-based motion control method of the robot car 3 in step S2 requires the use of the main control module and the drive module in the backend system control module. Among them, the main control module uses the STM32F407 development board for hardware, and the drive module uses the hub servo motor driver.

[0100] First, STM32F407 obtains the data of the slope k and the offset b of the detected straight line 1 sent by the Raspberry Pi 4B through network communication;

[0101] Secondly, establish a Figure 5 , Figure 6 , Figure 7 , Figure 8 shown motion model of the robot car in the world coordinate system. Take the center of the connection line of the driving wheels of the robot car 3 as the origin o, the forward direction of the robot car 3 as the positive direction of the y-axis, the straight line passing through point o and perpendicular to the y-axis as the x-axis, and the left direction of the robot car 3 as the positive direction of the x-axis.

[0102] In addition, in the world coordinate system, the positive direction of the deflection angle θ is clockwise along the x-axis, and counterclockwise is negative.

[0103] Continue to refer to Figure 4 , and assume that in the new pixel coordinate system, the distance between the intersection point of the detected straight line 1 and the y 1 axis and the origin o 1 is s. Through formula (1), using the slope k and the offset b of the detected straight line 1 in the new pixel coordinate system, calculate the offset S and the deflection angle θ of the detected straight line 1 in the world coordinate system of the robot car.

[0104]

[0105] Assume that the linear velocity of the robot car 3 is v 0 , when the car is driving and yawing, it is necessary to calculate the angular velocity at this time according to the detected straight line 1 and the motion control model to correct the heading.

[0106] In a preferred embodiment of the present invention, step S3 is divided into four cases:

[0107] As Figure 5 shown, when θ > 0 and T < 0, ignoring the influence of the linear velocity direction on the motion component in the x-axis direction, the driving wheels o 1 and o 2The connection center o passes through the angular velocity w 0 After movement, it reaches the position of point o′, that is, the center of the driving wheel is located on the detection line 1 and the x-axis of the world coordinate system of the robot car is perpendicular to the detection line 1.

[0108] Let the radius of rotation from point o to o′ be r, the distance from point o to the optical center a of the front camera 2 of the robot car 3 be L, and the distance from point o to the intersection point b of the detection line 1 and the x-axis of the world coordinate system of the robot car be T. The values of r and T are obtained by calculation using the following formula.

[0109]

[0110] According to the relationship between linear velocity and angular velocity Substitute r to obtain the angular velocity w 0 , at this time the robot car 3 goes straight and turns left.

[0111] When θ < 0 and T > 0, as Figure 6 shown, similar to Figure 5 the angular velocity w can be calculated 0 , at this time the robot car 3 goes straight and turns right.

[0112] When θ > 0 and T > 0, as Figure 7 shown, the robot car 3 needs to go straight and turn left first, that is, the two wheels o 1 and o 2 reach o′ 1 and o' 2 , given the angular velocity w 1 , control the turning time t 1 , so that w 1 t 1 = π - 2|θ|. After turning left, θ < 0 and T > 0, that is, it enters Figure 6 the situation of, and it needs to go straight and turn right again. The calculation method of the angular velocity w 0 is the same as Figure 6 .

[0113] When θ < 0 and T < 0, as Figure 8 shown, the robot car 3 needs to go straight and turn right first, that is, the two wheels o 1 and o 2 reach o′ 1 and o' 2 , given the angular velocity w 2 , control the turning time t 2 , so that w 2 t 2 = π - 2|θ|. After turning right, θ > 0 and T < 0, that is, it enters Figure 5 the situation of, and it needs to go straight and turn left again. The calculation method of the angular velocity w 0 is the same as Figure 5 .

[0114] When T = 0 or θ = 0, due to the inevitable errors in the movement of the robot car 3, it will surely enter one of the four motion states after maintaining the moving state for a period of time, and then the linear velocity and angular velocity can be calculated according to the above method. Figures 5 to 8 Finally, STM32F407 sends the linear velocity v

[0115] and the angular velocity w 0 to the drive controller of the robot car 3 through the serial port to control the line-tracking movement of the robot car 3. 0 In a preferred embodiment of the present invention, the line-tracking navigation robot further includes an adaptively adjustable annular compensation light source 4 for real-time filling light for the camera 2 module, which can better maintain the brightness of the image screen, enhance the image quality, and further enhance the stability of visual line-tracking.

[0116] Referring to the structural framework diagram of the annular compensation light source shown

[0117] to, the annular compensation light source 4 illuminates the ground at a certain height from the ground. The camera 2 is fixed above the center of the annular compensation light source 4 and transmits the captured color1 and color2 two-color ground images to the Raspberry Pi 4B control module. Figure 9 The brightness of the annular compensation light source 4 is controlled by the Raspberry Pi 4B so that the contrast line formed by the color1 and color2 two-color ground captured by the camera 2 can be clearly detected and recognized by the visual navigation module. Let the brightness at this time be D

[0118] . 0

[0119] In step S101, the image converted to the HSV mode is stored separately. Taking color1 as the reference, all pixel points whose H (hue) component values in the HSV image conform to the interval [h1, h2] are extracted. These pixel points are sorted in descending order according to the saturation component values, and the first 15% and the last 15% are removed, and only the middle 70% of the pixel points are retained.

[0120] Then, the average value S average of the saturation component values of the 70% pixel points is calculated. And [S average - 50, S average + 50] is used as the brightness threshold interval. Among them, if S average - 50 < 0, the lower bound of the threshold interval is set to 0, and if S average + 50 > 255, the upper bound of the brightness threshold interval is set to 255.

[0121] Finally, let the adjustable brightness interval of the annular compensation light source 4 be [1, 100] (D 0 ​∈[1, 100]), when the robot car 3 moves, the Raspberry Pi 4B calculates S′ in real time according to the collected image average (the real-time value similar to S average . If S′ average is less than the lower bound of the brightness interval, with a step of 10, the Raspberry Pi 4B sends a signal to increase the brightness to the annular compensation light source 4 until S′ average is within the brightness interval. If S′ average is greater than the upper bound of the brightness interval, similarly set the step to 10, and the Raspberry Pi 4B sends a signal to decrease the brightness to the annular compensation light source 4 to make S′ average be within the brightness interval. Thus, the brightness of the image collected by the camera acquisition module is always kept within a good range, improving the image quality.

[0122] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0123] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

[0124] The above specific embodiments of the present invention do not constitute a limitation to the protection scope of the present invention. Any other corresponding changes and deformations made according to the technical concept of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A control method for a line-tracking navigation robot, where the line-tracking navigation robot includes a visual navigation module for making the robot car travel along a contrast line formed by a two-color ground and an annular compensation light source for illuminating the ground; the visual navigation module includes a line detection module, and the line detection module is used to obtain the offset of the detected line in the world coordinate system of the robot car S and the deflection angle , It is characterized in that it includes the following steps: S1. Process the contrast line formed by the two-color ground to obtain a detection line, and obtain the slope of the detection line in the new pixel coordinate system k and offset b ; Step S1 includes: S101. Under the traditional pixel coordinate system, clip the comparison straight-line image, convert the image into the HSV image and perform masking processing, optimize the edge straight lines in the masked image to obtain the detected straight line; S102. Screen out the detection lines whose slopes exceed the threshold, and obtain a set of the two endpoints of the detection lines further optimized , Among them, the number of the detected straight lines is n , and the coordinate set of the two end points of the detected straight lines is ; S103. Obtain the coordinates of each point in the new pixel coordinate system by using Equation (2): ​ (2) Among them, , , × is the default resolution of the camera; S104. Using the point set as the fitting data points of the detection line, call the line fitting function to obtain the slope of the detection line in the new pixel coordinate system k and the offset b ; S2. Establish the world coordinate system of the robot car, and calculate the offset of the detected straight line in the world coordinate system of the robot car by using Equation (1) S and the deflection angle : (1) Among them, K is the actual distance represented by a unit pixel, s For the intercept of the detected straight line in the y 1 axis direction in the new pixel coordinate system; S3. Use the motion control model to calculate the angular velocity for adjusting yaw and the linear velocity , and achieve the line-tracking navigation control of the robot car 2. The line-tracing navigation robot control method according to claim 1, it is characterized in that Step S3 is divided into four cases: S31, > 0, T < 0, the robot trolley goes straight and turns left. At this time, there is an angular velocity , and the turning radius r is obtained by the following formula: (3) wherein, T is the intercept of the detection straight line on the x-axis of the world coordinate system of the robot car; L The distance from the center of the driving wheel of the robot car in the y-axis direction of the world coordinate system of the robot car to the optical center of the camera ; is the known linear velocity of the robot trolley; S32、 <0, T >0, the robot trolley goes straight and turns right, and the angular velocity The calculation method is the same as that in S31; S33、 >0, T >0, the robot car needs to go straight and then turn left first. Given the angular velocity , control the turning time such that , and enter the situation of S32 after turning left; S34, < 0, T < 0, the robot car needs to go straight and then turn right first. Given the angular velocity , control the turning time such that , and enter the situation of S31 after turning right.

3. The line-tracing navigation robot control method according to claim 1, it is characterized in that After being converted into the HSV image in step S101, it further includes step S11: When the HSV average value of the lightness component of the target color of the image is not within the set lightness threshold range, the annular compensation light source is adjusted with a brightness step of 10 until the average value of the lightness component is within the set lightness threshold range.

4. The line-tracing navigation robot control method according to claim 3, it is characterized in that Step S11 includes the following steps: S111. Extract and, for all pixel points in the HSV image whose hue component values meet the interval, sort the saturation component values from largest to smallest, and retain the middle 70% of the pixel points; S112. Calculate the average value of the saturation component values of the 70% of the pixel points , and adjust the annular compensation light source with a brightness step of 10 so that is located in the lightness threshold interval.

5. The line-tracing navigation robot according to claim 1, it is characterized in that the visual navigation module includes a camera acquisition module for acquiring the comparison line, and an image processing module for processing the acquired comparison line to obtain the detection line.

6. The line-tracing navigation robot according to claim 1, it is characterized in that it further includes a main control module and a driving module; the main control module is used to send the linear velocity and angular velocity data of the robot car obtained to the driving module, and the driving module makes the robot car perform line-tracing movement.

7. The line-tracing navigation robot according to claim 5, it is characterized in that the camera of the camera acquisition module is fixed in the middle of the front end of the robot car through a fixed bracket, above the center of the annular compensation light source, and the lens of the camera faces the ground vertically.

8. The line-tracing navigation robot according to claim 1, it is characterized in that the colors of the two-color ground are any two colors with high contrast; the comparison line is a straight line formed by a two-color floor or a two-color wide tape.

Citation Information

Patent Citations

  • Intelligent navigation control system and method

    CN101976079A

  • Visual navigation method and system of mobile robot as well as warehouse system

    CN105651286A