CN110542422B - Robot positioning method, device, robot and storage medium - Google Patents

Robot positioning method, device, robot and storage medium Download PDF

Info

Publication number
CN110542422B
CN110542422B CN201910959527.XA CN201910959527A CN110542422B CN 110542422 B CN110542422 B CN 110542422B CN 201910959527 A CN201910959527 A CN 201910959527A CN 110542422 B CN110542422 B CN 110542422B
Authority
CN
China
Prior art keywords
plane
robot
elevator
clustering
coordinate system
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.)
Active
Application number
CN201910959527.XA
Other languages
Chinese (zh)
Other versions
CN110542422A (en
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.)
Shanghai TIMI robot Co.,Ltd.
Original Assignee
Shanghai Tmi Robot 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 Shanghai Tmi Robot Technology Co ltd filed Critical Shanghai Tmi Robot Technology Co ltd
Priority to CN201910959527.XA priority Critical patent/CN110542422B/en
Publication of CN110542422A publication Critical patent/CN110542422A/en
Application granted granted Critical
Publication of CN110542422B publication Critical patent/CN110542422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/02Picture taking arrangements specially adapted for photogrammetry or photographic surveying, e.g. controlling overlapping of pictures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/20Instruments for performing navigational calculations
    • G01C21/206Instruments for performing navigational calculations specially adapted for indoor navigation
    • 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/88Lidar systems specially adapted for specific applications
    • G01S17/93Lidar systems specially adapted for specific applications for anti-collision purposes

Abstract

The embodiment of the invention discloses a robot positioning method, a robot positioning device, a robot and a storage medium. The method comprises the following steps: obtaining plane features in an elevator to obtain a plane feature set, wherein the plane features comprise a plane normal vector and a plane area; clustering the plane features in the plane feature set according to the normal vector of the plane to obtain k plane clustering subsets, wherein k is more than or equal to 2; and determining the position of the robot in the elevator according to the centroid positions of the k plane cluster subsets. According to the embodiment of the invention, the plane features are extracted, clustering is further carried out to obtain the elevator plane, and then the position of the robot in the elevator is obtained through geometric calculation. The whole positioning process does not depend on an extra positioning beacon, so that the robot can be accurately positioned in the elevator, the deployment cost is reduced, the interference of passengers in the elevator can be effectively avoided, the positioning precision is ensured, and the robot positioning system has the advantages of high positioning precision and strong applicability.

Description

