Inspection robot control method, inspection robot and storage medium
By rotating the camera and calculating the image offset after the inspection robot takes the first image, determining the camera compensation angle, the problem of image offset in the data center computer room is solved, and more stable image shooting is achieved and hardware costs are reduced.
Patent Information
- Application Number
- PCT/IB2025/050186
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-17
- Filing Date
- 2025-01-08
- Publication Date
- 2025-07-24
AI Technical Summary
The images captured by existing inspection robots in the data center computer room have a large offset problem, resulting in unavailability of the inspection results, and the compensation angle of the existing adjustment plan is inaccurate and unstable.
After arriving at the inspection point, the inspection robot takes a first image and controls the camera to rotate the preset angle value, and captures the second image. By calculating the image offset, the camera compensation angle is determined, and the camera angle is adjusted to reduce the offset.
The calculation of compensation angle is simplified, the accuracy and stability of the inspection robot's images are improved, the hardware requirements are reduced, and the manufacturing cost is reduced.
Smart Images

Figure IB2025050186_24072025_PF_FP_ABST
Abstract
Description
[0001] TECHNICAL FIELD The present disclosure relates to the field of artificial intelligence technology, and more particularly to a control method for an inspection robot, an inspection robot, and a storage medium. Background: With the continuous development of technologies such as cloud computing and big data, data centers are being built on a large scale. As the number of devices within data center computer rooms increases, the difficulty of computer room operation and maintenance increases. Reliably operating a large data center has become a significant challenge for enterprises. In the prior art, to address the shortcomings of current manual inspections of computer rooms, inspection robots have been designed for data center inspections. The inspection robots follow a preset inspection route, taking photos at each inspection point and performing image recognition on the captured images to identify information such as instrument readings, device status, and abnormal conditions. However, images captured by existing inspection robots during inspections within data center computer rooms suffer from significant offset, ultimately rendering the inspection results unusable. SUMMARY: In view of the aforementioned issues, the present disclosure provides a control method for an inspection robot, an inspection robot, and a storage medium that address, or at least partially address, the aforementioned issues. In a first aspect, a control method for an inspection robot is provided. The method includes: controlling the inspection robot to arrive at a position corresponding to a first inspection point and capture a first image; after capturing the first image, controlling the inspection robot's camera to rotate by a preset angle; capturing a second image after the camera has rotated by the preset angle; determining a camera compensation angle based on a first position offset between the first and second images and a second position offset between the second image and a standard image of the first inspection point; and adjusting the camera angle of the inspection robot according to the camera compensation angle. In one implementation of the first aspect, a first axis of the camera is parallel to a height direction of an imaging plane of the camera; controlling the inspection robot's camera to rotate by a preset angle after capturing the first image includes: after capturing the first image, controlling the inspection robot's camera to rotate by a first preset lateral angle value about the first axis; the preset angle value includes the first preset lateral angle value.In an implementation provided by the first aspect, the first position offset includes: a first lateral offset between the first image and the second image in the width direction of the imaging plane; the second position offset includes: a second lateral offset between the second image and the standard image of the first inspection point in the width direction of the imaging plane; the camera compensation angle includes: a lateral compensation angle; determining the camera compensation angle based on the first position offset between the first image and the second image and the second position offset between the second image and the standard image of the first inspection point includes: determining the lateral compensation angle based on the first lateral offset and the second lateral offset. In an implementation provided by the first aspect, the second axis of the camera is parallel to the width direction of the imaging plane of the camera; after capturing the first image, controlling the camera of the inspection robot to rotate by a preset angle value includes: after capturing the first image, controlling the camera of the inspection robot to rotate by a first preset longitudinal angle value about the second axis; the preset angle value includes the first preset longitudinal angle value. In an implementation provided by the first aspect, the first position offset includes: a first longitudinal offset between the first image and the second image in the height direction of the imaging plane; the second position offset includes: a second longitudinal offset between the second image and the standard image at the first inspection point in the height direction; the camera compensation angle includes: a longitudinal compensation angle; and determining the camera compensation angle based on the first position offset between the first image and the second image and the second position offset between the second image and the standard image at the first inspection point includes: determining the longitudinal compensation angle based on the first longitudinal offset and the second longitudinal offset. In an implementation provided by the first aspect, before controlling the camera of the inspection robot to rotate by a preset angle, the method further includes: determining a third position offset between the first image and the standard image; determining whether the first image meets preset requirements based on the third position offset; if the first image does not meet the preset requirements, executing the step of controlling the camera of the inspection robot to rotate by the preset angle; and if the first image meets the preset requirements, using the first image as the inspection image.In an implementation of the first aspect, both the first image and the second image include a QR code; the QR code is pre-set in the environment to be inspected; and the standard image includes a preset area. The method further includes: determining a first position offset between the first image and the second image based on the position of the QR code in the first image and the position of the QR code in the second image; and determining a second position offset between the second image and the standard image based on the position of the QR code in the second image and the position of the preset area in the standard image. In an implementation of the first aspect, the environment to be inspected includes multiple devices to be inspected; each device to be inspected includes a QR code generated based on device information of the device to be inspected. In an implementation of the first aspect, before capturing the first image, the method further includes: obtaining shooting requirements for the first inspection point; the shooting requirements include one or more of camera shooting angle requirements, camera shooting height requirements, and inspection robot chassis angle requirements; adjusting the inspection robot according to the shooting requirements for the first inspection point; and capturing the first image after the inspection robot is adjusted. In one implementation provided in the first aspect, adjusting the camera angle of the inspection robot according to the camera compensation angle includes: determining an adjustment direction based on the positive or negative value of the camera compensation angle; and adjusting the camera angle of the inspection robot along the adjustment direction according to the value of the camera compensation angle. In one implementation provided in the first aspect, the inspection robot includes a pan / tilt platform configured to drive the camera to rotate. In a second aspect, an inspection robot is provided. The robot includes a memory and a processor, wherein the memory is configured to store a program; and the processor is coupled to the memory and configured to execute the program stored in the memory to implement any of the control methods described above. In a third aspect, a computer-readable storage medium storing a computer program is provided. When executed by a computer, the computer program can implement any of the control methods described above. In the technical solutions provided in the embodiments of the present disclosure, after arriving at a position corresponding to a first inspection point, the inspection robot captures a first image. Thereafter, the inspection robot controls the camera to rotate by a preset angle to capture a second image. The purpose of capturing the first image and the second image is to determine: a position offset caused by rotating the camera by a preset angle.Based on the positional offset between the second image and the standard image and the positional offset caused by rotating the camera by a preset angle, the required camera rotation angle (i.e., the camera compensation angle) can be determined. Thus, in the technical solution provided by the embodiments of the present disclosure, the camera compensation angle can be obtained by simply determining the positional offset caused by rotating the camera by the preset angle and the positional offset between the currently captured image (i.e., the second image) and the standard image. This solution is simple, highly stable, and reduces compensation errors. BRIEF DESCRIPTION OF THE DRAWINGS To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below illustrate some embodiments of the present disclosure. Persons skilled in the art can derive other drawings based on these drawings without inventive effort. Figure 1 is a schematic diagram of a scenario provided by an embodiment of the present disclosure; Figure 2 is a schematic flow chart of a control method provided by an embodiment of the present disclosure; Figure 3 is a schematic flow chart of a control method provided by another embodiment of the present disclosure; and Figure 4 is a block diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION To help those skilled in the art better understand the disclosed solutions, the technical solutions in the disclosed embodiments will be described clearly and completely below, based on the accompanying drawings. Obviously, the described embodiments represent only a portion of the disclosed embodiments, and are not exhaustive. All other embodiments derived by those skilled in the art based on the disclosed embodiments without inventive effort are within the scope of protection of the disclosed embodiments. Furthermore, some processes described in the specification, claims, and accompanying drawings of the disclosed embodiments include multiple operations that appear in a specific order. These operations may be executed out of the order in which they appear herein or in parallel. Operation numbers, such as 101 and 102, are merely used to distinguish between different operations and do not represent any specific order of execution. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that terms such as "first" and "second" are used herein to distinguish between different messages, devices, components, and do not represent a sequential order, nor do they limit "first" and "second" to different types.It should be noted that all user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display) involved in this disclosure are authorized by the user or fully authorized by all parties. The collection, use, and processing of such data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding access points are provided for users to choose to authorize or deny such access. Research has found that the main reasons for the deviation of inspection images captured by inspection robots in data center computer rooms are:
[0002] 1. The layout and style of the data center computer room are relatively simple, and there is a 40-meter-long corridor in the computer room, which easily causes the robot's positioning to drift, making it impossible for the robot to accurately locate the inspection point.
[0003] 2. A large number of insulating pads are used in the data center room. Since the insulating pads have low friction, the tires of the robot are prone to slipping when walking on them, resulting in the inability to accurately reach the inspection point.
[0004] 3. There are errors in the operation of the robot hardware.
[0005] 4. The robot will generate cumulative errors during operation, resulting in increasing image offset the longer it operates. Existing adjustment solutions first calculate the robot's chassis error, then calculate the pan / tilt compensation angle (also known as the camera compensation angle) based on the chassis error. Finally, the pan / tilt is operated based on the camera's supplementary angle to compensate for the angle. A disadvantage of this solution is that the chassis error is calculated by comparing the robot's current position with a preset position. However, the robot's current position is also an estimate (typically, the chassis has an error of ±5cm). Therefore, the calculated compensation angle is inaccurate, and the effect of applying the compensation to the pan / tilt is unstable, even causing greater image offset. Furthermore, this solution places high demands on the chassis, pan / tilt, and lift accuracy. To partially address the above technical issues, the present disclosure provides a new solution: upon arriving at the position corresponding to a first inspection point, the inspection robot captures a first image. Thereafter, the inspection robot controls the camera to rotate by a preset angle to capture a second image. The purpose of capturing the first and second images is to determine the position offset caused by the camera rotating by the preset angle. Based on the positional offset between the second image and the standard image and the positional offset resulting from rotating the camera by a preset angle, the required camera rotation angle (i.e., the camera compensation angle) can be determined. Therefore, in the technical solution provided by the embodiments of the present disclosure, the camera compensation angle can be obtained by simply determining the positional offset resulting from rotating the camera by the preset angle and the positional offset between the currently captured image (i.e., the second image) and the standard image. This approach is computationally simple, highly stable, and reduces compensation errors. Before introducing the control method of the inspection robot provided by the present disclosure, the mechanical structure of the inspection robot involved in the present disclosure is described. As shown in Figure 1, the inspection robot 1 includes a chassis 10, a lifting assembly 11, a pan / tilt head 12, and a camera 13. The first axis of the camera 13 is parallel to the height direction of the imaging plane of the camera 13; the second axis of the camera 13 is parallel to the width direction of the imaging plane of the camera 13. The camera 13 is capable of rotating about the first axis and / or about the second axis. The lifting assembly 11 is mounted on the chassis 10, the pan-tilt head 12 is mounted on the lifting assembly 11, and the camera 13 is mounted on the pan-tilt head 12. The chassis 10 is used to control the movement of the inspection robot 1. The lifting assembly 11 is used to drive the pan-tilt head 12 to move upward and downward. Exemplarily, the lifting assembly 11 is used to drive the pan-tilt head 12 to move vertically (perpendicular to the horizontal direction). The pan-tilt head 12 is used to drive the camera 13 to rotate.Optionally, the pan-tilt platform 12 is configured to drive the camera 13 to rotate about a first axis and / or a second axis. The first and second axes are perpendicular to each other. Rotation of the camera 13 about the first axis can be understood as lateral rotation, while rotation of the camera 13 about the second axis can be understood as longitudinal rotation. In one feasible solution, the pan-tilt platform 12 is configured to drive the camera 13 to rotate about the first and second axes. The pan-tilt platform 12 includes a first drive mechanism capable of driving the camera to rotate about the first axis, and a second drive mechanism capable of driving the camera to rotate about the second axis. Furthermore, in practical applications, the pan-tilt platform described above can be replaced by other mechanical structures capable of driving camera rotation, and this disclosure is not intended to limit this. In one feasible solution, the lifting assembly 11 includes a third drive mechanism configured to drive the pan-tilt platform to move vertically. Illustratively, the lifting assembly 11 further includes a lifting rod 111 connected to a third drive mechanism; the pan / tilt head 12 is mounted on the lifting rod 111; the lifting rod 111 moves vertically under the drive of the third drive mechanism. In certain scenarios, if the inspection robot only needs to capture images at a constant shooting height, the lifting assembly 111 is not required. The first, second, and third drive mechanisms can be different motors. It should be noted that the embodiments of the present disclosure are not limited to the structure of the pan / tilt head; the first and second drive mechanisms can also be the same motor. The first and second drive mechanisms can be driven to adjust the shooting angle of the camera 13; the third drive mechanism can be driven to adjust the shooting height of the camera 13. The inspection robot provided by the present disclosure can operate in various locations requiring inspection, such as data center computer rooms, factory buildings, and substations. Figure 1 illustrates a scenario in which the inspection robot operates in a data center computer room. The data center computer room includes multiple computer room devices 2 and a computer room corridor 3. Multiple computer room devices 2 are installed on both sides of the computer room corridor, and an inspection robot travels along the corridor to perform inspection tasks. The control method for the inspection robot provided in the disclosed embodiments can be executed by the inspection robot (e.g., its controller) or by a first device communicatively connected to the inspection robot, such as a desktop computer, laptop computer, mobile phone, tablet computer, wearable device, server device, etc. For ease of description, the control method will be described in detail below, using FIG2 as an example, using an inspection robot equipped with a camera that can rotate about a first axis and a second axis. As shown in FIG2 , the method includes:
[0006] 201. After the inspection robot arrives at a position corresponding to a first inspection point, it captures a first image. Multiple inspection points may be pre-set in the environment to be inspected, and their location information may be stored in the inspection robot. The multiple inspection points include the first inspection point. Based on the location information of the first inspection point, the inspection robot may be controlled to arrive at the position corresponding to the first inspection point. It should be noted that due to positioning errors, the inspection robot may not accurately arrive at the first inspection point based on the location information of the first inspection point. In other words, based on the location information of the first inspection point, the inspection robot arrives at a position near the first inspection point.
[0007] 202. After capturing the first image, control the camera of the inspection robot to rotate about a first axis by a first preset lateral angle value and about a second axis by a first preset longitudinal angle value. The first preset lateral angle value and the first preset longitudinal angle value can be set according to actual needs and are not specifically limited in this embodiment of the present disclosure. It should be noted that these two angle values cannot be set too large or too small. If they are set too large, the subsequent required compensation angle may be large; if they are set too small, the accuracy of the determined first lateral offset and first longitudinal offset may be poor due to mechanical errors. Exemplarily, the first preset lateral angle value and the first preset longitudinal angle value are both 1°. Setting the first preset lateral angle value and the first preset longitudinal angle value to 1° also facilitates the subsequent calculation of the lateral compensation angle and the longitudinal compensation angle.
[0008] 203. The inspection robot captures a second image after the camera rotates about the first axis by a first preset transverse angle value and about the second axis by a first preset longitudinal angle value. When capturing the first image, the angle of the camera about the first axis is a first angle, and the angle of the camera about the second axis is a third angle. When capturing the second image, the angle of the camera about the first axis is a second angle, and the angle of the camera about the second axis is a fourth angle. The difference between the first and second angles is the first preset transverse angle value, and the difference between the third and fourth angles is the first preset longitudinal angle value.
[0009] 204. Determine a first lateral offset between the first image and the second image in the width direction of the imaging plane and a second lateral offset between the second image and the standard image of the first inspection point in the width direction of the imaging plane.
[0010] 205. Determine a lateral compensation angle based on the first lateral offset and the second lateral offset. Exemplarily, when the first preset lateral angle value is 1°, the lateral compensation angle may be determined as a ratio of the second lateral offset to the absolute value of the first lateral offset.
[0011] 206. Determine a first longitudinal offset between the first image and the second image in the height direction of the imaging plane and a second longitudinal offset between the second image and the standard image of the first inspection point in the height direction of the imaging plane.
[0012] 207. Determine a longitudinal compensation angle based on the first longitudinal offset and the second longitudinal offset. For example, when the first preset longitudinal angle value is 1°, the longitudinal compensation angle can be determined as the ratio of the absolute value of the second longitudinal offset to the first longitudinal offset. It should be noted that the order of executing steps 204 and 206 can be set based on actual needs and is not specifically limited in this embodiment of the present disclosure. For example, step 204 can be executed first, followed by step 206; or, step 206 can be executed first, followed by step 204; or, steps 204 and 206 can be executed simultaneously.
[0013] 208. Adjust the angle of the camera around the first axis according to the lateral compensation angle. In an optional implementation, if the lateral compensation angle is greater than 0, the camera is controlled to rotate around the first axis according to a first rotation direction by an angle value of the lateral supplementary angle; if the lateral compensation angle is less than 0, the camera is controlled to rotate around the first axis according to a second rotation direction by an angle value of the lateral supplementary angle. The first rotation direction and the second rotation direction are opposite. The first rotation direction and the second rotation direction can be determined in actual scenarios and are not specifically limited in this embodiment of the present disclosure.
[0014] 209. Adjust the angle of the camera around the second axis according to the longitudinal compensation angle. In an optional embodiment, if the longitudinal compensation angle is greater than 0, the camera is controlled to rotate around the second axis according to a third rotation direction by the longitudinal compensation angle value. If the longitudinal compensation angle is less than 0, the camera is controlled to rotate around the second axis according to a fourth rotation direction by the longitudinal compensation angle value. The third rotation direction and the fourth rotation direction are opposite. The third and fourth rotation directions can be determined in actual scenarios and are not specifically limited in this embodiment. The rotation direction in this embodiment is also the adjustment direction mentioned above. To reduce the difficulty of calculating the offset, a QR code can be pre-set in the inspection scene. Optionally, a QR code can be pre-set on each device to be inspected in the inspection environment or in the vicinity thereof. For example, a sticker printed with a QR code can be affixed to the device to be inspected. Optionally, the QR code corresponding to each device to be inspected is generated based on the device information of the device to be inspected. In other words, the device information of the device to be inspected can be obtained by recognizing the QR code. The standard image of each inspection point includes a preset area. Exemplarily, the standard image contains a QR code, and the preset area is the area occupied by the QR code. When the first and second images are subsequently captured, both the first and second images contain the QR code. Thus, the position offset can be determined based on the difference in the position of the QR code in the images. Specifically, the above method may further include:
[0015] 210. Determine a first horizontal offset and a first vertical offset according to a position of the two-dimensional code in the first image and a position of the two-dimensional code in the second image.
[0016] 211. Determine a second lateral offset and a second longitudinal offset based on the position of the QR code in the second image and the position of the preset area in the standard image. The position of the QR code in the image can be represented by the two-dimensional coordinates of its designated point in the image. The designated point can be any point on the QR code. Optionally, the designated point is a vertex (e.g., the upper left corner vertex) or a center point of the QR code. The specific implementation of calculating the lateral offset and the longitudinal offset based on the two-dimensional coordinates of the designated point of the QR code in the image will be described by way of example in the following embodiments. To avoid invalid adjustments or reduce the number of invalid adjustments, the above method may further perform the following steps before performing step 202:
[0017] 212. Determine a third lateral offset between the first image and the standard image in the width direction and a third longitudinal offset in the height direction. The specific methods for determining the lateral and longitudinal offsets can be found in the above embodiments and are not further described here.
[0018] 213. Determine whether the first image meets preset requirements based on the third horizontal offset and the third vertical offset. The preset requirements may include a first horizontal offset threshold and a first vertical offset threshold. Optionally, determine whether the value of the third horizontal offset is less than the first horizontal offset threshold and whether the third vertical offset is less than the first vertical offset threshold. If the value of the third horizontal offset is less than the first horizontal offset threshold and the third vertical offset is less than the first vertical offset threshold, determine that the first image meets the preset requirements. Otherwise, determine that the first image does not meet the preset requirements. Optionally, first determine whether the value of the third horizontal offset is less than the first horizontal offset threshold. If the value of the third horizontal offset is not less than the first horizontal offset threshold, determine that the first image does not meet the preset requirements. If the value of the third horizontal offset is less than the first horizontal offset threshold, then determine whether the value of the third vertical offset is less than the first vertical offset threshold. If the value of the third vertical offset is less than the first vertical offset threshold, determine that the first image meets the preset requirements. If the value of the third vertical offset is not less than the first vertical offset threshold, determine that the first image does not meet the preset requirements. Exemplarily, the first horizontal offset threshold may be determined based on the width of the first image, for example, 10 percent of the width of the first image. Exemplarily, the first vertical offset threshold may be determined based on the height of the first image, for example, 10 percent of the height of the first image. It should be noted that the values of the first horizontal offset threshold and the first vertical offset threshold may be set according to actual needs and are not specifically limited in the embodiments of the present disclosure.
[0019] 214. If the first image does not meet the preset requirement, execute the above step 202.
[0020] 215. If the first image meets the preset requirements, use the first image as the inspection image. In one feasible solution, required shooting requirements can be configured for each inspection point. The shooting requirements may include one or more of camera shooting angle requirements, camera shooting height requirements, and inspection robot chassis angle requirements. For example, the standard image for each inspection point can be understood as being obtained by manually controlling the camera at the inspection point in accordance with the inspection point's shooting requirements. Optionally, the shooting requirements and standard images for each of the multiple inspection points can be pre-stored in the inspection robot. Specifically, before capturing the first image, the above method may further include the following steps:
[0021] 2011. Obtaining the photography requirements of the first inspection point.
[0022] 2012. Adjust the inspection robot according to the photography requirements of the first inspection point. Optionally, adjust the camera angle around the first axis and the camera angle around the second axis according to the camera photography angle requirements. Optionally, adjust the camera height according to the camera photography height requirements. Optionally, adjust the chassis angle according to the inspection robot chassis angle requirements. Step 2012 can be performed after the inspection robot reaches the position corresponding to the first inspection point, or when the inspection robot is about to reach the position corresponding to the first inspection point, which is not specifically limited in this embodiment. 2013. After the inspection robot is adjusted, capture a first image. In the above embodiment, in step 202, the camera is controlled to rotate simultaneously around the first axis and the second axis by a preset angle. In this way, the first lateral offset and the first longitudinal offset can be simultaneously determined using the two images before and after the rotation (i.e., the first image and the second image). Optionally, the first lateral offset and the second longitudinal offset can be calculated in two steps. That is, the camera is first controlled to rotate about a first axis by a preset angle, and a first lateral offset is calculated based on the two images before and after the rotation. Subsequently, the camera is controlled to rotate about a second axis by a preset angle, and a first longitudinal offset is calculated based on the two images before and after the rotation. It should be noted that in certain scenarios where only lateral compensation is required (for example, where the camera can only rotate about the first axis and not the second axis), the step of "controlling the inspection robot's camera to rotate about the second axis by a first preset longitudinal angle value" in the above embodiments can be omitted, and the calculation of the longitudinal offsets and longitudinal compensation angles is unnecessary. In certain scenarios where only longitudinal compensation is required (for example, where the camera can only rotate about the second axis and not the first axis), the step of "controlling the inspection robot's camera to rotate about the first axis by a first preset lateral angle value" in the above embodiments can be omitted, and the calculation of the lateral offsets and lateral compensation angles is unnecessary. The control method for the inspection robot provided by an embodiment of the present disclosure will be described below with reference to FIG. As shown in FIG. 3 , the control method may include the following steps:
[0023] 301. Control the inspection robot to move to the position corresponding to the first inspection point. Multiple inspection points can be preset in the environment to be inspected, and the required shooting requirements and standard images are configured for each inspection point. The shooting requirements can include one or more of the camera shooting angle requirements, the camera shooting height requirements, and the inspection robot chassis angle requirements. Exemplarily, the standard image can be understood as being obtained by manually controlling the camera to shoot at the inspection point according to the shooting requirements of the inspection point. Optionally, the shooting requirements and standard images of each of the multiple inspection points can be pre-stored in the inspection robot. In this way, the inspection robot can subsequently quickly obtain relevant data locally.
[0024] 302. Adjust the chassis angle of the inspection robot according to the inspection robot chassis angle requirement of the first inspection point.
[0025] 303. Adjust the pan-tilt height of the inspection robot according to the camera shooting height requirement of the first inspection point. Here, adjusting the pan-tilt height means adjusting the camera height.
[0026] 304. According to the camera shooting angle requirement of the first inspection point, adjust the angle of the camera around the first axis and the angle around the second axis through the pan-tilt.
[0027] 305. Control the camera to shoot the first image containing the two-dimensional code.
[0028] 306. Locate the two-dimensional code in the first image to determine the first coordinate of the two-dimensional code in the first image. Optionally, the first coordinate is the pixel coordinate of the specified point of the two-dimensional code. Exemplarily, the specified point can be the vertex of the two-dimensional code (for example: the upper left vertex) or the center point. Exemplarily, the opencv two-dimensional code detection and positioning algorithm can be used to locate the two-dimensional code in the image to determine the coordinate of the two-dimensional code in the image. The opencv two-dimensional code detection and positioning algorithm includes a contour detection algorithm. Through the contour detection algorithm, three positioning frames (in the shape of a double square) in the two-dimensional code can be detected, and the coordinate of the two-dimensional code in the image can be determined according to the positions of the three positioning frames.
[0029] 307. Obtain the second coordinate of the two-dimensional code in the standard image of the first inspection point. Optionally, the second coordinate is the pixel coordinate of the specified point of the two-dimensional code.
[0030] 308. Determine the image offset according to the first coordinate and the second coordinate. According to the first coordinate and the second coordinate, determine the third horizontal offset in the image width direction and the third vertical offset in the image height direction between the first image and the standard image. The horizontal offset is (X] - x0): If the result is yes, execute the following step 310; if the result is no, execute the following steps 311-317.
[0031] 310. Determine the first image as a target inspection image. After the inspection robot determines the first image as the target inspection image, it may perform image recognition on the first image to identify information such as device instrument readings, device status, and abnormal conditions. Optionally, the inspection robot may establish a correspondence between the identified device instrument readings, device status, and abnormal conditions and the device information obtained through QR code recognition.
[0032] 311. Use the gimbal to control the camera to rotate 1 degree horizontally and 1 degree vertically. In step 311, the horizontal and vertical rotation directions can be selected based on actual needs and are not specifically limited in this embodiment. In one example, the horizontal rotation direction can be determined by the positive or negative value of the first offset; the vertical rotation direction can be determined by the positive or negative value of the second offset. For example, if the third horizontal offset (X1 - X0) is less than 0, the horizontal rotation direction is leftward; if the third horizontal offset (X1 - X0) is greater than 0, the horizontal rotation direction is rightward; if the third vertical offset (Y1 - Y2) is greater than 0, the vertical rotation direction is upward; and if the third vertical offset (Y1 - Y2) is less than 0, the vertical rotation direction is downward. This can reduce the angle required for subsequent compensation.
[0033] 312. Control the camera to capture a second image.
[0034] 313. Position the QR code in the second image to determine a third coordinate of the QR code in the second image. Optionally, the third coordinate may be a pixel coordinate of a specified point in the QR code.
[0035] 314. Calculate the horizontal step length (i.e., the absolute value of the first horizontal offset) and the vertical step length (i.e., the absolute value of the first vertical offset). The horizontal step length & is the distance the QR code moves on the image when the camera rotates 1 degree horizontally. The vertical step length Sy is the distance the QR code moves on the image when the camera rotates 1 degree vertically. Continuing with the previous example, the third coordinate is (x2, y2); then
[0036] S x =| x2- Xi | ( 1 ) It's important to note that each time the inspection robot reaches the same inspection point, due to positioning error (i.e., the robot can't accurately locate the inspection point), the distance between the robot and the QR code will vary, resulting in variations in its corresponding step length. Therefore, in this solution, the inspection robot recalculates its step length each time it reaches a particular inspection point to ensure accurate step length calculation.
[0037] 315. Determine a second lateral offset in the width direction and a second longitudinal offset in the height direction of the second image and the standard image according to the third coordinate and the second coordinate.
[0038] 316. Determine the ratio of the second lateral offset to the lateral step length as the lateral compensation angle; and determine the ratio of the second longitudinal offset to the longitudinal step length as the longitudinal compensation angle. Specifically, the lateral compensation angle e and the longitudinal compensation angle B may be calculated using the following formula: Among them, (x2 - x°) is the second lateral offset; (y2 - y°) is the second longitudinal offset.
[0039] 317. Adjust the lateral angle of the camera about the first axis according to the lateral compensation angle; and adjust the longitudinal angle of the camera about the second axis according to the longitudinal compensation angle. The lateral adjustment direction is determined by the sign (i.e., the positive or negative) of the lateral compensation angle e. Exemplarily, if the lateral compensation angle e is negative (i.e., less than 0), the lateral adjustment direction is leftward; if the lateral compensation angle e is positive (i.e., greater than 0), the lateral adjustment direction is rightward. The longitudinal adjustment direction is determined by the sign of the longitudinal compensation angle θ. Exemplarily, if the longitudinal compensation angle θ is positive, the longitudinal rotation direction is upward; if the longitudinal compensation angle θ is negative, the longitudinal rotation direction is downward. Adjusting the camera's lateral angle according to the lateral compensation angle e refers to controlling the camera to rotate by 1 degree along the adjustment direction. Adjusting the camera's longitudinal angle according to the longitudinal compensation angle B refers to controlling the camera to rotate by 1 degree along the adjustment direction. After executing step 317, the inspection robot repeats step 305 and subsequent steps until the newly captured first image meets the preset requirements or until the number of repetitions reaches an upper limit for repetitions. The upper limit for repetitions can be set according to actual needs. After capturing an inspection image that meets the preset requirements at each inspection point, the inspection robot will move to the next inspection point to obtain an inspection image that also meets the preset requirements. It should be noted that in actual applications, in addition to using QR codes for visual guidance, other patterns can also be used for visual guidance, which is not specifically limited in the present embodiment. In summary, the technical solution provided by the present embodiment utilizes QR codes for visual guidance when compensating the robot's angle, thereby reducing the offset of the robot's captured images, increasing the robustness of the robot's standard image capture, making it applicable to more complex environments, and resolving the issue of image unavailability. Furthermore, this solution reduces the complexity of pan-tilt angle calculation by calculating longitudinal and lateral step lengths. This eliminates the need to calculate the distance from the pan-tilt to the object and the object's size, enhancing the stability of the solution and reducing errors in pan-tilt angle compensation. The pan-tilt angle compensation scheme provided by this solution can reduce hardware requirements, thereby lowering the manufacturing cost of the robot. Figure 4 shows a schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure. As shown in Figure 4, the electronic device includes a memory 1101 and a processor 1102. Memory 1101 can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device.The memory 1101 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), electrically erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The memory 1101 is used to store programs; the processor 1102, coupled to the memory 1101, is used to execute the programs stored in the memory 1101 to implement the control methods provided in the above-described method embodiments. Furthermore, as shown in FIG4 , the electronic device also includes other components, such as a communication component 1103, a display 1104, a power supply component 1105, and an audio component 1106. FIG4 schematically illustrates only some components and does not imply that the electronic device includes only the components shown in FIG4 . Accordingly, embodiments of the present disclosure further provide a computer-readable storage medium storing a computer program. When executed by a computer, the computer program can implement the steps or functions of the control methods provided in the above-described method embodiments. The embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the components may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art can understand and implement the present embodiment without inventive effort. Through the above description of the embodiments, persons of ordinary skill in the art can clearly understand that each embodiment can be implemented using software and a necessary general-purpose hardware platform, or alternatively, through hardware.Based on this understanding, the essence of the above-mentioned technical solutions, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a ROM (Read Only Memory) / RAM (Random Access Memory), a magnetic disk, an optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or portions thereof. Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present disclosure and are not intended to limit them. Although the present disclosure has been described in detail with reference to the above-mentioned embodiments, persons of ordinary skill in the art will understand that the technical solutions described in the above-mentioned embodiments may be modified or some of the technical features thereof may be replaced by equivalents. Such modifications or replacements do not deviate from the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present disclosure. Industrial Applicability: The solution provided by the embodiments of this disclosure can be applied to the control of cruise robots. When compensating for robot angles, QR codes can be used for visual guidance to reduce the offset of images captured by the robot. This increases the robustness of the robot's standard image capture, makes it applicable to more complex environments, and solves the problem of image unavailability. Furthermore, by calculating longitudinal and lateral step lengths, this solution reduces the complexity of gimbal angle calculation. This eliminates the need to calculate the distance from the gimbal to the object and the object's size, enhancing the solution's stability and reducing errors in gimbal angle compensation. The gimbal angle compensation solution provided by this solution can reduce hardware requirements and, in turn, lower the manufacturing cost of the robot.
Claims
Claims 1. A control method for a patrol robot, comprising: After controlling the inspection robot to reach the position corresponding to the first inspection point, capture a first image. After capturing the first image, control the camera of the inspection robot to rotate by a preset angle value; after the camera rotates by the preset angle value, capture a second image; determine the camera compensation angle according to the first position offset between the first image and the second image and the second position offset between the second image and the standard image of the first inspection point. Adjust the camera angle of the inspection robot according to the camera compensation angle.
2. The method according to claim 1, wherein, The first axis of the camera is parallel to the height direction of the imaging plane of the camera. After capturing the first image, controlling the camera of the inspection robot to rotate by a preset angle value includes: after capturing the first image, controlling the camera of the inspection robot to rotate around the first axis by a first preset horizontal angle value. The preset angle value includes the first preset horizontal angle value.
3. The method according to claim 2, wherein The first position offset includes: the first horizontal offset between the first image and the second image in the width direction of the imaging plane; the second position offset includes: the second horizontal offset between the second image and the standard image of the first inspection point in the width direction of the imaging plane; the camera compensation angle includes: a horizontal compensation angle; determining the camera compensation angle according to the first position offset between the first image and the second image and the second position offset between the second image and the standard image of the first inspection point includes: determining the horizontal compensation angle according to the first horizontal offset and the second horizontal offset.
4. The method according to any one of claims 1 to 3, wherein, The second axis of the camera is parallel to the width direction of the imaging plane of the camera; after capturing the first image, controlling the camera of the inspection robot to rotate by a preset angle value includes: after capturing the first image, controlling the camera of the inspection robot to rotate around the second axis by a first preset vertical angle value; the preset angle value includes the first preset vertical angle value.
5. The method according to claim 4, wherein The first position offset includes: the first vertical offset between the first image and the second image in the height direction of the imaging plane; the second position offset includes: the second vertical offset between the second image and the standard image of the first inspection point in the height direction; the camera compensation angle includes: a vertical compensation angle; determining the camera compensation angle according to the first position offset between the first image and the second image and the second position offset between the second image and the standard image of the first inspection point includes: determining the vertical compensation angle according to the first vertical offset and the second vertical offset.
6. The method according to claim 5, wherein Controlling the camera of the inspection robot to rotate a first preset longitudinal angle value around the second axis includes: In response to the longitudinal compensation angle being greater than a preset value, controlling the camera to rotate by an angle value of the longitudinal compensation angle in a third rotation direction; in response to the longitudinal compensation angle being less than the preset value, controlling the camera to rotate by an angle value of the longitudinal compensation angle in a fourth rotation direction, where the fourth rotation direction is opposite to the third rotation direction.
7. The method according to any one of claims 1 to 3, wherein Before controlling the camera of the inspection robot to rotate a preset angle value, the method further includes: determining a third position offset between the first image and the standard image; based on the third position offset, determining whether the first image meets a preset requirement; if the first image does not meet the preset requirement, then performing the step of controlling the camera of the inspection robot to rotate the preset angle value; if the first image meets the preset requirement, then using the first image as an inspection image.
8. The method according to any one of claims 1 to 3, wherein Both the first image and the second image contain a two-dimensional code; the two-dimensional code is pre-set in the environment to be inspected; the standard image contains a preset area; the method further includes: determining a first position offset between the first image and the second image based on the position of the two-dimensional code in the first image and the position of the two-dimensional code in the second image; determining a second position offset between the second image and the standard image based on the position of the two-dimensional code in the second image and the position of the preset area in the standard image.
9. The method according to claim 8, wherein, The environment to be inspected includes multiple devices to be inspected; Each device to be inspected is provided with a two-dimensional code generated based on the device information of the device to be inspected.
10. The method according to any one of claims 1 to 3, wherein, Before capturing the first image, the method further includes: obtaining the shooting requirements for the first inspection point; the shooting requirements include one or more of the camera shooting angle requirement, the camera shooting height requirement, and the inspection robot chassis angle requirement; adjusting the inspection robot according to the shooting requirements for the first inspection point; after the inspection robot is adjusted, capturing the first image.
11. The method according to any one of claims 1 to 3, wherein Adjusting the camera angle of the inspection robot according to the camera compensation angle includes: determining an adjustment direction based on the positive or negative nature of the camera compensation angle; adjusting the camera angle of the inspection robot along the adjustment direction according to the angle value of the camera compensation angle.
12. The method according to any one of claims 1 to 3, wherein The inspection robot includes: a pan-tilt; the pan-tilt is used to drive the camera to rotate.
13. The method according to claim 12, wherein, The inspection robot further includes: a lifting assembly, and the lifting assembly is used to drive the pan-tilt to move in the vertical direction. 16 14. An inspection robot, comprising: A memory and a processor, wherein the memory is used for storing a program; the processor is coupled to the memory and is used for executing the program stored in the memory to implement the method according to any one of claims 1 to 13.
15. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a computer, it can implement the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Transformer station instrument equipment image recognition method based on autonomous routing inspection robot
CN105930837A
Cruising robot pan-tilt adjustment method based on visual feedback
CN107042511A
Image acquisition method of inspection robot
CN111161446A
Patrol robot holder adjusting method
CN115079727A
Cited By
Underground cable special inspection method and system
CN122111059A