This application claims priority to Chinese Patent Application No. 20191062287.X, filed Jul. 11, 2019, which is hereby incorporated by reference herein as if set forth in its entirety.
The present disclosure relates to robot technology, and particularly to a patrol method using a robot as well as an apparatus and a robot thereof.
In the prior art, a robot can be used to patrol the places such as a power control system room and a railway integrated control system room. The current patrol method using a robot generally adopts a single free navigation method. However, because the free navigation method involves continuous global planning and continuous local planning, it will take much time in each planning, and the larger the map, the longer the time will take, for example, for a map of one thousand square meters, the time for global planning may take 4-5 seconds or more, and the patrol efficiency of the robot is low.
To describe the technical schemes in the embodiments of the present disclosure more clearly, the following briefly introduces the drawings required for describing the embodiments or the prior art. Apparently, the drawings in the following description merely show some examples of the present disclosure. For those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
In order to make the object, the features and the advantages of the present disclosure more obvious and easy to understand, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present disclosure. It should be noted that, the described embodiments are only a part of the embodiments of the present disclosure, instead of all of the embodiments. All other embodiments obtained by those who skilled in the art based on the embodiments of the present disclosure without creative efforts are within the scope of the present disclosure.
FIG. is a flow chart of a patrol method using a robot according to an embodiment of the present disclosure. In this embodiment, a patrol method using a robot for a robot having a localization equipment is provided. The method is a computer-implemented method executable for a processor, which may be implemented through and applied to a patrol system shown in
S101: obtaining a preset patrol configuration file and reading a patrol sequence, a coordinate, and a navigation method of each patrol point from the patrol configuration file.
In which, the patrol configuration file includes at least two navigation methods, which include but are not limited to a free navigation method and a local navigation method.
In this embodiment, the robot 202 is the main body to implement the patrol method. When the patrol is to be performed, the patrol management terminal 201 can issue a patrol instruction to the robot 202, and the robot 202 can perform the patrol process after receiving the patrol instruction.
The robot 202 can obtain the patrol configuration file from the patrol management terminal 201, and read the patrol sequence, the coordinate, and the navigation method of each patrol point from the patrol configuration file. The number of the patrol points may be set according to actual needs. In this embodiment, the total number of patrol points in the patrol configuration file is marked as N.
S102: obtaining a preset electronic map and obtaining a starting coordinate of the robot in the electronic map through the localization equipment.
The electronic map may be stored in a storage medium (e.g., a hard disk or a flash card) of the robot in advance, or may be obtained by the robot from the patrol management terminal 201. After importing the electronic map, the robot can determine its starting coordinate in the electronic map by a localization method through the localization equipment such as a laser sensor or a UWB (ultra-wideband) tag. The localization method may be any one of the localization methods commonly used in the prior art such as AMCL (adaptive Monte Carlo localization) or UWB localization, which is not limited herein.
S103: controlling the robot to move from the starting coordinate to the coordinate of each patrol point according to the patrol sequence.
In which, in the process of moving the robot to the coordinate of the n-th patrol point, the navigation method corresponding to the n-th patrol point in the patrol configuration file is used for navigation, where 1≤n≤N.
In the case that the navigation method corresponding to the n-th patrol point in the patrol configuration file is the free navigation method, a global path planning can be first performed to obtain an optimal global path from the coordinate of the n−1-th patrol point to the coordinate of the n-th patrol point, where the starting coordinate can be taken as a special patrol point, that is, the 0-th patrol point. After obtaining the optimal global path, the robot can be controlled to move according to the optimal global path, and perform an obstacle avoidance processing and a partial path planning during the movement to avoid obstacles on the optimal global path.
S1031: reading a patrol direction of each patrol point from the patrol configuration file.
The patrol direction is a direction in which a front side of the robot orients when the robot is at the patrol point. For example, if the robot has to check whether the working state of a certain instrument is normal at a certain patrol point, the patrol direction of the patrol point should be set to a direction facing the instrument.
In this embodiment, for the sake of simplicity, the direction can be expressed as a two-dimensional vector. For example, the patrol direction of the n-th patrol point can be expressed as: (dirXn, dirYn).
S1032: calculating a movement direction of the robot according to the coordinate of the n−1-th patrol point and the coordinate of the n-th patrol point.
Herein, the coordinate of the n−1-th patrol point is marked as (xn-1, yn-1), and the coordinate of the n-th patrol point is marked as (xn, yn), then the movement direction of the robot can be expressed as (xn−xn-1, yn−yn-1).
S1033: calculating a first rotational angle based on the patrol direction of the n−1-th patrol point and the movement direction, and controlling the robot to rotate according to the first rotational angle such that an orientation of the robot is consistent with the movement direction.
In which, the first rotational angle can be calculated based on the following formula:
where, φ1 is the first rotational angle. After the first rotational angle is obtained, the robot can be controlled to rotate according to the first rotational angle such that the orientation of the robot is consistent with (e.g., the same as) the movement direction.
S1034: controlling the robot to move from the coordinate of the n−1-th patrol point to the coordinate of the n-th patrol point according to the movement direction.
dis=√{square root over ((xn−xn-1)2+(yn−yn-1)2)};
where, dis is the moving distance of the robot.
S1035: calculating a second rotational angle according to the movement direction and the patrol direction of the n-th patrol point, and controlling the robot to rotate according to the second rotational angle such that the orientation of the robot is consistent with the patrol direction of the n-th patrol point.
In which, the second angle can be calculated based on the following formula:
where, φ2 is the second rotational angle. As shown in
Furthermore, after controlling the robot to move from the starting coordinate to the coordinate of each patrol point according to the patrol sequence, patrol operation information of each patrol point can be read from the patrol configuration file, and the robot can be controlled to perform a corresponding patrol operation at each patrol point. The patrol operation information may include, but is not limited to, need shoot recognition or not, the height of a lifting rod when shooting, angle and focal length of the camera, or the like. The robot performs corresponding patrol operations such as checking whether the working state of the instrument of each patrol point is normal or whether there is fire alarm information, based on the information.
In summary, in this embodiment, it no longer uses a single free navigation method, but uses at least two navigation methods in combination and configures the patrol configuration file according to the actual situation in advance. When the robot needs to perform patrols, the patrol configuration file can be first obtained, and the patrol sequence, the coordinate, and the navigation method of each patrol point are read therefrom. Then, it obtains the preset electronic map, obtains the starting coordinate of the robot in the electronic map through the localization equipment, controls the robot to move from the starting coordinate to the coordinate of each patrol point according to the patrol sequence by navigating the robot using the navigation method corresponding to the n-th patrol point in the patrol configuration file during moving the robot to the coordinate of the n-th patrol point, where 1≤n≤N, and N is an amount of the patrol point in the patrol configuration file. In this way, a plurality of navigation methods can be used in combination. In comparison with the prior art that uses a single free navigation method, which greatly saves time consumption and improves the patrol efficiency of the robot.
It should be understood that, the sequence of the serial number of the steps in the above-mentioned embodiments does not mean the execution order while the execution order of each process should be determined by its function and internal logic, which should not be taken as any limitation to the implementation process of the embodiments.
a configuration file obtaining module 601 configured to obtain a preset patrol configuration file and read a patrol sequence, a coordinate, and a navigation method of each patrol point from the patrol configuration file, where the patrol configuration file includes at least two navigation methods;
a coordinate determining module 602 configured to obtain a preset electronic map and obtain a starting coordinate of the robot in the electronic map through the localization equipment; and
a motion patrol module 603 configured to control the robot to move from the starting coordinate to the coordinate of each patrol point according to the patrol sequence by navigating the robot using the navigation method corresponding to the n-th patrol point in the patrol configuration file during moving the robot to the coordinate of the n-th patrol point, where 1≤n≤N, and N is an amount of the patrol point in the patrol configuration file.
Furthermore, the navigation methods may include a free navigation method and a local navigation method. In the case that the navigation method corresponding to the n-th patrol point in the patrol configuration file is the free navigation method, the motion patrol module 603 includes:
a global path planning unit configured to perform a global path planning to obtain an optimal global path from the coordinate of the n−1-th patrol point to the coordinate of the n-th patrol point; and
an obstacle avoidance unit configured to control the robot to move according to the optimal global path, and performing an obstacle avoidance processing and a partial path planning during the movement to avoid obstacles on the optimal global path.
Furthermore, in the case that the navigation method corresponding to the n-th patrol point in the patrol configuration file is the local navigation method, the motion patrol module 603 includes:
a patrol direction reading unit configured to read a patrol direction of each patrol point from the patrol configuration file;
a movement direction calculating unit configured to calculate a movement direction of the robot according to the coordinate of the n−1-th patrol point and the coordinate of the n-th patrol point;
a first rotation unit configured to calculating a first rotational angle based on the patrol direction of the n−1-th patrol point and the movement direction, and controlling the robot to rotate according to the first rotational angle such that an orientation of the robot coincides with the movement direction;
a movement control unit configured to control the robot to move from the coordinate of the n−1-th patrol point to the coordinate of the n-th patrol point according to the movement direction; and
a second rotation unit configured to calculate a second rotational angle according to the movement direction and the patrol direction of the n-th patrol point, and controlling the robot to rotate according to the second rotational angle such that an orientation of the robot coincides with the patrol direction of the n-th patrol point.
Furthermore, the patrol apparatus 600 may further include:
a patrol operation module configured to read patrol operation information of each patrol point from the patrol configuration file, and control the robot to perform a patrol operation corresponding to the patrol operation information at each patrol point.
In this embodiment, each of the above-mentioned modules/units is implemented in the form of software, which can be computer program(s) stored in a memory of the patrol apparatus 600 and executable on a processor of the patrol apparatus 600. In other embodiments, each of the above-mentioned modules/units may be implemented in the form of hardware (e.g., a circuit of the patrol apparatus 600 which is coupled to the processor of the patrol apparatus 600) or a combination of hardware and software (e.g., a circuit with a single chip microcomputer).
Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the details of the working process of the above-mentioned apparatus, module, and unit can refer to the corresponding process in the above-mentioned method embodiment, which are not described herein.
In the above-mentioned embodiments, the description of each embodiment has its focuses, and the parts which are not described or mentioned in one embodiment may refer to the related descriptions in other embodiments.
Exemplarily, the computer program 72 may be divided into one or more modules/units, and the one or more modules/units are stored in the storage 71 and executed by the processor 70 to realize the present disclosure. The one or more modules/units may be a series of computer program instruction sections capable of performing a specific function, and the instruction sections are for describing the execution process of the computer program 72 in the robot 7.
It can be understood by those skilled in the art that
The processor 70 may be a central processing unit (CPU), or be other general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or be other programmable logic device, a discrete gate, a transistor logic device, and a discrete hardware component. The general purpose processor may be a microprocessor, or the processor may also be any conventional processor.
The storage 71 may be an internal storage unit of the robot 7, for example, a hard disk or a memory of the robot 7. The storage 71 may also be an external storage device of the robot 7, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, flash card, and the like, which is equipped on the robot 7. Furthermore, the storage 71 may further include both an internal storage unit and an external storage device, of the robot 7. The storage 71 is configured to store the computer program 72 and other programs and data required by the robot 7. The storage 71 may also be used to temporarily store data that has been or will be output.
Those skilled in the art may clearly understand that, for the convenience and simplicity of description, the division of the above-mentioned functional units and modules is merely an example for illustration. In actual applications, the above-mentioned functions may be allocated to be performed by different functional units according to requirements, that is, the internal structure of the device may be divided into different functional units or modules to complete all or part of the above-mentioned functions. The functional units and modules in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional unit. In addition, the specific name of each functional unit and module is merely for the convenience of distinguishing each other and are not intended to limit the scope of protection of the present disclosure. For the specific operation process of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the above-mentioned method embodiments, and are not described herein.
In the above-mentioned embodiments, the description of each embodiment has its focuses, and the parts which are not described or mentioned in one embodiment may refer to the related descriptions in other embodiments.
Those ordinary skilled in the art may clearly understand that, the exemplificative units and steps described in the embodiments disclosed herein may be implemented through electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented through hardware or software depends on the specific application and design constraints of the technical schemes. Those ordinary skilled in the art may implement the described functions in different manners for each particular application, while such implementation should not be considered as beyond the scope of the present disclosure.
In the embodiments provided by the present disclosure, it should be understood that the disclosed apparatus/robot and method may be implemented in other manners. For example, the above-mentioned apparatus/robot embodiment is merely exemplary. For example, the division of modules or units is merely a logical functional division, and other division manner may be used in actual implementations, that is, multiple units or components may be combined or be integrated into another system, or some of the features may be ignored or not performed. In addition, the shown or discussed mutual coupling may be direct coupling or communication connection, and may also be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms.
The units described as separate components may or may not be physically separated. The components represented as units may or may not be physical units, that is, may be located in one place or be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of this embodiment.
In addition, each functional unit in each of the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional unit.
When the integrated module/unit is implemented in the form of a software functional unit and is sold or used as an independent product, the integrated module/unit may be stored in a non-transitory computer-readable storage medium. Based on this understanding, all or part of the processes in the method for implementing the above-mentioned embodiments of the present disclosure are implemented, and may also be implemented by instructing relevant hardware through a computer program. The computer program may be stored in a non-transitory computer-readable storage medium, which may implement the steps of each of the above-mentioned method embodiments when executed by a processor. In which, the computer program includes computer program codes which may be the form of source codes, object codes, executable files, certain intermediate, and the like. The computer-readable medium may include any primitive or device capable of carrying the computer program codes, a recording medium, a USB flash drive, a portable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), electric carrier signals, telecommunication signals and software distribution media. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, a computer readable medium does not include electric carrier signals and telecommunication signals.
The above-mentioned embodiments are merely intended for describing but not for limiting the technical schemes of the present disclosure. Although the present disclosure is described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that, the technical schemes in each of the above-mentioned embodiments may still be modified, or some of the technical features may be equivalently replaced, while these modifications or replacements do not make the essence of the corresponding technical schemes depart from the spirit and scope of the technical schemes of each of the embodiments of the present disclosure, and should be included within the scope of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201910622871.X | Jul 2019 | CN | national |