Robot positioning method, device, robot and storage medium
Technical Field
The embodiment of the invention relates to a robot positioning technology, in particular to a robot positioning method, a robot positioning device, a robot and a storage medium.
Background
With the increasing popularization of robots, the robots are widely applied to various scenes, and in the actual work of the robots, the robots need to automatically get on and off the elevator, so that the accurate positioning of the robots in the elevator is particularly important.
At present, in order to enable the robot to obtain accurate position information, the robot needs to obtain an additional positioning beacon or needs to set size information in the elevator in advance, so that the efficiency is low, the cost is high, and the popularization and the operation of the robot are influenced.
Disclosure of Invention
The embodiment of the invention provides a robot positioning method, a robot positioning device, a robot and a storage medium, which aim to realize the aim that the robot can realize accurate positioning without depending on an external positioning beacon by extracting plane information, acquiring the position relation between the inner wall of an elevator and the robot based on the plane information, and further obtaining the position information of the robot in the elevator through calculation.
In a first aspect, an embodiment of the present invention provides a robot positioning method, including:
obtaining plane features in an elevator to obtain a plane feature set, wherein the plane features comprise a plane normal vector and a plane area;
clustering the plane features in the plane feature set according to the normal vector of the plane to obtain k plane clustering subsets, wherein k is more than or equal to 2;
and determining the position of the robot in the elevator according to the centroid positions of the k plane cluster subsets.
In a second aspect, an embodiment of the present invention further provides a robot positioning apparatus, including:
the plane feature extraction module is used for obtaining plane features in the elevator to obtain a plane feature set, wherein the plane features comprise a plane normal vector and a plane area;
the plane clustering module is used for clustering the plane features in the plane feature set according to the normal vector of the plane to obtain k plane clustering subsets, wherein k is more than or equal to 2;
and the first position determining module is used for determining the position of the robot in the elevator according to the centroid positions of the k plane cluster subsets.
In a third aspect, an embodiment of the present invention further provides a robot, including:
one or more processors;
storage means for storing one or more programs;
the robot comprises a first sensor, a second sensor and a third sensor, wherein the first sensor is used for acquiring environmental parameters of the robot and generating two-dimensional point cloud data of the environmental parameters;
the second sensor is used for acquiring environmental parameters of the robot and generating three-dimensional point cloud data of the environmental parameters;
when executed by the one or more processors, cause the one or more processors to implement a robot positioning method according to any of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the robot positioning method according to any embodiment of the present invention.
The embodiment of the invention collects the environmental parameters in the elevator through the sensor arranged on the robot and generates point cloud data, extracting plane features from the point cloud data to obtain a plane feature set, clustering each plane feature according to the normal vector of each plane feature in the plane feature set to obtain a plurality of plane cluster subsets, when the number of the plane cluster subsets is three, the angular deviation of the robot in the elevator is relatively small, the three cluster subsets obtained at the moment respectively represent three elevator walls, three large planes are determined through the three cluster subsets, and determining three elevator planes according to the barycentric coordinates and normal vectors of the three large planes, and performing coordinate conversion through the distance and the deflection angle between the robot and the inner wall of the elevator to obtain the coordinates of the robot in a coordinate system taking the center of the inner wall of the elevator as the origin of coordinates. The embodiment extracts plane characteristics through environmental parameters in the elevator, and through clustering processing and geometric relation calculation, the coordinate of the robot in the elevator is obtained, the whole positioning process does not depend on an extra positioning beacon, auxiliary positioning information does not need to be deployed in the elevator, accurate positioning of the robot in the elevator can be realized, the deployment cost is reduced, the interference of passengers in the elevator can be effectively avoided, the positioning accuracy is ensured, and the robot positioning system has the advantages of high positioning accuracy and strong applicability.
Drawings
Fig. 1 is a flowchart of a robot positioning method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a robot positioning method according to a second embodiment of the present invention;
fig. 3 is a block diagram of a robot positioning device according to a third embodiment of the present invention;
fig. 4 is a block diagram of a robot according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of a sensor according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a robot positioning method according to an embodiment of the present invention, which is applicable to a situation where a robot goes upstairs and downstairs without relying on an additional positioning beacon, for example, when the robot takes a normal elevator to go upstairs and downstairs automatically, the normal elevator does not have customized positioning information, and the robot needs to perform adaptive positioning according to environmental characteristics in the elevator to perform position adjustment according to the situation in the elevator. The method may be performed by a robot, for example, a robot configured with a lidar. As shown in fig. 1, the method specifically includes the following steps:
s110, obtaining plane features in the elevator to obtain a plane feature set, wherein the plane features comprise a plane normal vector and a plane area.
And the area of the plane is used for determining the large plane obtained after clustering. The plane features further comprise gravity center position information of the plane and a normal vector of the plane, and a plane can be uniquely determined according to the gravity center position information of the plane and the normal vector of the plane. In this embodiment, the environmental parameters related to the elevator can be acquired by the sensor arranged on the robot, the point cloud data is generated, and the plane feature extraction is performed on the generated point cloud data to obtain each plane information.
For the convenience of calculation, in this embodiment, the planar feature extraction is performed by using a robot coordinate system as a reference coordinate system, where the robot coordinate system is a right-hand coordinate system with a geometric center of the robot as a coordinate origin, and a forward direction of an x-axis of the robot coordinate system faces a front direction of the robot. And taking a robot coordinate system as a reference coordinate system, and carrying out plane feature extraction on the front of the robot and two sides of the robot through the existing plane feature extraction algorithm to obtain corresponding plane information, wherein the center of a chassis of the robot is usually taken as the geometric center of the robot.
In this embodiment, in order to eliminate the influence of noise point information in the plane feature set on the clustering process, after the plane feature is extracted, the noise point information needs to be filtered, and the process specifically includes:
comparing the area of each plane in the set of plane features;
and if the area of any plane in the plane feature set is smaller than a preset area threshold, deleting the plane from the plane feature set.
Wherein the area threshold is used to delete the interfering planar features in the planar feature set. The area threshold may be determined based on the size of the elevator and whether a person is present in the elevator. For example, the area threshold may be relatively large when there is a person in the elevator or the size of the elevator is large; conversely, the area threshold may be reduced to ensure that noisy information can be filtered out without affecting the clustering process.
S120, clustering the plane features in the plane feature set according to the normal vector of the plane to obtain k plane clustering subsets, wherein k is more than or equal to 2.
Wherein, considering that the robot usually stands facing the inner wall of the elevator after entering the elevator, it can be known that the inner wall of the elevator should be close to the y axis parallel to the robot coordinate system, and the two side walls of the elevator should be close to the x axis parallel to the robot coordinate system, so that each plane can be clustered by the normal vector of the extracted plane information, specifically, the clustering process comprises:
s121, taking any normal vector of the plane feature concentration plane, which faces the front face of the robot, as a first initial clustering center of mass, taking any normal vector of the normal vector, which faces the first side face of the robot, as a second initial clustering center of mass, and taking any normal vector of the normal vector, which faces the second side face of the robot, as a third initial clustering center of mass, wherein the first side face and the second side face of the robot are parallel to a longitudinal axis of coordinates of a coordinate system of the robot.
According to the prior information, a certain normal vector facing the front of the robot is selected as a first initial clustering center of mass, and any normal vector facing the side parts of two sides of the robot is selected as a second initial clustering center of mass and a third initial clustering center of mass, so that the workload of circular calculation can be reduced, and the clustering result can be obtained quickly.
S122, comparing the normal vector of each plane in the plane feature set with the first initial clustering center of mass, the second initial clustering center of mass and the third initial clustering center of mass respectively; wherein the content of the first and second substances,
if the included angle between the normal vector of the plane and the first initial clustering center of mass is minimum, calculating the plane features corresponding to the normal vector of the plane into a first initial clustering set;
if the included angle between the normal vector of the plane and the second initial clustering center of mass is minimum, calculating the plane features corresponding to the normal vector of the plane into a second initial clustering set;
and if the included angle between the normal vector of the plane and the third initial clustering mass center is minimum, calculating the plane features corresponding to the normal vector of the plane into a third initial clustering set.
The plane feature set is divided into a first initial clustering mass center, a second initial clustering mass center and a third initial clustering mass center, wherein the included angle between the normal vector of the plane and a certain clustering mass center is minimum, which indicates that the direction of the normal vector is closer to the direction of the clustering mass center, and the plane features in the plane feature set are initially classified by comparing the normal vector of each plane feature with the first initial clustering mass center, the second initial clustering mass center and the third initial clustering mass center respectively.
S123, respectively taking the mean value of the normal vector of each plane in each initial clustering set as a new clustering center of mass, and respectively comparing the normal vector of each plane in the plane feature set with the new clustering center of mass to obtain three secondary clustering sets;
and repeating the clustering process of the quadratic clustering set until the clustering center of mass of the obtained clustering set is not changed any more, and obtaining k plane clustering subsets.
The clustering method comprises the steps of determining the clustering center of mass of each plane again by solving the average value of normal vectors for the clustering result, comparing the normal vector of each plane with the determined clustering center of mass, and realizing the reclassification of the normal vectors which are close to a plurality of clustering centers of mass.
S130, determining the position of the robot in the elevator according to the centroid positions of the k plane cluster subsets.
The initial direction of the robot after entering the elevator determines a final clustering result, and when the inclination angle of the robot relative to the elevator is large, so that any two of normal vectors of three walls of the elevator are close to each other, three clustering subsets cannot be obtained after clustering; when the initial direction of the robot entering the elevator and the inclination angle of the elevator are smaller, the plane cluster subsets at the inner wall of the elevator and the plane cluster subsets at the two side walls of the elevator can be obtained after clustering according to the method, and then the three plane cluster subsets are obtained.
If k is 3, three plane cluster subsets are obtained, the position of the middle point of the intersection line of the three planes in the robot coordinate system is obtained, the distance between the center position of the elevator inner wall plane and the robot and the offset angle of the robot relative to the elevator inner wall plane can be further obtained, the coordinate transformation relation is determined according to the obtained distance and the offset angle, and the coordinate position of the robot in the first elevator coordinate system is obtained, wherein the first elevator coordinate system is a right-hand coordinate system taking the center of the third elevator plane as the origin of coordinates, and the x-axis positive direction of the first elevator coordinate system is the normal direction of the third elevator plane. Specifically, determining the position of the robot within the elevator from the centroid positions of the three planar cluster subsets comprises:
s131, determining a first plane, a second plane and a third plane according to the three plane cluster subsets, wherein the first plane and the second plane are respectively located on two sides of the robot, and the third plane is located in front of the robot; the area of the first plane, the area of the second plane and the area of the third plane are the sum of the areas of all planes in the corresponding clustering subsets, and the normal vector of the first plane, the normal vector of the second plane and the normal vector of the third plane are the clustering centroids of the corresponding plane clustering subsets.
The first plane is a large plane formed by planes in each plane feature in the first plane cluster subset, and the area of the large plane is the sum of the areas of the planes of each plane feature in the first plane cluster subset, so that the large plane determined in the process is not a complete elevator plane, and similarly, the second plane and the third plane are not complete elevator planes. For example, for the third plane, it is not the complete inner wall of the elevator, but a partial plane of the inner wall of the elevator. Likewise, the first plane and the second plane are respectively part planes of both side walls of the elevator.
And S132, calculating coordinates of the gravity centers of the first plane, the second plane and the third plane in the robot coordinate system.
And the barycentric coordinate of the first plane is the mean value of barycentric coordinates of all plane features in the first plane cluster subset. Illustratively, the first plane, the second plane, and the third plane may be represented by their center of gravity, normal vector, and area, respectively:
Figure GDA0002817422430000081
wherein [ x1, y1, z1] is barycentric coordinates of the first plane, [ a1, b1, c1] is a normal vector of the first plane, and size1 is the area of the first plane;
[ x2, y2, z2] is barycentric coordinates of the second plane, [ a2, b2, c2] is a normal vector of the second plane, and size2 is the area of the second plane;
[ x3, y3, z3] is the barycentric coordinate of the third plane, [ a3, b3, c3] is the normal vector of the third plane, and size3 is the area of the third plane.
And S133, determining the coordinate of the center of the third elevator plane to which the third plane belongs in the elevator coordinate system according to the coordinate of the gravity center in the robot coordinate system.
Wherein, after the normal vector of the plane and the coordinates of any point on the plane are known, the plane can be determined. Therefore, the first elevator plane to which the third plane belongs can be determined according to the normal vector of the third plane and the barycentric coordinate of the third plane; likewise, a first elevator plane and a second elevator plane can be determined to which the two side walls of the elevator belong.
Through the intersection line of the first elevator plane and the third elevator plane and the intersection line of the second elevator plane and the third elevator plane, the coordinates of the midpoint position of the two intersection lines can be determined, and then the coordinates of the center position of the third elevator plane can be obtained.
Exemplarily, if the coordinates of the center position of the third elevator plane are recorded as
Figure GDA0002817422430000091
The coordinates of the center position of the third elevator plane have the following relationship with the coordinates of the center of gravity of the first plane, the second plane, and the third plane:
Figure GDA0002817422430000092
and S134, performing coordinate conversion on the coordinate of the center of the third elevator plane in the robot coordinate system to obtain a first coordinate of the robot in the first elevator coordinate system.
Wherein, according to the coordinates of the barycenter of the first plane, the second plane and the third plane in the robot coordinate system, the included angle of the normal vector of the robot and the plane faced by the robot, namely the included angle of the normal vector and the third elevator plane can be obtained through geometric relation calculation
Figure GDA0002817422430000093
Meanwhile, according to the coordinates of the central position of the third elevator plane, the distance between the robot and the third elevator plane, namely the elevator inner wall can be calculated to be
Figure GDA0002817422430000101
According to the included angle between the robot and the third elevator plane and the distance between the robot and the third elevator plane, a coordinate conversion formula can be obtained, and the coordinate P of the robot in the first elevator coordinate system can be obtained after coordinate conversion1Wherein P is1=[y4·sinθ-x4·cosθ,-x4·sinθ-y4·cosθ,0]。
The principle of the robot positioning method in the embodiment of the invention is as follows: three pieces of plane information about the elevator wall are obtained through plane feature extraction and clustering processing, then the coordinates of the center position of the elevator inner wall are determined through the obtained plane information, the conversion relation between the robot coordinate system and the first elevator coordinate system is obtained through geometric relation calculation, the coordinates of the robot in the first elevator coordinate system are further obtained, and accurate positioning of the robot in the elevator is achieved.
The technical proposal of the embodiment collects the environmental parameters in the elevator through the sensor arranged on the robot and generates point cloud data, extracting plane features from the point cloud data to obtain a plane feature set, clustering each plane feature according to the normal vector of each plane feature in the plane feature set to obtain a plurality of plane cluster subsets, when the number of the plane cluster subsets is three, the angular deviation of the robot in the elevator is relatively small, the three cluster subsets obtained at the moment respectively represent three elevator walls, three large planes are determined through the three cluster subsets, and determining three elevator planes according to the barycentric coordinates and normal vectors of the three large planes, and performing coordinate conversion through the distance and the deflection angle between the robot and the inner wall of the elevator to obtain the coordinates of the robot in a coordinate system taking the center of the inner wall of the elevator as the origin of coordinates. The embodiment carries out plane feature extraction through the environmental parameter to in the elevator, through clustering processing to and the geometric relation calculates, obtain the coordinate of robot in the elevator, it does not rely on extra location beacon, need not to deploy assistance-localization real-time information in the elevator promptly, can realize the accurate location of robot in the elevator, has not only reduced the deployment cost, and can effectively avoid passenger's in the elevator interference, guarantees positioning accuracy, has positioning accuracy height and the strong advantage of suitability.
Example two
Fig. 2 is a flowchart of a robot positioning method according to a second embodiment of the present invention, which is optimized based on the second embodiment, and the position of the robot in the elevator is determined by introducing two-dimensional point cloud data, so as to achieve more accurate positioning of the robot, as shown in fig. 2, the positioning method specifically includes the following steps:
s210, obtaining linear features in the elevator to obtain a first linear feature set, wherein the linear features comprise the starting endpoint position and the ending endpoint position of a line segment.
For example, when the robot is located in an elevator, the surrounding environment at this time is the environment in the direction of the inner wall of the elevator located in front of the robot and the directions of the side walls of the elevator located at both sides of the robot, wherein the inner wall of the elevator is the elevator wall facing the elevator door, and the side walls are the elevator walls at both sides of the elevator door. The linear features are line segment features of the environment around the robot, the linear features include a starting end point position and an ending end point position of the line segment, and the linear features can be obtained through a linear feature extraction algorithm, for example, the linear feature extraction can be performed through a hough transform feature extraction algorithm. In this embodiment, the linear feature may be obtained by a sensor disposed on the robot, for example, by disposing a single line laser radar on the robot, point cloud data of the environment around the robot may be obtained, and the point cloud data carries coordinate information in a certain reference coordinate system, so that the linear feature extracted from the point cloud data by the linear feature extraction algorithm has coordinate information in the reference coordinate system, that is, the linear feature includes a start end point coordinate and an end point coordinate of the line segment.
Considering that the robot has a certain coordinate system, the embodiment may select the robot coordinate system as the reference coordinate system for the linear feature extraction. In this embodiment, the robot coordinate system uses the geometric center of the robot as the origin of coordinates, uses the right front of the robot as the x-axis forward direction of the robot coordinate system, uses the left side direction of the robot as the y-axis forward direction of the robot coordinate system, and establishes a rectangular coordinate system, and the coordinate plane of the robot coordinate system is parallel to the horizontal plane.
Meanwhile, the laser radar and the geometric center of the robot have a determined relative position relationship, so that the coordinate transformation relationship between the laser radar coordinate system and the robot coordinate system can be determined according to the relative position relationship between the laser radar and the geometric center of the robot, and the point cloud data generated by the laser radar can be mapped into the robot coordinate system through the coordinate transformation relationship.
Optionally, linear feature extraction may be performed on point cloud data in a laser radar coordinate system, and then the linear features are converted into a robot coordinate system to obtain a first linear feature set; or, the point cloud data may be subjected to coordinate conversion, and linear feature extraction is performed in a robot coordinate system to obtain a first linear feature set.
In this embodiment, the point cloud data generated by the single line laser radar is two-dimensional point cloud data, and therefore when the robot coordinate system is taken as the reference coordinate system, the extracted linear feature reflects the linear feature in the elevator in the robot coordinate plane.
In order to eliminate the influence of noise points on the linear feature extraction, in this embodiment, before the linear feature extraction is performed, low-pass filtering is performed on point cloud data generated by the laser radar, and then a linear feature extraction algorithm is used on the point cloud data subjected to the low-pass filtering to obtain a first linear feature set. Through low-pass filtering the point cloud data, the influence of personnel in the elevator and points generated due to reflection of the inner wall of the elevator on the laser radar can be effectively eliminated.
Considering that small-sized line segments interfere with the clustering process, before clustering linear features, the small-sized line segments need to be shaved off to reduce the amount of calculation and obtain an accurate clustering result, and the process specifically includes:
calculating the length of a line segment corresponding to each straight line feature in the first straight line feature set;
and if the length of the line segment is smaller than a preset length threshold value, deleting the linear feature corresponding to the line segment from the first linear feature set.
Wherein the length threshold is used to delete the interfering straight line features in the first straight line feature set. The length threshold can be specifically set depending on whether a person is present in the elevator and the size of the elevator, wherein the length threshold is relatively small when a person is present in the elevator and can be relatively large when no person is present in the elevator. Likewise, when the size of the elevator is large, the length threshold may be relatively large, and when the size of the elevator is small, the length threshold may be reduced to ensure that a relatively accurate set of linear features is obtained after clustering. In an optional implementation manner of the embodiment, if the number of people in the use environment of the elevator is large, the length threshold value can be set to be 0.2 m; the length threshold may be set to 0.5m if the elevator is a robot-dedicated elevator or has a small number of users.
S220, performing mean clustering on the linear features in the first linear feature set to obtain a plurality of clustering subsets.
Wherein performing mean clustering on the linear features in the first linear feature set may include: and performing mean clustering on the linear features in the first linear feature set according to the inclination angle, wherein the inclination angle is an included angle between a line segment corresponding to the linear features and the x axis of the robot coordinate system. After the reference coordinate system is determined, each linear feature in the first set of linear features has a determined tilt angle. For example, based on the robot coordinate system, considering that the robot basically stands towards the inner wall of the elevator after entering the elevator, when no person is between the robot and the inner wall of the elevator, the line segment corresponding to the extracted linear features is parallel or nearly parallel to the inner wall of the elevator, namely the inclination angle of the linear features is near pi/2; when a person exists between the robot and the inner wall of the elevator, the laser radar cannot acquire information of the inner wall of the elevator and only can acquire the information of the person due to the shielding of the person, so that point cloud data with different x coordinate values is generated, the inclination angles of the linear features extracted based on the point cloud data are different, and the difference between the inclination angle of part of the linear features and pi/2 is larger.
Considering that the robot is standing essentially towards the inner wall of the elevator after entering the elevator, it can be appreciated that the angle of inclination of a line segment parallel to the inner wall of the elevator should be at
Figure GDA0002817422430000131
The inclination angle of a line segment parallel to the side wall of the elevator is within a range of (0 +/-delta), wherein delta is a configurable parameter, and optionally, the value of delta can be in a range of 0-45 degrees. Therefore, after clustering the line segments in the first linear feature set according to the inclination angle of the linear feature, the set of the line segments parallel to the inner wall of the elevator and the set of the line segments parallel to the side wall of the elevator can be finally obtained. Optionally, in the robot coordinate system, the clustering process specifically includes the following steps:
s221, selecting any one inclination angle of the inclination angles of the straight line features from-delta to + delta as a first initial clustering center of mass from the first straight line feature set, and selecting the inclination angle of the straight line feature at
Figure GDA0002817422430000141
Wherein δ is a preset tolerance parameter, and the inclination angle of the linear feature is an included angle between the linear feature and the unit vector (1, 0, 0).
Wherein, the inclination angle of the linear feature is the included angle between the linear feature and the unit vector (1, 0, 0) in the robot coordinate system. Considering that the robot is basically facing the inner wall of the elevator after entering the elevator, namely the inner wall of the elevator and the longitudinal axis of the coordinate system of the robot should be nearly parallel, and the two side walls of the elevator should be nearly parallel to the transverse axis of the coordinate system of the robot, so that the straight line features in the first straight line feature set can be clustered by taking the inclination angle of the straight line as 0 and the inclination angle as pi/2 as two initial clustering centers, and in the case of considering tolerance parameters, the initial clustering centers can be determined as that a certain inclination angle in-delta- + delta is the first initial clustering center,
Figure GDA0002817422430000142
is the second initial cluster centroid.
S222, comparing the inclination angle of each straight line feature with a first initial clustering center of mass and a second initial clustering center of mass respectively, and counting the straight line feature into a first clustering group if the difference value between the inclination angle of the straight line feature and the first initial clustering center of mass is smaller than the difference value between the inclination angle of the straight line feature and the second initial clustering center of mass; otherwise, the linear feature is included in the second cluster.
The difference between the inclination angle of the straight line feature and the initial clustering center of mass is the absolute value of the difference, that is, the difference reflects the closeness of the inclination angle of the straight line feature and the clustering center of mass. The first cluster is a set of straight line features whose slant angles are closer to the first initial cluster centroid, and the second cluster is a set of straight line features whose slant angles are closer to the second initial cluster centroid.
For example, if the difference between the tilt angle of a straight line feature and the first initial clustering center of mass is smaller than the difference between the tilt angle of the straight line feature and the second initial clustering center of mass, it indicates that the tilt angle of the straight line feature is closer to 0, i.e. the straight line feature is closer to being parallel to the horizontal axis of the coordinate of the robot coordinate system, and therefore the straight line needs to be counted into the first clustering group; conversely, if the difference between the tilt angle of a straight line feature and the first initial clustering center of mass is greater than the difference between the tilt angle of the straight line feature and the second initial clustering center of mass, it indicates that the tilt angle of the straight line feature is closer to pi/2, i.e., the straight line feature is closer to being parallel to the longitudinal axis of the coordinates of the robot coordinate system, and therefore the straight line feature needs to be counted into the second clustering group.
S223, taking the average inclination angle of the straight line feature in the first clustering group as a third clustering mass center and the average inclination angle of the straight line feature in the second clustering group as a fourth clustering mass center, respectively comparing the inclination angle of the straight line feature with the third clustering mass center and the fourth clustering mass center, if the difference value between the inclination angle of the straight line feature and the third clustering mass center is smaller than the difference value between the inclination angle of the straight line feature and the fourth clustering mass center, counting the straight line feature into the third clustering group, otherwise, counting the straight line feature into the fourth clustering group.
And S224, repeating the clustering processes of the third clustering group and the fourth clustering group until the clustering center of the linear features in the first linear feature set is not changed after clustering, so as to obtain a second linear feature set and a third linear feature set.
Wherein, taking the average inclination angle of the straight line features in the first cluster group as the third cluster center means obtaining a new cluster center for the first cluster group, taking the average inclination angle of the straight line features in the second cluster group as the fourth cluster center means obtaining a new cluster center for the second cluster group, obtaining a new cluster center for the two cluster groups after the initial clustering, comparing the inclination angle of each straight line feature in the first straight line feature set with the two newly obtained cluster centers, and modifying the division of the straight line features with inclination angles of 0-pi/2 through the clustering process again, and finally, when the cluster center of mass of the cluster group is not changed, indicating that the inclination angles of all the straight line features after the clustering process are correctly classified, so the straight line features in the second straight line feature set obtained should be the straight line features parallel to the side wall of the elevator through the cyclic iteration The set of features, the linear features in the third set of linear features, should be a set of linear features parallel to the inner wall of the elevator.
And S230, respectively performing straight line fitting on each clustering subset, and determining a second coordinate of the robot in a second elevator coordinate system according to a straight line fitting result.
The origin of the second elevator coordinate system is the intersection point of the fitted straight line located on the inner wall of the elevator and the longitudinal center line of the inner wall of the elevator, the x axis of the second elevator coordinate system is parallel to the x axis of the first elevator coordinate system and has the same direction, the y axis of the second elevator coordinate system is parallel to the y axis of the first elevator coordinate system and has the same direction, and the inner wall of the elevator is opposite to the elevator door. The straight line fitting refers to obtaining a straight line function by using a fitting algorithm for the straight line features in the clustered straight line feature set, for example, the straight line function can be obtained by fitting each straight line feature by using a least square method. Considering that two side walls of the elevator are positioned on two sides of the robot, the set of the linear features parallel to the side walls of the elevator obtained after clustering should include a set of linear features positioned on the left side of the robot and a set of linear features positioned on the right side of the robot, so that the two sets of linear features can be subjected to linear fitting to obtain three linear functions L1, L2 and L3 respectively, wherein L1 is a linear function fitted to a subset of clusters parallel to the inner wall of the elevator, namely the inner wall of the elevator, and L2 and L3 are linear functions fitted to a subset of clusters on two sides of the robot, namely the two side walls of the elevator.
After three linear functions are obtained through linear fitting, the distance and the direction of the robot relative to the inner wall of the elevator and the side wall of the elevator can be obtained, and accurate positioning of the robot in the elevator is achieved. For example, the three linear functions can respectively correspond to a first straight line, a second straight line and a third straight line, wherein the first straight line is positioned on the inner wall of the elevator, the second straight line and the third straight line are respectively positioned on two side walls of the elevator, the coordinates of the intersection point of the first straight line and the second straight line and the coordinates of the intersection point of the first straight line and the third straight line can be obtained through the three linear functions, the distance between the two intersection points and the robot can be further obtained, and the distance between the robot and the inner wall of the elevator can be obtained through the distance between the two intersection points and the robot; meanwhile, the angle of the robot relative to the inner wall of the elevator can be determined through the first straight line; according to the angle and distance information of the robot relative to the elevator, the relative position relationship between the robot and the elevator can be established, and the positioning in the elevator is realized, so that the robot can automatically adjust the position in the elevator according to the environment of the elevator. In the robot coordinate system, the process of fitting the straight line specifically includes the following steps:
s231, performing straight line fitting on the straight line features in the third straight line feature set to obtain a first straight line function;
and performing linear fitting on linear features, located in two quadrants of the robot coordinate system, in the second linear feature set to obtain a second linear function, and performing linear fitting on linear features, located in three quadrants of the robot coordinate system, in the second linear feature set to obtain a third linear function.
The second linear feature set is a set of linear features parallel to the elevator side wall, and the analysis can know that the linear features parallel to the elevator side wall comprise linear features on the left side of the robot and linear features on the right side of the robot, in the robot coordinate system, the linear features on the left side of the robot are in the first two quadrants of the robot coordinate system, and the linear features on the right side of the robot are in the third four quadrants of the robot coordinate system, so that the linear features in the second linear feature set are secondarily classified according to the first two quadrants and the third four quadrants, and then the linear feature sets after secondary classification are subjected to linear fitting respectively to obtain two linear functions on the two side walls of the elevator.
And S232, determining the coordinates of the robot in a second elevator coordinate system according to the first linear function, the second linear function and the third linear function.
The intersection point of the first straight line and the second straight line and the intersection point of the first straight line and the third straight line are the intersection points of the inner wall of the elevator and two side walls of the elevator in the coordinate plane of the robot, the two intersection points can be obtained through three straight line functions, the distance from the robot to the two intersection points is further obtained through calculation, the distance from the robot to the origin of coordinates of the coordinate system of the elevator can be obtained through calculation, and the distance is equivalent to the vertical distance from the robot to the inner wall of the elevator;
then, an included angle between the robot and the inner wall of the elevator can be determined through the first linear function;
according to the vertical distance from the robot to the inner wall of the elevator and the included angle between the robot and the inner wall of the elevator, the transformation relation between a second elevator coordinate system and a robot coordinate system can be obtained;
and performing coordinate conversion according to the transformation relation to obtain the coordinate of the robot in the second elevator coordinate system, thereby providing reliable positioning data for the movement of the robot in the elevator.
S240, obtaining plane features in the elevator to obtain a plane feature set, wherein the plane features comprise a plane normal vector and a plane area.
S250, clustering the plane features in the plane feature set according to the normal vector of the plane to obtain k plane clustering subsets, wherein k is more than or equal to 2.
And S260, determining the position of the robot in the elevator according to the centroid positions of the k plane cluster subsets.
When three plane cluster subsets are obtained, the position of the middle point of the intersection line of the three planes in the robot coordinate system is obtained, the distance between the center position of the elevator inner wall plane and the robot and the offset angle of the robot relative to the elevator inner wall plane can be further obtained, the coordinate transformation relation is determined according to the obtained distance and the offset angle, and the first coordinate of the robot in the first elevator coordinate system is obtained, wherein the first elevator coordinate system is a right-hand coordinate system taking the center of the first elevator plane as the origin of coordinates, and the x-axis forward direction of the first elevator coordinate system is the normal direction of the first elevator plane.
S270, performing weighted calculation on the first coordinate and the second coordinate according to the following formula, and determining the final coordinate of the robot in a first elevator coordinate system:
p2=ap0+bp1 (1)
wherein p is0Is a first coordinate, p1Is a second coordinate, p2Is the final coordinate;
a. b is a weight, and a + b is 1.
The first coordinate is a coordinate under a first elevator coordinate system, the second coordinate is a coordinate under a second coordinate system, and the two coordinates need to be converted into the same coordinate system and then weighted calculation is carried out. In this embodiment, because the first elevator coordinate system and the second elevator coordinate system are obtained by converting the robot coordinate system according to the distance and angle information of the robot relative to the inner wall of the elevator, and the second elevator coordinate system is a plane coordinate system, which can be regarded as the movement of the first elevator coordinate system along the z-axis, the x-coordinate and the y-coordinate of the robot in the second elevator coordinate system can be directly used in the first elevator coordinate system, that is, the x-coordinate and the y-coordinate in the second elevator coordinate system and the first elevator coordinate system can be equivalently used.
By adjusting the values of a and b, the ratio of the positioning coordinates obtained by the straight line feature and the positioning coordinates obtained by the area feature in the weighting calculation can be adjusted, so that more accurate coordinate information can be obtained. For example, when the positioning coordinates obtained by the straight line feature are more accurate, the weight ratio of b may be increased; if the positioning coordinate obtained by the area feature is more accurate, the weight ratio of a can be increased. And finally, a more accurate positioning result is obtained.
In an alternative embodiment of this embodiment, the weights a and b are determined as follows: if the first plane is determined by clustering subsets of three planes, the sum of the areas of the second plane and the third plane is greater than 2 square meters, i.e. size1+ size2+ size3>2.0m2If the reliability of the coordinates obtained by fitting the plane through the three-dimensional point cloud is high, the distribution relationship of the weights a and b is as follows: a is 0.7 and b is 0.3, i.e. the second coordinate is given a higher weight. Conversely, if the first plane is determined by clustering subsets of three planes, the sum of the areas of the second plane and the third plane is less than 1 square meter, i.e., size1+ size2+ size3<1.0m2And then, the confidence level of the coordinates obtained by fitting the straight line through the two-dimensional point cloud is considered to be higher, and the distribution relation of the weights a and b is as follows: a is 0.3 and b is 0.7, i.e. the first coordinate is given a lower weight. In other cases, two weights may be equally distributed, i.e., a is 0.5 and b is 0.5.
And S280, if the number of the plane cluster subsets is not three, taking the second coordinate as the final coordinate of the robot in the first elevator coordinate system.
According to the analysis, when the direction of the robot in the elevator and the elevator car have large offset, three plane clustering subsets cannot be obtained, and therefore the first coordinate of the robot in the elevator cannot be obtained based on the plane feature clustering. At this time, the second coordinate obtained by the straight line feature is taken as the final coordinate of the robot in the elevator.
In the embodiment, a second coordinate of the robot in the elevator is obtained by extracting straight line features and clustering based on the mean value; and then, obtaining a first coordinate of the robot in the elevator by extracting area characteristics and carrying out mean value clustering processing, and carrying out weighted calculation on the two obtained coordinates to obtain a final coordinate of the robot in the elevator. Meanwhile, when the position information of the robot in the elevator cannot be obtained through the area characteristic because the deviation between the robot and the elevator car is large, the first coordinate obtained through the straight line characteristic is directly used as the coordinate of the final robot in the elevator. In the embodiment, the position information of the robot in the elevator is respectively obtained through the linear characteristic and the area characteristic, and the robot is accurately positioned in the elevator under the condition of not depending on external positioning information; meanwhile, based on the two coordinates, the two coordinates are weighted and calculated, and the weight ratio of the two coordinates is adjusted according to the actual situation, so that more accurate positioning coordinates are obtained. The positioning method does not depend on additional positioning beacons, saves the deployment cost required for deploying the additional positioning beacons for the robot, and has the advantages of high positioning efficiency and strong adaptability.
EXAMPLE III
Fig. 3 is a block diagram of a robot positioning device according to a third embodiment of the present invention, which is applicable to a situation where a robot rides in an elevator independently without relying on an additional positioning beacon for positioning and position adjustment.
As shown in fig. 3, a robot positioning apparatus according to an embodiment of the present invention may include: a planar feature extraction module 310, a planar clustering module 320, and a first position determination module 330, wherein:
the plane feature extraction module 310 is configured to obtain a plane feature in the elevator to obtain a plane feature set, where the plane feature includes a normal vector of a plane and an area of the plane;
the plane clustering module 320 is used for clustering the plane features in the plane feature set according to the normal vector of the plane to obtain k plane clustering subsets, wherein k is more than or equal to 2;
a first position determining module 330 for determining the position of the robot within the elevator according to the centroid positions of the k subsets of the planar clusters.
Optionally, the planar feature extraction module 310 is specifically configured to:
acquiring three-dimensional point cloud data in an elevator through a first sensor arranged on the robot;
performing low-pass filtering on the three-dimensional point cloud data;
and performing plane feature extraction on the three-dimensional point cloud data subjected to low-pass filtering by taking a robot coordinate system as a reference to obtain a plane feature set, wherein the robot coordinate system is a right-hand coordinate system taking a geometric center of the robot as a coordinate origin, and an x-axis of the robot coordinate system faces to the right front of the robot in the positive direction.
Optionally, the plane clustering module 320 specifically includes:
taking any normal vector of a normal vector of the plane feature concentration plane facing the front face of the robot as a first initial clustering center of mass, taking any normal vector of a normal vector facing the first side face of the robot as a second initial clustering center of mass, and taking any normal vector of a normal vector facing the second side face of the robot as a third initial clustering center of mass, wherein the first side face and the second side face of the robot are parallel to a coordinate longitudinal axis of the robot coordinate system;
comparing a normal vector of each plane in the plane feature set to the first initial clustered centroid, the second initial clustered centroid, and the third initial clustered centroid, respectively;
if the included angle between the normal vector of the plane and the first initial clustering center of mass is minimum, calculating the plane features corresponding to the normal vector of the plane into a first initial clustering set;
if the included angle between the normal vector of the plane and the second initial clustering center of mass is minimum, calculating the plane features corresponding to the normal vector of the plane into a second initial clustering set;
if the included angle between the normal vector of the plane and the third initial clustering center of mass is minimum, calculating the plane features corresponding to the normal vector of the plane into a third initial clustering set;
respectively taking the mean value of the normal vector of each plane in each initial clustering set as a new clustering center of mass, and respectively comparing the normal vector of each plane in the plane feature set with the new clustering center of mass to obtain three secondary clustering sets;
and repeating the clustering process of the quadratic clustering set until the clustering center of mass of the obtained clustering set is not changed any more, and obtaining k plane clustering subsets.
Optionally, the first position determining module 330 specifically includes:
if the k is 3, determining a first plane, a second plane and a third plane according to the three cluster subsets, wherein the first plane is located in front of the robot, and the second plane and the third plane are respectively located on two sides of the robot; the areas of the first plane, the second plane and the third plane are the sum of the areas of all planes in the corresponding clustering subset, and the normal vector of the first plane, the second plane and the third plane is the clustering centroid of the corresponding plane clustering subset;
calculating coordinates of the center of gravity of the first plane, the second plane and the third plane in the robot coordinate system;
determining the coordinates of the center of the first elevator plane to which the third plane belongs in the first elevator coordinate system according to the coordinates of the gravity center in the robot coordinate system;
and performing coordinate conversion on the coordinate of the center of the third elevator plane in the robot coordinate system to obtain a first coordinate of the robot in a first elevator coordinate system, wherein the first elevator coordinate system is a right-hand coordinate system taking the center of the third elevator plane as a coordinate origin, and the positive direction of the x axis of the first elevator coordinate system is the normal direction of the third elevator plane.
Optionally, on the basis of the above technical solution, the positioning device further includes a planar feature filtering module, and the planar feature filtering module is specifically configured to:
comparing the area of each plane in the set of plane features;
and if the area of any plane in the plane feature set is smaller than a preset area threshold, deleting the plane from the plane feature set.
Optionally, the positioning apparatus further comprises a linear feature extraction module, a linear clustering module and a second position determination module, wherein,
the linear feature extraction module is used for acquiring linear features in the elevator to obtain a first linear feature set, wherein the linear features comprise the starting endpoint position and the ending endpoint position of a line segment;
the linear clustering module is used for carrying out mean clustering on the linear features in the first linear feature set to obtain a plurality of clustering subsets;
and the second position determining module is used for respectively performing straight line fitting on each clustering subset and determining a second coordinate of the robot in the elevator system according to a straight line fitting result.
Optionally, the positioning apparatus further includes a weighted calculation module, configured to perform weighted calculation on the first coordinate and the second coordinate according to the following formula, and determine a final coordinate of the robot in the first elevator coordinate system:
p2=ap0+bp1 (1)
wherein p is0Is said first coordinate, p1Is said second coordinate, p2Is the final coordinate;
the a and b are weights, and a + b is 1.
On the basis of the technical scheme, if three plane clustering subsets cannot be obtained through the plane clustering module 320, the second coordinate is used as a final coordinate of the robot in the first elevator coordinate system.
The robot positioning device provided by the embodiment of the invention can execute the robot positioning method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. Reference may be made to the description of any method embodiment of the invention not specifically described in this embodiment.
Example four
Fig. 4 is a block diagram of a robot according to a fourth embodiment of the present invention. Fig. 4 illustrates a block diagram of an exemplary robot 412 suitable for use in implementing embodiments of the present invention. The robot 412 shown in fig. 4 is only an example, and should not bring any limitation to the function and the range of use of the embodiment of the present invention.
As shown in fig. 4, the components of the robot 412 may include, but are not limited to: a sensor 426, one or more processors or processing units 416, a system memory 428, and a bus 418 that couples the various system components (including the system memory 428 and the processing unit 416).
And a sensor 426 for acquiring environmental parameters around the robot and generating point cloud data of the environmental parameters. As an example, a block diagram of the sensor is shown in fig. 5, wherein the sensor 426 includes a first sensor 427 and a second sensor 429, wherein the first sensor 427 may be a single line laser radar for collecting environmental information and generating two-dimensional point cloud data; the second sensor 429 may employ a depth camera or a multiline laser radar, and three-dimensional point cloud data for environmental parameters may be generated by the second sensor 429. The two-dimensional point cloud data and the three-dimensional point cloud data are processed by the processor or processing unit 416, and then the position information of the robot is finally output.
Bus 418 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The robot 412 typically includes a variety of computer system readable media. These media may be any available media that can be accessed by the bot 412 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 428 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)430 and/or cache memory 432. The bot 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 434 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 418 by one or more data media interfaces. Memory 428 can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 440 having a set (at least one) of program modules 442 may be stored, for instance, in memory 428, such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 442 generally perform the functions and/or methodologies of the described embodiments of the invention.
The robot 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing device, display 424, etc.), with one or more devices that enable a user to interact with the robot 412, and/or with any devices (e.g., network card, modem, etc.) that enable the robot 412 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 422. Also, the robot 412 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via a network adapter 420. As shown, the network adapter 420 communicates with the other modules of the robot 412 over a bus 418. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the robot 412, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 416 executes various functional applications and data processing by executing programs stored in the system memory 428, for example, to implement the robot positioning method provided by the embodiment of the present invention, the method includes:
obtaining plane features in an elevator to obtain a plane feature set, wherein the plane features comprise a plane normal vector and a plane area;
clustering the plane features in the plane feature set according to the normal vector of the plane to obtain k plane clustering subsets, wherein k is more than or equal to 2;
and determining the position of the robot in the elevator according to the centroid positions of the k plane cluster subsets.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a robot positioning method provided in any embodiment of the present invention, and the method includes:
obtaining plane features in an elevator to obtain a plane feature set, wherein the plane features comprise a plane normal vector and a plane area;
clustering the plane features in the plane feature set according to the normal vector of the plane to obtain k plane clustering subsets, wherein k is more than or equal to 2;
and determining the position of the robot in the elevator according to the centroid positions of the k plane cluster subsets.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (6)

