CN113172658A - Robot positioning method, device, equipment and medium - Google Patents

Robot positioning method, device, equipment and medium Download PDF

Info

Publication number
CN113172658A
CN113172658A CN202110387940.0A CN202110387940A CN113172658A CN 113172658 A CN113172658 A CN 113172658A CN 202110387940 A CN202110387940 A CN 202110387940A CN 113172658 A CN113172658 A CN 113172658A
Authority
CN
China
Prior art keywords
angle
determining
measurement
point
measurement point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110387940.0A
Other languages
Chinese (zh)
Inventor
葛增晔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Orion Star Technology Co Ltd
Original Assignee
Beijing Orion Star Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Orion Star Technology Co Ltd filed Critical Beijing Orion Star Technology Co Ltd
Priority to CN202110387940.0A priority Critical patent/CN113172658A/en
Publication of CN113172658A publication Critical patent/CN113172658A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J19/00Accessories fitted to manipulators, e.g. for monitoring, for viewing; Safety devices combined with or specially adapted for use in connection with manipulators
    • B25J19/0095Means or methods for testing manipulators
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C22/00Measuring distance traversed on the ground by vehicles, persons, animals or other moving solid bodies, e.g. using odometers, using pedometers
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Optical Radar Systems And Details Thereof (AREA)

Abstract

The application discloses a robot positioning method, device, equipment and medium, which are used for accurately judging whether a robot is located in a corridor or not at present so as to improve the accuracy of robot positioning. The embodiment of the application can be directed at each first measuring point of a laser radar, a first set number of measuring point sets with continuous measuring time including the first measuring point is determined, a target straight line corresponding to the measuring point set is determined according to the coordinates of each measuring point in the measuring point set, the laser point cloud angle of the target straight line and the set direction is determined, and based on each laser point cloud angle, after a variance value is determined, whether a robot is located in a corridor or not can be determined quickly and accurately according to the variance value, so that the accuracy of robot positioning can be improved quickly.

Description

