Walking control method and device, storage medium and self-moving equipment
By acquiring and processing multiple target images and using semantic segmentation algorithms to determine the robot's next action, it solves the error problems in recognition and obstacle avoidance in the existing technology, achieves precise control and a high-coverage walking method, and reduces the cost of walking. Cost and the need to rely on expensive sensors.
Patent Information
- Application Number
- CN202410697924.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-17
AI Technical Summary
When existing robots recognize and avoid obstacles, they are prone to recognition errors when facing moving obstacles or multiple obstacles, and cannot recognize them globally, resulting in reduced task execution coverage.
Using the walking control method, by acquiring multiple target images, using the preset semantic segmentation algorithm to process the images, determine the device's next action to avoid obstacles, and achieve purely visual motion planning, eliminating the need for expensive sensors, and having Out-of-the-box functionality without global map and scene-specific customization, action-based learning model to increase generalization.
It achieves precise control of the equipment during walking, avoids collisions, improves work completion and coverage in the work area, reduces costs, has the ability to handle dynamic obstacles and obstacle groups, and enhances the generalization and performance of the equipment. Positioning accuracy.
Smart Images

Figure CN118655894A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile positioning, and in particular to a walking control method, device, storage medium and self-moving device. Background Art
[0002] With the rapid development of artificial self-moving equipment, the control technology of robots has also developed rapidly. In the prior art, robots can automatically identify obstacles around them during work and perform obstacle avoidance operations on them. However, in the process of identifying and avoiding obstacles, if the obstacles are in a moving state or there are multiple obstacles, the robots in the prior art will cause obstacle identification errors or fail to globally identify all obstacles, thereby reducing the coverage rate of task execution in the robot's working area. Summary of the invention
[0003] The main purpose of the present invention is to provide a walking control method and device, aiming to achieve precise control of the equipment during the walking process, avoid collisions, and meet the needs of users.
[0004] A first aspect of an embodiment of the present application provides a walking control method, the method comprising:
[0005] Acquire multiple target images, where the target images are used to indicate that multiple image acquisition devices acquire environmental images within a target range of the mobile device;
[0006] Process the target image according to a preset semantic segmentation algorithm to obtain a processing result, wherein the processing result at least includes whether there is a target object within a preset range of the mobile device, and the target object at least includes a boundary line or an obstacle;
[0007] Inputting the processing result into a data model to determine a target action of the self-moving device at a next moment so that the self-moving device avoids the obstacle;
[0008] The data model is used to instruct the mobile device to autonomously perform a target action based on multiple images.
[0009] According to a second aspect of an embodiment of the present application, there is provided a mobile device for a mobile device, the device comprising:
[0010] An image acquisition module, used to acquire multiple target images, wherein the target images are used to indicate that multiple image acquisition devices acquire environmental images within a target range of the mobile device;
[0011] A processing module, used to process the target image according to a preset semantic segmentation algorithm to obtain a processing result, wherein the processing result at least includes whether there is a target object within a preset range of the mobile device, and the target object at least includes a boundary line or an obstacle;
[0012] A trajectory module, inputting the processing result into a data model, and determining a target action of the self-moving device at a next moment, so that the self-moving device avoids the target object;
[0013] The data model is used to instruct the mobile device to autonomously perform a target action based on multiple images.
[0014] According to a third aspect of an embodiment of the present application, a self-mobile device is provided, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0015] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0016] The walking control method provided in the embodiment of the present application has the following advantages compared with the prior art:
[0017] Advantage 1: The control method provided in this application uses a purely visual solution to complete the motion planning of the lawn mower, which greatly reduces the cost while ensuring the completion of the task. For example, more expensive sensors such as lidar are eliminated.
[0018] Advantage 2: The control method provided in this application has an "out-of-the-box" function. After completing the training, the starting position of the lawn mower can be placed at any position on the lawn to start cutting automatically.
[0019] Advantage 3: The control method provided by this application does not require the establishment of a global map, and does not require the customization of the lawn mower behavior for specific scenarios. Since the network training is based on the lawn mower's own motion state and its interaction state with the environment, it is only necessary to perceive the environment locally to complete the task. At the same time, since the purpose of training is to learn the interaction between the lawn mower's own state and the environment and the lawn mower can make corresponding decisions under a certain interaction relationship, it does not rely on specific constraints, so there is no need for specific constraint control for specific scenarios.
[0020] Advantage 4: The control method provided by this application is based on the learning of actions at a certain moment, rather than the learning planning process. This learning mode is conducive to increasing the generalization of the lawn mower in practical applications. Even when facing an environmental state that has never been encountered, the corresponding predicted motion state can be given.
[0021] Advantage 5: It can jump out of the local optimum. Most local optimums occur when a group of obstacles cause the mower to be unable to plan to the target point. When a motion-based mower encounters such a situation, it will jump out of the local optimum based on the learned experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The specific embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings:
[0023] Figure 1 This is a schematic diagram of an application scenario of a walking control method provided by an embodiment of the present application;
[0024] Figure 2 is a flow chart of a walking control method provided by an embodiment of the present application;
[0025] Figure 3A This is a schematic diagram of semantic segmentation in a walking control method provided by an embodiment of the present application. Figure 1 ;
[0026] Figure 3B This is a semantic segmentation diagram of a walking control method provided by an embodiment of the present application. Figure 2 ;
[0027] Figure 3C This is a third semantic segmentation diagram of a walking control method provided by an embodiment of the present application;
[0028] Figure 4 is a schematic diagram of image processing in a walking control method provided by an embodiment of the present application;
[0029] Figure 5 is a schematic diagram of device actions in a walking control method provided by an embodiment of the present application;
[0030] Figure 6 It is a schematic diagram of the structure of a mobile device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0031] The terms used in the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. For example, the words "upper", "lower", "front", "back" and the like indicating orientation or positional relationship are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device / element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention.
[0032] Obstacle avoidance refers to when a self-moving device senses through sensors that there are static or dynamic obstacles on its planned route during its walking process, it updates the path in real time according to a certain algorithm, bypasses the obstacles, and finally reaches the target point. Obstacle avoidance is an indispensable part of the walking control of self-moving equipment, and is related to the accuracy, safety and stability of the operation of self-moving equipment. The obstacle avoidance method in the prior art uses a simple walking control method with obstacle bypassing logic to locate the terminal device. This positioning method obtains less information and has low efficiency and accuracy. Because the terminal device often moves, the environment in which it is located changes. For example, obstacle avoidance is performed after global planning, or obstacle avoidance is performed after local planning. However, the above obstacle avoidance logic does not meet the increasing accuracy requirements of self-moving equipment. Here are three specific examples:
[0033] Example 1: Current problems with global path planning and obstacle avoidance algorithms:
[0034] The global path planning and obstacle avoidance algorithm has high requirements for the accuracy of map information, that is, it needs to obtain the accurate coordinates of the current position and target point before planning and obstacle avoidance, as well as detailed information such as the position and size of all obstacles in the whole map. This means that an accurate global map must be established before using global path planning and obstacle avoidance. However, this may not be possible in many scenarios faced by lawn mowers, such as when dynamic obstacles appear and the dynamic obstacles are constantly moving in the lawn. In addition, more importantly, lawn mowers using global path planning and obstacle avoidance algorithms cannot complete the "out-of-the-box" function. "Out-of-the-box" means that the lawn mower can automatically start mowing immediately when placed at any position in the lawn to be mowed. However, lawn mowers using global path planning and obstacle avoidance algorithms must first establish a complete map of the entire lawn before they can mow.
[0035] Example 2: Current problems with local path planning and obstacle avoidance algorithms:
[0036] The local path planning and obstacle avoidance algorithm uses sensors to obtain local environmental information for real-time dynamic path planning and obstacle avoidance, which has relatively high real-time performance and flexibility. However, the problem with the local path planning and obstacle avoidance algorithm is that since it does not have global information and only relies on local information, the path it plans may often be the local optimal rather than the global optimal, or even in an area where the target is unreachable. The advantage of the local path planning and obstacle avoidance algorithm is that it does not rely on a pre-established global map, but completes planning and obstacle avoidance based on a real-time local field of view, but the local field of view often leads to information loss and causes planning errors or obstacle avoidance failures.
[0037] Example 3: Current problems with intelligent algorithms:
[0038] Some intelligent algorithms, such as genetic algorithms and particle swarm algorithms, may get stuck in local optimal solutions and fail to find global optimal solutions. Most intelligent algorithms have some parameters that need to be adjusted, and the selection of these parameters usually depends on the characteristics of the specific problem. For example, algorithms based on neural networks need to learn when facing specific problems. Incorrect parameter selection may cause algorithm performance to degrade and fail to achieve the desired effect. In planning problems, using neural networks to learn the planning process will cause serious problems, that is, when the scene has never appeared in the data set, the network's performance will not achieve the expected effect.
[0039] In response to the reduced completion rate of the operation caused by the above-mentioned obstacle avoidance processing, an embodiment of the present application provides a device walking control method, which obtains a number of multi-angle images within a preset time period, and determines the trajectory generation strategy according to the displacement deviation value of the positioning data in the preset time period.
[0040] This method can detect whether an obstacle is encountered during the real-time walking of the equipment based on the preset driving trajectory. If an obstacle that may cause a collision is detected, an obstacle avoidance path is generated, and the robot travels along the obstacle to continue to complete the preset driving trajectory. The obstacle avoidance trajectory generated by the preset driving trajectory, the relative position of the robot and the obstacle, and the walking path that has been traveled can not only achieve the technical effect of driving around obstacles, but also improve the completion of the work in the work area, making the cleaning trajectory more neat and regular. In the process of bow-shaped coverage, when an obstacle is encountered, the obstacle can be actively avoided and the bow-shaped coverage can be continued. The position of the obstacle is accurately sensed by the laser radar to achieve the obstacle avoidance effect and improve the coverage rate.
[0041] The solutions in the embodiments of the present application can be implemented using various computer languages, for example, the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0042] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0043] The method embodiment provided in the embodiment of the present application can be executed in a self-mobile device or a similar computing device. The self-mobile device 10 may include one or more processors 101 or programmable logic devices (PLDs) 101, a camera device 102 for image acquisition function, and a memory 103 for storing data.
[0044] In an exemplary embodiment, the self-mobile device may further include a transmission device and an input / output device for communication functions.
[0045] In an exemplary embodiment, the self-moving device may further include a driving device for the self-moving function.
[0046] It will be understood by those skilled in the art that the self-moving device may also include more or fewer components than those shown in the above modules, or have a different configuration with equivalent functions or more functions than those shown in the above robot. The memory may be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the walking control method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the computer program stored in the memory, that is, implementing the above method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
[0047] Please see attached Figure 2 The walking control method provided in the embodiment of the present application is applied to a self-moving device 10. The walking control method provided in the embodiment of the present application is applied to how the device realizes self-movement by collecting images and data models as an example. The walking control method provided in the embodiment of the present application includes the following steps 201 to 203:
[0048] Step 201: Acquire multiple target images.
[0049] The target image is used to indicate that multiple image acquisition devices acquire environmental images within a target range of the self-mobile device, and the target range can be set according to the working area or the physical parameters of the image acquisition device or the physical parameters of the self-mobile device.
[0050] Self-moving devices include devices equipped with motors and processors, which can send signals through the processor to control the motor and drive the device to move, such as intelligent robots, intelligent lawn mowers or other operating equipment.
[0051] The above target image can be acquired in real time by using multiple cameras, so as to cover a 360-degree field of view and acquire the image comprehensively. The default resolution of the above acquired image is 720*1280, and the resolution can be modified without affecting the subsequent modules.
[0052] The captured image data is transmitted in real time to the image processing unit inside the device, which usually contains a high-performance computer chip or specialized image processing hardware. The image processing unit is used to preliminarily process the raw image data, such as denoising, correction, enhancement, etc., to improve the accuracy of subsequent analysis.
[0053] Step 202: Process the target image according to a preset semantic segmentation algorithm to obtain a processing result.
[0054] The processing result at least includes whether there is a target object within a preset range of the self-moving device, and the target object at least includes a boundary line or an obstacle.
[0055] The semantic segmentation network mentioned in the embodiments of the present application facilitates the processor to understand the image at the pixel level, that is, pixels belonging to the same class of objects are classified into one class and each pixel in the image is assigned to a predefined category, such as grass, path, boundary line, tree, house, etc. The collected images are analyzed by deep learning models such as convolutional neural networks (CNN) or more advanced semantic segmentation models such as U-Net, Mask R-CNN, etc. The model learns a large number of samples in the training phase in order to accurately distinguish different object categories in unknown images.
[0056] Step 203: input the processing result into a data model to determine the target action of the target self-moving device at the next moment, so that the self-moving device avoids the target object.
[0057] The data model is used to indicate the matching relationship between multiple target actions of the mobile device and multiple images.
[0058] The target action may be stationary or moving, and the target action may include at least one of a moving direction, a moving speed, a moving time, or a moving distance.
[0059] Through multiple image acquisition devices, images within a preset range of the lawn mower are collected, and then semantic segmentation processing is performed on the image to determine whether there is a target object in the environment where the lawn mower is currently located. The target object may include a boundary line or an obstacle. Regardless of whether there is a target object, depth estimation must be performed.
[0060] If there is a target object, the collected image input, perception result information, depth estimation information, etc. are transmitted to the data model. The data model outputs the direction of action and walking method at the next moment, so that the target object can be bypassed to avoid collision.
[0061] An embodiment of the present application provides a walking control method, which collects target images from multiple angles around a device, processes the target images through semantic segmentation, and inputs the processing results into a data model, thereby analyzing the device's action at the next moment. This method can not only accurately identify whether there are obstacles within a preset range, but also comprehensively plan the device's obstacle avoidance strategy.
[0062] The control method provided in this application uses deep learning to complete real-time planning and obstacle avoidance of mobile equipment under pure vision and local field of view, achieving "out-of-the-box use", avoiding the establishment of a global map, avoiding the establishment of specific constraint behaviors, and being able to handle the emergence of dynamic obstacles. When encountering a group of obstacles, it jumps out of the local optimum and determines the optimal action at the current moment.
[0063] In an optional embodiment, the method provided by the present application, in step 201, of acquiring multiple target images, includes:
[0064] Step 301: Use at least four image acquisition modules to acquire initial images of a target from multiple different directions within a target range of a mobile device.
[0065] The above-mentioned four different image acquisition modules may include four cameras in different directions, facing the front, back, left and right directions of the machine respectively, or they may be different modules of the panoramic image acquisition device. The purpose of this is to ensure that each camera captures visual information within a certain range in that direction, and this information is recorded in the form of images.
[0066] Step 302: After dedistorting the multiple initial images in different directions, a target image is acquired.
[0067] De-distortion processing corrects image distortion caused by the inherent physical properties of optical lenses to restore the true form of the image.
[0068] In the embodiment of the present application, a 360-degree field of view without blind spots around the lawn mower is obtained to ensure that there are no blind spots, provide more accurate data for management for subsequent semantic segmentation processing and data model decision-making, and improve the accuracy of equipment control.
[0069] In an optional embodiment, the method provided by the present application, in step 202, the step of obtaining the processing result mentioned in step 202, comprises at least the following steps:
[0070] Step 401: Divide the target image into multiple image blocks according to the similarity in the target image.
[0071] After semantic segmentation, the environment image is divided into multiple image blocks according to the pixel texture similarity in the environment image; specific features in the image, such as color, texture, shape, etc., are identified in image blocks to distinguish between grass, boundary lines and obstacles. Obstacles may be judged by a combination of shape and depth information. Semantic segmentation is performed on each image block to obtain the object category and position corresponding to each image block to determine whether there are obstacles or boundary lines.
[0072] Step 402: Taking the image blocks as units, identify the label and position information of each image block in turn.
[0073] The tag is used to indicate the attribute of the current image block, where the attribute indication includes a boundary or an obstacle, and the position information is used to indicate the coordinate information of the current image block in the target area.
[0074] After semantic segmentation, different areas in the image will be segmented and assigned corresponding labels.
[0075] The above labels are trained with a large amount of data and can define labels of target objects, such as "boundary line", "obstacle", etc., and can accurately identify image labels through model training.
[0076] Step 403: Obtain processing results according to the label and position information of each image.
[0077] After the model segments the image, it uses the preset label information to determine whether the lawn mower is currently near a boundary line or an obstacle. For example, if the "obstacle" label appears in the front field of view, the lawn mower should perform obstacle avoidance operations.
[0078] Please refer to Figures 3A to 3C The diagram of the semantic segmentation process shown in the figure is as follows: Here, only images collected in one direction are used as an example. Figure 3A Used to indicate the initial acquisition image, Figure 3B Used to indicate that the original image is segmented based on the similarity of image blocks. Figure 3C It is used to indicate the image blocks after segmentation according to the annotation of semantic labels. Here, it is simply segmented into grass area and non-grass area. It is only an exemplary explanation. The objects in the image can be further labeled.
[0079] The method provided in this application can perform semantic segmentation processing on the real-time collected environment image through the trained semantic segmentation network, and build a map or understanding model of its surrounding environment based on the processing results of the semantic segmentation. This model can help the lawn mower "understand" key information such as its current location, whether there is a passable area around it, and the specific location and size of obstacles.
[0080] In an optional embodiment, the processing result in step 202 of the method provided by the present application includes at least one of the following information:
[0081] If the target image includes boundary information, the processing result at least includes: location information and distance information of the boundary;
[0082] or,
[0083] If the target image includes obstacle information, the processing result includes at least: location information and distance information of the obstacle;
[0084] or,
[0085] The current movement information of the lawn mower and its position changes are obtained from the mobile device.
[0086] The above boundary information facilitates the device to obtain the actual boundary in the working area, and can calculate the distance between the device's position at this moment and the actual boundary, so as to facilitate the data model to calculate the action at the next moment.
[0087] The above obstacles facilitate the extraction of the obstacle's orientation, distance, and whether it is within a preset safety range. The preset safety range distance can be set according to the physical information of the device itself or the physical size of the obstacle. The safety range distance can set multiple levels of safety ranges.
[0088] Please refer to the attached Figure 4 As shown in the figure, the first-level safety range is set as a 2-meter square area with yellow lines, and the second-level safety range is set as a 1-meter square area with red lines. Specifically: the 1-meter distance line is used to indicate that the lawn mower is very close to the obstacle at this time, and the weight of obstacle avoidance will increase; the 2-meter distance line is used to indicate that the lawn mower is far away from the obstacle at this time, and the weight of obstacle avoidance will decrease. During the movement of the equipment, timely avoid objects within the 1-meter range to improve the safety of the equipment movement, and appropriately ignore objects outside the 2-meter safety range to avoid unnecessary information interference from the outside world; the color picture is used here to better display the safety range.
[0089] In an optional embodiment, the method provided by the present application, in step 203, determining the target action of the mobile device at the next moment, further includes:
[0090] Step 501: According to the processing result of the preset semantic segmentation algorithm, a plurality of preset actions are obtained in the data model.
[0091] Step 502: Determine the score of each preset action according to the training of the data model, and select the preset motion state with the highest score as the target action at the next moment.
[0092] Through network learning, it is possible to determine which motion state the device is currently in and which motion state the device should change to next when receiving image information again. The steps taken when making the decision are: score the following actions according to the information obtained in step 202, and select the motion state with the highest score as the target motion state. If the current motion state and the target motion state are consistent, they remain unchanged, otherwise the device is controlled to reach the target motion state.
[0093] For example, scoring can be based on whether the device will collide with an obstacle, and whether the obstacle will collide with the device requires a comprehensive judgment based on factors such as the driving angular velocity, driving linear speed, device shape, obstacle shape, and whether the obstacle is moving.
[0094] In an optional embodiment, determining the score of each preset action in step 502 in the method provided by the present application further includes:
[0095] Step 601: vectorize the image information and the lawn mower status information to generate input data for model training.
[0096] Step 602: Process the input data through a convolutional neural network (CNN) layer and a reinforcement learning function to obtain a plurality of preset actions;
[0097] The score of each preset action is determined based on the difference between the preset action and the labeled training data; the label indicates the real state obtained through preprocessing or the expected result obtained through actual behavior feedback.
[0098] In an optional embodiment, the method provided by the present application further includes training of the data model, and the training process includes at least the following steps:
[0099] (a) Input real-time images from multiple cameras:
[0100] The method provided in the embodiment of the present application captures the environmental images around the lawn mower in real time through four cameras. Each frame of the image is an instant snapshot of the surrounding environment, including elements such as grass, obstacles, and boundary lines around the lawn mower, reflecting the real-time status of the current environment of the device, thereby providing visual information for subsequent environmental understanding and decision-making.
[0101] (b) Analyze the information contained in the real-time image:
[0102] The method provided in the embodiment of the present application extracts key information from the image through image processing algorithms and deep learning models such as semantic segmentation and object detection. Specifically, it is necessary to identify the boundary lines and obstacles in the image, and analyze the linear speed and position changes of the device itself through image sequence analysis.
[0103] The above boundary information includes: the direction and distance of the boundary in the map: by analyzing the images of the four cameras, the algorithm can identify the location and distance of the road boundary. This is usually achieved through techniques such as image segmentation or edge detection, providing the device with the road information required for navigation. (including their direction and approximate distance)
[0104] The obstacle information includes: the location and distance of the obstacle and whether the obstacle is within a safe range;
[0105] The above-mentioned current linear velocity information of the device and its position change can be obtained through sensors inside the device and used to more accurately predict and decide the motion state of the device.
[0106] (c) Vectorization and sending to training layer:
[0107] The method provided in the embodiment of the present application includes, through vectorization processing, integrating the image information and the state information of the lawn mower into a unified format, thereby vectorizing them, which means converting the information into a numerical vector so that it can be used as an input for the neural network.
[0108] The extracted image information (such as the coordinates, speed, and position changes of boundaries and obstacles) is converted into numerical vectors, which represent the current state of the environment and the state of the lawn mower itself.
[0109] These state vectors are then passed as input to a training model that incorporates a deep Q network (DQN). DQN uses CNN layers to process image features, and convolutional neural network (CNN) layers to extract image features, combined with a (three-in-one) reinforcement learning function to predict the motion state of the lawn mower; and combined with a reinforcement learning algorithm to learn how to choose the best action based on the current state. The "vectorization processing" here is to simplify complex information into a form that the model can handle, making it easier for the model to learn.
[0110] (d) Supervised training and mean square error:
[0111] In the method provided in the embodiment of the present application, supervised learning refers to using labeled training data to train the model. The label here, i.e., "next state", is the real state obtained through preprocessing or the expected result obtained through actual behavior feedback, which tells the model what future state should be expected to achieve given the current state. The task of the model is to learn this state-to-state mapping relationship.
[0112] The state vector ([a, b, c, ..., l]) is a mathematical representation of the current environment and state of the lawn mower, where each element represents a specific feature or attribute, such as position, speed, boundary distance, obstacle information, etc. Encoding this information into a vector form makes it easier for the model to process and learn directly.
[0113] After the device status is vectorized, different statuses can be classified and processed. For example, one-hot encoding is a common label representation method that represents each category as a high-dimensional vector in which only one element is 1 and the rest are all 0. In this scenario, if the status categories are limited and clear, one-hot encoding can clearly indicate the expected next status category.
[0114] The difference between the next state predicted by the model and the actual state (represented by one-hot encoding) is quantified by MSE. MSE calculates the mean of the sum of squares of the difference between the predicted value and the true value. The smaller the MSE, the more accurate the prediction.
[0115] The state vector is encoded into a set of features ([a, b, c, ..., l]) and the model is trained using supervised learning. During the training process, the next state predicted by the model is compared with the actual one-hot encoded state (obtained through labels or real behavior feedback) to calculate the mean square error (MSE), where MSE is a common indicator to measure the difference between the predicted value and the true value.
[0116] After calculating the mean square error, the gradient of the loss function with respect to the model parameters (weights and bias terms) is calculated through the back propagation algorithm. This process starts from the output layer, calculates backwards to the input layer, and derives each layer to determine how to adjust each parameter to reduce the loss function.
[0117] Using optimization algorithms such as gradient descent or its variants (such as Adam, RMSprop), the model weights are adjusted according to the calculated gradients, and the parameters are updated in the direction of reducing the MSE. Through multiple iterations of this process, the model gradually learns the parameter configuration that can more accurately predict state changes, thereby improving the prediction performance.
[0118] (e) Export model weight file:
[0119] When the prediction error of the model on the validation set drops below a preset threshold, the method provided in the embodiment of the present application indicates that the model can accurately predict the state change of the lawn mower. At this time, the trained network weights will be saved to a file (such as a .pt file), which contains all the parameters learned by the model. This model can be separated from the training environment and used for offline reasoning on an actual lawn mower, that is, without additional learning, it directly predicts the best action based on the current input to guide the real-time decision-making and motion control of the lawn mower.
[0120] Please refer to the attached Figure 5, the figure describes several actions included in the device in the embodiment of the present application. The green background in the figure is used to show that the device is walking on the lawn, and the blue arrows and lines are used to show the driving action of the device. Multiple operations can facilitate the big data model to train the driving of the lawn mower, and can also determine the driving of the lawn mower based on the collected images. The schematic diagrams of each action are as follows: a action is used to indicate the bow-shaped trajectory step 1: straight forward; b action is used to indicate the bow-shaped trajectory step: 2 encounter a boundary and make a 90-degree turn; c action is used to indicate the bow-shaped trajectory step: 3 after the turn The action d is used to indicate the bow-shaped trajectory step: 4, a 90-degree turn after the short-distance straight driving; the action e is used to indicate the discovery of an obstacle in the 2-meter field of view and approaching the obstacle; the action f is used to indicate the obstacle avoidance step 1: right / left turn; the action g is used to indicate the obstacle avoidance step 2: straight driving; the action h is used to indicate the obstacle avoidance step 2: left / right turn; the action i is used to indicate the obstacle avoidance step 3: straight driving; the action j is used to indicate the obstacle avoidance step 3: left / right turn; the action k is used to indicate the obstacle avoidance step 4: straight driving; the action l is used to indicate the obstacle avoidance step 4: right / left turn, returning to the forward direction before obstacle avoidance.
[0121] In an optional embodiment, after determining the target action of the mobile device at the next moment in step 203, the method provided by the present application further includes:
[0122] If it is detected that the mobile device has completed the target action matched at the current moment, the target image of the next moment will continue to be collected, and the target action matching the target image will be executed until this round of tasks is completed.
[0123] It should be emphasized here that the movement method provided by the present application is to predict the behavior, which refers to the action at the next moment, that is, to match one action at one moment, rather than predicting the trajectory within a period of time. The method provided by the present application can make more accurate decisions on the movement action at the next moment based on the surrounding images and data models. Therefore, compared with the prediction of the movement trajectory, the decision-making at each moment can complete the task and avoid obstacles more efficiently and intelligently, especially when the obstacles are moving or changing.
[0124] The deep learning method provided by the control method provided by the present application is to learn the actions of the lawn mower, rather than the planning process of the lawn mower. The generalization of learning based on the planning process is low, that is, when the scene has never appeared in the training process, the planning effect will not meet expectations. Action-based learning has a higher generalization because the learning process does not focus on the scene or the planning process, but learns the actions taken by the lawn mower when dealing with a certain environment. Then, when faced with a new scene, the lawn mower can make corresponding judgments based on the previously learned actions.
[0125] The walking control method provided in the embodiment of the present application has a mutual constraint effect by fusing the measurement information of the laser radar and the measurement information of the odometer. It can adaptively adjust to hardware errors, wheel slippage, or equipment jamming. As long as the radar laser and the odometer do not fail to position at the same time, the positioning system will not fail. The positioning stability of the self-moving device is effectively improved, the defects of a single type of algorithm can be avoided, and the accuracy of positioning is improved.
[0126] The process of executing tasks based on image acquisition and data model in the method provided in the embodiment of the present application includes:
[0127] Step 1: The self-mobile device can travel to any corner of the target area without deploying the lawn mower at a charging station or a preset position, which is more convenient and improves the user experience.
[0128] Step 2: Collect the target image from the mobile device and perform semantic segmentation processing. According to the structure of semantic segmentation, start calculating the closest distance to the boundary around it and go to the corner of the boundary.
[0129] Step 3: When the mobile device detects that it has reached the preset position of the boundary line, it starts to perform operations, such as starting bow-shaped cutting.
[0130] Step 4: The device continuously collects images during operation and adjusts its direction in real time so that the left side (right side) of the lawn mower is close to the boundary, and starts planning and obstacle avoidance based on deep reinforcement learning.
[0131] Step 5: When the self-moving device moves forward to the other corner, that is, when there is no drivable area on the right side (left side) of the moving direction of the self-moving device, it is determined that the cutting of the lawn mower is finished.
[0132] Step 6. After the cutting is completed, use target recognition to find the manually specified return point (such as a charging pile). After finding the return point in the field of view, take the return point as the target and go to the destination to end the whole process.
[0133] Of course, the above processing process is only an example. In the actual process of controlling the equipment, the operation information and the working area can be integrated to control the equipment.
[0134] See also Figure 6 , an embodiment of the present application provides a control device 60, including:
[0135] An image acquisition module 601 is used to acquire multiple target images, where the target images are used to indicate that multiple image acquisition devices have acquired environment images within a target range of a mobile device;
[0136] An image processing module 602 is used to process the target image according to a preset semantic segmentation algorithm to obtain a processing result, wherein the processing result at least includes whether there is a target object within a preset range of the mobile device, and the target object at least includes a boundary line or an obstacle;
[0137] The trajectory module 603 inputs the processing result into the data model to determine the target action of the self-moving device at the next moment, so that the self-moving device avoids the target object;
[0138] The data model is used to instruct the mobile device to autonomously perform a target action based on a plurality of image trainings.
[0139] In an optional embodiment, the image acquisition module 601 in the above-mentioned control device 60 is used to acquire images in multiple directions, such as using a four-way camera (or a multi-way camera that can cover a 360-degree field of view) to acquire images in real time.
[0140] In an optional embodiment, the image processing module 602 in the control device 60 is used to obtain multi-channel image information from the storage module. The segmentation results, target detection results, distance estimation results and orientation information are processed from the image matrix. If the device is in a state where it has not yet searched for the starting cutting point, the operation module is activated at this time; if the device has activated the starting operation module at this time and obtained feedback from the starting cutting module-the starting cutting has been completed, the subsequent processing results will be sent to the decision module based on deep learning; if the lawn mower has activated the starting cutting module at this time, but has not obtained feedback from the starting cutting module, it is considered that the search for the starting cutting has not been completed, and the processing information is sent to the starting cutting module.
[0141] In an optional embodiment, the trajectory module 603 in the above-mentioned control device 60 also includes a decision-making module, which is based on deep learning and is activated after obtaining feedback information from the starting cutting module. At this time, the data in the real-time image post-processing module is obtained in real time. The decision is selected based on the real-time data and the model file that has been trained offline. That is, the decision is selected based on the current environment of the lawn mower and the action of the lawn mower itself at this time. After the decision is determined, the decision information is sent to the control module. If the information obtained at this time already contains a drivable area, feedback information is sent to the real-time image post-processing module, that is, the cutting is completed at this time. The data subsequently obtained from the real-time image post-processing module will be directly passed to the regression module.
[0142] In an optional embodiment, the trajectory module 603 in the control device 60 further includes a regression module, which is used to obtain real-time data provided by the image real-time post-processing module after the decision module based on deep learning completes the task, find a preset regression point (such as a charging pile) as the destination, and move forward to the destination. The instructions in the process are sent to the control module.
[0143] In an optional embodiment, the trajectory module 603 in the control device 60 further includes a control module, which includes control logic of the self-moving device, and is used to control the direct operations of the lawn mower such as forward movement, steering, and stopping. The control device provided in the embodiment of the present application has a mutual constraint effect by fusing the measurement information of the laser radar and the measurement information of the odometer, and can adaptively adjust the hardware errors, wheel slippage, or equipment jams. As long as the radar laser and the odometer do not fail to locate at the same time, the positioning system cannot fail, which effectively improves the positioning stability of the self-moving device, and can also avoid the defects of a single type of algorithm, thereby improving the accuracy of positioning.
[0144] In an optional embodiment, the control device 60 further includes an operation module, which is used to control the operation of the working head, such as controlling the cutter disc to complete the cutting operation. The operation module can obtain the image processed by the image processing module, perform the operation of finding the starting cutting point according to the data, analyze the boundary information and direction information in four directions obtained by the image real-time post-processing module, take the nearest boundary as the direction, take the corner of the boundary closest to the lawn mower at this time as the target point, send instructions to the control module, and control the lawn mower to go to the starting cutting point. When the starting cutting point is reached, feedback information is sent to the image real-time post-processing module and the decision module based on deep learning, that is, the starting cutting is completed at this time.
[0145] In an optional embodiment, the control device 60 further includes a storage module, which is used to store multiple images collected by the multiple image real-time acquisition module. In the shared memory module, the multiple images are first subjected to distortion removal processing, and then the multiple images are packaged into multi-dimensional matrix information; for example, four images with a resolution of 720*1280 will be processed into a matrix of 1*4*720*1280, and the processed data will be passed to subsequent modules.
[0146] For the specific definition of the control device of the above-mentioned self-moving device, please refer to the definition of the walking control method of the self-moving device mentioned above, which will not be repeated here. The various modules in the mobile device of the above-mentioned self-moving device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0147] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any step in the above method for controlling walking of a mobile device can be implemented.
[0148] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
Claims
1. A walking control method, characterized in that: Applied to a self-equipped device, the method comprises: Acquire multiple target images, where the target images are used to indicate that multiple image acquisition devices acquire environmental images within a target range of the mobile device; Process the target image according to a preset semantic segmentation algorithm to obtain a processing result, wherein the processing result at least includes whether there is a target object within a preset range of the mobile device, and the target object at least includes a boundary line or an obstacle; Inputting the processing result into a data model to determine a target action of the self-moving device at a next moment so that the self-moving device avoids the target object; The data model is used to instruct the mobile device to autonomously perform a target action based on multiple images.
2. The walking control method according to claim 1, characterized in that: The method acquires a plurality of target images, including: The image acquisition module acquires initial images of the target from multiple different directions within the target range of the mobile device; After dedistortion processing is performed on the multiple initial images in different directions, a target image is acquired.
3. The walking control method according to claim 1, characterized in that: The obtaining of the processing result at least includes: Divide the target image into multiple image blocks according to the similarity in the target image; Taking image blocks as units, sequentially identifying the label and position information of each image block, wherein the label is used to indicate the attribute of the current image block, the attribute of the current image block is at least used to indicate whether the image block belongs to a boundary or an obstacle, and the position information is used to indicate the coordinate information of the current image block in the target area; The processing result is obtained according to the label and position information of each image.
4. The walking control method according to claim 1, characterized in that: The processing result at least includes: If the target image includes boundary information, the processing result at least includes: location information and distance information of the boundary; or, If the target image includes obstacle information, the processing result includes at least: location information and distance information of the obstacle; or, Current movement information from the mobile device and its location changes.
5. The walking control method according to claim 4, characterized in that: The step of inputting the processing result into a data model to determine a target action of the mobile device at a next moment includes: According to the processing result of the preset semantic segmentation algorithm, a number of preset actions are obtained in the data model; According to the training of the data model, the score of each preset action is determined, and the preset motion state with the highest score value is selected as the target action at the next moment.
6. The walking control method according to claim 4, characterized in that: Determining the score of each preset action includes: Vectorize the image information and the lawn mower's status information to generate input data for model training; Processing the input data through a convolutional neural network layer and a reinforcement learning function to obtain a number of preset actions; The score of each preset action is determined based on the difference between the preset action and the training data with labels; the labels are used to indicate the real state obtained through preprocessing or the expected result obtained through actual behavior feedback.
7. The walking control method according to claim 1, characterized in that: After determining the target action of the mobile device at the next moment, the following steps are included: If it is detected that the target action matched at the current moment is completed by the mobile device, the target image at the next moment will continue to be captured, and the target action matched with the target image will be executed.
8. A walking control device, characterized in that: The control device comprises: An image acquisition module, used to acquire multiple target images, wherein the target images are used to indicate that multiple image acquisition devices acquire environmental images within a target range of the mobile device; An image processing module, used to process the target image according to a preset semantic segmentation algorithm to obtain a processing result, wherein the processing result at least includes whether a target object exists within a preset range of the self-mobile device, and the target object at least includes a boundary line or an obstacle; A trajectory module, inputting the processing result into a data model, and determining a target action of the self-moving device at a next moment, so that the self-moving device avoids the obstacle; The data model is used to instruct the mobile device to autonomously perform a target action based on multiple images.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 7 when executed.
10. A self-moving device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.
Citation Information
Cited By
Walking control method and device for supporting retaining wall construction equipment
CN121143313A