1. A robot positioning method, comprising:
the method comprises the steps of obtaining linear features in an elevator to obtain a first linear feature set, wherein the linear features comprise the starting endpoint position and the ending endpoint position of a line segment; performing mean clustering on the linear features in the first linear feature set to obtain a plurality of clustering subsets; respectively performing linear fitting on each clustering subset, and determining a second coordinate of the robot in a second elevator coordinate system according to a linear fitting result, wherein the origin of the second elevator coordinate system is the intersection point of a straight line positioned on the inner wall of the elevator and the longitudinal central line of the inner wall of the elevator, the x axis of the second elevator coordinate system is parallel to the x axis of the first elevator coordinate system and has the same direction, the y axis of the second elevator coordinate system is parallel to the y axis of the first elevator coordinate system and has the same direction, and the inner wall of the elevator is opposite to the elevator door;
acquiring three-dimensional point cloud data in an elevator through a first sensor arranged on the robot; performing low-pass filtering on the three-dimensional point cloud data; performing plane feature extraction on the three-dimensional point cloud data subjected to low-pass filtering by taking a robot coordinate system as a reference to obtain a plane feature set, wherein the robot coordinate system is a right-hand coordinate system taking a geometric center of a robot as a coordinate origin, and an x-axis of the robot coordinate system faces to the right front of the robot in the positive direction, and the plane feature comprises a plane normal vector and a plane area;
taking any normal vector of a normal vector of the plane feature concentration plane facing the front face of the robot as a first initial clustering center of mass, taking any normal vector of a normal vector facing the first side face of the robot as a second initial clustering center of mass, and taking any normal vector of a normal vector facing the second side face of the robot as a third initial clustering center of mass, wherein the first side face and the second side face of the robot are parallel to a coordinate longitudinal axis of the robot coordinate system;
comparing a normal vector of each plane in the plane feature set to the first initial clustered centroid, the second initial clustered centroid, and the third initial clustered centroid, respectively;
if the included angle between the normal vector of the plane and the first initial clustering center of mass is minimum, calculating the plane features corresponding to the normal vector of the plane into a first initial clustering set;
if the included angle between the normal vector of the plane and the second initial clustering center of mass is minimum, calculating the plane features corresponding to the normal vector of the plane into a second initial clustering set;
if the included angle between the normal vector of the plane and the third initial clustering center of mass is minimum, calculating the plane features corresponding to the normal vector of the plane into a third initial clustering set;
respectively taking the mean value of the normal vector of each plane in each initial clustering set as a new clustering center of mass, and respectively comparing the normal vector of each plane in the plane feature set with the new clustering center of mass to obtain three secondary clustering sets;
repeating the clustering process of the secondary clustering set until the clustering center of mass of the obtained clustering set is not changed, and obtaining k plane clustering subsets, wherein k is more than or equal to 2;
if the k is 3, determining a first plane, a second plane and a third plane according to the three cluster subsets, wherein the third plane is located in front of the robot, and the first plane and the second plane are respectively located on two sides of the robot; the areas of the first plane, the second plane and the third plane are the sum of the areas of all planes in the corresponding clustering subset, and the normal vector of the first plane, the second plane and the third plane is the clustering centroid of the corresponding plane clustering subset;
calculating coordinates of the center of gravity of the first plane, the second plane and the third plane in the robot coordinate system;
determining the coordinate of the center of the third elevator plane to which the third plane belongs in the robot coordinate system according to the coordinate of the gravity center in the robot coordinate system;
coordinate conversion is carried out on coordinates of the center of the third elevator plane in the robot coordinate system to obtain a first coordinate of the robot in a first elevator coordinate system, wherein the first elevator coordinate system is a right-hand coordinate system taking the center of the third elevator plane as a coordinate origin, and the positive direction of an x axis of the first elevator coordinate system is the normal direction of the third elevator plane;
and if the number of the plane cluster subsets is not three, taking the second coordinate as the final coordinate of the robot in the first elevator coordinate system.
2. The method according to claim 1, before the clustering the plane features in the plane feature set according to the normal vector of the plane to obtain k plane cluster subsets, further comprising:
comparing the area of each plane in the set of plane features;
and if the area of any plane in the plane feature set is smaller than a preset area threshold, deleting the plane from the plane feature set.
3. The method of claim 1, wherein after the determining the robot's position within the elevator from the centroid positions of the k subsets of the planar clusters, the method further comprises:
and performing weighted calculation on the first coordinate and the second coordinate according to the following formula to determine the final coordinate of the robot in the first elevator coordinate system:
p2=ap0+bp1 (1)
wherein p is0Is said first coordinate, p1Is said second coordinate, p2Is the final coordinate;
the a and b are weights, and a + b is 1.
4. A robot positioning device, comprising:
the plane feature extraction module is used for acquiring three-dimensional point cloud data in the elevator through a first sensor arranged on the robot; performing low-pass filtering on the three-dimensional point cloud data; performing plane feature extraction on the three-dimensional point cloud data subjected to low-pass filtering by taking a robot coordinate system as a reference to obtain a plane feature set, wherein the robot coordinate system is a right-hand coordinate system taking a geometric center of a robot as a coordinate origin, and an x-axis of the robot coordinate system faces to the right front of the robot in the positive direction, and the plane feature comprises a plane normal vector and a plane area;
the plane clustering module is used for taking any normal vector of a plane in the plane feature concentration towards the front of the robot as a first initial clustering center of mass, taking any normal vector of a normal vector towards the first side face of the robot as a second initial clustering center of mass, and taking any normal vector of a normal vector towards the second side face of the robot as a third initial clustering center of mass, wherein the first side face and the second side face of the robot are parallel to a coordinate longitudinal axis of the robot coordinate system;
comparing a normal vector of each plane in the plane feature set to the first initial clustered centroid, the second initial clustered centroid, and the third initial clustered centroid, respectively;
if the included angle between the normal vector of the plane and the first initial clustering center of mass is minimum, calculating the plane features corresponding to the normal vector of the plane into a first initial clustering set;
if the included angle between the normal vector of the plane and the second initial clustering center of mass is minimum, calculating the plane features corresponding to the normal vector of the plane into a second initial clustering set;
if the included angle between the normal vector of the plane and the third initial clustering center of mass is minimum, calculating the plane features corresponding to the normal vector of the plane into a third initial clustering set;
respectively taking the mean value of the normal vector of each plane in each initial clustering set as a new clustering center of mass, and respectively comparing the normal vector of each plane in the plane feature set with the new clustering center of mass to obtain three secondary clustering sets;
repeating the clustering process of the secondary clustering set until the clustering center of mass of the obtained clustering set is not changed, and obtaining k plane clustering subsets, wherein k is more than or equal to 2;
a first position determining module, configured to determine a first plane, a second plane, and a third plane according to the three cluster subsets if k is 3, where the third plane is located in front of the robot, and the first plane and the second plane are located on two sides of the robot, respectively; the areas of the first plane, the second plane and the third plane are the sum of the areas of all planes in the corresponding clustering subset, and the normal vector of the first plane, the second plane and the third plane is the clustering centroid of the corresponding plane clustering subset;
calculating coordinates of the center of gravity of the first plane, the second plane and the third plane in the robot coordinate system;
determining the coordinate of the center of the third elevator plane to which the third plane belongs in the robot coordinate system according to the coordinate of the gravity center in the robot coordinate system;
coordinate conversion is carried out on coordinates of the center of the third elevator plane in the robot coordinate system to obtain a first coordinate of the robot in a first elevator coordinate system, wherein the first elevator coordinate system is a right-hand coordinate system taking the center of the third elevator plane as a coordinate origin, and the positive direction of an x axis of the first elevator coordinate system is the normal direction of the third elevator plane;
and the final coordinate determination module is used for taking the second coordinate as the final coordinate of the robot in the first elevator coordinate system if the number of the plane cluster subsets is not three.
5. A robot, comprising:
one or more processors;
storage means for storing one or more programs;
the robot comprises a first sensor, a second sensor and a third sensor, wherein the first sensor is used for acquiring environmental parameters of the robot and generating two-dimensional point cloud data of the environmental parameters;
the second sensor is used for acquiring environmental parameters of the robot and generating three-dimensional point cloud data of the environmental parameters;
when executed by the one or more processors, cause the one or more processors to implement the robot positioning method of any of claims 1-3.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the robot positioning method according to any one of claims 1-3.
CN201910959527.XA 2019-10-10 2019-10-10 Robot positioning method, device, robot and storage medium Active CN110542422B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910959527.XA CN110542422B (en) 2019-10-10 2019-10-10 Robot positioning method, device, robot and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910959527.XA CN110542422B (en) 2019-10-10 2019-10-10 Robot positioning method, device, robot and storage medium