Robot positioning method, device, equipment and medium
Technical Field
The present disclosure relates to the field of robot positioning technologies, and in particular, to a method, an apparatus, a device, and a medium for positioning a robot.
Background
The positioning technology is a precondition for the robot to complete tasks such as autonomous navigation, path planning and the like, and is a hot spot for the research in the robot field. The robot positioning sensor comprises various sensors such as a laser radar and a camera, wherein the single-line laser radar becomes a core sensor for robot positioning by virtue of the advantages of stability, reliability and the like.
However, when the robot is located in the corridor, because the single line laser radar is under-constrained in the corridor, the single line laser radar does not have enough information to estimate the complete and accurate positioning information of the robot, and if the positioning information of the single line laser radar is directly adopted to position the robot, the situation that the robot is positioned inaccurately may occur.
Disclosure of Invention
The application provides a robot positioning method, device, equipment and medium, which are used for accurately judging whether a robot is currently located in a corridor or not so as to improve the accuracy of robot positioning.
In a first aspect, the present application provides a method for positioning a robot, the method comprising:
determining a first set number of measurement point sets with continuous measurement time, including a first measurement point, aiming at each first measurement point of the laser radar, determining a target straight line corresponding to each measurement point set according to the coordinate of each measurement point in the measurement point sets, and determining a laser point cloud angle between the target straight line and a set direction, wherein the coordinate is the coordinate under a laser radar coordinate system;
in a second aspect, the present application provides a positioning device for a robot, the device comprising:
the laser radar measuring device comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining a first set number of measuring point sets with continuous measuring time, including a first measuring point, aiming at each first measuring point of a laser radar, determining a target straight line corresponding to each measuring point set according to the coordinate of each measuring point in the measuring point sets, and determining the laser point cloud angle between the target straight line and a set direction, wherein the coordinate is the coordinate under a laser radar coordinate system;
the second determining module is used for determining a variance value based on each laser point cloud angle;
and the third determining module is used for determining whether the robot is located in the corridor or not according to the variance value.
In a third aspect, the present application further provides an electronic device, which at least comprises a processor and a memory, wherein the processor is configured to implement the steps of the positioning method for the robot as described in any one of the above when executing the computer program stored in the memory.
In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the steps of the positioning method for a robot as described in any one of the above.
The embodiment of the application can be directed at each first measuring point of a laser radar, a first set number of measuring point sets with continuous measuring time including the first measuring point is determined, a target straight line corresponding to the measuring point set is determined according to the coordinates of each measuring point in the measuring point set, the laser point cloud angle of the target straight line and the set direction is determined, and based on each laser point cloud angle, after a variance value is determined, whether a robot is located in a corridor or not can be determined quickly and accurately according to the variance value, so that the accuracy of robot positioning can be improved quickly.
Drawings
Fig. 1 is a schematic diagram of a positioning process of a first robot according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of each measurement point of a single line laser radar according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of an angle distribution of a laser point cloud according to an embodiment of the present disclosure;
fig. 4 is a schematic view of another laser point cloud angle distribution provided in the embodiment of the present application;
fig. 5 is a schematic diagram of a positioning process of a second robot according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a positioning process of a second robot according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of each measurement point of another single line laser radar provided in an embodiment of the present application;
fig. 8 is a schematic diagram of a positioning process of a third robot according to an embodiment of the present disclosure;
fig. 9 is a schematic view of a positioning device of a robot according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between similar or analogous objects or entities and not necessarily for describing a particular sequential or chronological order, unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
In order to judge whether the robot is currently located in a corridor or not and improve the accuracy of robot positioning, the embodiment of the application provides a robot positioning method, device, equipment and medium.
Example 1:
fig. 1 is a schematic diagram of a positioning process of a first robot according to an embodiment of the present disclosure, where the process includes the following steps:
s101: the method comprises the steps of determining a first set number of measurement point sets with continuous measurement time, including a first measurement point, for each first measurement point of the laser radar, determining a target straight line corresponding to each measurement point set according to the coordinate of each measurement point in the measurement point sets, and determining a laser point cloud angle between the target straight line and a set direction, wherein the coordinate is the coordinate under a laser radar coordinate system.
The positioning method of the robot provided by the embodiment of the application is applied to electronic equipment, and the electronic equipment can be a robot or a controller of the robot, and the like.
In a possible implementation manner, a single line laser radar in the robot may periodically measure the position information of the robot at a set frequency, fig. 2 is a schematic diagram of each measurement point of a single line laser radar provided in an embodiment of the present application, as shown in fig. 2, in a possible implementation manner, during a current measurement period, the single line laser radar may sequentially obtain a plurality of measurement points, such as a1, a2, a3, a4, a5, …, a14, … an, and the like by rotating (for example, rotating 360 degrees). The electronic equipment can acquire the coordinates of each measuring point of the single-line laser radar in the current measuring period under the laser radar coordinate system.
The laser radar coordinate system can be a rectangular coordinate system established by taking the position of the laser radar as an original point, and the coordinates of each measuring point under the laser radar coordinate system can be determined by adopting the prior art, so that the repeated description is omitted.
In one possible implementation, after each measurement point in the current measurement cycle is acquired, the steps S101-S103 are executed to determine whether the robot is currently located in the corridor. At the next measurement cycle, each measurement point in the next measurement cycle continues to be acquired, and the steps of S101-S103 are repeatedly performed to continuously determine whether the robot is currently located in the corridor. In each measurement period, acquiring each measurement point in the measurement period after the measurement period is finished, and executing the steps of S101-S103; the steps of S101 to S103 may be executed after the measurement points are acquired in real time.
In a possible embodiment, in order to determine whether the robot is currently located in the corridor, for each measurement point (denoted as a first measurement point) of the lidar in the current measurement period, a set of measurement points corresponding to the first measurement point may be determined, where the set of measurement points includes a first set number of measurement points, and the first set number of measurement points is a first set number of measurement points including the first measurement point and having consecutive measurement times. Specifically, each measurement point may carry measurement time, and a first set number of measurement point sets with continuous measurement time including the first measurement point may be determined according to the measurement time carried by each measurement point. The first set number may be flexibly set according to a requirement, and may be, for example, 2, 3, 4, 5, and the like, which is not specifically limited in this application.
The method for selecting the first set number of measurement point sets including the first measurement point is not particularly limited in the present application, and for example, the first set number of measurement point sets with continuous measurement time may be sequentially selected with the first measurement point as a starting point; or a first set of measuring points with continuous measuring time can be selected in sequence by taking the first measuring point as a terminal point; or other measurement points may be used as a starting point or an end point, a first set number of measurement point sets with continuous measurement time including the first measurement point are sequentially selected, and the like, and the measurement points can be flexibly set according to requirements. For convenience of understanding, the manner of selecting the first set of measurement points including the first measurement point is exemplified below by a specific embodiment, and for example, referring to fig. 2, for example, a1, a2, a3, a4, a5, a6, and a7 … … are measurement points with consecutive measurement times, and taking the first set number as 5 as an example, for the first measurement point a3, the set of measurement points including five measurement points a1, a2, a3, a4, and a5 may be determined to be the set of measurement points corresponding to the first measurement point, the set of measurement points including five measurement points a2, a3, a4, a5, and a6 may be determined to be the set of measurement points corresponding to the first measurement point, and the set of measurement points including five measurement points a3, a4, a5, a6, and a7 may be determined to be the set of measurement points corresponding to the first measurement point.
For each first measurement point, after a measurement point set corresponding to the first measurement point is determined, the coordinates of each measurement point in the measurement point set in the laser radar coordinate system may be determined, and according to the coordinates of each measurement point in the measurement point set, a target straight line corresponding to the measurement point set is determined. For example, fitting (fitting a straight line) may be performed based on the coordinates of each measurement point in the measurement point sets, and any one of the fitted straight lines is used as a target straight line corresponding to the measurement point sets.
After the target straight line corresponding to the measurement point set is determined, the laser point cloud angle between the target straight line and the set direction can be further determined. As can be understood, the laser point cloud angle is an included angle between the target straight line and the set direction. In one possible embodiment, the lidar coordinate system is a coordinate system established with the position of the lidar in the robot as the origin. The setting direction may be any direction, for example, a direction in which an X axis is located, a direction in which a positive X axis is located, a direction in which a Y axis is located, a direction in which a positive Y axis is located, an arbitrary direction in which an angle with the X axis is not 90 degrees, or the like, and the setting direction may be flexibly selected according to a need. The laser point cloud angle can be an angle in a range of [0 degree, 180 degrees ], can also be an angle in a range of [0 degree, 360 degrees ] and the like, can be flexibly set according to requirements, and is not specifically limited in the application.
In one possible embodiment, for convenience of calculation, the setting direction may be a direction in which the X axis is located, a direction in which the Y axis is located, or the like.
S102: and determining a variance value based on each laser point cloud angle.
In one possible embodiment, after the laser point cloud angle is determined for each first measurement point, a variance value may be determined based on each laser point cloud angle. The prior art can be adopted when determining the variance value based on each laser point cloud angle, and details are not repeated here.
For example, when determining the variance value, the average angle of each laser point cloud angle may be determined first, and for convenience of description, each laser point cloud angle is used as tiThe number of laser point cloud angles is represented by N, and the average angle is represented by
Figure BDA0003014547710000061
Expressed as the variance value σ, the average angle
Figure BDA0003014547710000062
Variance value
Figure BDA0003014547710000063
S103: and determining whether the robot is currently located in the corridor or not according to the variance value.
Fig. 3 is a schematic diagram of an angle distribution of a laser point cloud provided in an embodiment of the present application, and fig. 4 is a schematic diagram of another angle distribution of a laser point cloud provided in an embodiment of the present application, where an abscissa in fig. 3 and fig. 4 is an angle value (a specific value is not shown) of a preset angle sub-range, and an ordinate is the number of laser point cloud angles located in each angle sub-range. As shown in fig. 3, in general, when the robot is currently located in the corridor, the values of each laser point cloud angle are relatively concentrated, and may be relatively concentrated in a small number of angle sub-ranges, and the variance value is relatively small. As shown in fig. 4, when the robot is not located in the corridor, the numerical values of the angles of each laser point cloud are relatively dispersed, and may be relatively dispersed and located in a large number of angle sub-ranges, and the variance value is relatively large.
Based on this, in one possible embodiment, when determining whether the robot is currently located in the corridor according to the variance value, it may be determined that the robot is currently located in the corridor when the variance value is relatively small; and when the variance value is relatively large, determining that the robot is not located in the corridor currently.
The embodiment of the application can be directed at each first measuring point of a laser radar, a first set number of measuring point sets with continuous measuring time including the first measuring point is determined, a target straight line corresponding to the measuring point set is determined according to the coordinates of each measuring point in the measuring point set, the laser point cloud angle of the target straight line and the set direction is determined, and based on each laser point cloud angle, after a variance value is determined, whether a robot is located in a corridor or not can be determined quickly and accurately according to the variance value, so that the accuracy of robot positioning can be improved quickly.
Example 2:
on the basis of the foregoing embodiment, in this embodiment, the determining whether the robot is currently located in the corridor according to the variance value includes:
if the variance value is within a set first variance interval, determining that the robot is currently located in a corridor; or
If the variance value is within a set second variance interval, determining that the robot is not located in a corridor currently; wherein the maximum variance threshold of the first variance interval is less than or equal to the minimum variance threshold of the second variance interval.
In one possible embodiment, when determining whether the robot is currently located in the corridor according to the variance value, two variance intervals may be preset: a first variance interval and a second variance interval, wherein each variance value in the first variance interval is relatively small, each variance value in the second variance interval is relatively large, and a maximum variance threshold value in the first variance interval is less than or equal to a minimum variance threshold value in the second variance interval. The specific judgment conditions are as follows: if the variance value obtained in the S102 is in the first variance interval, determining that the robot is currently located in the corridor; and if the variance value obtained in the step S102 is in the second variance interval, determining that the robot is not located in the corridor currently.
In one possible embodiment, the maximum variance threshold of the first variance interval and the minimum variance threshold of the second variance interval are referred to as variance threshold values when the maximum variance threshold of the first variance interval is equal to the minimum variance threshold of the second variance interval. When determining whether the robot is currently located in the corridor according to the variance value, if the variance value is smaller than a set variance value threshold, determining that the robot is currently located in the corridor; or if the variance value is larger than or equal to the variance value threshold value, determining that the robot is not located in the corridor currently.
In a possible implementation manner, the variance value threshold may be preset, wherein a specific value of the variance value threshold may be flexibly set according to a requirement, which is not specifically limited in the present application. Whether the robot is located in the corridor currently can be determined according to the variance value and the set variance value threshold. The specific judgment conditions are as follows: if the variance value obtained in the step S102 is smaller than the set variance value threshold value, the variance value is determined to be in the set first variance interval, and the robot is determined to be currently located in the corridor; and if the variance value obtained in the step S102 is greater than or equal to the variance value threshold, determining that the variance value is within a set second variance interval, and determining that the robot is not currently located in the corridor.
For convenience of understanding, the positioning method of the robot provided in the embodiment of the present application is described below by using a specific embodiment. Fig. 5 is a schematic diagram of a positioning process of a second robot according to an embodiment of the present application, and as shown in fig. 5, the positioning process includes the following steps:
s501: the method comprises the steps of determining a first set number of measurement point sets with continuous measurement time, including a first measurement point, for each first measurement point of the laser radar, determining a target straight line corresponding to each measurement point set according to the coordinate of each measurement point in the measurement point sets, and determining the laser point cloud angle of the target straight line and the set direction, wherein the coordinate is the coordinate under a laser radar coordinate system.
S502: based on each laser point cloud angle, a variance value is determined.
S503: judging whether the variance value is smaller than a set variance value threshold value, if so, executing S504; if not, go to S505.
S504: it is determined that the robot is currently located in the corridor.
S505: it is determined that the robot is not currently located in the corridor.
According to the method and the device, whether the robot is located in the corridor or not can be quickly and accurately determined according to the variance value and the set variance value threshold.
In one possible embodiment, the robot may generally include a plurality of positioning modes, for example, a single line laser radar-based positioning mode, a wheel odometer-based positioning mode, a vision-based positioning mode, and the like. When the robot is determined to be currently located in the corridor, the single-line laser radar is under-constrained in the corridor, the single-line laser radar does not have enough information to estimate the complete and accurate positioning information of the robot, and in order to acquire the accurate positioning information, the position information of the robot can be determined according to other positioning modes except the single-line laser radar in the robot. Other positioning modes can be wheel type odometer, vision and the like, can be flexibly set according to requirements, and are not specifically limited in the application. It can be understood that when it is determined that the robot is not located in the corridor at present, the position information of the robot can be determined according to the positioning data of the single-line laser radar, and data fusion can also be performed according to the positioning data of the single-line laser radar and other positioning modes, so that the position information of the robot is determined, and the method is not specifically limited in this application.
Example 3:
on the basis of the foregoing embodiments, in this embodiment of the present application, the determining, according to the coordinates of each measurement point in the measurement point set, a target straight line corresponding to the measurement point set includes:
fitting based on the coordinates of each measuring point in the measuring point set to determine at least one candidate straight line;
for each candidate straight line, determining the distance sum of the distance between each measuring point in the measuring point set and the candidate straight line; and
and determining the candidate straight line corresponding to the minimum value in the distance sum as a target straight line corresponding to the measurement point set.
In a possible implementation manner, when determining a target straight line corresponding to the measurement point set according to the coordinates of each measurement point in the measurement point set, fitting (fitting a straight line) may be performed based on the coordinates of each measurement point in the measurement point set, and at least one straight line obtained by fitting may be determined as a candidate straight line. Then, for each candidate straight line, a distance between each measurement point in the set of measurement points and the candidate straight line is determined, and a sum value of each distance may be determined as a distance sum of distances between each measurement point and the candidate straight line. In order to accurately determine the target straight line, the candidate straight line corresponding to the minimum value in the distance sum may be determined as the target straight line corresponding to the measurement point set.
For convenience of understanding, the process of determining the target straight line provided in the embodiments of the present application is described below with a specific embodiment. Referring to fig. 2, taking the first measurement point a1, the first set number being 2, and the measurement points in the measurement point set being a1 and a2 as an example, if after fitting the coordinates of each measurement point in the measurement point set, the determined candidate straight lines are respectively a candidate straight line a and a candidate straight line B (not shown), where the candidate straight line a is a straight line passing through a1 and a2, and the candidate straight line B is a perpendicular bisector (perpendicular bisector) of a segment composed of a1 and a2, for the candidate straight line a, the distances between the measurement points a1 and a2 in the measurement point set and the candidate straight line a are both 0, and the sum of the distances is 0. Regarding the candidate straight line B, the length of the line segment composed of a1 and a2 is recorded as L1, the distances between the measurement points a1 and a2 and the candidate straight line B are both L1/2, and the sum of the distances is L1. The candidate straight line corresponding to the minimum value in the distance sum is the candidate straight line a, and the candidate straight line a may be determined as the target straight line.
Example 4:
on the basis of the foregoing embodiments, in this application embodiment, the fitting based on the coordinates of each measurement point in the measurement point set, and determining at least one candidate straight line includes:
optionally including a second set number of measurement points in the set of measurement points, wherein the second set number is less than or equal to the first set number; and
and aiming at each measuring point group, fitting based on the coordinates of each measuring point in the measuring point group to obtain at least one candidate straight line.
In a possible embodiment, when the candidate straight line is determined by fitting based on the coordinates of each measurement point in the measurement point set, the fitting may be performed based on all measurement points in the measurement point set, or may be performed based on a part of measurement points in the measurement point set, specifically, a measurement point group including a second set number of measurement points may be optionally included in the measurement point set, where the second set number may be greater than or equal to 2 and less than or equal to the first set number, and may be flexibly set according to requirements. Then, for each measurement point group, fitting may be performed based on coordinates of each measurement point in the measurement point group, thereby obtaining at least one candidate straight line.
For convenience of understanding, the process of determining candidate straight lines provided in the embodiments of the present application is described below with a specific embodiment. Taking the first set number as 5, the measurement point set includes 5 measurement points a1, a2, a3, a4, and a5 as an example, the second set number may be any one of 2, 3, 4, and 5, and may be flexibly set according to requirements, and taking the second set number as 3 as an example, one measurement point group may be formed by optionally 3 measurement points from 5 measurement points a1, a2, a3, a4, and a5, where each measurement point in the measurement point group may be a measurement point with continuous measurement time or a measurement point with discontinuous measurement time, and for example, the formed measurement point group may include the first measurement point group formed by a1, a2, and a 3; a second set of measurement points consisting of a1, a2, a 4; a third measurement point group consisting of a1, a2, a 5; a fourth measurement point group consisting of a2, a3, a 4; a fifth set of measurement points consisting of a2, a3, a 5; a sixth measurement point group consisting of a3, a4, a5, and the like.
For each measurement point group, fitting may be performed based on coordinates of each measurement point in the measurement point group to obtain a candidate straight line of the measurement point group. In the prior art, fitting may be performed based on the coordinates of each measurement point in the measurement point group to obtain a candidate straight line, which is not described herein again. After determining the candidate straight lines of the measurement point group for each measurement point group, the distance sum of the distances between the 5 measurement points of a1, a2, a3, a4, a5 and the candidate straight line may be determined for each candidate straight line, and then the candidate straight line corresponding to the minimum value of the distance sum may be determined as the target straight line corresponding to the measurement point set (including 5 measurement points of a1, a2, a3, a4, a 5), and then the laser point cloud angle of the target straight line and the set direction may be determined based on the target straight line.
Example 5:
in order to accurately determine the variance value, in the embodiments of the present application, after determining a first set number of measurement point sets including the first measurement point and having consecutive measurement times, before determining a target straight line corresponding to each measurement point set according to coordinates of each measurement point in the measurement point sets, the method further includes:
and determining second measurement points adjacent to the first measurement point in the measurement point set in measurement time, and if the distance between the first measurement point and each second measurement point is smaller than a set distance threshold, executing a step of determining a target straight line corresponding to the measurement point set according to the coordinates of each measurement point in the measurement point set.
In a possible embodiment, in order to accurately determine the variance value, after determining a first set of measurement points with continuous measurement time including a first measurement point for each first measurement point of the lidar, before determining a target straight line corresponding to the measurement point set according to coordinates of each measurement point in the measurement point set, it may be determined whether the first measurement point is a noise point, and if the first measurement point is a noise point, the first measurement point may be discarded, that is, the steps of S101 to S103 are not performed for the first measurement point. And continues the steps of S101-S103 for the next measurement point. And if the first measurement point is not noise, performing the steps of S101-S103 for the first measurement point.
In a possible implementation manner, in order to determine whether the first measurement point is a noise point, a distance threshold may be preset, and the distance threshold may be flexibly set according to a requirement, which is not specifically limited in this embodiment of the application. In determining whether a first measurement point is noisy, a second measurement point in the measurement point set that is adjacent to the measurement time of the first measurement point, such as a measurement point at a previous measurement time before the measurement time of the first measurement point and/or a measurement point at a next measurement time after the measurement time of the first measurement point, may be determined. Then, the distance between the first measurement point and each second measurement point is determined, if the distance between the first measurement point and each second measurement point is smaller than the set distance threshold, the distance between the first measurement point and each second measurement point is considered to be smaller, the continuity between the first measurement point and each second measurement point is better, the measurement data of the first measurement point is more stable, the first measurement point is considered not to be a noise point, and the steps S101-S103 may be executed for the first measurement point.
If the distance between the first measurement point and any one of the second measurement points is greater than or equal to the set distance threshold, the distance between the first measurement point and the second measurement point may be considered to be large, the continuity between the first measurement point and the second measurement point is poor, the measurement data of the first measurement point is relatively unstable, the first measurement point may be determined as noise, the first measurement point is discarded, and the steps of S101-S103 may not be performed for the first measurement point.
For ease of understanding, the process of determining whether the first measurement point is noisy will be exemplified by a specific embodiment. Illustratively, taking a first measurement point as a3 as an example, second measurement points adjacent to the first measurement point in measurement time are a2 and a4 respectively, the distance between a2 and a3 is denoted as L2, and the distance between a3 and a4 is denoted as L3. If both L2 and L3 are less than the set distance threshold, then the first measurement point a3 is not noisy. If one of L2 or L3 is greater than or equal to the set distance threshold, then the first measurement point may be determined to be noisy. It will be appreciated that if both L2 and L3 are greater than or equal to the set distance threshold, then the first measurement point may be determined to be noisy.
For convenience of understanding, the following describes a positioning process of the robot provided in the embodiments of the present application with a specific embodiment. Fig. 6 is a schematic diagram of a positioning process of a second robot according to an embodiment of the present application, where as shown in fig. 6, the process includes the following steps:
s601: for each first measurement point of the lidar, a first set number of measurement point sets are determined, including the first measurement point, for which measurement times are consecutive.
S602: determining second measurement points adjacent to the first measurement point in the measurement point set in terms of measurement time, judging whether the distances between the first measurement point and each second measurement point are smaller than a set distance threshold, and if so, executing S603; if the distance between the first measurement point and any one of the second measurement points is greater than or equal to the set distance threshold (if no), the first measurement point is determined as a noise point, and the process returns to S601.
S603: and determining a target straight line corresponding to the measurement point set according to the coordinates of each measurement point in the measurement point set.
S604: and determining the laser point cloud angle between the target straight line and the set direction.
S605: based on each laser point cloud angle, a variance value is determined.
S606: and determining whether the robot is currently located in the corridor or not according to the variance value.
Example 7:
on the basis of the foregoing embodiments, in the embodiments of the present application, the determining the laser point cloud angle between the target straight line and the set direction includes:
for each measuring point, determining an angle between a target straight line corresponding to a measuring point set including the measuring point and the set direction;
if the determined angle is within a set first angle range, determining the determined angle as the laser point cloud angle; or
If the determined angle is not in the set first angle range, converting the determined angle into a corresponding angle in the first angle range, and determining the converted angle as the laser point cloud angle.
In a possible embodiment, considering that, for example, when the laser point cloud angle is 90 degrees or 270 degrees, it may indicate that the included angle between the target straight line and the set direction is 90 degrees, and the target straight line and the set direction are perpendicular to each other; when the laser point cloud angle is 15 degrees or 345 degrees, the included angle between the target straight line and the set direction can be 15 degrees. That is to say, laser point cloud angles such as 90 degrees, 270 degrees, 15 degrees, and 345 degrees all indicate that the included angles between the target straight line and the set direction are the same, that is, the relative position relationship between the target straight line and the set direction is the same, that is, the target straight line and the set direction have the same meaning, but if the numerical value of the laser point cloud angles with the same meaning is different greatly, based on such laser point cloud angles, when determining the variance value, the variance value cannot be determined accurately, and thus whether the robot is currently located in the corridor cannot be determined accurately. In order to accurately determine the variance value, a first angle range may be preset, and the determined laser point cloud angle is configured to be an angle in the first angle range, so that the angles with the same meaning may be converted into angles with similar or identical values to the greatest extent, the accuracy of determining the variance value may be improved, and further, whether the robot is currently located in a corridor may be determined more accurately. The specific value of the first angle range can be flexibly set according to the requirement, and the first angle range can be [0 degree, 180 degrees ], for example.
In a possible implementation manner, when determining the laser point cloud angle, for each measurement point, an angle between a target straight line corresponding to a measurement point set including the measurement point and a set direction may be determined, where a process of determining the angle is the same as the process of determining the laser point cloud angle between the target straight line and the set direction in the foregoing embodiment, and details are not repeated here.
After the angle between the target straight line and the set direction is determined, whether the determined angle is within the set first angle range is further judged, and if the determined angle is within the set first angle range, the determined angle can be directly determined as the laser point cloud angle. If the determined angle is not within the set first angle range, the determined angle can be converted into a corresponding angle within the first angle range, and the converted angle is determined as the laser point cloud angle. The process of converting the determined angle into the corresponding angle within the first angle range may adopt the prior art, and is not described herein again.
Illustratively, taking the first angle range as [0 degree, 180 degrees ], the determined angle is 270 degrees, the converted angle is 90 degrees, and 90 degrees can be determined as the laser point cloud angle. Still taking the first angle range as [0 degrees, 180 degrees ] as an example, if the determined angle is 90 degrees, the determined angle of 90 degrees may be directly determined as the laser point cloud angle. Therefore, the determined laser point cloud angles are all angles in the first angle range, included angles representing a target straight line and a set direction can be the same to a certain extent, namely the relative position relation of the target straight line and the set direction is the same, namely the angles with the same meaning are converted into angles with similar or same numerical values, so that the variance value can be determined more accurately, and whether the robot is located in a corridor or not can be determined more accurately.
Example 8:
on the basis of the foregoing embodiments, in this embodiment of the application, the determining a variance value based on each laser point cloud angle includes:
determining a target angle according to each laser point cloud angle;
determining a second angle range according to the target angle, wherein the minimum threshold of the second angle range is the difference value between the target angle and a set angle, and the maximum threshold of the second angle range is the sum value between the target angle and the set angle;
for each laser point cloud angle, if the laser point cloud angle is within the second angle range, determining the laser point cloud angle as a target laser point cloud angle; if the laser point cloud angle is not located in the second angle range, converting the laser point cloud angle into a corresponding angle located in the second angle range, and determining the converted angle as a target laser point cloud angle; and
and determining a variance value based on each target laser point cloud angle.
Referring to fig. 7, fig. 7 is a schematic view of each measurement point of another single line laser radar provided in this embodiment of the present application, as shown in fig. 7, taking the setting direction as the positive direction of the X axis as an example, a laser point cloud angle corresponding to a measurement point set of each first measurement point in an upper row (upper and lower rows shown in the figure, a1 … … a 13) in fig. 7 may be 0 degree or 180 degrees, and similarly, a laser point cloud angle corresponding to a measurement point set of each first measurement point in a lower row (upper and lower rows shown in the figure, a14 … … an) in fig. 7 may be 180 degrees or 0 degree. However, since 0 degree and 180 degrees can both be used to indicate that the angle between the target line and the X axis is 0 degree, and the target line and the setting direction are parallel to each other, that is, 0 degree and 180 degrees can indicate that the angle between the target line and the setting direction is the same, that is, the relative position relationship between the target line and the setting direction is the same, and the target line and the setting direction have the same meaning, but the values of 0 degree and 180 degrees are greatly different, if the angle range of the laser point cloud angle is a fixed [0 degree, 180 degrees ] or [0 degree, 360 degrees ], when determining the variance value based on the laser point cloud angle of the fixed angle range, the values of the angles having the same meaning may be greatly different, and thus the variance value may not be accurately determined.
In order to accurately determine the variance value, in a possible embodiment, a second angle range suitable for each current laser point cloud angle may be determined according to each current laser point cloud angle, and a target laser point cloud angle corresponding to each laser point cloud angle and located in the second angle range may be determined, since each target laser point cloud angle is located in the second angle range, and the second angle range is an angle range suitable for each current laser point cloud angle adaptively adjusted based on each current laser point cloud angle, when determining the variance value, the included angle between the target straight line and the set direction, which may be represented by, for example, 0 degree and 180 degrees, may be the same to the greatest extent, that is, the relative position relationship between the target straight line and the set direction may be the same, and the angles having the same meaning may be converted into angles having the same or similar values, the accuracy of determining the variance value can be improved.
In a possible implementation manner, when determining the second angle range suitable for each current laser point cloud angle according to each current laser point cloud angle, a target angle may be determined according to each current laser point cloud angle, and then the second angle range may be determined according to the target angle, where a minimum threshold of the second angle range is a difference value between the target angle and a set angle, and a maximum threshold of the second angle range is a sum value between the target angle and the set angle, where the set angle may be flexibly set according to a requirement, and may be, for example, 90 degrees. Illustratively, the second angle range may be [ -81 degrees, 99 degrees ], taking the set angle as 90 degrees and the target angle as 9 degrees as an example.
In a possible implementation manner, when the target angle is determined according to each laser point cloud angle, any laser point cloud angle in each laser point cloud angle can be determined as the target angle, and an average value of each laser point cloud angle can also be determined as the target angle; the number of each laser point cloud angle may also be counted, and the laser point cloud angle with the largest number may be determined as the target angle, for example, when each laser point cloud angle is 10 degrees, 20 degrees, 30 degrees, and 40 degrees, respectively, and the number of the laser point cloud angles with 20 degrees is the largest (2), then 20 degrees may be determined as the target angle.
After the second angle range is determined, whether the laser point cloud angle is within the second angle range or not can be judged for each laser point cloud angle, and if the laser point cloud angle is within the second angle range, the laser point cloud angle can be determined as a target laser point cloud angle; if the laser point cloud angle is not within the second angle range, the laser point cloud angle can be converted into a corresponding angle within the second angle range, and the converted angle is determined as the target laser point cloud angle. In which, the laser point cloud angle may be converted into a corresponding angle located in the second angle range by using the prior art, for example, when the set angle is 90 degrees, i.e. PI/2, and when the laser point cloud angle is smaller than the minimum threshold of the second angle range, the converted angle (target laser point cloud angle) may be a sum of the laser point cloud angle and PI (180 degrees). When the laser point cloud angle is greater than the maximum threshold of the second angle range, the converted angle (target laser point cloud angle) may be a difference between the laser point cloud angle and PI (180 degrees). Illustratively, assuming the second angular range is [ -81 degrees, 99 degrees ], if the laser point cloud angle is 100 degrees, then the target laser point cloud angle is-80 degrees; and if the laser point cloud angle is 180 degrees, the target laser point cloud angle is 0 degree.
After the target laser point cloud angle for each laser point cloud angle is determined, a variance value may be determined based on each target laser point cloud angle. Because each target laser point cloud angle is located in the second angle range, and the second angle range is an angle range which is self-adaptively adjusted based on each current laser point cloud angle and is suitable for each current laser point cloud angle, compared with the method for configuring a fixed angle range for the laser point cloud angle, the method can improve the accuracy of determining the variance value.
Example 9:
on the basis of the foregoing embodiments, in the embodiments of the present application, the obtaining a target angle from each laser point cloud angle includes:
aiming at each laser point cloud angle, determining an angle sub-range to which the laser point cloud angle belongs according to each preset angle sub-range;
determining the number of laser point cloud angles in each angle sub-range, and determining an angle sub-range containing the largest number of laser point cloud angles as a target angle sub-range; and
and determining the target angle according to the target angle sub-range.
In one possible embodiment, when determining the target angle, a plurality of angle sub-ranges may be preset, for example, assuming that each laser point cloud angle is an angle between 0 degree and 180 degrees, an angle sub-range may be set every 18 degrees, that is, a plurality of angle sub-ranges of [0 degree, 18 degrees ], (18 degrees, 36 degrees ], (36 degrees, 54 degrees ] … … (162 degrees, 180 degrees ] and the like may be preset, for each laser point cloud angle, according to each preset angle sub-range, the angle sub-range to which the laser point cloud angle belongs is determined, for example, if the laser point cloud angle is 0 degree, the angle sub-range to which the laser point cloud angle belongs is [0 degree, 18 degrees ].
After the angle sub-range to which each laser point cloud angle belongs is determined, the number of the laser point cloud angles in each angle sub-range can be determined, the angle sub-range containing the laser point cloud angle with the largest number is determined, and the angle sub-range containing the laser point cloud angle with the largest number is determined as the target angle sub-range. For example, assuming that the number of laser point clouds included in three angle sub-ranges of [0 degree, 18 degrees ], (18 degrees, 36 degrees ], (36 degrees, 54 degrees ] is 10, 2 and 1, respectively, and the number of laser point clouds included in other angle sub-ranges is 0, then [0 degree, 18 degrees ] can be determined as the target angle sub-range.
And determining a target angle sub-range, and determining a minimum angle value, an average angle value, a maximum angle value and the like in the target angle sub-range as a target angle when determining the target angle according to the target angle sub-range. Illustratively, taking the target angle sub-range as [0 degree, 18 degrees ], the average angle value of 9 degrees can be determined as the target angle.
For convenience of understanding, the following describes a positioning process of the robot provided in the embodiments of the present application with a specific embodiment. Fig. 8 is a schematic diagram of a positioning process of a third robot according to an embodiment of the present application, where as shown in fig. 8, the positioning process includes the following steps:
s801: and determining a laser point cloud angle Ai of each first measuring point of the laser radar under a laser radar coordinate system.
For each first measurement point of the laser radar, the process of determining the laser point cloud angle Ai of the first measurement point in the laser radar coordinate system may be:
the method comprises the steps of determining a first set number of measurement point sets with continuous measurement time, including a first measurement point, for each first measurement point of the laser radar, determining a target straight line corresponding to each measurement point set according to the coordinate of each measurement point in the measurement point sets, and determining a laser point cloud angle between the target straight line and a set direction (namely the laser point cloud angle Ai of the first measurement point in a laser radar coordinate system), wherein the coordinate is the coordinate in the laser radar coordinate system.
S802: and aiming at the laser point cloud angle Ai of each determined first measuring point in the laser radar coordinate system, determining an angle (marked as Bi) which is corresponding to the determined angle Ai and is positioned in a first angle range [0 degree, 180 degrees ], and determining the angle Bi as the laser point cloud angle.
The process of determining the angle Bi corresponding to the angle Ai and located in the first angle range [0 degree, 180 degrees ] may be:
for each first measuring point, if the determined angle Ai is within a set first angle range [0 degrees, 180 degrees ], determining the determined angle Ai as Bi (laser point cloud angle); and if the determined angle Ai is not in the set first angle range, converting the determined angle Ai into a corresponding angle Bi in the first angle range, and determining the converted angle Bi as the laser point cloud angle.
S803: and (5) counting the histogram M of each laser point cloud angle Bi.
The process of calculating the histogram M of each laser point cloud angle Bi may be:
aiming at each laser point cloud angle Bi, determining an angle sub-range to which the laser point cloud angle belongs according to each preset angle sub-range; and determining the number of the laser point cloud angles in each angle sub-range.
S804: and calculating the median m of the target angle sub-range according to the histogram.
According to the histogram, the process of calculating the median m of the target angle sub-range may be:
determining an angle sub-range containing the largest number of laser point cloud angles as a target angle sub-range according to the number of the laser point cloud angles in each angle sub-range; the median (median) of the sub-range of the target angle is determined as the target angle m. Illustratively, if the target angle sub-range is [0 degrees, 18 degrees ], the median of the target angle sub-range is 9 degrees, and 9 degrees is determined as the target angle m.
S805: and determining an angle (marked as Ci) corresponding to each laser point cloud angle Bi and positioned in a second angle range [ m-PI/2, m + PI/2], and determining the angle Ci as a target laser point cloud angle.
The process of determining the angle Ci corresponding to the laser point cloud angle Bi and located in the second angle range [ m-PI/2, m + PI/2] may be:
and determining a second angle range [ m-PI/2, m + PI/2] according to the target angle m, wherein the minimum threshold value of the second angle range is the difference value between the target angle m and the set angle (PI/2), and the maximum threshold value of the second angle range is the sum value between the target angle m and the set angle (PI/2). Wherein PI is 180 degrees, and PI/2 is 90 degrees;
for each laser point cloud angle Bi, if the laser point cloud angle Bi is within a second angle range, determining the laser point cloud angle Bi as Ci (target laser point cloud angle); if the laser point cloud angle Bi is not within the second angle range, the laser point cloud angle Bi is converted into a corresponding angle Ci within the second angle range, and the converted angle Ci is determined as a target laser point cloud angle.
S806: and calculating the variance value of each target laser point cloud angle Ci.
S807: if the variance value is smaller, determining that the robot is currently located in the corridor; and if the variance value is larger, determining that the robot is not located in the corridor currently.
Wherein, the process of judging whether the robot is currently located in the corridor can be as follows:
judging whether the variance value is smaller than a set variance value threshold value or not, and if the variance value is smaller than the set variance value threshold value, determining that the robot is currently located in the corridor; or if the variance value is larger than or equal to the variance value threshold value, determining that the robot is not located in the corridor currently.
Example 10:
on the basis of the foregoing embodiments, fig. 9 is a schematic view of a positioning device of a robot according to an embodiment of the present application, and as shown in fig. 9, the positioning device includes:
the first determining module 91 is configured to determine, for each first measurement point of the laser radar, a first set of measurement point sets with continuous measurement time and including the first measurement point, determine, according to a coordinate of each measurement point in the measurement point sets, a target straight line corresponding to the measurement point sets, and determine a laser point cloud angle between the target straight line and a set direction, where the coordinate is a coordinate in a laser radar coordinate system;
a second determining module 92, configured to determine a variance value based on each laser point cloud angle;
and a third determining module 93, configured to determine whether the robot is currently located in the corridor according to the variance value.
In a possible embodiment, the third determining module 93 is specifically configured to determine that the robot is currently located in the corridor if the variance value is smaller than a set variance value threshold; or if the variance value is larger than or equal to the variance value threshold value, determining that the robot is not located in the corridor currently.
In a possible implementation, the first determining module 91 is specifically configured to perform fitting based on coordinates of each measurement point in the set of measurement points, and determine at least one candidate straight line; for each candidate straight line, determining the distance sum of the distance between each measuring point in the measuring point set and the candidate straight line; and determining the candidate straight line corresponding to the minimum value in the distance sum as the target straight line corresponding to the measurement point set.
In a possible embodiment, the first determining module 91 is specifically configured to optionally include a second set number of measurement points in the measurement point set, where the second set number is smaller than or equal to the first set number; and fitting each measurement point group based on the coordinates of each measurement point in the measurement point group to obtain at least one candidate straight line.
In a possible embodiment, the first determining module 91 is further configured to, after determining a first set of measurement points including the first measurement point and having a first set number of consecutive measurement times, determine a second measurement point adjacent to the first measurement point in the set of measurement points in the measurement time before determining a target straight line corresponding to the set of measurement points according to coordinates of each measurement point in the set of measurement points, and if a distance between the first measurement point and each second measurement point is smaller than a set distance threshold, perform a step of determining a target straight line corresponding to the set of measurement points according to the coordinates of each measurement point in the set of measurement points.
In a possible embodiment, the first determining module 91 is further configured to, after determining a first set of measurement points including the first measurement point and having consecutive measurement times, determine a second measurement point adjacent to the first measurement point in the set of measurement points in the measurement time, determine the first measurement point as a noise point if a distance between the first measurement point and any one of the second measurement points is greater than or equal to a set distance threshold, and return to the step of determining the first set of measurement points including the first measurement point and having consecutive measurement times for each first measurement point of the lidar.
In a possible implementation, the first determining module 91 is specifically configured to determine, for each of the measurement points, an angle between a target straight line corresponding to a measurement point set including the measurement point and the set direction; if the determined angle is within a set first angle range, determining the determined angle as the laser point cloud angle; or if the determined angle is not in the set first angle range, converting the determined angle into a corresponding angle in the first angle range, and determining the converted angle as the laser point cloud angle.
In a possible implementation, the second determining module 92 is specifically configured to determine a target angle according to each laser point cloud angle; determining a second angle range according to the target angle, wherein the minimum threshold of the second angle range is the difference value between the target angle and a set angle, and the maximum threshold of the second angle range is the sum value between the target angle and the set angle; for each laser point cloud angle, if the laser point cloud angle is within the second angle range, determining the laser point cloud angle as a target laser point cloud angle; if the laser point cloud angle is not located in the second angle range, converting the laser point cloud angle into a corresponding angle located in the second angle range, and determining the converted angle as a target laser point cloud angle; and determining a variance value based on each target laser point cloud angle.
In a possible embodiment, the second determining module 92 is specifically configured to determine, for each laser point cloud angle, an angle sub-range to which the laser point cloud angle belongs according to each preset angle sub-range; determining the number of laser point cloud angles in each angle sub-range, and determining an angle sub-range containing the largest number of laser point cloud angles as a target angle sub-range; and determining the target angle according to the target angle sub-range.
The embodiment of the application can be directed at each first measuring point of a laser radar, a first set number of measuring point sets with continuous measuring time including the first measuring point is determined, a target straight line corresponding to the measuring point set is determined according to the coordinates of each measuring point in the measuring point set, the laser point cloud angle of the target straight line and the set direction is determined, and based on each laser point cloud angle, after a variance value is determined, whether a robot is located in a corridor or not can be determined quickly and accurately according to the variance value, so that the accuracy of robot positioning can be improved quickly.
Example 11:
on the basis of the foregoing embodiments, an embodiment of the present application further provides an electronic device, and fig. 10 is a schematic structural diagram of the electronic device provided in the embodiment of the present application, and as shown in fig. 10, the electronic device includes: the system comprises a processor 101, a communication interface 102, a memory 103 and a communication bus 104, wherein the processor 101, the communication interface 102 and the memory 103 are communicated with each other through the communication bus 104;
the memory 103 has stored therein a computer program which, when executed by the processor 101, causes the processor 101 to perform the steps of:
determining a first set number of measurement point sets with continuous measurement time, including a first measurement point, aiming at each first measurement point of the laser radar, determining a target straight line corresponding to each measurement point set according to the coordinate of each measurement point in the measurement point sets, and determining a laser point cloud angle between the target straight line and a set direction, wherein the coordinate is the coordinate under a laser radar coordinate system; determining a variance value based on each laser point cloud angle; and determining whether the robot is currently located in the corridor or not according to the variance value.
Because the principle of solving the problems of the electronic equipment is similar to the positioning method of the robot, the implementation of the electronic equipment can be referred to the implementation of the method, and repeated details are not repeated.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The communication interface 102 is used for communication between the above-described electronic device and other devices. The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital instruction processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
Example 12:
on the basis of the foregoing embodiments, an embodiment of the present application provides a computer-readable storage medium, in which a computer program executable by an electronic device is stored, and when the program is run on the electronic device, the electronic device is caused to execute the following steps:
determining a first set number of measurement point sets with continuous measurement time, including a first measurement point, aiming at each first measurement point of the laser radar, determining a target straight line corresponding to each measurement point set according to the coordinate of each measurement point in the measurement point sets, and determining a laser point cloud angle between the target straight line and a set direction, wherein the coordinate is the coordinate under a laser radar coordinate system; determining a variance value based on each laser point cloud angle; and determining whether the robot is currently located in the corridor or not according to the variance value.
Since the principle of solving the problem of the computer-readable storage medium is similar to that of the positioning method of the robot, the implementation of the computer-readable storage medium can refer to the implementation of the method, and repeated details are not repeated.
The computer readable storage medium may be any available medium or data storage device that can be accessed by a processor in an electronic device, including but not limited to magnetic memory such as floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc., optical memory such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memory such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs), etc.
The embodiment of the application can be directed at each first measuring point of a laser radar, a first set number of measuring point sets with continuous measuring time including the first measuring point is determined, a target straight line corresponding to the measuring point set is determined according to the coordinates of each measuring point in the measuring point set, the laser point cloud angle of the target straight line and the set direction is determined, and based on each laser point cloud angle, after a variance value is determined, whether a robot is located in a corridor or not can be determined quickly and accurately according to the variance value, so that the accuracy of robot positioning can be improved quickly.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method of positioning a robot, the method comprising:
determining a first set number of measurement point sets with continuous measurement time, including a first measurement point, aiming at each first measurement point of the laser radar, determining a target straight line corresponding to each measurement point set according to the coordinate of each measurement point in the measurement point sets, and determining a laser point cloud angle between the target straight line and a set direction, wherein the coordinate is the coordinate under a laser radar coordinate system;
determining a variance value based on each laser point cloud angle;
and determining whether the robot is currently located in the corridor or not according to the variance value.
2. The method of claim 1, wherein the determining the target straight line corresponding to the measurement point set according to the coordinates of each measurement point in the measurement point set comprises:
fitting based on the coordinates of each measuring point in the measuring point set to determine at least one candidate straight line;
for each candidate straight line, determining the distance sum of the distance between each measuring point in the measuring point set and the candidate straight line;
and determining the candidate straight line corresponding to the minimum value in the distance sum as a target straight line corresponding to the measurement point set.
3. The method of claim 2, wherein the fitting based on the coordinates of each measurement point in the set of measurement points, and wherein determining at least one candidate straight line comprises:
optionally including a second set number of measurement points in the set of measurement points, wherein the second set number is less than or equal to the first set number;
and aiming at each measuring point group, fitting based on the coordinates of each measuring point in the measuring point group to obtain at least one candidate straight line.
4. The method according to any one of claims 1 to 3, wherein after determining the first set of measurement points including the first measurement point and having a first set number of consecutive measurement times, before determining the target straight line corresponding to the set of measurement points based on the coordinates of each measurement point in the set of measurement points, the method further comprises:
and determining second measurement points adjacent to the first measurement point in the measurement point set in measurement time, and if the distance between the first measurement point and each second measurement point is smaller than a set distance threshold, executing a step of determining a target straight line corresponding to the measurement point set according to the coordinates of each measurement point in the measurement point set.
5. A method according to any of claims 1-3, wherein after determining a first set of a first set number of measurement points comprising the first measurement point, the method further comprises:
and determining second measurement points adjacent to the first measurement points in the measurement time in the measurement point set, determining the first measurement point as a noise point if the distance between the first measurement point and any one of the second measurement points is greater than or equal to a set distance threshold, and returning to execute the step of determining a first set number of measurement point sets with continuous measurement time including the first measurement point for each first measurement point of the laser radar.
6. The method of claim 1, wherein the determining the laser point cloud angle of the target straight line and the set direction comprises:
for each measuring point, determining an angle between a target straight line corresponding to a measuring point set including the measuring point and the set direction;
if the determined angle is within a set first angle range, determining the determined angle as the laser point cloud angle; or
If the determined angle is not in the set first angle range, converting the determined angle into a corresponding angle in the first angle range, and determining the converted angle as the laser point cloud angle.
7. The method of any of claims 1-3, 6, wherein the determining a variance value based on each of the laser point cloud angles comprises:
determining a target angle according to each laser point cloud angle;
determining a second angle range according to the target angle, wherein the minimum threshold of the second angle range is the difference value between the target angle and a set angle, and the maximum threshold of the second angle range is the sum value between the target angle and the set angle;
for each laser point cloud angle, if the laser point cloud angle is within the second angle range, determining the laser point cloud angle as a target laser point cloud angle; if the laser point cloud angle is not located in the second angle range, converting the laser point cloud angle into a corresponding angle located in the second angle range, and determining the converted angle as a target laser point cloud angle;
and determining a variance value based on each target laser point cloud angle.
8. A positioning device for a robot, the device comprising:
the laser radar measuring device comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining a first set number of measuring point sets with continuous measuring time, including a first measuring point, aiming at each first measuring point of a laser radar, determining a target straight line corresponding to each measuring point set according to the coordinate of each measuring point in the measuring point sets, and determining the laser point cloud angle between the target straight line and a set direction, wherein the coordinate is the coordinate under a laser radar coordinate system;
the second determining module is used for determining a variance value based on each laser point cloud angle;
and the third determining module is used for determining whether the robot is located in the corridor or not according to the variance value.
9. An electronic device, characterized in that the electronic device comprises at least a processor and a memory, the processor being adapted to carry out the steps of the positioning method of the robot according to any of claims 1-7 when executing a computer program stored in the memory.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when being executed by a processor, carries out the steps of the positioning method of a robot according to any one of claims 1-7.
CN202110387940.0A 2021-04-09 2021-04-09 Robot positioning method, device, equipment and medium Pending CN113172658A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110387940.0A CN113172658A (en) 2021-04-09 2021-04-09 Robot positioning method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110387940.0A CN113172658A (en) 2021-04-09 2021-04-09 Robot positioning method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN113172658A true CN113172658A (en) 2021-07-27

