Autonomous mobile machine, controller, and control method for autonomous mobile machine
Provided are an autonomous mobile machine, a controller, and a control method. The autonomous mobile machine includes a controller executing program instructions to implement: driving a sensor to obtain a first current frame; retrieving an adjacent region corresponding to the first current frame according to a pose of the first current frame; determining whether the adjacent region is the same as an adjacent region corresponding to a previous frame; updating a region list stored in a first storage medium based on that the adjacent region corresponding to the first current frame is different from the adjacent region corresponding to the previous frame, wherein the region list records the adjacent region corresponding to the first current frame; and loading, from a second storage medium, a pose and point cloud data of a key frame corresponding to a newly added region in the region list into the first storage medium.
1 . An autonomous mobile machine, comprising a controller, the controller executing program instructions to implement the following steps:
obtaining, by a sensor, an initial current frame;
creating a first two-dimensional region according to the initial current frame; and
after the first two-dimensional region is created, driving autonomous mobile machine to move;
obtaining, by the sensor, a first current frame;
retrieving an adjacent region corresponding to the first current frame according to a pose of the first current frame;
determining whether the adjacent region corresponding to the first current frame is the same as an adjacent region corresponding to a previous frame of the first current frame;
updating a region list stored in a first storage medium in response to that the adjacent region corresponding to the first current frame is different from the adjacent region corresponding to the previous frame of the first current frame, wherein the region list records the adjacent region corresponding to the first current frame;
loading, from a second storage medium, a pose and point cloud data of a key frame corresponding to a newly added region in the region list into the first storage medium; and
deleting region data that is in the first storage medium and that is not of the adjacent region corresponding to the first current frame.
2 . The autonomous mobile machine according to claim 1 , wherein the controller further executes the program instructions to implement the following steps:
generating point cloud data of the first current frame; and
loading a point cloud map feature description of the adjacent region from the second storage medium.
3 . The autonomous mobile machine according to claim 2 , wherein the controller further executes the program instructions to implement the following steps:
comparing a similarity between the first current frame and the point cloud map feature description according to the pose and point cloud data of the first current frame, to obtain an initial pose.
4 . The autonomous mobile machine according to claim 3 , wherein the controller further executes the program instructions to implement the following steps:
determining a pose and point cloud data of a nearest neighbor key frame from the first storage medium according to the initial pose.
5 . The autonomous mobile machine according to claim 4 , wherein the controller further executes the program instructions to implement the following steps:
obtaining localization of the autonomous mobile machine according to the point cloud data of the first current frame and the pose and the point cloud data of the nearest neighbor key frame.
6 . The autonomous mobile machine according to claim 1 , wherein the controller further executes the program instructions to implement the following steps:
driving the sensor to obtain a second current frame in response to that the autonomous mobile machine operates in a mapping mode;
generating point cloud data of the second current frame;
determining whether the second current frame is in an existing region according to a pose and the point cloud data of the second current frame; and
creating a new region in response to that the second current frame is not in an existing region.
7 . The autonomous mobile machine according to claim 6 , wherein the controller further executes the program instructions to implement the following steps:
determining, in response to that the second current frame is in an existing region, whether region data that is in the first storage medium and that is not of an adjacent region corresponding to the second current frame exists in the second storage medium.
8 . The autonomous mobile machine according to claim 7 , wherein the controller further executes the program instructions to implement the following steps:
deleting, in response to that the region data that is in the first storage medium and that is not of the adjacent region corresponding to the second current frame exists in the second storage medium, the region data that is in the first storage medium and that is not of the adjacent region corresponding to the second current frame; and
storing, in response to that the region data that is in the first storage medium and that is not of the adjacent region corresponding to the second current frame does not exist in the second storage medium, the region data that is in the first storage medium and that is not of the adjacent region corresponding to the second current frame into the second storage medium.
9 . The autonomous mobile machine according to claim 7 , wherein the controller further executes the program instructions to implement the following steps:
matching the second current frame with the region data of the adjacent region corresponding to the second current frame.
10 . The autonomous mobile machine according to claim 9 , wherein the controller further executes the program instructions to implement the following steps:
using the second current frame as a key frame in response to creating the new region;
determining whether the second current frame is a key frame in response to that the second current frame is in an existing region; and
storing the pose and the point cloud data of the second current frame into a region corresponding to the first storage medium in response to that the second current frame is a key frame.
11 . The autonomous mobile machine according to claim 10 , wherein the controller further executes the program instructions to implement the following steps:
downsampling the point cloud data of the second current frame.
12 . The autonomous mobile machine according to claim 11 , wherein the controller further executes the program instructions to implement the following steps:
generating a point cloud map feature description according to the downsampled point cloud data of the second current frame; and
storing the point cloud map feature description into the second storage medium.
13 . The autonomous mobile machine according to claim 9 , wherein the controller further executes the program instructions to implement the following steps:
matching the second current frame with the region data of the adjacent region corresponding to the second current frame and outputting the pose of the second current frame, in response to that the second current frame is not a key frame.
14 . The autonomous mobile machine according to claim 13 , wherein the matching the second current frame with the region data of the adjacent region corresponding to the second current frame comprises:
registering the second current frame with a previous frame of the second current frame by an algorithm, so that the second current frame and the previous frame of the second current frame are aligned in a same coordinate system, to minimize an error between two frames of point clouds.
15 . The autonomous mobile machine according to claim 14 , wherein the matching the second current frame with the region data of the adjacent region corresponding to the second current frame further comprises:
converting the second current frame into a same coordinate system as the region data of the adjacent region corresponding to the second current frame.
16 . The autonomous mobile machine according to claim 15 , wherein the matching the second current frame with the region data of the adjacent region corresponding to the second current frame further comprises:
matching the second current frame with point cloud data of a key frame closest to the second current frame in the region data of the adjacent region corresponding to the second current frame.
17 . The autonomous mobile machine according to claim 2 , wherein the generating point cloud data of the first current frame comprises:
performing near-range point cloud filtering on an original point cloud of the first current frame to generate an unobstructed point cloud; and
downsampling the unobstructed point cloud to generate a sparse point cloud.
18 . A controller, configured to execute program instructions, to implement the following steps:
obtaining, by a sensor, an initial current frame;
creating a first two-dimensional region according to the initial current frame; and
after the first two-dimensional region is created, driving autonomous mobile machine to move;
obtaining, by the sensor, a first current frame;
retrieving an adjacent region corresponding to the first current frame according to a pose of the first current frame;
determining whether the adjacent region corresponding to the first current frame is the same as an adjacent region corresponding to a previous frame of the first current frame;
updating a region list in a first storage medium in response to that the adjacent region corresponding to the first current frame is different from the adjacent region corresponding to the previous frame of the first current frame, wherein the region list records the adjacent region corresponding to the first current frame;
loading, from a second storage medium, a pose and point cloud data of a key frame corresponding to a newly added region in the region list into the first storage medium; and
deleting region data that is in the first storage medium and that is not of the adjacent region corresponding to the first current frame.
19 . A control method for an autonomous mobile machine, comprising:
obtaining, by a sensor, an initial current frame;
creating a first two-dimensional region according to the initial current frame; and
after the first two-dimensional region is created, driving autonomous mobile machine to move;
obtaining, by the sensor, a first current frame;
retrieving an adjacent region corresponding to the first current frame according to a pose of the first current frame;
determining whether the adjacent region corresponding to the first current frame is the same as an adjacent region corresponding to a previous frame of the first current frame;
updating a region list in a first storage medium in response to that the adjacent region corresponding to the first current frame is different from the adjacent region corresponding to the previous frame of the first current frame, wherein the region list records the adjacent region corresponding to the first current frame;
loading, from a second storage medium, a pose and point cloud data of a key frame corresponding to a newly added region in the region list into the first storage medium; and
deleting region data that is in the first storage medium and that is not of the adjacent region corresponding to the first current frame.