Publications (2)

Publication Number Publication Date
CN110542422A CN110542422A (en) 2019-12-06
CN110542422B true CN110542422B (en) 2021-03-23

Family

ID=68715575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910959527.XA Active CN110542422B (en) 2019-10-10 2019-10-10 Robot positioning method, device, robot and storage medium

Country Status (1)

Country Link
CN (1) CN110542422B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113009414B (en) * 2019-12-20 2024-03-19 中移(成都)信息通信科技有限公司 Signal source position determining method and device, electronic equipment and computer storage medium
CN111986258B (en) * 2020-08-24 2022-05-31 华中科技大学 Robot positioning control method and system based on point cloud normal vector direction clustering servo

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103673931A (en) * 2013-12-02 2014-03-26 北京农业信息技术研究中心 Method, device and system for measuring angle of rice flag leaf
CN106556412A (en) * 2016-11-01 2017-04-05 哈尔滨工程大学 The RGB D visual odometry methods of surface constraints are considered under a kind of indoor environment
CN106650640A (en) * 2016-12-05 2017-05-10 浙江大学 Negative obstacle detection method based on local structure feature of laser radar point cloud
CN109101967A (en) * 2018-08-02 2018-12-28 苏州中德睿博智能科技有限公司 The recongnition of objects and localization method, terminal and storage medium of view-based access control model

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6496008B1 (en) * 2000-08-17 2002-12-17 Digital Control Incorporated Flux plane locating in an underground drilling system
CN105045263B (en) * 2015-07-06 2016-05-18 杭州南江机器人股份有限公司 A kind of robot method for self-locating based on Kinect depth camera
CN110111388B (en) * 2019-05-10 2021-03-23 北京航空航天大学 Three-dimensional object pose parameter estimation method and visual equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103673931A (en) * 2013-12-02 2014-03-26 北京农业信息技术研究中心 Method, device and system for measuring angle of rice flag leaf
CN106556412A (en) * 2016-11-01 2017-04-05 哈尔滨工程大学 The RGB D visual odometry methods of surface constraints are considered under a kind of indoor environment
CN106650640A (en) * 2016-12-05 2017-05-10 浙江大学 Negative obstacle detection method based on local structure feature of laser radar point cloud
CN109101967A (en) * 2018-08-02 2018-12-28 苏州中德睿博智能科技有限公司 The recongnition of objects and localization method, terminal and storage medium of view-based access control model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
遗传算法在双激光雷达位姿标定中的应用;韦邦国 等;《计量与测试技术》;20190331;第46卷(第03期);第91-95页 *

