Method, device and storage medium for estimating motion trajectory of mobile robot
By using the pre-trained pose estimation model and calculating the absolute pose based on the relative pose, the problem of insufficient accuracy in mobile robot motion trajectory estimation is solved, and higher-precision motion trajectory estimation is achieved, which is suitable for autonomous navigation and autonomous driving. .
Patent Information
- Application Number
- CN202110896938.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-05
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-08-05
AI Technical Summary
The accuracy of mobile robot motion trajectory estimation in the existing technology is not high enough, mainly due to the insufficient accuracy of the pose estimation model caused by the inaccuracy of the absolute pose of the sample.
By pre-training the pose estimation model, the relative pose in the continuous images to be processed is estimated, and the absolute pose is determined, thereby improving the accuracy of the motion trajectory. The specific method includes obtaining continuous images of the movement of the target mobile robot, inputting them into a pre-trained pose estimation model, outputting the relative pose, and calculating the absolute pose based on the relative pose to determine the motion trajectory.
It improves the accuracy of the mobile robot's motion trajectory and can more accurately estimate the motion trajectory of the target mobile robot, which is suitable for fields such as autonomous navigation and autonomous driving.
Smart Images

Figure CN113744301B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of visual odometers, and in particular to a method, device and storage medium for estimating the motion trajectory of a mobile robot. Background Art
[0002] In recent years, technologies in the fields of autonomous navigation of mobile robots, autonomous driving, virtual reality (VR) and augmented reality (AR) have flourished, greatly enriching people's production and living needs. Achieving high-precision positioning of mobile robots and building a complete and reliable environmental model will be an important condition for mobile robots to realize autonomous navigation functions in different environments. Visual odometry (VO) is a technology that estimates the motion trajectory of a mobile robot based on captured images. Currently, visual odometry is generally used to provide technical support for the autonomous navigation function of mobile robots.
[0003] In the current technical solution, after obtaining the sample images collected by the mobile robot, the sample absolute pose is marked for each sample image, and then the single sample image and the corresponding sample absolute pose are input into the deep neural network for learning and training to obtain a pose estimation model; subsequently, after obtaining the continuous images to be processed during the movement of the target mobile robot, the pose estimation model can be used to output the estimated absolute pose corresponding to each image to be processed, and then the estimated motion trajectory of the target mobile robot can be determined. However, in actual operation, the pose change of the mobile robot in a short period of time may be subtle. When training the pose estimation model, due to the inaccurate absolute pose of each sample, the accuracy of the trained pose estimation model will be insufficient. Therefore, using the existing method will result in the inaccurate motion trajectory of the mobile robot.
[0004] Therefore, how to further improve the accuracy of estimating the motion trajectory of the mobile robot is a technical problem that technical personnel in this field currently need to solve. Summary of the invention
[0005] Based on this, it is necessary to provide a method, device and storage medium for estimating the motion trajectory of a mobile robot, which can improve the accuracy of estimating the motion trajectory of the mobile robot, in order to address the above technical problems.
[0006] A method for estimating a motion trajectory of a mobile robot, the method comprising:
[0007] Acquire continuous images to be processed during the movement of the target mobile robot;
[0008] Inputting the continuous images to be processed into a pre-trained pose estimation model, and using the pose estimation model to output estimated relative poses corresponding to each adjacent image to be processed;
[0009] Determining the estimated absolute pose of each of the images to be processed according to each of the estimated relative poses;
[0010] The estimated motion trajectory of the target mobile robot is determined using each of the estimated absolute poses.
[0011] In one embodiment, the process of training the pose estimation model includes:
[0012] Acquire sample images collected by the target mobile robot;
[0013] Determine the sample absolute pose corresponding to each of the sample images, and determine the sample relative pose of two adjacent sample images according to the two adjacent sample absolute poses;
[0014] The sample images and the sample relative poses are input into a deep neural network for learning and training to obtain the pose estimation model.
[0015] In one embodiment, the process of determining the sample absolute pose corresponding to each of the sample images, and determining the sample relative pose of two adjacent sample images according to two adjacent sample absolute poses, includes:
[0016] Determine a first sample image from the sample images, obtain a marking operation of the user object on the first sample image, and determine a first sample absolute pose of the first sample image;
[0017] Determine images other than the first sample images in the sample images as second sample images, and calculate second sample absolute poses corresponding to each of the second sample images according to the first sample images and the first sample absolute poses;
[0018] Arrange the first sample absolute posture and the second sample absolute posture in time sequence to obtain the sample absolute postures arranged in time sequence;
[0019] The relative pose of the sample is determined according to the absolute poses of two adjacent samples.
[0020] In one embodiment, the process of inputting the sample image and the sample relative pose into a deep neural network for learning and training to obtain the pose estimation model includes:
[0021] Setting initialization parameters for the deep neural network to obtain an initialization estimation model;
[0022] Inputting two adjacent sample images and the corresponding sample relative poses into the initialization estimation model, and using the initialization estimation model to output an output relative pose corresponding to the currently input sample image;
[0023] If the error value between the output relative pose and the sample relative pose exceeds the expected error range, the model parameters of the initialization model are adjusted according to the error value, and the step of inputting two adjacent sample images and the corresponding sample relative poses into the initialization estimation model is entered until the error value is within the expected error range. The training is terminated to obtain the pose estimation model.
[0024] In one embodiment, if the error value between the output relative pose and the sample relative pose exceeds the expected error range, the process of adjusting the model parameters of the initialization model according to the error value includes:
[0025] If the error value between the output relative pose and the sample relative pose exceeds the expected error range, the optimal network parameters are calculated using a network error optimization function according to the error value between the output relative pose and the sample relative pose;
[0026] The model parameters of the initialization model are adjusted using the optimized network parameters.
[0027] In one embodiment, the process of determining the relative pose of the sample according to the absolute poses of two adjacent samples includes:
[0028] Determine the relative displacement data and relative rotation angle of the two adjacent sample absolute postures; wherein the relative displacement data includes the moving distance of the target mobile robot along the rectangular coordinate system X, Y, Z axis, and the relative rotation angle represents the angle of rotation of the target mobile robot around the rectangular coordinate system X, Y, Z axis;
[0029] The relative position and posture of the sample is determined according to the relative displacement data and the relative rotation angle.
[0030] In one embodiment, the deep neural network is a convolutional neural network; wherein the network framework of the convolutional neural network includes an input layer, a hidden layer and an output layer, and the hidden layer includes a convolutional layer, an activation function layer, a pooling layer and a fully connected layer;
[0031] The process of inputting two adjacent sample images and the corresponding sample relative poses into the initialization estimation model, and using the initialization estimation model to output an output relative pose corresponding to the currently input sample image, comprises:
[0032] Inputting two adjacent sample images and the corresponding sample relative poses into the input layer of the initialization estimation model, and using the convolution layer, the activation function layer, and the pooling layer in the hidden layer to perform feature extraction, and using the fully connected layer to perform classification and recognition, to determine the probability that the two adjacent sample images correspond to each candidate relative pose;
[0033] The output layer is used to select the candidate relative posture corresponding to the maximum value of each of the probabilities as the output relative posture.
[0034] In one embodiment, the process of determining the estimated absolute pose of each of the images to be processed according to each of the estimated relative poses includes:
[0035] A matrix transformation is performed using the plurality of estimated relative postures to obtain an estimated absolute posture corresponding to each of the images to be processed.
[0036] A motion trajectory estimation device for a mobile robot, the device comprising:
[0037] An acquisition module is used to acquire continuous images to be processed during the movement of the target mobile robot;
[0038] An output module, used for inputting the continuous images to be processed into a pre-trained pose estimation model, and using the pose estimation model to output the estimated relative poses corresponding to each adjacent image to be processed;
[0039] A first determination module, used to determine the estimated absolute pose of each of the images to be processed according to each of the estimated relative poses;
[0040] The second determination module is used to determine the estimated motion trajectory of the target mobile robot using each of the estimated absolute postures.
[0041] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0042] Acquire continuous images to be processed during the movement of the target mobile robot;
[0043] Inputting the continuous images to be processed into a pre-trained pose estimation model, and using the pose estimation model to output estimated relative poses corresponding to each adjacent image to be processed;
[0044] Determining the estimated absolute pose of each of the images to be processed according to each of the estimated relative poses;
[0045] The estimated motion trajectory of the target mobile robot is determined using each of the estimated absolute poses.
[0046] The above-mentioned motion trajectory estimation method, device and storage medium based on a mobile robot pre-train a pose estimation model. After obtaining continuous images to be processed during the motion of the target mobile robot, the pose estimation model is used to determine the corresponding estimated relative pose, and then the estimated absolute pose of each image to be processed is determined according to each estimated relative pose to obtain the motion trajectory of the target mobile robot; that is, the training samples of the pose estimation model in this method are two adjacent sample images and the corresponding sample relative poses. Since the estimated relative pose includes the changes in the poses of adjacent images to be processed in time and space, the pose estimation model can be used to output a more accurate estimated relative pose, thereby improving the accuracy of determining the motion trajectory of the target mobile robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A schematic diagram of a flow chart of a motion trajectory estimation method for a mobile robot in one embodiment;
[0048] Figure 2 A schematic diagram of a process of training the pose estimation model in one embodiment;
[0049] Figure 3 The figure is a structural block diagram of a motion trajectory estimation device for a mobile robot in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] The present application provides a method for estimating the motion trajectory of a mobile robot, which can be applied to a mobile robot to estimate the motion trajectory of the mobile robot, thereby realizing autonomous navigation and automatic driving of the mobile robot. Among them, the mobile robot refers to a robot that can be displaced in space. This embodiment does not limit the specific type of the mobile robot, for example, it can be a drone. Simultaneous localization and mapping (SLAM) is the core key technology for the autonomous operation of mobile robots in unknown environments and is a research focus in the field of mobile robot automation. In the absence of any prior information about the surrounding environment, the mobile robot continuously perceives the surrounding environment and estimates its own position through the sensors it carries, and incrementally constructs the environmental map and continuously locates the mobile robot as the mobile robot moves, and finally can construct a model of the surrounding environment. Visual Odometry (VO), as an important module in the SLAM system, is a special form of visual navigation. It estimates the motion of the camera by tracking the feature points between adjacent image frames and reconstructs the environment. VO mostly estimates the pose of the current frame by calculating the motion between image frames.
[0052] In one embodiment, Figure 1 As shown, a method for estimating the motion trajectory of a mobile robot is provided, and the method is applied to a mobile robot as an example for explanation, comprising the following steps:
[0053] Step 102, acquiring continuous images to be processed during the movement of the target mobile robot.
[0054] Specifically, in this step, the main purpose is to obtain continuous images to be processed during the movement of the target mobile robot; wherein the target mobile robot refers to a mobile robot whose movement trajectory needs to be estimated; and the images to be processed refer to images used to estimate the movement trajectory of the target robot. Specifically, the images to be processed can be collected using a shooting device provided on the target mobile robot, and the shooting device can be specifically a camera or a video camera. In actual operation, during the movement of the target mobile robot, the camera is used to continuously capture information about the surrounding environment to obtain continuous images to be processed; or after a video is shot using a camera, multiple continuous frame images are extracted from the shot video to obtain continuous images to be processed.
[0055] It should be noted that after obtaining the original image directly captured by the shooting device, the original image can be directly used as the image to be processed; however, these original images may have motion distortion or noise from the shooting device, so the original image can be further preprocessed, including image enhancement, image denoising and other operations on the original image, and the image after the preprocessing operation is used as the image to be processed, eliminating irrelevant information in the original image, restoring useful real information, enhancing the detectability of relevant information and simplifying the data to the maximum extent, thereby improving the reliability of feature extraction, image segmentation, matching and recognition.
[0056] Step 104 , inputting the continuous images to be processed into a pre-trained pose estimation model, and using the pose estimation model to output the estimated relative pose corresponding to each adjacent image to be processed.
[0057] Specifically, when a pose estimation model is pre-trained, after continuous images to be processed are acquired, the continuous images to be processed are input into the pose estimation model, the pose estimation model is used to analyze the images to be processed, and the estimated relative pose corresponding to each adjacent image to be processed is output.
[0058] It can be understood that two adjacent images to be processed are taken as a group of image sequences, and the estimated relative pose is the relative pose of the target mobile robot corresponding to each group of image sequences and predicted by the pose estimation model.
[0059] Step 106: Determine the estimated absolute pose of each image to be processed according to each estimated relative pose.
[0060] It should be noted that in this step, after the estimated relative pose is obtained, the estimated absolute pose corresponding to each image to be processed is obtained through pose solution using the estimated absolute pose according to the correspondence between the relative pose and the absolute pose.
[0061] Step 108, using each estimated absolute position and posture to determine the estimated motion trajectory of the target mobile robot.
[0062] Specifically, in actual operation, multiple continuous images to be processed are generally used for pose estimation to obtain multiple corresponding estimated relative poses, and then the corresponding absolute pose is solved for the estimated relative pose according to the correspondence between the estimated pose and the absolute pose. After determining the estimated absolute pose, the estimated motion trajectory of the target mobile robot can be determined according to the spatial position and rotation angle corresponding to each estimated absolute pose.
[0063] In actual operation, after determining the estimated motion trajectory, the position and posture of the target mobile robot at the next moment can be further predicted based on the estimated motion trajectory, and based on the position and posture at the next moment, it can be determined whether the movement speed or movement direction of the target mobile robot needs to be adjusted to ensure the safe movement of the target mobile robot.
[0064] The above-mentioned motion trajectory estimation method based on a mobile robot pre-trains a pose estimation model, and after obtaining continuous images to be processed during the motion of the target mobile robot, uses the pose estimation model to determine the corresponding estimated relative pose, and then determines the estimated absolute pose of each image to be processed according to each estimated relative pose, and obtains the motion trajectory of the target mobile robot; that is, the training samples of the pose estimation model in this method are two adjacent sample images and the corresponding sample relative poses. Since the estimated relative pose includes the changes in the poses of adjacent images to be processed in time and space, the pose estimation model can be used to output a more accurate estimated relative pose, thereby improving the accuracy of determining the motion trajectory of the target mobile robot.
[0065] In actual operation, open source data sets can be used for learning and training to obtain a pose estimation model. ; For example, the open source data set Euroc data set contains two scenes: one is the ETH machine hall of the Swiss Federal Institute of Technology, and the scene data contains true value data accurately positioned to the millimeter level by laser tracking; the second scene is an ordinary room in the Vicon environment; this embodiment adopts the first scene of the Euroc data set, the ETH machine hall, which contains five data set sequences (Machine Hall 01-05); among them, the data set evaluation level of Machine Hall 01 (MH-01) and Machine Hall 02 (MH-02) is simple mode; Machine Hall 03 (MH-03) is medium mode; Machine Hall 04 (MH-04) and Machine Hall 05 (MH-05) are difficult modes, and each data set sequence provides true value data; the true value data is divided into training samples and test samples; after the pose estimation model is trained using the training samples, the error test is performed using the test samples, and the absolute pose error (APE, unit: meter) is selected as the final evaluation indicator. The smaller the error value, the better the effect. The specific experimental results are shown in Table 1:
[0066] Table 1 Evaluation results of different sequences
[0067] Image Sequence MH-01 MH-02 MH-03 MH-04 MH-05 Absolute attitude error (ATE) 1.99 1.62 1.75 2.70 1.780
[0068] Through experimental verification, the posture estimation model trained by this embodiment is used to obtain the estimated relative posture, and then the estimated absolute posture, which can obtain an accurate estimated motion trajectory, that is, the posture estimation model can meet actual needs.
[0069] In one embodiment, Figure 2 As shown in Figure 1, the process of training a pose estimation model includes:
[0070] Step 202: Acquire a sample image;
[0071] Step 204: Determine the sample absolute pose corresponding to each sample image, and determine the sample relative pose of two adjacent sample images according to the two adjacent sample absolute poses.
[0072] Specifically, the sample images may be images collected during the movement of the target mobile robot, or may be images collected during the movement of other mobile robots.
[0073] After acquiring the sample images, the sample absolute pose corresponding to each sample image is determined, and the sample relative pose of two adjacent sample images is determined according to the two adjacent sample absolute poses; wherein, as a preferred embodiment, the process of determining the sample absolute pose corresponding to each sample image, and determining the sample relative pose of two adjacent sample images according to the two adjacent sample absolute poses includes:
[0074] Determine a first sample image from the sample images, obtain a marking operation of the user object on the first sample image, and determine a first sample absolute pose of the first sample image;
[0075] Determine the images other than the first sample images in the sample images as second sample images, and calculate the second sample absolute poses corresponding to the second sample images according to the first sample images and the first sample absolute poses;
[0076] Arrange the absolute pose of the first sample and the absolute pose of the second sample in time sequence to obtain the absolute poses of the samples arranged in time sequence;
[0077] The relative pose of the sample is determined based on the absolute poses of two adjacent samples.
[0078] Specifically, the first sample image refers to an image in which the pose of the target object in the image is clear, generally the first image and the last image of multiple consecutive sample images, and the first sample absolute pose refers to the absolute pose corresponding to the first sample image; in other embodiments, the first sample image may also be the first few images and the last few images of multiple consecutive sample images, and the first sample absolute pose refers to the absolute pose corresponding to each image; after determining the first sample image from the sample images, the user object performs a marking operation on the first sample image to determine the first sample absolute pose of the first sample image.
[0079] Specifically, the second sample image refers to the image other than the first sample image in the sample image. It should be noted that, since the posture changes of the target object in the acquired continuous sample images are subtle, it is impossible to directly determine the sample absolute posture corresponding to each sample image by manually marking the user object; in this embodiment, after determining the second sample image, the second sample absolute posture corresponding to each second sample image is calculated according to the first sample image and the first sample absolute posture; then the first sample absolute posture and the second sample absolute posture are arranged in time sequence to obtain the sample absolute posture arranged in time sequence, and then the sample relative posture is determined according to the two adjacent sample absolute postures. It can be understood that the absolute posture of the sample object is determined by combining user object marking and automatic marking, and on the basis of being able to obtain the absolute posture of each sample image, the manual operation of the user object is minimized to the greatest extent, and the convenience and efficiency of determining the absolute posture of the sample are improved.
[0080] Step 206: Input the sample image and the sample relative pose into a deep neural network for learning and training to obtain a pose estimation model.
[0081] Specifically, after determining the sample relative pose corresponding to the sample image, the sample relative pose is used to set labels for the corresponding adjacent sample images to obtain training samples, and the training samples are input into a deep neural network for learning and training to obtain a pose estimation model.
[0082] It should be noted that this embodiment does not limit the specific type of deep neural network. For example, it can be a convolutional neural network (CNN) or a recurrent neural network (RNN) or a long short-term memory network (LSTM), etc., and can be selected according to actual needs.
[0083] It can be understood that after the pose estimation model is trained, a mapping relationship between the image and the ground truth value is established. Subsequently, the pose estimation model can be used to output the estimated relative pose corresponding to two consecutive images to be processed, that is, the input of the pose estimation model is the image to be processed, and the output is the estimated relative pose corresponding to the image to be processed; this makes the method of determining the estimated relative position accurate and convenient.
[0084] As a preferred implementation, the process of determining the relative pose of a sample according to the absolute poses of two adjacent samples includes:
[0085] Determine the relative displacement data and relative rotation angle of the absolute positions of two adjacent samples; wherein the relative displacement data includes the moving distance of the target mobile robot along the X, Y, and Z axes of the rectangular coordinate system, and the relative rotation angle represents the rotation angle of the target mobile robot around the X, Y, and Z axes of the rectangular coordinate system;
[0086] The relative position and posture of the sample are determined based on the relative displacement data and the relative rotation angle.
[0087] Specifically, in this embodiment, the sample absolute poses of two adjacent sample images in the continuous sample images are used to determine the corresponding sample relative poses; wherein the sample absolute poses include the spatial position and the rotation angle of the target mobile robot; wherein the spatial position is represented by the position of the target object in the rectangular coordinate system, and the rotation angle can be represented by quaternions, Euler angles, rotation matrices, etc., and the determined sample absolute poses can be represented as the vector shown in the following formula:
[0088] P = [x, y, z, ψ, χ, γ];
[0089] Wherein, P represents the absolute pose of the sample, x, y, z represent the spatial position of the target object in the sample image, and ψ, χ, γ represent the rotation angle of the target object. When determining the relative pose of the sample based on the absolute poses of two adjacent samples, first determine the relative displacement data and relative rotation angle of the two adjacent absolute poses of the samples, wherein the relative displacement data includes the moving distance of the target mobile robot along the X, Y, and Z axes of the rectangular coordinate system, and the relative rotation angle represents the angle of rotation of the target mobile robot around the X, Y, and Z axes of the rectangular coordinate system. To be consistent with the absolute pose of the sample, the relative pose of the sample in this embodiment can be expressed as:
[0090] ΔP=[Δx,Δy,Δz,Δψ,Δχ,Δγ];
[0091] Among them, ΔP represents the relative position of the sample, Δx, Δy, Δz represent the displacement difference of the target object in the sample image along the X, Y, and Z axes from time t to time t+1, respectively, and Δψ, Δχ, Δγ represent the angular difference of the target object's rotation around the X, Y, and Z axes from time t to time t+1, respectively.
[0092] It can be seen that the method of this embodiment is used to represent the absolute pose of the sample and the relative position of the sample, and the representation is simple and convenient for subsequent operations and calculations.
[0093] Based on the above embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, the sample image and the sample relative pose are input into the deep neural network for learning and training to obtain the pose estimation model, including:
[0094] Set initialization parameters for the deep neural network and obtain an initial estimation model;
[0095] Input two adjacent sample images and the corresponding sample relative poses into the initialization estimation model, and use the initialization estimation model to output the output relative pose corresponding to the currently input sample image;
[0096] If the error value between the output relative pose and the sample relative pose exceeds the expected error range, the model parameters of the initialization model are adjusted according to the error value, and the step of inputting two adjacent sample images and the corresponding sample relative pose into the initialization estimation model is entered until the error value is within the expected error range. The training is terminated and the pose estimation model is obtained.
[0097] In this embodiment, after setting initialization parameters for the deep neural network and obtaining an initialization estimation model, the initialization estimation model is continuously optimized using sample images and sample relative poses to obtain a pose estimation model.
[0098] Specifically, two adjacent sample images and the corresponding sample relative poses are input into the initialization estimation model, and the image features of the sample images are extracted and analyzed using the initialization estimation model, and the output relative pose corresponding to the currently input sample image is output; then the output relative pose and the sample relative pose are compared to determine the error value between the output relative pose and the sample relative pose and to determine whether the error value exceeds the expected error range. If so, the model parameters of the initialization model are adjusted using the error value; then the updated initialization model is trained using the sample images and the sample estimated poses until the error value is within the expected error range, and the training is terminated to obtain the pose estimation model.
[0099] It should be noted that if the error value between the output relative pose and the sample relative pose exceeds the expected error range, the process of adjusting the model parameters of the initialization model according to the error value includes:
[0100] If the error between the output relative pose and the sample relative pose exceeds the expected error range, the network error optimization function is used to calculate the optimal network parameters according to the error between the output relative pose and the sample relative pose.
[0101] The model parameters of the initialized model are adjusted using the optimized network parameters.
[0102] Specifically, in this embodiment, it is assumed that the given k-th group of picture sequences is X k =(X k ,X k+1 ), from the perspective of probability, the relative posture of this set of image sequences is Y k The probability is:
[0103] P(Y k |X k );
[0104] The key to maximizing this probability is to find the optimal network parameters. The parameters are expressed as follows:
[0105]
[0106] In a preferred embodiment, the network error optimization function uses the mean square error function (MSE), and the final optimization function is:
[0107]
[0108] Among them, P k and Φ k is the relative pose of the samples in the k-th image sequence, and is the output relative pose of the k-th pair of image sequences, β is the scale factor of the relative pose, It is represented by the two-norm.
[0109] Specifically, after the optimized network parameters are calculated according to the error value between the output relative pose and the sample relative pose using the network error optimization function, the model parameters of the initialization model are adjusted using the optimized network parameters.
[0110] It can be seen that this embodiment uses a supervised learning method to train a deep neural network, establishes a mapping relationship between two consecutive frames of images and relative pose, and obtains a pose estimation model; the supervision information comes from the error value between the sample relative pose and the output relative pose output by the model; according to the error value between the sample relative pose and the output relative pose, the network error optimization function is used to optimize the pose estimation model during the continuous training process, and the error between the two is gradually reduced to improve the accuracy of the pose estimation model, thereby optimizing the pose estimation model.
[0111] On the basis of the above embodiments, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, the deep neural network is a convolutional neural network; wherein the network framework of the convolutional neural network includes an input layer, a hidden layer and an output layer, and the hidden layer includes a convolutional layer, an activation function layer, a pooling layer and a fully connected layer;
[0112] The process of inputting two adjacent sample images and the corresponding sample relative poses into the initialization estimation model, and using the initialization estimation model to output the output relative pose corresponding to the currently input sample image includes:
[0113] Input two adjacent sample images and the corresponding sample relative poses into the input layer of the initialization estimation model, and use the convolution layer, activation function layer, and pooling layer in the hidden layer to extract features, and use the fully connected layer for classification and recognition to determine the probability of the two adjacent sample images corresponding to each candidate relative pose;
[0114] The output layer is used to select the candidate relative pose corresponding to the maximum value of each probability as the output relative pose.
[0115] Specifically, in this embodiment, a convolutional neural network (CNN) is used to train a pose estimation model; wherein the network framework of the convolutional neural network includes an input layer, a hidden layer and an output layer, and the hidden layer includes 10 convolutional layers, an activation function layer, a pooling layer (Max-pooling) and a fully connected layer.
[0116] Among them, each convolution layer is connected to an activation function ReLU, that is, the function max(0, X); and there are 6 layers of convolution with a step size of 2, and the obtained feature map is correspondingly reduced to twice the original; the size of the convolution kernel is gradually reduced from 7*7 to 5*5, and finally to 3*3; first extract features from the overall macroscopic perspective, and as the convolution kernel decreases, it is easier to extract local features; as the number of convolution filter layers continues to increase, the network weight W is also increasing, which makes the output image depth increase accordingly, that is, the number of feature maps obtained increases to increase the extracted abstract features.
[0117] In addition, in this embodiment, three fully connected layers are designed after the convolutional layer, and the number of hidden units is 4096, 1024, and 128 respectively. A nonlinear activation function Relu is added after each fully connected layer. After obtaining the 128-dimensional feature, the last feature extraction (feature concentration) is performed to obtain a 6-dimensional feature. The 6-dimensional feature is used to represent the relative posture of the two input sample images.
[0118] In the process of training the pose estimation model, two adjacent sample images and the corresponding sample relative poses are input into the input layer of the initialization estimation model, and the convolution layer, activation function layer, and pooling layer in the hidden layer are used for feature extraction, and the fully connected layer is used for classification and recognition to determine the probability of each candidate relative pose corresponding to the two adjacent sample images; the output layer is used to select the candidate relative pose corresponding to the maximum value of each probability as the output relative pose.
[0119] It should be noted that, by utilizing the learning ability of convolutional neural networks for image features, higher generalization ability and robustness can be obtained under the premise of having a large number of training samples, which is conducive to the migration of pose estimation models to different environments, improving the robustness of the trained pose estimation model while obtaining good accuracy; and the pose estimation model is trained by deep learning using a convolutional neural network, and the pose estimation model is used to determine the estimated relative pose corresponding to the image to be processed, and then the estimated motion trajectory of the target mobile robot is determined, and the operation method is more convenient; in addition, in this embodiment, an end-to-end training and learning system framework is selected. Compared with the traditional visual odometer calculation method, the process of fine-tuning parameters in each module is omitted, thereby improving the efficiency of training the pose estimation model and greatly improving the efficiency of the motion trajectory estimation method of the mobile robot based on the visual odometer.
[0120] Based on the above embodiments, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment,
[0121] The process of determining the estimated absolute pose of each image to be processed according to each estimated relative pose includes:
[0122] A plurality of estimated relative poses are used to perform matrix transformation to obtain an estimated absolute pose corresponding to each image to be processed.
[0123] It should be noted that, in this embodiment, the estimated absolute pose corresponding to the image to be processed is determined by performing matrix transformation on the estimated relative pose; the spatial position and rotation angle in each estimated absolute pose are determined, and the corresponding estimated absolute poses are arranged in a corresponding order according to the chronological order of the images to be processed to obtain the estimated motion trajectory.
[0124] It can be seen that according to the method of this embodiment, the corresponding estimated absolute pose can be determined conveniently and accurately based on the estimated relative pose, and then the corresponding estimated motion trajectory can be determined based on the estimated absolute pose.
[0125] It should be understood that, although the steps in each flow chart involved in the above-described embodiment are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a portion of the steps in each flow chart involved in the above-described embodiment may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0126] In one embodiment, Figure 3 As shown, a motion trajectory estimation device for a mobile robot is provided, comprising: an acquisition module 302, an output module 304, a first determination module 306 and a second determination module 308, wherein:
[0127] An acquisition module 302 is used to acquire continuous images to be processed during the movement of the target mobile robot;
[0128] An output module 304 is used to input the continuous images to be processed into a pre-trained pose estimation model, and use the pose estimation model to output the estimated relative poses corresponding to each adjacent image to be processed;
[0129] A first determination module 306, configured to determine an estimated absolute pose of each image to be processed according to each estimated relative pose;
[0130] The second determination module 308 is used to determine the estimated motion trajectory of the target mobile robot using the estimated absolute poses.
[0131] A motion trajectory estimation device for a mobile robot provided by an embodiment of the present invention has the same beneficial effects as the motion trajectory estimation method for a mobile robot described above.
[0132] As a preferred embodiment, the output module includes
[0133] An acquisition submodule is used to acquire sample images collected by the target mobile robot;
[0134] The first determination submodule is used to determine the sample absolute pose corresponding to each sample image, and determine the sample relative pose of two adjacent sample images according to the two adjacent sample absolute poses;
[0135] The input submodule is used to input sample images and sample relative poses into the deep neural network for learning and training to obtain a pose estimation model.
[0136] As a preferred implementation, the first determination submodule includes:
[0137] A first determining unit is used to determine a first sample image from the sample images, obtain a marking operation of the user object on the first sample image, and determine a first sample absolute position and posture of the first sample image;
[0138] A second determining unit, used for determining images other than the first sample images in the sample images as second sample images, and calculating second sample absolute poses corresponding to each second sample image according to the first sample images and the first sample absolute poses;
[0139] A third determining unit is used to arrange the first sample absolute posture and the second sample absolute posture in time sequence to obtain the sample absolute postures arranged in time sequence;
[0140] The fourth determining unit is used to determine the relative pose of the sample according to the absolute poses of two adjacent samples.
[0141] As a preferred implementation, the input submodule includes:
[0142] A setting unit, used to set initialization parameters for the deep neural network and obtain an initialization estimation model;
[0143] An input unit, used to input two adjacent sample images and corresponding sample relative poses into an initialization estimation model, and use the initialization estimation model to output an output relative pose corresponding to the currently input sample image;
[0144] The optimization unit is used to adjust the model parameters of the initialization model according to the error value if the error value between the output relative pose and the sample relative pose exceeds the expected error range, and call the output unit until the error value is within the expected error range, thereby terminating the training and obtaining the pose estimation model.
[0145] As a preferred implementation, if the error value between the output relative pose and the sample relative pose exceeds the expected error range, the optimization unit includes:
[0146] A first calculation subunit is used to calculate the optimal network parameters using a network error optimization function according to the error value between the output relative posture and the sample relative posture;
[0147] The optimization subunit is used to adjust the model parameters of the initialization model using the optimized network parameters.
[0148] As a preferred implementation, the fourth determining unit includes:
[0149] A determination subunit is used to determine the relative displacement data and relative rotation angle of the absolute positions of two adjacent samples; wherein the relative displacement data includes the moving distance of the target mobile robot along the X, Y, and Z axes of the rectangular coordinate system, and the relative rotation angle represents the rotation angle of the target mobile robot around the X, Y, and Z axes of the rectangular coordinate system;
[0150] The second calculation subunit is used to determine the relative position and posture of the sample according to the relative displacement data and the relative rotation angle.
[0151] As a preferred implementation, the first determination module includes:
[0152] The second determination submodule is used to perform matrix transformation using multiple estimated relative poses to obtain estimated absolute poses corresponding to each image to be processed.
[0153] For the specific definition of the motion trajectory estimation device of the mobile robot, please refer to the definition of the motion trajectory estimation method of the mobile robot above, which will not be repeated here. Each module in the above-mentioned motion trajectory estimation device of the mobile robot 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.
[0154] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0155] Acquire continuous images to be processed during the movement of the target mobile robot;
[0156] Inputting continuous images to be processed into a pre-trained pose estimation model, and using the pose estimation model to output estimated relative poses corresponding to each adjacent image to be processed;
[0157] Determine the estimated absolute pose of each image to be processed according to each estimated relative pose;
[0158] The estimated motion trajectory of the target mobile robot is determined using the estimated absolute poses.
[0159] A computer-readable storage medium provided by an embodiment of the present invention has the same beneficial effects as the above-mentioned method for estimating the motion trajectory of a mobile robot.
[0160] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0161] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0162] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for estimating the motion trajectory of a mobile robot, characterized in that: The method comprises: Acquire continuous images to be processed during the movement of the target mobile robot; Get a sample image; Determine a first sample image from the sample images, obtain a marking operation of the user object on the first sample image, and determine a first sample absolute pose of the first sample image; Determine images other than the first sample images in the sample images as second sample images, and calculate second sample absolute poses corresponding to each of the second sample images according to the first sample images and the first sample absolute poses; Arrange the first sample absolute posture and the second sample absolute posture in time sequence to obtain the sample absolute postures arranged in time sequence; Determine the relative displacement data and relative rotation angle of the two adjacent sample absolute postures; wherein the relative displacement data includes the moving distance of the target mobile robot along the rectangular coordinate system X, Y, Z axis, and the relative rotation angle represents the angle of rotation of the target mobile robot around the rectangular coordinate system X, Y, Z axis; Determine the relative position and posture of the sample according to the relative displacement data and the relative rotation angle; Inputting the sample image and the relative pose of the sample into a deep neural network for learning and training to obtain a pose estimation model; Inputting the continuous images to be processed into a pre-trained pose estimation model, and using the pose estimation model to output estimated relative poses corresponding to each adjacent image to be processed; Determining the estimated absolute pose of each of the images to be processed according to each of the estimated relative poses; The estimated motion trajectory of the target mobile robot is determined using each of the estimated absolute poses.
2. The method according to claim 1, characterized in that The process of inputting the sample image and the sample relative pose into a deep neural network for learning and training to obtain a pose estimation model includes: Set initialization parameters for the deep neural network and obtain an initial estimation model; Inputting two adjacent sample images and the corresponding sample relative poses into the initialization estimation model, and using the initialization estimation model to output an output relative pose corresponding to the currently input sample image; If the error value between the output relative pose and the sample relative pose exceeds the expected error range, the model parameters of the initialization estimation model are adjusted according to the error value, and the step of inputting two adjacent sample images and the corresponding sample relative poses into the initialization estimation model is entered until the error value is within the expected error range. The training is terminated to obtain the pose estimation model.
3. The method according to claim 2, characterized in that The process of adjusting the model parameters of the initialization estimation model according to the error value if the error value between the output relative pose and the sample relative pose exceeds the expected error range includes: If the error value between the output relative pose and the sample relative pose exceeds the expected error range, the optimal network parameters are calculated using a network error optimization function according to the error value between the output relative pose and the sample relative pose; The model parameters of the initialization estimation model are adjusted using the optimized network parameters.
4. The method according to claim 2, characterized in that: The deep neural network is a convolutional neural network; wherein the network framework of the convolutional neural network includes an input layer, a hidden layer and an output layer, and the hidden layer includes a convolutional layer, an activation function layer, a pooling layer and a fully connected layer; The process of inputting two adjacent sample images and the corresponding sample relative poses into the initialization estimation model, and using the initialization estimation model to output an output relative pose corresponding to the currently input sample image, comprises: Inputting two adjacent sample images and the corresponding sample relative poses into the input layer of the initialization estimation model, and using the convolution layer, the activation function layer, and the pooling layer in the hidden layer to perform feature extraction, and using the fully connected layer to perform classification and recognition, to determine the probability that the two adjacent sample images correspond to each candidate relative pose; The output layer is used to select the candidate relative posture corresponding to the maximum value of each of the probabilities as the output relative posture.
5. The method according to any one of claims 1 to 4, characterized in that: The process of determining the estimated absolute pose of each of the images to be processed according to each of the estimated relative poses includes: A matrix transformation is performed using the plurality of estimated relative postures to obtain an estimated absolute posture corresponding to each of the images to be processed.
6. A motion trajectory estimation device for a mobile robot, characterized in that: The device comprises: An acquisition module is used to acquire continuous images to be processed during the movement of the target mobile robot; The output module is used to obtain sample images; determine a first sample image from the sample images, obtain a marking operation of the user object on the first sample image, and determine a first sample absolute pose of the first sample image; determine images other than the first sample image in the sample images as second sample images, and calculate second sample absolute poses corresponding to each second sample image according to the first sample image and the first sample absolute pose; arrange the first sample absolute pose and the second sample absolute pose in time sequence to obtain the sample absolute poses arranged in time sequence; determine the relative position of two adjacent sample absolute poses The displacement data and the relative rotation angle are compared; wherein the relative displacement data includes the moving distance of the target mobile robot along the rectangular coordinate system X, Y, and Z axes, and the relative rotation angle represents the angle of rotation of the target mobile robot around the rectangular coordinate system X, Y, and Z axes; the relative position and posture of the sample are determined according to the relative displacement data and the relative rotation angle; the sample image and the sample relative position and posture are input into a deep neural network for learning and training to obtain a position and posture estimation model; the continuous images to be processed are input into the pre-trained position and posture estimation model, and the position and posture estimation model is used to output the estimated relative position and posture corresponding to each adjacent image to be processed; A first determination module, used to determine the estimated absolute pose of each of the images to be processed according to each of the estimated relative poses; The second determination module is used to determine the estimated motion trajectory of the target mobile robot using each of the estimated absolute postures.
7. The device according to claim 6, characterized in that The output module includes an input submodule, and the input submodule includes: A setting unit, used to set initialization parameters for the deep neural network and obtain an initialization estimation model; An input unit, used for inputting two adjacent sample images and corresponding sample relative poses into the initialization estimation model, and using the initialization estimation model to output an output relative pose corresponding to the currently input sample image; The optimization unit is used to adjust the model parameters of the initialization estimation model according to the error value if the error value between the output relative pose and the sample relative pose exceeds the expected error range, and enter the step of inputting two adjacent sample images and the corresponding sample relative poses into the initialization estimation model until the error value is within the expected error range, thereby terminating the training and obtaining the pose estimation model.
8. The device according to claim 7, characterized in that The optimization unit is specifically used for: If the error value between the output relative pose and the sample relative pose exceeds the expected error range, the optimal network parameters are calculated using a network error optimization function according to the error value between the output relative pose and the sample relative pose; The model parameters of the initialization estimation model are adjusted using the optimized network parameters.
9. The device according to claim 7, characterized in that The deep neural network is a convolutional neural network; wherein the network framework of the convolutional neural network includes an input layer, a hidden layer and an output layer, wherein the hidden layer includes a convolutional layer, an activation function layer, a pooling layer and a fully connected layer; the input unit is specifically used for: Inputting two adjacent sample images and the corresponding sample relative poses into the input layer of the initialization estimation model, and using the convolution layer, the activation function layer, and the pooling layer in the hidden layer to perform feature extraction, and using the fully connected layer to perform classification and recognition, to determine the probability that the two adjacent sample images correspond to each candidate relative pose; The output layer is used to select the candidate relative posture corresponding to the maximum value of each of the probabilities as the output relative posture.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
