Robot autonomous exploration method, robot and computer readable storage medium
By using a neural network parameterized policy network model and a preset information-driven exploration strategy in the robot, the problem of low efficiency of traditional robot exploration methods is solved and more efficient autonomous exploration is achieved.
Patent Information
- Application Number
- CN202111332418.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-11-11
AI Technical Summary
Traditional robot exploration methods are greatly affected by noise and pose estimation errors, and cannot effectively utilize the prior semantic information of the environment, resulting in low exploration efficiency.
Using a strategy network model based on neural network parameterization, by obtaining the status data of the robot's current position, it generates a walking path and controls the robot to explore autonomously, and executes a specific exploration strategy based on preset information, including coverage, number of collisions, area size, etc. condition.
It improves the robot's exploration efficiency in unknown environments, can dynamically adjust the exploration strategy based on environmental information, and improves exploration efficiency and accuracy.
Smart Images

Figure CN114089752B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robots, and in particular to an autonomous exploration method of a robot, a robot and a computer-readable storage medium. Background Art
[0002] When a robot is exploring an environment, it needs to perceive the environment through sensors installed on the robot, build maps and locate itself based on the perceived data, and then plan the next exploration route.
[0003] Traditional exploration methods are boundary-based exploration methods, that is, they define the boundary between the current known area and the unknown area as the boundary, and then sample the boundary according to the sampling strategy to obtain the next exploration target. However, such traditional methods are greatly affected by noise and pose estimation errors. At the same time, such traditional methods cannot use the prior semantic information or features of the environment to further reduce the search space, resulting in low exploration efficiency.
[0004] In view of this, it is indeed necessary to propose a robot's autonomous exploration method, a robot and a computer-readable storage medium to solve the above problems. Summary of the invention
[0005] The purpose of the present invention is to provide a robot autonomous exploration method, a robot and a computer-readable storage medium based on a neural network parameterized representation method to improve the robot's exploration efficiency.
[0006] To achieve the above-mentioned object of the invention, the first aspect of the present invention provides a robot autonomous exploration method, the robot autonomous exploration method comprising:
[0007] Take the current position of the robot as the point to be explored and obtain the status data of the point to be explored;
[0008] Calling the strategy network model, performing path exploration on the state data according to the strategy network model, so as to output target information corresponding to the point to be explored; the target information includes the target point to be explored by the robot in the next step;
[0009] Based on the target point and the point to be explored, a walking path of the robot is generated, and the robot is controlled to explore along the walking path.
[0010] As a further improvement of the present invention, after generating a walking path of the robot based on the target point and the point to be explored, and controlling the robot to explore along the walking path, the autonomous exploration method of the robot further includes:
[0011] Continuously calculating data corresponding to preset information during the movement of the robot to the target point;
[0012] If the data corresponding to the acquired preset information meets the preset specific conditions, the robot is controlled to execute the specific exploration strategy corresponding to the preset specific conditions.
[0013] As a further improvement of the present invention, the preset information is configured on the robot, and the preset information includes at least one or more of the coverage value of the explored area, the number of physical collisions within a first preset time, and the size parameters of the area to be explored.
[0014] As a further improvement of the present invention, if the data corresponding to the acquired preset information meets the preset specific conditions, the robot is controlled to execute the specific exploration strategy corresponding to the preset specific conditions, and the specific exploration strategy includes:
[0015] If the coverage value of the explored area of the robot is greater than the map coverage threshold, controlling the robot to perform an exploration operation along a preset path;
[0016] If the number of physical collisions of the robot within the first preset time is greater than the collision number threshold, controlling the robot to stop the exploration operation;
[0017] If the size parameter of the area to be explored by the robot is smaller than the size threshold, the robot is controlled to mark the front exploration area as an obstacle.
[0018] As a further improvement of the present invention, after generating a walking path of the robot based on the target point and the point to be explored, and controlling the robot to explore along the walking path, the autonomous exploration method of the robot further includes:
[0019] If the robot has not reached the target point after the second preset time, the target point is updated based on the current position of the robot.
[0020] As a further improvement of the present invention, the status data includes: one or more of: an occupancy grid map established in the current time slot, a map representing the current position of the robot, data representing the historical operation path of the robot, data representing the conditions of the robot's explored and unexplored areas, and data representing the collision position and / or number of the robot over a period of time.
[0021] As a further improvement of the present invention, the policy network model is a trained policy network model, and the policy network model includes a plurality of cascaded convolutional layers, a plurality of cascaded fully connected layers and a normalization layer.
[0022] As a further improvement of the present invention, the convolution layer performs mapping transformation or feature extraction on the state data to obtain a state feature map. The state feature map is processed by the fully connected layer and the normalization layer to obtain a target map to be explored. The target map to be explored includes coordinate information of the target point.
[0023] As a further improvement of the present invention, an evaluation network is also configured in the training of the policy network model, and the evaluation network is used to assist the training of the policy network model.
[0024] As a further improvement of the present invention, the autonomous exploration method of the robot further includes:
[0025] Draw a local map or a global map of the robot's current position according to the target information corresponding to the point to be explored.
[0026] To achieve the above-mentioned purpose of the invention, the second aspect of the present invention also provides a robot, including a shell, and a control device housed in the shell for controlling the operation of the robot, the robot also including an exploration module, a data processing module, a strategy network model and a path planning module, the exploration module is used to explore the information of the point to be explored; the data processing module is used to receive the information of the point to be explored, and output the status data of the point to be explored; the control device calls the strategy network model, inputs the status data into the strategy network model, and outputs the target information corresponding to the point to be explored through the strategy network model; the target information includes the target point for the next exploration of the robot; the path planning module is used to generate a walking path of the robot based on the target point and the point to be explored; the control device is used to control the robot to explore along the walking path.
[0027] As a further improvement of the present invention, the data processing module includes one or more processing procedures of data caching, data extraction, data updating, data preprocessing and data merging.
[0028] As a further improvement of the present invention, the robot also includes a positioning and mapping module, which is used to draw a local map or a global map of the current position of the robot according to the target information corresponding to the point to be explored.
[0029] As a further improvement of the present invention, the strategy network model includes several layers of neural networks.
[0030] As a further improvement of the present invention, the robot also includes a learning module and an evaluation module, the learning module is used to train the strategy network model, and the evaluation module is used to assist in the training of the strategy network model.
[0031] In order to achieve the above-mentioned purpose of the invention, the third aspect of the present invention also provides a computer-readable storage medium, on which a program for autonomous exploration of the robot is stored. When the program for autonomous exploration of the robot is executed by a control device, the above-mentioned autonomous exploration method of the robot is implemented.
[0032] The beneficial effects of the present invention are as follows: the present invention provides a robot autonomous exploration method, a robot and a computer-readable storage medium, which are mainly used for the robot to conduct autonomous exploration in an unknown environment, by obtaining the state data of the robot's current position, using a strategy network model to conduct path exploration on the state data, and outputting the target information corresponding to the point to be explored, and based on the target information and the point to be explored, generating the robot's walking path, autonomously exploring according to the walking path, and being able to control the robot to execute a specific exploration strategy of preset specific conditions corresponding to the preset information according to preset information, and the robot can also draw a local map or a global map of the current position according to the target information corresponding to the point to be explored during the autonomous exploration process. The present invention effectively improves the robot's exploration efficiency by using an exploration strategy characterized by neural network parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is an application environment diagram of the autonomous exploration method of the robot of the present invention.
[0034] Figure 2 It is a flow chart of the autonomous exploration method of the robot of the present invention.
[0035] Figure 3 yes Figure 2 Flow chart of the robot's autonomous exploration method.
[0036] Figure 4 It is a schematic diagram of the policy network model performing the first mapping transformation.
[0037] Figure 5 It is a schematic diagram of the network structure of a preferred embodiment of the strategic network model.
[0038] Figure 6 It is a schematic diagram of the network structure of the strategy network model based on the actor-evaluator framework. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0040] It should be noted here that in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the scheme of the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0041] In addition, it should be noted that the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus.
[0042] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0043] The robot autonomous exploration method provided in this application can be applied to Figure 1 In the application environment of the sweeping robot shown. Among them, the sweeping robot 100 may include but is not limited to a sensor component 102, a control device 104, and a walking component 106. The control device 104 is deployed with a strategy network model. The control device 104 can execute the autonomous exploration method of the sweeping robot 100, and control the walking component 106 of the sweeping robot 100 to perform corresponding path exploration. Specifically, the sensor component 102 collects state data such as the environmental image of the current position of the sweeping robot 100, and the control device 104 calls the strategy network model on the sweeping robot 100. Through the strategy network model, the point to be explored in the environmental image is processed based on the exploration strategy, and the target point of the next exploration of the sweeping robot 100 is obtained. Based on the target point, the walking path of the sweeping robot 100 is generated, and the control device 104 controls the walking component 106 of the sweeping robot 100 to move according to the walking path.
[0044] The sensor component 102 may specifically include but is not limited to a laser rangefinder, a visual sensor, an infrared sensor, an acoustic sensor, a structured light, a line laser, a camera, a depth camera, etc. The control device 104 may specifically include but is not limited to a processor such as a central processing unit (CPU) and a control circuit. The walking component 106 may specifically include but is not limited to a driving wheel and a universal wheel, etc.
[0045] In addition, the cleaning robot 100 can also communicate with a server or terminal (not shown) through a network so that the server or terminal can control the cleaning robot 100. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server can be implemented as an independent server or a server cluster consisting of multiple servers.
[0046] In one embodiment, if Figure 2-3As shown, the present invention provides an autonomous exploration method of a robot 100, which is used to control the robot 100 to complete autonomous exploration of an area to be explored. The autonomous exploration method of the robot 100 includes:
[0047] S201: Taking the current position of the robot 100 as the point to be explored, obtaining state data of the point to be explored;
[0048] S202: calling the strategy network model, performing path exploration on the state data according to the strategy network model, so as to output target information corresponding to the point to be explored; the target information includes the target point to be explored next by the robot 100;
[0049] S203: Generate a walking path for the robot 100 based on the target point and the point to be explored, and control the robot 100 to explore along the walking path.
[0050] The robot 100 periodically repeats the above method to perform autonomous exploration. When the robot 100 completes the local exploration task or the global exploration task, the robot 100 directly enters step S205: stops autonomous exploration after completing the local exploration task or the global exploration task. At this time, the robot 100 can also draw a local map or a global map of the current position of the robot 100 according to the target information corresponding to the point to be explored.
[0051] It should be noted that when the robot 100 reaches the target point at the end of the current time slot or before the end of the time slot, the control device 104 can also control the robot 100 to directly trigger the next iteration of the robot 100 autonomous exploration method.
[0052] In a preferred embodiment, before the robot 100 autonomously explores, the preset information and its corresponding data are configured on the robot 100 to meet the preset specific conditions. After the robot 100 generates a walking path of the robot 100 based on the target point and the point to be explored, and controls the robot 100 to explore according to the walking path, the robot 100 will execute step S204 during the autonomous exploration process: the robot 100 continuously calculates the data corresponding to the preset information during the process of reaching the target point, and continuously calculates the data corresponding to the preset information during the process of reaching the target point.
[0053] If the data corresponding to the preset information obtained by the robot 100 does not meet the preset specific conditions, the robot enters step S205, that is, periodically repeats the above method to perform autonomous exploration until the local exploration task or the global exploration task is completed and the autonomous exploration is stopped.
[0054] If the data corresponding to the preset information acquired by the robot 100 meets the preset specific conditions, the robot 100 is controlled to enter step S206, that is, the robot 100 enters or triggers the preset specific conditions, and the robot 100 is controlled to perform autonomous exploration of the specific exploration strategy corresponding to the preset specific conditions.
[0055] After the specific exploration strategy corresponding to the preset specific conditions has been executed by the robot 100, the robot 100 can periodically repeat the autonomous exploration method based on the strategy network model until the local exploration task or the global exploration task is completed, or the preset specific conditions are triggered again to control the robot 100 to perform autonomous exploration of the specific exploration strategy corresponding to the preset specific conditions.
[0056] If the robot 100 still does not reach the target point after the second preset time, the robot 100 is controlled to enter step S207: re-update the target point based on the current position of the robot 100. That is, the current position of the robot 100 is used as a new exploration point, and the robot 100 is re-entered into step S201 to execute the autonomous exploration method of the robot 100 again.
[0057] The robot 100 of the present invention includes but is not limited to a sweeping robot 100, a service robot 100 and other movable robots 100. The surrounding environment of the present invention for autonomous exploration includes but is not limited to indoor scenes, outdoor scenes, virtual environments, and simulated environments, which are not described in detail here, nor are any restrictions imposed. For the sake of clarity, the following description will take the sweeping robot 100 performing autonomous exploration in an indoor scene as an example for detailed description.
[0058] See also Figure 2-3 As shown, when the sweeping robot 100 is exploring in an unknown environment, the unknown environment may be the first time the sweeping robot 100 works in an indoor scene, and it is necessary to perform global mapping and / or exploration of the indoor scene. Based on this unknown environment, in order to complete global mapping and / or exploration, the sweeping robot 100 divides the continuous time axis into multiple time slots for autonomous exploration. At the beginning of each time slot, the current position of the sweeping robot 100 is used as the point to be explored, and the surrounding environment is sensed by sensors or other non-sensing modules to obtain the required data, and the map and the posture information of the sweeping robot 100 are generated according to the positioning and mapping module, and then the current state data, i.e., the state data of the point to be explored by the sweeping robot 100, is generated through the data processing module based on the environmental information, map and posture information sensed by the sensor, so as to estimate the target point to be explored by the sweeping robot 100 next based on the state data.
[0059] In one embodiment, the sensor includes but is not limited to one or more of the following sensors: laser radar, color camera, depth camera, infrared sensor, ultrasonic sensor, odometer, IMU (Inertial Measurement Unit, inertial measurement unit or gyroscope), or other types of sensors that can detect image and / or distance data. The data obtained from the sensor includes but is not limited to the data collected by the sensor when the sweeping robot 100 is in the current position: for example, the information collected by the IMU, laser radar and odometer, and the RGB image collected by the color camera and / or depth camera, etc.; wherein, the specific type and specific number of sensors configured by the sweeping robot 100 can be configured according to the specific application scenario and specific requirements of the sweeping robot 100, and the embodiment of the present invention does not limit the specific type and number of sensors configured by the sweeping robot 100.
[0060] In one embodiment, the status data in step S201 includes one or more of an occupancy grid map established in the current time slot, a map representing the current position of the sweeping robot 100, data representing the historical operation path of the sweeping robot 100, data representing the conditions of the areas that have been detected and the areas that have not been detected by the sweeping robot 100, and data representing the collision position and / or number of the sweeping robot 100 over a period of time.
[0061] It should be noted that the occupancy grid map established in the current time slot refers to the occupancy grid map of the current position calculated and obtained by the data processing module when the sweeping robot 100 is in the current position. For example, when the occupancy grid map contains pixel positions representing map coordinates and probability pixel values representing obstacles, the pixel value can be an integer or a decimal between 0 and 1.
[0062] The graph representing the current position of the cleaning robot 100 includes but is not limited to the pixel position representing the map coordinates (the pixel value is binary and indicates whether the cleaning robot 100 is currently at that position), the current posture or angle of the cleaning robot 100, and the RGB image observed by the camera at the current time slot.
[0063] The data characterizing the situations of the areas already explored and the areas not explored by the sweeping robot 100 refers to the data characterizing the areas already explored by the sweeping robot 100 by using the pixel positions to represent the map coordinates, and the pixel values are binary to represent whether the sweeping robot 100 is currently at the position; the data characterizing the situations of the areas not explored by the sweeping robot 100 by using the pixel positions to represent the map coordinates, and the pixel values are binary to represent whether the position has been clearly explored, or the pixel values are continuous values between 0 and 1 to represent the probability of the position being clearly explored.
[0064] The graph representing the collision position and / or number of the cleaning robot 100 over a period of time refers to the cleaning robot 100 using pixel positions to represent map coordinates, wherein the pixel value represents the number of collisions caused by the cleaning robot 100 colliding with the position and / or traveling from a neighboring area to the position over a period of time.
[0065] Furthermore, in step S202, the sweeping robot 100 calls a strategy network model, which uses a strategy algorithm to enable the sweeping robot 100 to self-learn when facing a new environment, so that the sweeping robot 100 can interact with the environment in any unknown environment through sensor perception and non-sensor hardware device collection, so that the sweeping robot 100 makes a decision on the next action to be taken, and then obtains the exploration strategy of the sweeping robot 100 in different environments, so that the sweeping robot 100 can autonomously adapt to the environment of thousands of households and the environment of the same family environment that changes over time. The above exploration strategy can be the movement strategy of the target point of the next movement of the sweeping robot 100, or it can be the cleaning strategy of the sweeping robot 100 in the process of reaching the target point. Among them, the strategy network model is composed of several layers of neural networks, the input is the current state data, and the output is the target information corresponding to the point to be explored.
[0066] The sweeping robot 100 continuously collects environmental information through sensors and other devices in each time slot, and the state data obtained after processing is input into the strategy network model, and the state data is path explored according to the strategy network model to output the target information corresponding to the point to be explored through a suitable strategy. Among them, the target information includes the target point to be explored by the sweeping robot 100 in the next step.
[0067] In one embodiment, the policy network model first outputs a grid map to be explored, where the pixel positions of the grid map to be explored represent map coordinates, and the pixel values represent the probability that the pixel is selected as the target point corresponding to the point to be explored. In order to output a target point corresponding to a point to be explored, the sweeping robot 100 samples pixels in the grid map to be explored according to the probability represented by the pixel values, and the coordinates represented by the sampled pixels are the target point corresponding to the selected point to be explored.
[0068] In a preferred embodiment of the present invention, the size of the occupied grid map received by the policy network model can be greater than, equal to, or less than the size of the grid map to be explored output by the policy network. The policy network model includes multiple mapping transformations so that the size of the received occupied grid map is consistent with the size of the grid map to be explored. Specifically, when the size of the occupied grid map is greater than the size of the grid map to be explored, a first mapping transformation for mapping the large-sized map to a small-sized map can be performed.
[0069] Optionally, the first mapping transformation includes but is not limited to one or more of the following operations: sampling, pooling, convolution, encoding, decoding, encoding and decoding, encoding and decoding transformation, Transformer, RNN, LSTM.
[0070] See also Figure 4 As shown, the input of the first mapping transformation includes one or more large-size images, and the output of the first mapping includes one or more small-size images. Optionally, the input of the first mapping transformation includes the following one or more occupancy grid maps of size M*N (such as Figure 4 Part A), wherein: Figure a: is an occupancy grid map established in the current time slot (for example, the pixel position represents the map coordinates, the pixel value represents the probability of an obstacle, and the pixel value can be an integer or a decimal between 0 and 1), Figure b: is a map representing the current position of the cleaning robot 100 (for example, the pixel position represents the map coordinates, and the pixel value is binary to indicate whether the cleaning robot 100 is currently at this position), Figure c: is a map representing the historical route of the cleaning robot 100 (for example, the pixel position represents the map coordinates, and the pixel value is binary to indicate whether the cleaning robot 100 is currently at this position), Figure d: is a map representing the map exploration situation (for example, the pixel position represents the map coordinates, the pixel value is binary to indicate whether the position has been clearly explored, or the pixel value is a continuous value between 0 and 1 to indicate the probability of exploring the position clearly), Figure e: is a map representing the collision position and / or number of times of the cleaning robot 100 over a period of time (for example, the pixel position represents the map coordinates, and the pixel value represents the number of collisions of the cleaning robot 100 at this position and / or from the territory to this position). The above period of time may be set according to user needs or environmental needs, such as 5s, 6.5s, or may be a regional range, such as 7.5-10s.
[0071] At this time, the policy network model performs the first mapping transformation, and at this time the first mapping transformation is downsampling and / or maximum pooling to output one or more X*Y graphs, where X≤M, Y≤N, that is, the grid graph to be explored is as follows Figure 4 Figures f and g in part B complete the conversion of the large occupied grid map to the small unexplored grid map.
[0072] In an optional embodiment of the present invention, the policy network model is a trained policy network model, and the policy network model includes a plurality of cascaded convolutional layers, a plurality of fully connected layers, and a normalization layer. The plurality of convolutional layers perform mapping transformation or feature extraction on the state data to obtain a state feature map, and the state feature map is processed by a plurality of fully connected layers and a normalization layer to obtain a target map to be explored, and the target map to be explored includes coordinate information of the target point.
[0073] When the environmental information input into the policy network model includes an RGB image, the policy network model includes a single-layer or multi-layer convolutional network for extracting RGB image features to obtain RGB features. Optionally, the input of the fully connected layer includes but is not limited to the posture (angle) of the sweeping robot 100, the small-size image output by the first mapping transformation, and the output of other network layers of the policy network. When the output of the fully connected layer is a grid map to be explored, the pixel position of the grid map to be explored represents the map coordinates, and the pixel value is the probability that the pixel is selected as the target point corresponding to the point to be explored.
[0074] Optionally, the policy network model is a trained policy network model. The training of the policy network model means that before the cleaning robot 100 officially works or explores in the working scene, the policy network model can be trained in one or more scenes of the same type as the working scene to obtain appropriate policy network parameters and thus ensure the performance of the cleaning robot 100 when exploring in the working scene.
[0075] The scenario used in the policy network model training process is defined as the training scenario, and the policy network model training process includes one or more of the following steps.
[0076] Step 1: Initialize the policy network model, that is, initialize the policy network parameters, such as randomly taking values for the policy network parameters.
[0077] Step 2: Optionally, use imitation learning to train the policy network model.
[0078] Step 3: Run the sweeping robot 100 in the training scene according to the strategy represented by the strategy network model, and collect training data. The training data includes the current state data in each time step, the target point corresponding to the point to be explored, and reward information. In this embodiment, the reward includes a positive reward representing the size of the newly added detection area or the number of grids, a negative reward representing the number of collisions, a negative reward representing the length of the exploration path, a positive reward representing the reduction of map uncertainty, a negative reward representing repeated exploration, and one or more of the errors between the real map and the estimated map.
[0079] Step 4: Based on the training data, use the deep reinforcement learning algorithm to train the policy network model and update the policy network parameters.
[0080] Optionally, the deep reinforcement learning algorithm may also include an evaluator network to assist the policy network model in training. Using the evaluator network can speed up the training of the policy network model, making the training of the policy network model more stable, thereby enabling faster and more accurate action selection, while also reducing the amount of computation.
[0081] Step 5: Iterate and repeat steps 3 and 4 until the training end condition is met.
[0082] The training end conditions include, but are not limited to, one or more of the number of iterations exceeding a preset value of the number of iterations, the iteration time exceeding a preset value of the iteration time, and the performance of the policy network exceeding a performance threshold value.
[0083] It should be noted that the training scenes in this embodiment are virtual training scenes and actual training scenes. Optionally, whether the training scenes and the working scenes are of the same type may be irrelevant to whether they are virtual or actual scenes.
[0084] See also Figure 5 , which is a schematic diagram of the network structure of a policy network model of a preferred embodiment of the present invention. In this embodiment, the policy network includes an input, one or more convolutional layers, one or more fully connected layers, and an output.
[0085] Optionally, the input includes input 1 and input 2. The size of input 1 is 5*M*N, which means 5 channels, and the size of each channel is M*N. The input data of the first channel is the occupancy grid map established in the previous time slot, wherein the pixel position (m, n) represents the map coordinates, and the pixel value represents the probability of the existence of an obstacle at the coordinates. The pixel value can be an integer or a decimal between 0 and 1. A pixel value of 1 represents that there is an obstacle at the corresponding position of the pixel, and a pixel value of 0 represents that there is no obstacle at the pixel position. The input data of the second channel is a map representing the current position of the sweeping robot 100, wherein the pixel position (m, n) represents the map coordinates, and the pixel value can be 0 or 1. A pixel value of 0 represents that the sweeping robot 100 is not at the position corresponding to the pixel, and a pixel value of 1 represents that the sweeping robot 100 is at the position corresponding to the pixel. The input data of the third channel is a graph representing the historical route of the sweeping robot 100, wherein the pixel position (m, n) represents the map coordinates, and the pixel value can be 0 or 1. A pixel value of 1 represents that the sweeping robot 100 has passed the position corresponding to the pixel, and a pixel value of 0 represents that the sweeping robot 100 has not passed the position corresponding to the pixel. The input data of the fourth channel is a graph representing the map exploration situation, wherein the pixel position (m, n) represents the map coordinates, and the pixel value can be 0 or 1. A pixel value of 0 represents that the position corresponding to the pixel has not been clearly explored, and a pixel value of 1 represents that the position corresponding to the pixel has been clearly explored. The input data on the fifth channel is a graph representing the collision position and / or number of the sweeping robot 100 over a period of time, wherein the pixel position (m, n) represents the map coordinates, and the pixel value can be 0 or 1. A pixel value of 1 represents that the sweeping robot 100 has collided at the position and / or from the neighboring area to the position, otherwise, the pixel value is 0.
[0086] Input 2 is the current rotation angle of the cleaning robot 100 , representing the orientation of the cleaning robot 100 in the occupied grid map.
[0087] The data of input 1 is input into one or more convolutional layers for processing, and the size of the final output of the one or more convolutional layers is X*Y, which represents the first hidden feature information extracted from input 1 by the one or more convolutional layers.
[0088] The first hidden feature information is input together with input 2 to one or more fully connected layers for processing. The output size is X*Y. The output after logistic regression (softmax) processing represents a grid map to be explored. The pixel position (x, y) of the grid map to be explored represents the map coordinates, and the pixel value is the probability that the corresponding position of the pixel is selected as the target point corresponding to the point to be explored.
[0089] When in formal operation, the sweeping robot 100 generates input 1 and input 2 data according to the current state, and the strategy network model derives the corresponding output based on the input. The sweeping robot 100 samples the output grid map to be explored according to the probability represented by the pixel value to obtain the coordinates of the target point corresponding to the corresponding point to be explored.
[0090] When using deep reinforcement learning to train a policy network, the policy network is also called an actor network. During training, an evaluator network can be introduced to increase training stability. Figure 6 As shown in FIG. 1 , a schematic diagram of the network structure of the strategy network model based on the actor-evaluator framework of a preferred embodiment of the present invention is shown. The structure of the evaluator network is similar to that of the actor network, except that the output of the evaluator network is different from the output of the actor network. The output of the evaluator network is a state value function, and the size of the output of the evaluator network is a real number. The last network layer in the evaluator network, i.e. Figure 6 The fully connected layer near the output of the evaluator network linearly maps the data output by the penultimate network layer to a real number.
[0091] In an optional embodiment, the state of the cleaning robot 100 in time slot t, that is, the input is s t Indicates; the action taken by the cleaning robot 100 at time slot t is represented by a t Represents; the reward obtained by the cleaning robot 100 in time slot t is represented by r t If r t =δF(t)+βL(t)+μC(t), where F(t) represents the action a taken by the cleaning robot 100 in time slot t. t The size of the newly added exploration area, L(t) represents the length of the path traveled by the sweeping robot 100 in time slot t, C(t) represents the number of collisions that occurred in the sweeping robot 100 in time slot t, δ, β, μ are weight coefficients, the network parameters of the actor network are represented by θ, and the network parameters of the evaluator network are represented by θ v , then the output of the actor network is represented by π(at / s t ; θ), represents the pixel position a in the grid map to be explored t The probability that the pixel is selected as the target point; the output of the evaluator network can be expressed by V(s t θ v ) indicates that the cleaning robot 100 is in state s t The estimated value of the expected return that can be obtained by following the strategy when . The return represents the cumulative discounted reward, and the discount rate is γ.
[0092] Specifically, the steps for updating the policy network model using the actor-evaluator reinforcement learning algorithm framework are as follows:
[0093] Step 1: Initialize the neural network, that is, initialize and set the neural network parameters, such as randomly taking values for the neural network parameters. Specifically, the initialization may be the environment state and current posture information of the sweeping robot 100.
[0094] Step 2: Run the sweeping robot 100 in the training scene according to the strategy represented by the strategy network model, and collect training data. The training data includes the state data in each time step (e.g., t=0, 1, 2, ..., T), the target point corresponding to the selected point to be explored, the reward and the state data at the next moment, i.e., s t 、a t 、r t 、s t+1 .
[0095] Step 3: Every J time slots, the network parameters θ of the evaluator network are v When updating, a batch of data is selected from the data collected in step 2 as training data, and the batch size is B1. The goal of training the evaluator network is to t θ v ) and the target value r t +γV(s t+1 θ v ). In other words, the loss function for training the evaluator network is (r t +γV(s t+1 θ v )-V(s t θ v )) 2 .
[0096] Optionally, use gradient descent to θ v Update, the update equation is as follows, where a' is the learning rate of the evaluator network:
[0097]
[0098] Step 4: Update the network parameter θ of the actor network every I time slots. When updating, select a batch of data from the data collected in step 2 as training data, and the batch size is B2. The goal of training the actor network is to maximize the reward obtained by the sweeping robot 100, that is, the expectation of the cumulative discounted reward or reward.
[0099] Optionally, θ is updated using the policy gradient method, and the update equation is as follows:
[0100]
[0101] Where a is the learning rate of the actor network, A(s t ,a t ;θ,θ v ) represents t Take action a t Compared with following strategy π(a t / s t ; α) can bring the size of the return advantage, which is determined by A(s t ,a t ;θ,θ v )=r t +γV(s t+1 θ v )-V(s t θ v ) for estimation.
[0102] Step 5: Iterate and repeat steps 2 to 4 until the training end condition is met. The network model that meets the training end condition is the policy network model.
[0103] Among them, the training end conditions include one or more of the following: the number of iterations exceeds a certain number, for example, 100,000 times; the number of time slot steps exceeds a certain number, for example, 10,000,000 times; the loss function value of the evaluator network increases instead of decreases within a certain number of iterations; the target value of the actor network training decreases instead of increases within a certain number of iterations.
[0104] Furthermore, based on the target point and the point to be explored, the path planning module generates a walking path of the cleaning robot 100 , and controls the cleaning robot 100 to explore along the walking path through the control device.
[0105] Of course, in addition to generating the walking path of the sweeping robot 100 through the path planning module, the sweeping robot 100 can also explore through the preset path pre-stored in the preset information of the sweeping robot 100. The preset path can be a path along the edge that controls the sweeping robot 100 to run along the boundary of the current position or a bow-shaped path that controls the robot 100 to run within the boundary area of the current position. Of course, in other embodiments of the present invention, the exploration path can also be other path forms that are different from the preset path. At this time, the strategy network model can select the exploration path from the planned path according to the principle of the highest reward to ensure that the sweeping robot 100 can follow the exploration path to complete the exploration of the current position.
[0106] Furthermore, the sweeping robot 100 draws a local map or a global map of the current location according to the target information corresponding to the point to be explored. Specifically, the acquisition of the grid map data in the local map and the global map is obtained by processing the strategy network model, and the control device 104 establishes the local map and / or global map corresponding to the autonomous exploration according to the grid map data and the path information transmitted by the path planning module.
[0107] The cleaning robot 100 periodically repeats the above method to perform autonomous exploration until the local exploration task or the global exploration task is completed, and stops exploring, that is, enters step S205. Of course, when the cleaning robot 100 ends at the end of the current time slot or the cleaning robot 100 reaches the target point before the end of the time slot, the control device 104 can control the cleaning robot 100 or directly trigger the next iteration of the autonomous exploration method of the cleaning robot 100.
[0108] In a preferred embodiment, before the robot 100 conducts autonomous exploration, the preset information and its corresponding data satisfying the preset specific conditions are configured on the robot 100. The cleaning robot 100 periodically repeats the above method to conduct autonomous exploration, generates a walking path of the cleaning robot 100 based on the target point and the point to be explored, and controls the cleaning robot 100 to explore according to the walking path, and then enters step S204: the data corresponding to the preset information is continuously calculated during the process of the cleaning robot 100 reaching the target point, and according to the calculation result, the robot 100 is controlled to enter step S205 or S206.
[0109] During the autonomous exploration process, if the preset specific conditions are not triggered, the sweeping robot 100 is controlled to enter step S205: continue to periodically repeat the above method to perform autonomous exploration until the local exploration task or the global exploration task is completed and then stop the autonomous exploration.
[0110] During the autonomous exploration process, if a preset specific condition is triggered, the cleaning robot 100 is controlled to enter step S206, that is, to perform autonomous exploration of a specific exploration strategy corresponding to the preset specific condition.
[0111] Furthermore, the preset information and its corresponding data satisfy preset specific conditions and are configured on the sweeping robot 100. Specifically, the preset information and its corresponding data satisfy the preset specific conditions and are stored in the control device 104 of the sweeping robot 100. The current state information is compared with the preset information through the data processing module, and the sweeping robot 100 is controlled by the control device 104 to execute a specific exploration strategy corresponding to the preset specific conditions.
[0112] The preset information includes at least one or more of the coverage value of the explored area, the number of physical collisions within the first preset time, and the size parameters of the area to be explored. The size parameters of the area to be explored include one or more of the area value, length value, and height value of the area to be explored.
[0113] In one embodiment, the first preset time may be a numerical threshold or an interval threshold, which may be set according to user needs or environmental needs. For example, the first preset time is 7s or 2.2-5.5s, which may also be set to the time corresponding to the collection time slot of the sweeping robot 100.
[0114] If the data corresponding to the acquired preset information meets the preset specific conditions, the cleaning robot 100 is controlled to execute the specific exploration strategy corresponding to the preset specific conditions, and the specific exploration strategy includes:
[0115] If the coverage value of the explored area of the sweeping robot 100 is greater than the map coverage threshold, the sweeping robot 100 is controlled to perform exploration operations along a preset path. The preset path may be a path pre-set in the control device 104 of the sweeping robot 100, such as a path along the edge for controlling the sweeping robot 100 to run along the boundary of the current position or a bow-shaped path for controlling the sweeping robot 100 to run in the boundary area of the current position. Among them, the map coverage threshold may be a percentage, such as 70%, 80%, etc. If the coverage value of the explored area of the sweeping robot 100 is greater than 70%, the sweeping robot 100 is controlled to perform exploration operations along a preset path. The preset path may be to continue to explore along the original path such as a bow-shaped path, or to explore a random path or an optimal path between the target point and the point to be explored. The preset path is pre-set on the sweeping robot 100, and a mapping relationship between a preset specific condition and a preset path is established. In some embodiments, a preset specific condition may select multiple preset paths for exploration, or may select a corresponding preset path for exploration.
[0116] If the number of physical collisions of the sweeping robot 100 within the first preset time is greater than the collision number threshold, the sweeping robot 100 is controlled to stop the exploration operation. That is, the sweeping robot 100 is controlled to abandon the exploration of the current position and return to the initial position, or to explore the current position with a preset path, or to autonomously explore the exploration target through other exploration algorithms other than the strategy network model. Among them, the collision number threshold can be 3 times, or 5 times, etc.
[0117] If the size parameter of the area to be explored by the cleaning robot 100 is less than the size threshold, the cleaning robot 100 is controlled to abandon the exploration of the front area and / or mark the front exploration area as an obstacle. The size threshold is associated with the size of a specific obstacle, which may be a wall, a shoe, a sock, a wire, a table, a stool, etc. Different obstacles correspond to different size thresholds, and the size threshold corresponds to the category of the obstacle.
[0118] It should be noted that the above-mentioned preset specific conditions and specific exploration strategies are not limiting. In one embodiment, when the area to be explored where the current position of the sweeping robot 100 is located is an indoor scene, the data corresponding to the preset information satisfies the preset specific conditions and also includes that the single room mapping coverage is greater than a single room map coverage threshold, the entire house mapping coverage is greater than a whole house mapping coverage threshold, the number of collisions within a period of time is greater than a collision number threshold, and the obstacle in front is less than an area threshold or a length threshold. At this time, the specific exploration strategy of the sweeping robot 100 includes but is not limited to one or more of the following: ending the mapping of the current room of the sweeping robot 100 and / or moving to the next room, ending the mapping work of the whole house and / or returning to the initial position (such as the charging pile of the sweeping robot 100), abandoning the exploration of the front area and / or marking the front area as an obstacle.
[0119] After the specific exploration strategy corresponding to the preset specific conditions has been executed by the sweeping robot 100, the sweeping robot 100 can periodically repeat the autonomous exploration method based on the strategy network model until the local exploration task or the global exploration task is completed, or the preset specific conditions are triggered again to control the sweeping robot 100 to perform autonomous exploration of the specific exploration strategy corresponding to the preset specific conditions.
[0120] It should be noted that when the sweeping robot 100 has not reached the target point at the end of the current time slot, the target point planned for the next time slot may change. That is, the sweeping robot 100 enters step S207: based on the target point and the point to be explored, the walking path of the sweeping robot 100 is generated, and the sweeping robot 100 is controlled to explore along the walking path. If the sweeping robot 100 has not reached the target point after the second preset time, the target point is updated based on the current location of the sweeping robot 100. Then the path planning module generates the walking path of the sweeping robot 100 again based on the updated target point and the updated exploration point, and controls the sweeping robot 100 to explore along the walking path.
[0121] The present invention effectively improves the exploration efficiency of the sweeping robot 100 by using an exploration strategy represented by neural network parameters, especially improves the exploration efficiency of the sweeping robot 100 in unknown areas.
[0122] The present invention further provides a robot 100, including a shell, a control device 104 contained in the shell for controlling the operation of the robot 100, an exploration module, a data processing module, a strategy network model, a positioning and mapping module, and a path planning module.
[0123] The exploration module is used to explore the surrounding environment of the current position, that is, the information of the point to be explored. The exploration module includes sensors or other non-sensor modules. The exploration module includes but is not limited to one or more of the environmental information, posture information, and map used to explore the current position of the robot 100.
[0124] The data processing module is connected to the exploration module, the path planning module and the positioning and mapping module respectively. The data processing module is used to receive the information of the points to be explored by the exploration module and output the status data of the points to be explored. The data processing module includes one or more processing procedures for data caching, data extraction, data updating, data preprocessing and data merging. The data processing module can be a data processing module in a sensor or a data processing module in the control device 104.
[0125] The control device 104 is deployed with a strategy network model, which uses the robot 100 autonomous exploration strategy based on deep learning. The strategy can adapt to the autonomous navigation exploration of the mobile robot 100 from a random starting point to an arbitrary end point, and uses deep reinforcement learning to train the exploration behavior of the robot 100 in an unknown environment, so that it can adapt to the unknown environment, and even if the environment changes, the robot 100 can still perform the corresponding exploration task. The control device 104 can be a controller composed of a central processing unit and a control circuit. The control device 104 inputs the state data processed by the data processing module into the strategy network model, and outputs the target information corresponding to the point to be explored through the strategy network model. Among them, the target information includes the coordinate information corresponding to the target point, and the target point of the robot 100 to explore next can be known through the coordinate information.
[0126] The path planning module generates a walking path for the robot 100 based on the target point and the points to be explored, and the control device 104 controls the robot 100 to explore according to the walking path.
[0127] Of course, the control device 104 can also control the robot 100 to execute a specific exploration strategy corresponding to the preset specific conditions after the robot 100 encounters the preset specific conditions corresponding to the preset information, and after the specific exploration strategy is retrieved, the control device 104 again uses the current position of the robot 100 as the point to be explored and re-updates the target point.
[0128] The robot 100 also includes a positioning and mapping module, which draws a local map or a global map of the current position of the robot 100 according to the target information corresponding to the point to be explored.
[0129] The strategy network model includes several layers of neural networks, the input is the current state data, and the output is the target information corresponding to the point to be explored. Furthermore, the strategy network model includes several cascaded convolutional layers, several fully connected layers and normalization layers. Several convolutional layers perform mapping transformation or feature extraction on the state data to obtain a state feature map, and the state feature map is processed by several fully connected layers and normalization layers to obtain a target map to be explored, which includes the coordinate information of the target point. Through the several layers of neural networks of the strategy network model, the robot 100 can automatically learn the abstract features of the environment or objects from large-scale raw data, thereby improving the exploration efficiency of the robot 100.
[0130] Furthermore, the robot 100 also includes a learning module and an evaluation module, wherein the learning module is used to train the policy network model, and the evaluation module is used to assist in the training of the policy network model. Through the learning module and the evaluation module, the policy network model can be effectively trained and evaluated to further improve the exploration efficiency and exploration accuracy of the policy network model, thereby improving the exploration efficiency and exploration accuracy of the robot 100's autonomous exploration path based on the policy network model.
[0131] The robot 100 provided by the present invention can effectively control the robot 100 to execute the above-mentioned autonomous exploration method through various modules in the control device 104, thereby achieving the same practical effect as the above-mentioned autonomous exploration method of the robot 100.
[0132] The present invention also provides a computer-readable storage medium, on which is stored a program for autonomous exploration of the robot 100. When the program for autonomous exploration of the robot 100 is executed by the control device 104, the above-mentioned autonomous exploration method of the robot 100 is implemented. Therefore, the computer-readable storage medium has the same practical effect as the above-mentioned autonomous exploration method of the robot 100.
[0133] In summary, the present invention provides an autonomous exploration method of a robot 100, a robot 100, and a computer-readable storage medium, which are mainly used for the robot 100 to conduct autonomous exploration in an unknown environment, by acquiring the state data of the current position of the robot 100, using a strategy network model to perform path exploration on the state data, and outputting the target information corresponding to the point to be explored, and based on the target information and the point to be explored, generating a walking path of the robot 100, autonomously exploring according to the walking path, and being able to control the robot 100 to execute a specific exploration strategy of preset specific conditions corresponding to the preset information according to preset information, and the robot 100 can also draw a local map or a global map of the current position according to the target information corresponding to the point to be explored during the autonomous exploration process. The present invention effectively improves the exploration efficiency of the robot 100 by using an exploration strategy characterized by neural network parameters.
[0134] The above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A robot autonomous exploration method, characterized in that: The autonomous exploration method of the robot includes: Taking the current position of the robot as the point to be explored, obtaining the state data of the point to be explored, wherein the state data includes one or more of: an occupancy grid map established in the current time slot, a map representing the current position of the robot, data representing the historical running path of the robot, data representing the situation of the robot's explored area and unexplored area, and data representing the collision position and / or number of the robot within a period of time; Calling a strategy network model, performing path exploration on the state data according to the strategy network model, so as to output target information corresponding to the point to be explored; the target information includes a target point to be explored by the robot in the next step; The strategy network model is a trained strategy network model, which includes several layers of neural networks, and the input is current state data, and the output is target information corresponding to the point to be explored; Based on the target point and the point to be explored, a walking path of the robot is generated, and the robot is controlled to explore along the walking path.
2. The robot autonomous exploration method according to claim 1, characterized in that: After generating a walking path of the robot based on the target point and the point to be explored, and controlling the robot to explore along the walking path, the autonomous exploration method of the robot further includes: Continuously calculating data corresponding to preset information during the movement of the robot to the target point; If the data corresponding to the acquired preset information meets the preset specific conditions, the robot is controlled to execute the specific exploration strategy corresponding to the preset specific conditions; The specific exploration strategy includes at least: If the coverage value of the explored area of the robot is greater than the map coverage threshold, controlling the robot to perform an exploration operation along a preset path; If the number of physical collisions of the robot within the first preset time is greater than the collision number threshold, controlling the robot to stop the exploration operation; If the size parameter of the to-be-explored area obtained by the robot is smaller than the size threshold, the robot is controlled to mark the front exploration area as an obstacle.
3. The robot autonomous exploration method according to claim 2, characterized in that: The preset information is configured on the robot, and the preset information includes at least one or more of a coverage value of an explored area, a number of physical collisions within a first preset time, and a size parameter of an area to be explored.
4. The robot autonomous exploration method according to claim 1, characterized in that: After generating a walking path of the robot based on the target point and the point to be explored, and controlling the robot to explore along the walking path, the autonomous exploration method of the robot further includes: If the robot still does not reach the target point after the second preset time, the target point is updated based on the current position of the robot.
5. The robot autonomous exploration method according to claim 1, characterized in that: The policy network model includes a plurality of cascaded convolutional layers, a plurality of cascaded fully connected layers and a normalization layer.
6. The robot autonomous exploration method according to claim 5, characterized in that: The state data is mapped or feature extracted by the convolution layer to obtain a state feature map. The state feature map is processed by the fully connected layer and the normalization layer to obtain a target map to be explored. The target map to be explored includes the coordinate information of the target point.
7. The robot autonomous exploration method according to claim 1, characterized in that: An evaluation network is also configured in the training of the policy network model, and the evaluation network is used to assist the training of the policy network model.
8. The robot autonomous exploration method according to claim 1, characterized in that: The autonomous exploration method of the robot also includes: Draw a local map or a global map of the robot's current position according to the target information corresponding to the point to be explored.
9. A robot comprising a housing and a control device contained in the housing for controlling the operation of the robot, characterized in that: The robot also includes an exploration module, a data processing module, a strategy network model and a path planning module. The exploration module is used to explore the information of the points to be explored; The data processing module is used to receive the information of the to-be-explored point and output the status data of the to-be-explored point, wherein the status data includes one or more of: an occupancy grid map established in the current time slot, a map representing the current position of the robot, data representing the historical running path of the robot, data representing the situation of the robot's explored area and unexplored area, and data representing the collision position and / or number of the robot within a period of time; The control device calls the strategy network model, inputs the state data into the strategy network model, and outputs the target information corresponding to the point to be explored through the strategy network model; the target information includes the target point to be explored by the robot in the next step; the strategy network model is a trained strategy network model, the strategy network model includes several layers of neural networks, and the input is the current state data, and the output is the target information corresponding to the point to be explored; The path planning module is used to generate a walking path for the robot based on the target point and the point to be explored; The control device is used to control the robot to explore along the walking path.
10. The robot according to claim 9, characterized in that: The data processing module includes one or more processing procedures of data caching, data extraction, data updating, data preprocessing and data merging.
11. The robot according to claim 9, characterized in that: The robot also includes a positioning and mapping module, which is used to draw a local map or a global map of the robot's current position according to the target information corresponding to the point to be explored.
12. The robot according to claim 9, characterized in that: The robot also includes a learning module and an evaluation module, wherein the learning module is used to train the policy network model, and the evaluation module is used to assist in the training of the policy network model.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a robot's autonomous exploration program, and when the robot's autonomous exploration program is executed by a control device, the robot's autonomous exploration method as described in any one of claims 1-8 is implemented.
Citation Information
Patent Citations
Particle unmanned vehicle set under artificial intelligence big data, control method and medium
CN111208820A
Real-time unmanned aerial vehicle path prediction method based on deep reinforcement learning
CN112148008A