Also Published As

Publication number Publication date
CN110542422A (en) 2019-12-06

Similar Documents

Publication Publication Date Title
CN109781119B (en) Laser point cloud positioning method and system
CN109270545B (en) Positioning true value verification method, device, equipment and storage medium
EP3624055B1 (en) Ground detection method, apparatus, electronic device, vehicle and storage medium
CN110542421B (en) Robot positioning method, positioning device, robot, and storage medium
CN111612841B (en) Target positioning method and device, mobile robot and readable storage medium
CN110663060B (en) Method, device, system and vehicle/robot for representing environmental elements
CN110542422B (en) Robot positioning method, device, robot and storage medium
CN113256712B (en) Positioning method, positioning device, electronic equipment and storage medium
CN110530375B (en) Robot adaptive positioning method, positioning device, robot and storage medium
WO2023131048A1 (en) Position and attitude information determining method and apparatus, electronic device, and storage medium
CN110530376B (en) Robot positioning method, device, robot and storage medium
WO2023040737A1 (en) Target location determining method and apparatus, electronic device, and storage medium
CN115406457A (en) Driving region detection method, system, equipment and storage medium
CN114966651A (en) Drivable region detection method, computer device, storage medium, and vehicle
CN114528941A (en) Sensor data fusion method and device, electronic equipment and storage medium
CN113220018B (en) Unmanned aerial vehicle path planning method and device, storage medium and electronic equipment
CN112465908B (en) Object positioning method, device, terminal equipment and storage medium
CN115346020A (en) Point cloud processing method, obstacle avoidance method, device, robot and storage medium
CN115388906A (en) Pose determination method and device, electronic equipment and storage medium
CN114910892A (en) Laser radar calibration method and device, electronic equipment and storage medium
CN111812670A (en) Single photon laser radar space transformation noise judgment and filtering method and device
CN112258566A (en) Pavement collection point identification method and device and server
CN113129361B (en) Pose determining method and device for movable equipment
CN110414458A (en) Localization method and device based on planar tags and template matching
CN111107505B (en) Position estimation method, spatial transformation judgment method, device, equipment and medium

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Room 513-517, building 1, No. 351, GuoShouJing Road, Pudong New Area, Shanghai, 201203

Patentee after: Shanghai TIMI robot Co.,Ltd.

Address before: Room 513-517, building 1, No. 351, GuoShouJing Road, Pudong New Area, Shanghai, 201203

Patentee before: SHANGHAI TMI ROBOT TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder