Autonomous mobile machine, controller, and point cloud matching state confirmation method for autonomous mobile machine
Some embodiments of the present disclosure relate to an autonomous mobile machine, a controller, and a point cloud matching state confirmation method for an autonomous mobile machine. The autonomous mobile machine includes a controller, and the controller is configured to execute a program instruction to implement the following operations: obtaining an original point cloud and a target point cloud; registering the original point cloud and the target point cloud to obtain a Hessian matrix and a transformation matrix between the original point cloud and the target point cloud; calculating a matching error between the original point cloud and the target point cloud according to the Hessian matrix and the transformation matrix; and determining a matching state between the original point cloud and the target point cloud based on a comparison between the matching error and a first threshold range.
1 . An autonomous mobile machine, the autonomous mobile machine comprising a controller, the controller being configured to execute a program instruction to implement the following operations:
obtaining an original point cloud and a target point cloud, the original point cloud being a real-time point cloud of a current position of the autonomous mobile machine and the target point cloud being a local map or a global map of the current position of the autonomous mobile machine;
registering the original point cloud and the target point cloud to obtain a Hessian matrix and a transformation matrix between the original point cloud and the target point cloud;
calculating a matching error between the original point cloud and the target point cloud according to the Hessian matrix and the transformation matrix; wherein calculating a matching error between the original point cloud and the target point cloud according to the Hessian matrix and the transformation matrix comprises: transforming the original point cloud into a first point cloud via the transformation matrix; and determining normal vectors of points in the first point cloud; and
determining a matching state between the original point cloud and the target point cloud based on a comparison between the matching error and a first threshold range;
when the matching error falls within the first threshold range, controlling the autonomous mobile machine to continue to execute a current task; and
when the matching error is outside the first threshold range, controlling the autonomous mobile machine to suspend a current task.
2 . The autonomous mobile machine according to claim 1 , wherein the registering the original point cloud and the target point cloud to obtain a Hessian matrix and a transformation matrix between the original point cloud and the target point cloud comprises:
obtaining transformation parameters of a coordinate system of the original point cloud relative to a coordinate system of the target point cloud;
sorting the transformation parameters;
registering the original point cloud and the target point cloud; and
obtaining the Hessian matrix and the transformation matrix when the registration reaches a convergence condition.
3 . The autonomous mobile machine according to claim 1 , wherein the original point cloud and the target point cloud are registered by using one of the following algorithms: a generalized iterative closest point (GICP) algorithm and an iterative closest point (ICP) algorithm.
4 . The autonomous mobile machine according to claim 3 , wherein
the original point cloud and the target point cloud are registered by using the GICP algorithm based on a Levenberg-Marquardt algorithm (L-M algorithm).
5 . The autonomous mobile machine according to claim 1 , wherein the calculating a matching error between the original point cloud and the target point cloud according to the Hessian matrix and the transformation matrix comprises:
calculating, according to the Hessian matrix, an eigenparameter related to a coordinate value; and
calculating a matching error between the original point cloud and the target point cloud based on the eigenparameter, the first point cloud, and the normal vectors.
6 . The autonomous mobile machine according to claim 5 , wherein the calculating, according to the Hessian matrix, an eigenparameter related to a coordinate value comprises:
extracting, from the Hessian matrix, a first matrix related to the coordinate value; and
performing eigenvalue decomposition on the first matrix, to obtain eigenvalues and eigenvectors.
7 . The autonomous mobile machine according to claim 6 , wherein the operation further comprises: sorting the eigenvalues in an ascending order, and correspondingly adjusting sorting of the eigenvectors.
8 . The autonomous mobile machine according to claim 1 , wherein the operation further comprises:
determining the matching error as a reasonable matching error when the matching error is within a first threshold range.
9 . The autonomous mobile machine according to claim 8 , wherein the first threshold range is 0.06 to 0.12.
10 . The autonomous mobile machine according to claim 1 , wherein the calculating a matching error between the original point cloud and the target point cloud based on the eigenparameter, the first point cloud, and the normal vectors first parameter comprises:
performing dimensionality augmentation on the eigenvector, to obtain a dimensionality-augmented eigenvector;
reserving a point, in the first point cloud, having an absolute value of a dot product of the normal vector and the dimensionality-augmented eigenvector is greater than a second threshold range, to obtain a second point cloud; and
calculating a matching error between the original point cloud and the target point cloud based on the eigenvalue, the dimensionality-augmented eigenvector, the second point cloud, and normal vectors of points in the second point cloud.
11 . The autonomous mobile machine according to claim 10 , wherein the second threshold range is 0.4 to 0.8.
12 . The autonomous mobile machine according to claim 10 , wherein the calculating a matching error between the original point cloud and the target point cloud based on the eigenvalue, the dimensionality-augmented eigenvector, the second point cloud, and normal vectors of points in the second point cloud comprises:
calculating weights of the points based on the eigenvalue, the dimensionality-augmented eigenvector, and the normal vectors of the points in the second point cloud;
searching for a nearest neighbor point, in the target point cloud, of a point in the second point cloud and calculating a distance between the point and the nearest neighbor point; and
calculating a matching error between the original point cloud and the target point cloud based on the weight and the distance.
13 . The autonomous mobile machine according to claim 12 , wherein the eigenvalue comprises a first eigenvalue and a second eigenvalue, the dimensionality-augmented eigenvector comprises a first eigenvector and a second eigenvector, and the calculating weights of the points based on the eigenvalue, the dimensionality-augmented eigenvector, and the normal vectors of the points in the second point cloud comprises:
calculating the weight by using the following formula:
w
=
(
n
*
v
1
*
lambda_
2
lambda_
1
+
lambda_
2
)
2
+
(
n
*
v
2
*
lambda_
1
lambda_
1
+
lambda_
2
)
2
wherein lambda_1 is the first eigenvalue, lambda_2 is the second eigenvalue, v1 is the first eigenvector, v2 is the second eigenvector, and n is a normal vector of a point in the second point cloud.
14 . The autonomous mobile machine according to claim 12 , wherein the searching for a nearest neighbor point, in the target point cloud, of a point in the second point cloud and calculating a distance between the point and the nearest neighbor point comprises:
searching for the nearest neighbor point by using one of the following algorithms: KD-Tree, octree, binary tree, and brute-force search.
15 . The autonomous mobile machine according to claim 12 , wherein the calculating a matching error between the original point cloud and the target point cloud based on the weight and the distance comprises:
multiplying the weight by the distance, to obtain a first distance;
accumulating the first distances and the weights of all points in the second point cloud, to obtain a second distance and a first weight, respectively; and
dividing the second distance by the first weight, to obtain the matching error.
16 . A controller, configured to execute a program instruction, to implement the following operations:
obtaining an original point cloud and a target point cloud, the original point cloud being a real-time point cloud of a current position of the autonomous mobile machine and the target point cloud being a local map or a global map of the current position of the autonomous mobile machine;
registering the original point cloud and the target point cloud to obtain a Hessian matrix and a transformation matrix between the original point cloud and the target point cloud;
calculating a matching error between the original point cloud and the target point cloud according to the Hessian matrix and the transformation matrix, wherein calculating a matching error between the original point cloud and the target point cloud according to the Hessian matrix and the transformation matrix comprises: transforming the original point cloud into a first point cloud via the transformation matrix; and determining normal vectors of points in the first point cloud;
determining a matching state between the original point cloud and the target point cloud based on a comparison between the matching error and a first threshold range;
when the matching error falls within the first threshold range, controlling the autonomous mobile machine to continue to execute a current task; and
when the matching error is outside the first threshold range, controlling the autonomous mobile machine to suspend a current task.
17 . A point cloud matching state confirmation method for an autonomous mobile machine, the method comprising:
obtaining an original point cloud and a target point cloud, the original point cloud being a real-time point cloud of a current position of the autonomous mobile machine and the target point cloud being a local map or a global map of the current position of the autonomous mobile machine;
registering the original point cloud and the target point cloud to obtain a Hessian matrix and a transformation matrix between the original point cloud and the target point cloud;
calculating a matching error between the original point cloud and the target point cloud according to the Hessian matrix and the transformation matrix, wherein calculating a matching error between the original point cloud and the target point cloud according to the Hessian matrix and the transformation matrix comprises: transforming the original point cloud into a first point cloud via the transformation matrix; and determining normal vectors of points in the first point cloud;
determining a matching state between the original point cloud and the target point cloud based on a comparison between the matching error and a first threshold range;
when the matching error falls within the first threshold range, controlling the autonomous mobile machine to continue to execute a current task; and
when the matching error is outside the first threshold range, controlling the autonomous mobile machine to suspend a current task.