Family

ID=76924985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110387940.0A Pending CN113172658A (en) 2021-04-09 2021-04-09 Robot positioning method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113172658A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114012783A (en) * 2021-10-12 2022-02-08 深圳优地科技有限公司 Robot fault detection method, robot and storage medium
CN115002906A (en) * 2022-08-05 2022-09-02 中昊芯英(杭州)科技有限公司 Object positioning method, device, medium and computing equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005222559A (en) * 2005-03-11 2005-08-18 Matsushita Electric Works Ltd Autonomous moving unit and autonomous moving control method
GB0809467D0 (en) * 2007-05-26 2008-07-02 Lindsay Norman Matheson Electro-optical sensors
CN108332758A (en) * 2018-01-26 2018-07-27 上海思岚科技有限公司 A kind of corridor recognition method and device of mobile robot
CN108490945A (en) * 2018-04-12 2018-09-04 南京苏美达智能技术有限公司 The method that grass-removing robot judges narrow zone and leaves automatically
CN109254298A (en) * 2018-09-30 2019-01-22 中国安全生产科学研究院 The positioning system of safety patrol inspection robot in subway tunnel
CN111007522A (en) * 2019-12-16 2020-04-14 深圳市三宝创新智能有限公司 Position determination system of mobile robot
US20200149892A1 (en) * 2017-03-31 2020-05-14 Intel Corporation Autonomous tunnel navigation with a robotic system
CN111192331A (en) * 2020-04-09 2020-05-22 浙江欣奕华智能科技有限公司 External parameter calibration method and device for laser radar and camera
CN112013850A (en) * 2020-10-16 2020-12-01 北京猎户星空科技有限公司 Positioning method, positioning device, self-moving equipment and storage medium
CN112461230A (en) * 2020-12-07 2021-03-09 深圳市优必选科技股份有限公司 Robot repositioning method and device, robot and readable storage medium
AU2020104291A4 (en) * 2020-12-23 2021-03-11 Guilin University Of Technology Singletree segmentation method based on chord angle discriminant clustering for layered LIDAR point cloud

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005222559A (en) * 2005-03-11 2005-08-18 Matsushita Electric Works Ltd Autonomous moving unit and autonomous moving control method
GB0809467D0 (en) * 2007-05-26 2008-07-02 Lindsay Norman Matheson Electro-optical sensors
US20200149892A1 (en) * 2017-03-31 2020-05-14 Intel Corporation Autonomous tunnel navigation with a robotic system
CN108332758A (en) * 2018-01-26 2018-07-27 上海思岚科技有限公司 A kind of corridor recognition method and device of mobile robot
CN108490945A (en) * 2018-04-12 2018-09-04 南京苏美达智能技术有限公司 The method that grass-removing robot judges narrow zone and leaves automatically
CN109254298A (en) * 2018-09-30 2019-01-22 中国安全生产科学研究院 The positioning system of safety patrol inspection robot in subway tunnel
CN111007522A (en) * 2019-12-16 2020-04-14 深圳市三宝创新智能有限公司 Position determination system of mobile robot
CN111192331A (en) * 2020-04-09 2020-05-22 浙江欣奕华智能科技有限公司 External parameter calibration method and device for laser radar and camera
CN112013850A (en) * 2020-10-16 2020-12-01 北京猎户星空科技有限公司 Positioning method, positioning device, self-moving equipment and storage medium
CN112461230A (en) * 2020-12-07 2021-03-09 深圳市优必选科技股份有限公司 Robot repositioning method and device, robot and readable storage medium
AU2020104291A4 (en) * 2020-12-23 2021-03-11 Guilin University Of Technology Singletree segmentation method based on chord angle discriminant clustering for layered LIDAR point cloud

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王葵;翟荣刚;王道斌;颜普;: "基于激光测距雷达和车载GPS的动态障碍物检测", 工业仪表与自动化装置, no. 02, 15 April 2013 (2013-04-15) *
纪思源;王同合;张国龙;李敏;: "基于激光扫描点云的隧道断面提取方法", 测绘工程, no. 06, 25 June 2017 (2017-06-25) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114012783A (en) * 2021-10-12 2022-02-08 深圳优地科技有限公司 Robot fault detection method, robot and storage medium
CN115002906A (en) * 2022-08-05 2022-09-02 中昊芯英(杭州)科技有限公司 Object positioning method, device, medium and computing equipment

