This application claims priority to Chinese Patent Application No. 201810687611.6, filed Jun. 28, 2018, which is hereby incorporated by reference herein as if set forth in its entirety.
The present disclosure relates to intelligent robot technology, and particularly to a robot distance measuring method and apparatus as well as a robot using the same.
With the continuous development of intelligent technology, the results of the researches about intelligent robots have gradually industrialized and gradually applied to the industries including medical treatment, health care, family, entertainment, and service industry. A robot is generally disposed with sensors for ranging (distance measurement), so that the robot can evaluate the surrounding environment by measuring the distance with respect to the surrounding obstacles and then make a motion strategy, that is, it determines whether there's a necessary to turn or stop the motion according to the condition of the surrounding obstacles, hence the accuracy of the distance measurement of the obstacle around the robot has a great influence on the navigation performance of the robot.
At present, the traditional method for measuring the distances of obstacles around a robot is that measuring the distances of the obstacles by multiple sensors disposed on the robot simultaneously or by adjacent and nearby sensors disposed on the robot successively. However, the signal transmitted by a certain sensor may be received by other adjacent sensors when the signal is refracted or reflected by the obstacle in the environment. Therefore, due to the mutual interference between adjacent sensors, the measured distance with respect to the surrounding obstacles may be inaccurate, which may affect the navigation performance of the robot.
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 the following descriptions, for purposes of explanation instead of limitation, specific details such as particular system architecture and technique are set forth in order to provide a thorough understanding of embodiments of the present disclosure. However, it will be apparent to those skilled in the art that the present disclosure may be implemented in other embodiments that are less specific of these details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present disclosure with unnecessary detail.
It is to be understood that, when used in the description and the appended claims of the present disclosure, the terms “including” and “comprising” indicate the presence of stated features, integers, steps, operations, elements and/or components, but do not preclude the presence or addition of one or a plurality of other features, integers, steps, operations, elements, components and/or combinations thereof.
It is also to be understood that, the terminology used in the description of the present disclosure is only for the purpose of describing particular embodiments and is not intended to limit the present disclosure. As used in the description and the appended claims of the present disclosure, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It is also to be further understood that the term “and/or” used in the description and the appended claims of the present disclosure refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
As used in the description and the appended claims, the term “if” may be interpreted as “when” or “once” or “in response to determining” or “in response to detecting” according to the context. Similarly, the phrase “if determined” or “if [the described condition or event] is detected” may be interpreted as “once determining” or “in response to determining” or “on detection of [the described condition or event]” or “in response to detecting [the described condition or event]”.
For the purpose of describing the technical solutions of the present disclosure, the following describes through specific embodiments.
the relative position parameter obtaining module 501 is configured to obtain a plurality of relative position parameters of the robot from the plurality of ranging sensors;
the installation distance obtaining module 502 is configured to determine an installation distance between each two of the ranging sensors based on the plurality of relative position parameters;
the installation distance sum obtaining module 503 is configured to determine a sum of the installation distance of each looping arrangement of the plurality of ranging sensors based on the installation distance between each two of the ranging sensors; and
the obstacle ranging module 504 is configured to enable the plurality of ranging sensors sequentially to perform obstacle ranging according to a preset looping rule, where the preset looping rule is that the total length of tracks of sequences to enable the plurality of ranging sensors in a looping period is the largest among the sums of the installation distances of all the looping arrangements of the plurality of ranging sensors.
It can be seen from the above-mentioned description that, based on the preset looping rule that the total length of a track of a sequence to enable the plurality of ranging sensors in a looping period is the largest among the sums of the installation distances of all the looping arrangements of the plurality of ranging sensors, the plurality of ranging sensors are sequentially enabled to perform obstacle ranging. Since the adjacent ranging sensors are avoided to range simultaneously or sequentially, the interference of the adjacent ranging sensors can be minimized, the accuracy of measuring the distance of the surrounding obstacles can be improved, thereby improving the navigation performance of the robot.
Referring to
a distance receiving module 505 configured to receive a plurality of distances of a target obstacle collected according to the looping period by a target ranging sensor, where the target ranging sensor is any one of the plurality of ranging sensors:
a mean square error calculating module 506 configured to calculate a mean square error of the plurality of distances;
a motion trend threshold calculating module 507 configured to calculate a motion trend threshold of the robot based on a motion speed of the robot and a preset proportion; and
a final distance determining module 508 configured to determine a final distance of the target obstacle based on a comparison between the mean square error and the motion trend threshold.
Referring to
Referring to
a ranging sensor enabling module 509 configured to enable the next ranging sensor according to the preset looping rule to perform obstacle measurement, if the latest obtained distance in the plurality of distances is determined as invalid.
It should be noted that, each of the above-mentioned modules/units may be implemented in the form of hardware (e.g., a circuit), software (e.g., a program), or a combination thereof (e.g., a circuit with a single chip microcomputer).
In one embodiment, the plurality of ranging sensors include one or more of an ultrasonic ranging sensor, an infrared ranging sensor, and a millimeter wave radar.
It should be comprehended that, in this embodiment, the processor 601 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 input device 602 may include a touch panel, a fingerprint sensor (for collecting fingerprint information of the user and direction information of the fingerprint), a microphone, and the like, and the output device 603 may include a display (LCD or the like), a speaker, and the like.
The memory 604 can include read only memory and random access memory and provides instructions and data to the processor 601. A portion of the memory 604 can also include a non-volatile random access memory. For example, the memory 604 can also store information of the device type.
In a specific implementation, the processor 601, the input device 602, and the output device 603 described in the embodiments of the present disclosure may implement the implementation of the present disclosure.
In a specific implementation, the processor 601, the input device 602, and the output device 603 in this embodiment may perform the first embodiment and the implementation manner described in the second embodiment of the service request method provided by this embodiment. The implementation manner of the terminal described in this embodiment may also be implemented, and details are not described herein again.
S101: obtaining a plurality of relative position parameters of the robot from the plurality of ranging sensors.
In this embodiment, the ranging sensor may be one or more of an ultrasonic ranging sensor, an infrared ranging sensor, and a millimeter wave radar. The robot may be any type of robot having navigation function. The relative position parameters may be relative position coordinates of the ranging sensors in a same coordinate system.
S102: determining an installation distance between each two of the ranging sensors based on the plurality of relative position parameters.
In this embodiment, the installation distance refers to the linear distance between two ranging sensors. The installation distance of each two ranging sensors can be calculated based on the relative position coordinates of the ranging sensors in the same coordinate system. For example, as shown in Table 1, the layout of the ranging sensor shown in
S103: determining a sum of the installation distance of each looping arrangement of the plurality of ranging sensors based on the installation distance between each two of the ranging sensors.
In this embodiment, all of the looping arrangements refer to a combination of all the arrangement manners made by arranging all the ranging sensors from any of the ranging sensors and then returning to the originating ranging sensor. The sum of the installation distances of the looping arrangements refers to the total length of the tracks of the sequences to arrange the ranging sensors from the first ranging sensors and then returning to the first ranging sensor to terminate the arrangement. For example, referring to
S104: enabling the plurality of ranging sensors sequentially to perform obstacle ranging according to a preset looping rule, where the preset looping rule is that the total length of tracks of sequences to enable the plurality of ranging sensors in a looping period is the largest among the sums of the installation distances of all the looping arrangements of the plurality of ranging sensors.
In this embodiment, the largest among the sums of the installation distances of all the looping arrangements is selected, the looping arrangements corresponding to the largest sum is taken as the preset looping rule for sequentially enabling the ranging sensors to perform obstacle ranging. For example, referring to
It can be seen from the above-mentioned description that, based on the preset looping rule that the total length of a track of a sequence to enable the plurality of ranging sensors in a looping period is the largest among the sums of the installation distances of all the looping arrangements of the plurality of ranging sensors, the plurality of ranging sensors are sequentially enabled to perform obstacle ranging. Since the adjacent ranging sensors are avoided to range simultaneously or sequentially, the interference of the adjacent ranging sensors can be minimized, the accuracy of measuring the distance of the surrounding obstacles can be improved, thereby improving the navigation performance of the robot.
S201: receiving a plurality of distances of a target obstacle collected according to the looping period by a target ranging sensor, where the target ranging sensor is any one of the plurality of ranging sensors.
In this embodiment, the looping period may be set according to actual needs, for example, set according to the motion speed of the robot, and the looping period may be inversely proportional to the motion speed of the robot.
S202: calculating a mean square error of the plurality of distances.
In this embodiment, the mean square error reflects the dispersion level of the plurality of distances, and the mean square error is proportional to the motion speed of the robot.
S203: calculating a motion trend threshold of the robot based on a motion speed of the robot and a preset proportion.
In this embodiment, the motion speed of the robot is multiplied by the preset proportion to obtain the motion trend threshold of the robot. The preset proportion is related to the environment in which the robot is located. The motion trend threshold of the robot reflects the motion speed of the robot in different environments.
S204; determining a final distance of the target obstacle based on a comparison between the mean square error and the motion trend threshold.
In this embodiment, the final distance of the target obstacle can be determined through the magnitude of the mean square error and the motion trend threshold. In which, the final distance of the target obstacle can be determined by determining whether the latest collected distance among the plurality of distances of the target obstacle which are collected according to the looping period is valid or not.
It can be seen from the above-mentioned description that, by comparing the motion speed of the robot and the mean square error of the plurality of distances, the distances of the target obstacle that obviously have measurement error can be filtered out, and the accuracy of the navigation of the robot is further improved.
S301: determining the latest obtained distance in the plurality of distances to be invalid, if the mean square error is larger than the motion trend threshold.
S302: determining the latest obtained distance in the plurality of distances as the final distance, if the mean square error is smaller than the motion trend threshold.
In this embodiment, if the mean square error is larger than the motion trend threshold, the latest collected distance (the latest distance collected according to the looping period) in the plurality of distances of the target obstacle which is collected according to the looping period has been interfered and therefore has error, and it is invalid; otherwise, it is valid.
The embodiments corresponding to
Assuming that the amount of the distances is 5, where the distance 1=1 m (meter), the distance 2=2 m, the distance 3=3 m, the distance 4=5 m, the distance 5=5 m, the looping period is 60 ms (millisecond), and the average speed of the robot is 1 m/s (meter/second).
It can be calculated to obtain the mean square error of the five distances which equals √{square root over (2)}.
If the preset proportion K=1, then √{square root over (2>1*1)}, and the latest obtained distance is invalid.
If the preset proportion K=2, then √{square root over (2<2*1)}, and the latest obtained distance is valid and the latest distance 5=5 m.
In one embodiment, if it is determined that the latest obtained distance among the plurality of distances is invalid, the next ranging sensor is enabled according to the preset looping rule to perform obstacle measurement.
In this embodiment, if it is determined that the measurement of the target ranging sensor is invalid, the re-measurement will not be performed immediately, but the latest obtained distance is discarded and the next ranging sensor is enabled, thereby improving the ranging efficiency, and further ensuring the timely response of the navigation of the robot.
In another embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided. The non-transitory computer-readable storage medium stores a computer program including program instructions. All or part of the processes in the method for implementing the above-mentioned embodiments of the present disclosure are implemented when the program instructions are executed by the processor, 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 non-transitory computer-readable storage 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 non-transitory computer readable storage 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 non-transitory computer readable storage medium does not include electric carrier signals and telecommunication signals.
The computer-readable storage medium may be an internal storage unit of the robot of any of the above-mentioned embodiment, for example, a hard disk or a memory of the robot. The computer-readable storage medium may also be an external storage device of the robot, 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. Furthermore, the computer-readable storage medium may further include both an internal storage unit and an external storage device, of the robot. The computer-readable storage medium is configured to store the computer program and other programs and data required by the robot. The computer-readable storage medium may also be used to temporarily store data that has been or will be output.
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, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of the examples have been generally described in terms of functions in the above-mentioned description. 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.
Those skilled in the art may clearly understand that, for the convenience and simplicity of description, for the specific operation process of the above-mentioned robot and units, reference may be made to the corresponding processes in the above-mentioned method embodiments, and are not described herein.
In the embodiments provided by the present disclosure, it should be understood that the disclosed robot and method may be implemented in other manners. For example, the above-mentioned apparatus embodiment is merely exemplary. For example, the division of 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, the functional units in each of 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.
The forgoing is only the specific embodiment of the present disclosure, while the scope of the present disclosure is not limited thereto. For those skilled in the art, various equivalent modifications or replacements that can be easily conceived within the technical scope of the present disclosure should be included within the scope of the present disclosure. Therefore, the scope of the present disclosure should be determined in accordance with the scope of the claims.
Number | Date | Country | Kind |
---|---|---|---|
201810687611.6 | Jun 2018 | CN | national |