Similar Documents

Publication Publication Date Title
JP7344389B2 (en) Cooperative positioning methods, devices, equipment and storage media
CN109974727B (en) Robot charging method and device and robot
CN111209978B (en) Three-dimensional visual repositioning method and device, computing equipment and storage medium
CN113172658A (en) Robot positioning method, device, equipment and medium
CN112050821B (en) Lane line polymerization method
JP2020177645A (en) Method and apparatus for training trajectory classification model, and electronic equipment
CN110850859B (en) Robot and obstacle avoidance method and obstacle avoidance system thereof
CN111381586A (en) Robot and movement control method and device thereof
CN113392794B (en) Vehicle line crossing identification method and device, electronic equipment and storage medium
CN111123934A (en) Trajectory evaluation method, trajectory evaluation device, and mobile robot
CN113295176A (en) Map updating method, map updating apparatus, and computer-readable storage medium
CN112925416A (en) User sight tracking method, device and system
CN113029136B (en) Method, apparatus, storage medium and program product for processing positioning information
CN114199268A (en) Robot navigation and guidance method and device based on voice prompt and guidance robot
KR102473272B1 (en) Target tracking method and device
CN106885567B (en) Inertial navigation cooperation positioning method and positioning equipment
CN112097772A (en) Robot and map construction method and device thereof
CN108551653B (en) Indoor positioning method and device, electronic equipment and storage medium
CN113702931B (en) External parameter calibration method and device for vehicle-mounted radar and storage medium
CN116010543A (en) Lane information determination method, lane information determination device, electronic equipment and storage medium
CN114147707B (en) Robot docking method and device based on visual identification information
CN109788431B (en) Bluetooth positioning method, device, equipment and system based on adjacent node group
CN115290066A (en) Error correction method and device and mobile equipment
CN111464937B (en) Positioning method and device based on multipath error compensation
CN113203424A (en) Multi-sensor data fusion method and device and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination